Repository navigation
Patching APEX modules #612
Replies: 2 comments 13 replies
|
Hmm, I'm not familiar with Android's apex images at all, but the steps you listed seem fine to me. Are you able to grab a logcat early enough to see the logs for It might be worth changing just one thing at a time. Eg. just re-sign the outer apex file with Also, at least on my device, it seems that my I'm not sure if that's necessary. I also took a look at: They have nothing related to checksums or signatures, so I don't think they need to be modified. |
Unfortunately, no. It crashes before adb is even available. I injected adb vendor keys so I shouldn't even need to manually authorize but it's just not available. Is there another way to extract logs?
I do have that same record in I was able to get it to boot by resigning the apex module with apksigner (but I assume that it only really even matters for updating modules, not initializing them), but resigning the payload image even without modifying the contents still results in a crash. I'm curious whether this is a quirk of GrapheneOS - the apex imagmes I've seen are all signed with the same key (edit: I found this to be the same avb key shipped in the install zip) even though the docs say to use separate signing keys for each module, so perhaps they enforce this key somewhere? It wouldn't be surprising as they do the same thing for kernel modules. Also, separate question, is this null-terminator in the [entries.xattrs]
"security.selinux" = 'u:object_r:system_file:s0\0' |
Uh oh!
There was an error while loading. Please reload this page.
Hello!
I've been trying to patch the
com.android.conscryptapex module for a while now and can't seem to get it to boot unfortunately. As per the docs, I'm vbmeta signing the innerapex_payload.img, and then signing the entire apex module zip with apksigner, v3 signing scheme.While I've verified that resigning the apex module with apksigner works fine, I cannot seem to be able to resign the apex payload without triggering a crash (kicks me back to the bootloader and marks the slot as unbootable). My process for doing this is as such (I'm doing this manually for now until I can verify that it works):
system.imgfrom OTA with avbroot/system/etc/apex/com.android.conscrypt.apex(relevant files:apex_payload.imgandapex_pubkey)/etcand a corresponding entry tofs_metadata.toml(as a placeholder, the end goal is to add a certificate tocacerts)apex_payload.imgwith a key and--forceto force vbmeta signingavbroot avb encode-avband overwriteapex_pubkeywith itavbroot avb verifyzipalignapex module to 4096 bytesapksignerwith only v3 signing enabledBy doing this, the crash occurs just after the boot animation starts. I am not sure what I am doing wrong here. Do you happen to know whether the key also has to be patched into somewhere else? There's some sort of keys at
/system/etc/security/fsveritybut I am unsure of what they are for.All reactions