Downgrade an apk with different signature, without root
0
votes
0
answers
2011
views
I'm trying to do the following things to an Android app without root access:
1. De-compile the apk with
adb d xxx.apk
(done)
2. Modify some files in /res/xml/
(done)
3. Re-build the apk with adb b xxx
(done)
4. Sign the apk (keytool
+ zipalign
+ apksigner
)
5. Downgrade with adb push xxx.apk /data/local/tmp/
& adb shell pm install -r -d /data/local/tmp/xxx.apk
I'm able to sign the apk with my own keypair, but I don't want to uninstall & re-install the apk to install the modified version -- I want to downgrade the original app to preserve the data.
However, step 5 produces:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package xxx signatures do not match newer version; ignoring!]
It seems like downgrade app's old & new version must have the same signature. Is there anyway to bypass this check, or solve this situation?
I read this question: https://android.stackexchange.com/questions/132374/how-do-i-force-reinstallation-of-an-apk-with-different-signature-on-rooted-andro
... but it requires root access.
Asked by TaihouKai
(101 rep)
Nov 20, 2023, 04:20 AM