1

I have re-signed all system apps of LineageOS with my own key and have replaced them all before the first boot. LineageOS boots normally but then all re-signed system apps crash with an error like:

SystemUI stopped, Settings stopped.

The screen stays dark. It seems that the re-signed system apps are unusable. Maybe I made some mistake or LineageOS has some anti-tampering check implemented?

What i have done: I opened all system apps with the winrar zip manager and removed the CERT.RSA and CERT.SF files in each META INF folder and deleted all the names and SHA-256 digest entries in all MF manifest-files. Also all other apk for example, in the framework folder, like the framework-res.apk file, I edited them like this. Then I created a keystore with Key, using the Java keytool, I think this is self-signed. Then I signed all APKs with the Uber Apk signet tool and successfully performed zip-aligning. Then I flashed Lineage OS with TWRP on the phone. Before the first boot, I deleted the system apks with the TWRP file manager and replaced them with my self-signed ones. Uber-Sign-Tool: https://github.com/patrickfav/uber-apk-signer

Picture of the error: https://imgur.com/a/hAwsJuO

Thanks for your help

Mike the android-noob

That's why I did that: https://www.reddit.com/r/LineageOS/comments/9z728h/how_to_change_frameworkresapk_without_bootloop/

UPDATE (thx Zillinium): I have now adapted with the TWRP terminal chmod with the following commands: Before I adapted chmod I checked everything with ls -l. Then I adjusted everything as it is right in the system so for me: chmod 644 for system-apk's and the apk-folders and chmod 755 for the /system/app and /system/priv-app folders. Now I'm stuck again in BOOTLOOP when i edit chmod :(((

The chown-Settings were already on root. Also i tried chown 0.0 -R and chcon u: object_r: system_file: s0 (see also installing apk in /system/app with android 5.1 or higher (simple adb push doesn't work anynore) push does) I stuck again in BOOTLOOP when i edit chmod :(((

There are no Odex files available.

Why i can edit without problems the AndroidManifest.xml from all Systemapps if i keep the original signature except at the framework-res.apk. Does anyone know why it dont work with the framework-res.apk?? The only way i find which works is to turn off signature verification in the whole system, but this is bad for the security.

  • Did you chmod and chown system/app recursively to fix permissions and ownership. --- If so.. Is the system deodexed or odexed, the odex files could be mismatched with the apks... Also.. I usually don't sign system apps at all, i find that they aren't usually signed anyway... i think signatures mainly matter for DATA apps, and apps that use shared userID's – Gadget Guru Dec 2 '18 at 1:45
  • Hmm, not sure if it still is the case in recent Android versions, but at least in Nougat what I did is keeping the original signature while modifying framework-res. apktool has the -c option for that, though yes you will lose AndroidManifest.xml changes, so it might not work for you. What I want to say is that the OS likely does check for that signature. – Andy Yan Dec 2 '18 at 2:21
  • I edited the Post – andromade7 Dec 5 '18 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.