Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

[BUG]32 bit support on Android 13

Open qyzhaojinxi opened this issue 1 year ago • 12 comments

32 bit apk crash on android 13 64 bit device. apk work well before modify it. It worked well with apktool 2.7.1. And this apk still works well on android 12 device or 32 bit device.

Information

  1. Apktool Version (apktool -version) -2.8.1
  2. Operating System (Mac, Linux, Windows) -Mac
  3. APK From? (Playstore, ROM, Other) -HappyMod
  4. Java Version (java --version) -19.0.2

Stacktrace/Logcat

dlopen failed: can't read file "/data/app/~~bayU3QjfGSwG_I2f0QmIKQ==/com.xxx.xxx-Z_Uu1WQmYVIC-LWAsFakow==/lib/arm/xxx.so": Timer expired

Steps to Reproduce

  1. apktool d xxx.apk

  2. change some code

3.apktool b

4.aligin and resign

APK

If this APK can be freely shared, please upload/attach a link to it. any 32 bit apk

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? -----yes, it didn't crash
  2. If you are trying to install a modified apk, did you resign it?--------yes
  3. Are you using the latest apktool version?-------yes,2.7.1 worked well but 2.8.1 not

qyzhaojinxi avatar Aug 24 '23 09:08 qyzhaojinxi

Sorry I can't glean anything from this report to know. We've made lots of regression fixes in the upcoming 2.8.2, so perhaps that will help.

Could you try a SNAPSHOT build from here? https://github.com/iBotPeaches/Apktool/suites/15416580029/artifacts/880342903

iBotPeaches avatar Aug 24 '23 12:08 iBotPeaches

ok, I will test it.

qyzhaojinxi avatar Aug 25 '23 02:08 qyzhaojinxi

Hi,this version still has the same problem. 32 bit app (only contain armeabi-v7a) worked well on android13 device of 64 bit cpu before apktool decompile and repackage. But once apktool deal with it. it will crash wth this error on 64bit android 13 but work well on android 12 or lower:

dlopen failed: can't read file "/data/app/~~bayU3QjfGSwG_I2f0QmIKQ==/com.xxx.xxx-Z_Uu1WQmYVIC-LWAsFakow==/lib/arm/xxx.so": Timer expired

I don't know if this has anything to do with Google starting to phase out 32-bit apps on Android 13 and 14 devices.

qyzhaojinxi avatar Aug 25 '23 03:08 qyzhaojinxi

Sorry I'm afraid I'm not sure. We did update the internal aapt/aapt2 binaries between 2.7.1 and 2.8.1, but I'm not really going to revert that or attempt to bisect 20-30k commits.

I'll leave this open for a few weeks in case something comes to mind.

iBotPeaches avatar Aug 25 '23 10:08 iBotPeaches

Mine is giving 32 bit support is deprecated

frederickabrah avatar Jan 17 '24 00:01 frederickabrah

Mine is giving 32 bit support is deprecated

32bit is deprecated. AOSP is dropping that support more and more and I follow the restrictions that AOSP imposes on the aapt(2) binaries.

iBotPeaches avatar Jan 17 '24 11:01 iBotPeaches

But there are still a lot of 32bit apps and devices. The recompiled apk will stuck on app start with armeabi-v7a devices

qyzhaojinxi avatar Jan 19 '24 07:01 qyzhaojinxi

But there are still a lot of 32bit apps and devices. The recompiled apk will stuck on app start with armeabi-v7a devices

I don't think aapt/aapt2 dropping 32bit compatibility affects the native libraries of the respective applications. Either way even if it did - I just follow AOSP guidelines.

iBotPeaches avatar Jan 20 '24 17:01 iBotPeaches

I get this error. what may cause this?

dlopen failed: can't read file "/data/app/~~bayU3QjfGSwG_I2f0QmIKQ==/com.xxx.xxx-Z_Uu1WQmYVIC-LWAsFakow==/lib/arm/xxx.so": Timer expired

qyzhaojinxi avatar Jan 22 '24 02:01 qyzhaojinxi

It's weird that I still get this error and app crash on iqoo12(android14,cpu 870) after repacking on my mac(intel). But the apk work well on most android devices. My friend do the same thing about the apk on another mac (m1) and the apk also work on the iqoo device. I try to change different versions of jdk but not work. I really need help.

qyzhaojinxi avatar Jul 02 '24 09:07 qyzhaojinxi

@frederickabrah do you have any progress?

qyzhaojinxi avatar Jul 02 '24 09:07 qyzhaojinxi