0

Hi I'm using a stock LineageOS rom specifically android Pie (LineageOS 16) and I've been modifying system applications, such as SystemUI, framework, gallery, sms etc. before (on samsung ROMS) and so far I haven't got any problem aside from forgetting to set the correct permissions on each apk.

Though when I switched to LineageOS, it seems that I can't simply modify the framework and systemui. I tried the usual way of decompiling and compiling an apk using apktool, then, to sign the apk with its previous/original key, I use the files from the "original" folder in the decompiled apk then build the apk again. Somehow, when I try to replace the apk in my phone, set the correct permissions, and reboot, it will result to bootloop.

Did I miss anything? Do i need to sign it with another key? Do I need to disable signature-check on my Android?

  • When you say, "to sign the apk with its previous/original key, I use the files from the 'original' folder," do you mean you just copy the original signature? The signature depends on the contents of the files in the APK, so copying the signature from the unmodified APK won't work. – Dan Hulme Dec 28 '18 at 13:39
  • Oh so that's how it works? I always use that method everytime I just theme an application (wether its a system app or a market app) and not modifying the AndroidManifest.xml since I read from other forums that in order for the system app to be recognized, it needs to be signed with its original key because Android verifies the signature if it is the same with the framework. If that's the case then do I need to sign systemui and framework with any key that I can use? – Relinquish Sashimi Dec 28 '18 at 14:14
  • You need to sign it with the same key that was used to sign the ROM image. Usually you can only obtain this by compiling and signing the ROM yourself from source. – Dan Hulme Dec 28 '18 at 14:40
0

Signing won't work by just copying the files from the original folder. You could try building the ROM yourself then you'd have the signatures, but I believe there's a much better solution that I've described below.

If you're modifying things that are in res/ and assets/ overlays are most definitely the way to go. They don't require any signature tricks and they can be easily added/removed without you having to even touch the SystemUI or framework. You can use cmd overlay to enable and disable them easily. Building the overlays isn't really easy, so you'd have to get some knowledge related to aapt in order to understand how to build them, or you could use a theme engine like Substratum. There's a template that you can modify and you can manage the overlays within the app.

  • I don't really know anything much about building android applications but I do understand some of their contents and how they work, and I'm not sure about aapt, since I haven't used that one yet so I'll try to learn how to use it and yes I only modify the "res" and "assets" folder whenever I theme an application since I only change some drawables/icons/layout/strings of the app. By building an overlay means creating another app that "themes" its target app? Sorry for the newb questions. – Relinquish Sashimi Dec 29 '18 at 15:40
0

If you're EXTREMELY SURE you know what you're doing, and you are an experienced APK Modder.

Try using the Application LuckyPatcher

I'm sure you'll find it if you look around in your own time.

This software can disable package signature verification and patch your entire system to allow such things as downgrading software by disabling the version check etc... This software is designed by hacker's as far as I know, so please do not blame me for any problems.

This information is provided as-is without any guarantees, by using this information you agree to take full responsibility and/or liability for any damages, injury or any other consequences that may result from using this information.

You can try not signing the apk at all, this has worked many times for many people. You need to remove all signature parts in the APK.

  • How Lucky! I have it in my phone! Just kidding but I'll try using that method. Well I'm not really an App Developer or something I just simply want to modify an application to have a desired look of it on the user interface by modifying its resources. I'm not into smali or java or anything that is related to complex programming of an application. – Relinquish Sashimi Dec 29 '18 at 16:00
  • In my experience, signing the APK is what caused issue's... on most systems I've looked at, the apps aren't signed in system .. only for user installations is it necessary to have the correct signature... Systemless root won't allow system modifications sometimes... I just remove the signature all together and zip everything back together, then rename the zip file to . APK .. – Gadget Guru Dec 29 '18 at 22:35
  • I personally don't use APK mods anymore, I use Xposed and Gravity Box to do my UI customizations – Gadget Guru Dec 29 '18 at 22:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.