Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

The recompiled APK can not be installed

Open YiMing2021Nick opened this issue 3 years ago • 5 comments

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

  1. Apktool Version (apktool -version) - 2.5.0
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - Other

Steps to Reproduce

  1. java -jar apktool_2.5.0.jar d Mybase.apk

  2. 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...

  3. Sign the Newbase.apk with autosign tool.

  4. Copy the Newbase.apk to mobile and install.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? -- YES
  2. If you are trying to install a modified apk, did you resign it? -- Nothing changed and resigned.
  3. Are you using the latest apktool version? -- 2.5.0

YiMing2021Nick avatar Jul 07 '21 16:07 YiMing2021Nick

Can you take a look through https://github.com/iBotPeaches/Apktool/issues/1626 and see if that resolves your issue?

iBotPeaches avatar Jul 09 '21 10:07 iBotPeaches

@YiMing2021Nick apk file not constains native librares for your phone, or lib compressed

MrIkso avatar Jul 09 '21 11:07 MrIkso

Can you take a look through #1626 and see if that resolves your issue?

Thanks for your reference, it works now.

YiMing2021Nick avatar Jul 09 '21 13:07 YiMing2021Nick

I had the same issue. Using the referenced zipalign argument fixed it. I think this can be closed.

metronidazole avatar Sep 11 '21 03:09 metronidazole

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"

89z avatar Oct 17 '21 15:10 89z