Friday, December 29, 2017

rom flashing - Can not re-sign Android system app without app crashing (using LineageOS)


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.




No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...