I am working on an automatic app updating solution for devices (LG p509 - Optimus 1) which we deploy to our customers. We have control of these devices and currently install a custom kernel on them (but not a full custom ROM). Since we are trying to do auto-updating of our app on the device, we need the system to be signed by a key which we control so we can sign our apps with the same key (to get the INSTALL_PACKAGES permission).
I have been having a few issues running AOSP builds on the device (using the LG released source for the device), and am trying to take a step back and evaluate our options. I have a few questions:
Any insight would be appreciated.
Ok, so we figured it out. I am not going to go into full detail (too much writing), but here is the basic gist for anyone who stumbles on this:
If you want change the key which the system is signed with, you need to do the following steps:
/system/
dir from the running phone.apk
files (from /system/app
and /system/framework
) to figure out which ones are signed by the same key as the framework-res.apk
. I used a modified version of the script linked here to figure out which APKs to sign./system/app
which share the signing key with framework-res.apk
are odexed, you need to de-odex them.framework-res.apk
and pack them in an update.zip
(google how to do that).On my specific device I had to resign both /system/framework/framework-res.apk
and /system/framework/lge-res.apk
from /system/framework
and also had to de-odex and sign 20 .apks
from the /system/app
folder in order to get everything running smoothly.