Apktool
Apktool copied to clipboard
The recompiled APK can not be installed
I got an APK file and tried to install on my mobile, everything is OK.
Then I used the Apktool decomiled it, and recompiled it back to APK without any changes. On the same mobile, the recompiled APK can not be installed.
After that, I tried to use the adb command to install this recompiled APK on an simulator, it said
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
But the original APK file works well. Any help on this? Thank you and best regards.
Information
-
Apktool Version (
apktool -version
) - 2.5.0 - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - Other
Steps to Reproduce
-
java -jar apktool_2.5.0.jar d Mybase.apk
-
java -jar ..\apktool_2.5.0.jar b Mybase -o Newbase.apk --use-aapt2 I: Using Apktool 2.5.0 I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... I: Copying libs... (/lib) I: Copying libs... (/kotlin) I: Copying libs... (/META-INF/services) I: Building apk file... I: Copying unknown files/dir... I: Built apk...
-
Sign the Newbase.apk with autosign tool.
-
Copy the Newbase.apk to mobile and install.
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? -- YES - If you are trying to install a modified apk, did you resign it? -- Nothing changed and resigned.
- Are you using the latest apktool version? -- 2.5.0
Can you take a look through https://github.com/iBotPeaches/Apktool/issues/1626 and see if that resolves your issue?
@YiMing2021Nick apk file not constains native librares for your phone, or lib compressed
Can you take a look through #1626 and see if that resolves your issue?
Thanks for your reference, it works now.
I had the same issue. Using the referenced zipalign argument fixed it. I think this can be closed.
In my case, after running this:
java -jar apktool.jar d app.apk
You can then edit AndroidManifest.xml
. With the application
element, remove this attribute:
android:extractNativeLibs="false"