I'm trying to pull an APK file, modify it, then re-install to phone. I'm using adb, apktool and jarsigner. I'll call the APK file, 1.arm64_v8a.apk.
adb pull /data/ .. /1.arm64_v8a.apk
to pull the file from android to my computer.apktool decode 1.arm64_v8a.apk -o 1.arm64_v8a
to decompress the APKapktool build --use-aapt 1.arm64_v8a -o 1.arm64_v8a.apk
to build a new APK.- sign apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore 1.arm64_v8a.apk mykey
- Install APK to phone
adb install 1.arm64_v8a.apk
which produces:Failure [INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2]