Question

I am trying to modify an APK which came with my official firmware.

Actually only some resources should be modified (sounds should be replaced with silent files).

I moved APK and ODEX to backup folder, unzipped APK on a PC, modified files, zipped APK with 7Zip again and placed it into /system/app folder with corresponding permissions. After a reboot Camera application disappeared from everywhere.

Ok, I copied ODEX file back to /system/app, rebooted, and application appeared, but trying to run it makes it crash.

APK file has no DEX inside.

I thought that ODEX file contains code only and shouldn't be re-created.

What I was doing wrong and how to do it right?

Was it helpful?

Solution

You can't modify apk's without signing them again. The Android system will notice that the apk has been tampered with and refuse to load it. You could sign it with your own key, but then your signature wont match the official signature for that package name and that will prevent you from getting any updates for that application as long as your modified apk is installed. Also if that application is relying on being signed with the same certificates as other applications from the same manufacturer it wont work correctly.

You can read about signing android applications in the official documentation

Why do you want to do this?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top