Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upApktool building not working on 2.4.0 with Java 8 32bit #2141
Comments
This comment has been minimized.
This comment has been minimized.
|
Installing the 64 bit version of java allowed me to fix the problem. |
This comment has been minimized.
This comment has been minimized.
|
@Mimi8298 Yep, that's it, fixed it for me. Thanks! |
This comment has been minimized.
This comment has been minimized.
|
change java 8 to 64bit also work for me . |
This comment has been minimized.
This comment has been minimized.
|
@weathondev 32bit libraries exist for Windows, so this doesn't appear to be intended. I might just remove all 32bit and prevent use if still on 32 bit. That might solve these issues. |
This comment has been minimized.
This comment has been minimized.
|
Yeah this doesn't make sense. The bitness of java must be misleading the system to selecting the wrong binary for aapt. IE - Users must be using 32bit Java on 64bit OS, leading Apktool to selecting a 32bit aapt binary. So maybe complete removal of 32bit from Apktool would be best solution.
Could try executing those on your system to see if they load (just run in Terminal - Windows only). Then report back with OS bitness and Java bitness. |
This comment has been minimized.
This comment has been minimized.
|
Thank you everyone for the heads up. I've finally confirmed with 32 bit aapt binaries on both aapt1/aapt2.
I will investigate. |
This comment has been minimized.
This comment has been minimized.
|
I am dropping Windows 32 bit support. I cannot figure this out how to statically compile libwinpthread into aapt1 & 2. Outside my knowledge gap. I'll leave this for a few days for someone to step up if interested. Otherwise removal of Windows 32 bit. |
This comment has been minimized.
This comment has been minimized.
|
my solve 2105 |
This comment has been minimized.
This comment has been minimized.
|
@iBotPeaches , Is APKTool running a modified aapt ? Because I am on W32 using APKTool 2.4.0 with modified aapt statistically linked to libwinpthread-1, still I cant compile the resources. |
This comment has been minimized.
This comment has been minimized.
|
@parind - Yes we use a custom aapt binary. Custom options are disabled when leveraged with |
This comment has been minimized.
This comment has been minimized.
|
Okay. So I guess that is what doesn't let me compile using a prebuilt aapt. And what are the modifications you are using to build aapt ? I could try to build with linking the libwinpthread. |
This comment has been minimized.
This comment has been minimized.
|
@parind I've been working on this master branch here - https://github.com/iBotPeaches/platform_frameworks_base/commits/master If you are able to figure out the linking with 32bit builds for libwinpthread, that would be very helpful! I was planning on removing 32bit support since it didn't seem possible in my limited build knowledge |
This comment has been minimized.
This comment has been minimized.
|
Sure, I will do some tests, and push commits, if successful. |
This comment has been minimized.
This comment has been minimized.
|
iBotPeaches, do you have a makefile for aapt alone ? The blueprint files require ndk, and I am using mingw64 to compile. |
This comment has been minimized.
This comment has been minimized.
|
@iBotPeaches Hey, I haven't got the time to look closely and perform changes to prevent libwinpthread-1, but found a temporary solution. The solution is to use the dll from mingw in a PATH env, and use apktool. It did allow me to compile the apk. I am attaching the dll from mingw. |
This comment has been minimized.
This comment has been minimized.
It works. Thanks a lot @parind |
This comment has been minimized.
This comment has been minimized.
|
It's totally strange, I am not able to pinpoint the problem yet. Found some similar situations on the web. It mostly happens when using cross-compile on Linux, this causes win64 to build correctly, but has win32 binary with a dependency on this dll. It might work, if mingw64 is used on windows to build with win32 threads instead of posix. I have yet to try this, but can't due to storage issues, as building aapt requires the whole android platform base and it's dependency. |
This comment has been minimized.
This comment has been minimized.
|
Thanks to Furniel, we have fixed 32bit binaries. I'll have a test release up later today to confirm for this ticket, then I'll merge them into master. |
Information
I tried decompiling and building multiple apks, on multiple machines (it works on some, on some it doesn't, all windows 10). It doesn't work (see stacktrace) with 2.4.0 but it works with 2.3.4...)
2.4.0) -Stacktrace/Logcat
Steps to Reproduce
apktool d "input.apk" -o "outputFolder"apktool b "outputFolder" -f -o "output.apk"Frameworks
default framework
APK
https://anonymousfiles.io/f9PSu1ez/
Questions to ask before submission
apktool d,apktool bwithout changing anything?Yes
n.a.
Yes