-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Several resources are missing (skipped) #3778
Comments
Well thats interesting. Thanks for the jadx research. Thankfully during a previous fix we already have the infrastructure to jump around the stream. I'll take this. |
Had some time this morning - made some good progress, but broke basically all the tests. Still results in this application skipping a ton of resources, but best I believe so far - that is correct.
|
Okay, PR up and should be fixed once merged.
|
Hi @iBotPeaches,
The amount of resources that were skipped has reduced a lot. However, it is still ignoring some which results in the recompiled .apk crashing at runtime. For instance, there are exactly 4 values found (and decoded) in res/values/bools.xml whereas WhatsApp is trying to access the 15th one. |
The only thing I can think of without going into research is we check for end of chunk prior to checking the resource. So lets say you hit the end of the chunk, but the offset for the resource was +1 or something - so its actually in range, but we were at end of the chunk and prematurely exited. It would be basically moving this code after the entryStart jumpTo - https://github.com/iBotPeaches/Apktool/blob/master/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java#L353-L360 |
Hi @iBotPeaches , |
actually we have same issue in latest Instagram Alfa builds too, idk why it happens but im sure it will be fixed in next version |
@mamiiblt It's actually not surprising as Instagram and WhatsApp are both developed by Meta. They certainly use the same tools for building. You should try the latest version of Apktool which was just released. |
Information
apktool -version
) - 2.11.0java --version
) - openjdk 17.0.13 2024-10-15Issue details
While decoding the resources on latest WhatsApp, APKTool is skipping several resources (such as strings) which makes the app unusable. I can load the original .apk file into jadx and it shows all strings without problems. However, APKTool can't. The new WhatsApp seems to contain unordered entries in the resource chunks which seems to require seeking backwards in the resources.arsc file. I think it is likely that this is the same issue here. See skylot/jadx#2343
Stacktrace/Logcat
Steps to Reproduce
apktool d base.apk -o ./WhatsApp --no-src
apktool b ./WhatsApp --use-aapt2
APK
Choose
arm64-v8a
variant here and extractbase.apk
: APKMirrorThe text was updated successfully, but these errors were encountered: