Do you know if it possible to edit compiled code in apk package?
I tried followed steps:
- Unpack xapk file by command:
unzip my-app.xapk
(I have there multiple apk and I need to modify one of them, due to bug fixing...) - Unpack one of the apk:
apktool d my-component.apk
- Modify one of the smali files
- Build apk:
apktool b ./my-component -o ./my-component.apk
- generate cert:
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
- sign all unpacked from xapk files:
find ./ -name "*.apk" -exec apksigner sign --ks my-release-key.jks --ks-pass pass:123456 --out {} {} \;
- install all component:
adb install-multiple -r my-component.apk another-component.apk....
After all these steps my application works partially and I got some errors in logcat:
ArtManagerService: Failed to prepare profile for my-package:/data/app/~~SeVk-WOasdas3A-hIPw==/my-component-TwgvYqasd_uL4r2tgdBZ-og==/base.apk