-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Decompiling apk file its extracted folders missing -v4 #928
Comments
I've added test apk, since an apk was not provided - iBotPeaches/TestApks@9c40d37 Yes, I duplicate the problem. |
Looks like after fixing of this bug we have new issue, apktool adds version qualifiers to folders that don't have them. Files for test: |
@Furniel I'll double check if my regression caused this, but I believe this is aapt. Check my response here: #934 (comment) |
@iBotPeaches I confirm that. In my tests -v4 qualifier is being added to all decompiled values folders, even if the original apk doesn't have them. |
According to the files uploaded to test, there is no problem. Look at the output
Then you can see after decode.
(Stripped |
Thanks for the details. I see now, though was reluctant as I've always been trusting What confuses me is that we have an extensive application in the unit-test pool that has over 40 resource folders, only one of which has a version qualifier (
Now unit-tests go Without the change I have any qualifier that has Does reverting my change fix the above problem? Not sure yet. Obviously there is a problem though, so re-opening. |
Okay, just talking through words here. So newer So currently, apktool decodes this properly as in the Now, if we examine the code we have currently. (apktool)
(aosp)
There is a difference. The All of this is irrelevant in the greater picture that apktool should decode resources to what they literally are. If the qualifier is However in the instance of that, the |
The original Gmail 5.4 apk has -v4 qualifiers which correctly decompile into the folder for editing and remain intact through recompile so not this problem. |
Using an old version of APKtool 2.0.0 that I had, the -v4 qualifiers disappeared during decompile |
Okay, I tracked this problem down (again?) I have a LINUX rebuild aapt here - http://connortumbleson.com/apktool/aapt_8-8-2015/aapt Anyone willing to confirm my findings before I build a windows/mac aapt and include in master? Basically aapt is trying to make the apks "future compatible", by doing all these tweaks which cause this. Since apktool is suppose to simply rebuild to match the original apk as close as possible, it made sense to skip (no-op) these functions. |
Okay, I skip all In 2.0.2 the apk will not add any version qualifiers. It will maintain whatever the original apk was. |
Then that was the way the original apk was. Please open a new bug report, following template and apk provided if you believe regression occurred. |
Apktool v2.0.0 Bug: Decompiling apk file in LG G2 Lollipop rom its extracted folders missing -v4 (Ex: drawable-xxhdpi-v4 extract to drawable-xxhdpi)
The text was updated successfully, but these errors were encountered: