-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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]Issues repacking res it gives issues with apktool_dummy in integers.xml and dimens.xml #2462
Comments
I got a different crash, then tried 2 and got something else. aapt2
aapt1
Not sure yet. |
Many Dummy files are created when decompil/recompil in dimens, strings and integers. Style dobles are normals, just remove it from styles and done. But for Dummy files lines, its crazy, there are Many, maybe more than 100 and also created in public.xml Here some of theses : W: C:\Users\admin\Desktop\TickleMyAndroid_WorkArea2_working\framework-res.apk\res\values\dimens.xml:1343: error: Error: String types not allowed (at 'APKTOOL_DUMMY_242' with value ''). <public type="attr" name="APKTOOL_DUMMY_5f1" id="0x010105f1" |
This issue started for me after a commit which changed how dummy attributes were produced, this one I think, |
This is intentional and I don't think I'll be reverting this. This is a much better approach than previous and falls in line with aapt2 restrictions. |
I have some similar errors:
anims.xml:30 is: ids.xml:415 is:
layouts.xml:137 is:
|
The problem is that it doesn't assign the elements as item type. Just add the elements in the correct syntax and it will work.
and
And with any other resource file you have to do the same. Since it will surely not solve this, I am creating a program for my own use that detects and modifies these values automatically when I finish decompiling. |
I have the same problem with this APK https://apkcombo.com/apk-downloader/?arches=armeabi-v7a&q=com.snailgameusa.aowd
|
In the same manner #2501 [16:38 edu@xps tmp] > apktool b com.wireguard.android
I: Using Apktool 2.5.0
I: Copying com.wireguard.android classes.dex file...
I: Copying com.wireguard.android classes2.dex file...
I: Checking whether resources has changed...
I: Building resources...
W: Failed to generate resource table for split ''
W: /tmp/com.wireguard.android/res/values/drawables.xml:7: error: Error: String types not allowed (at 'APKTOOL_DUMMY_b' with value '').
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_137844021837667621165916702805564322097.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 30, --version-code, 485, --version-name, 1.0.20201224, --no-version-vectors, -F, /tmp/APKTOOL251826602113890625.tmp, -e, /tmp/APKTOOL17608074881270986798.tmp, -0, arsc, -I, /home/edu/.local/share/apktool/framework/1.apk, -S, /tmp/com.wireguard.android/res, -M, /tmp/com.wireguard.android/AndroidManifest.xml] |
Alright, in my case, I fixed it by removing
From \res\values\layouts.xml And also removing
From res\values\public.xml Compiled successfully and the game is working fine so far |
I found the fastest way to remove all APKTOOL_DUMMY in few clicks. The game i encounted, had a thousands of APKTOOL_DUMMY in/res/values/. So I use notepad++ and do regex search and replace all though /res/values/ removing lines
This regex match a whole line containing APKTOOL_DUMMY There are of course a possibility it may break something. Games with removed APKTOOL_DUMMY have been working fine for me so far Before:
After:
|
Wow it working perfectly on framework-res.apk Oneui 3.1 for S20 G98x ! Well done ! |
sometimes using option --use-aapt2 will do the trick |
From logcat output I get After recompiling the app with @Krowne 's solution, and it doesn't start. I noticed that these issues happen when the apk was split files - for example:
Maybe I am just not decompilig/recompilig correctly in that case? |
@Xaxoxuxu you can get single APK from Apkcombo to save your time. No need to deal with split APK https://apkcombo.com/en-dk/apk-downloader/?device=&arches=&sdkInt=&sa=1&lang=en&dpi=480&q=com.withbuddies.diceellen Apkcombo is safe and i have been using it since it was born |
Your error doesn't seem to be in the resources folder but in the assets folder. My solution was for when can't compile due to resources, fixing it. However, I am going to add a script that I am currently using to modify all the strings containing the problems mentioned above without using external programs. Note that this does not fix issues with asset and apps splits. You have to put the file in the root folder of the project (where AndroidManifest.xml is located).
This script is for cmd on Windows, if someone knows they can adapt it for Linux. Note: This script checks all the resource folders that contain the files with the mentioned strings, and appends the missing type content to each line of each file. |
I've exported the .apk from the files (using the native support from SO) without using any tool. It did exported the .apk but the .apk didn't install at all. In my case "APKTOOL_DUMMY" also appeared. I realized just after reading @AndnixSH's answer. So I used the apkcombo in order to export the .apk and it did work properly. |
This worked for me |
Looking at this ticket again. It was originally opened because the change of DUMMY attribute generation had a negative affect for aapt1. This was intentional as the alternative was breaking aapt2. Since aapt1 is on the way out - this was kept. The next item is the discussion of DUMMY attributes in general, which some folks are asking should be able to be removed in entirety - that is being tracked here: #2683 so with that. I'm going to close this as I believe nothing left actionable that isn't already covered in this ticket. |
Information
Apktool 2.5.1-145201-SNAPSHOT
Stacktrace/Logcat
Steps to Reproduce
apktool d framework-res.apk
apktool b framework-res
Frameworks
samsung framework-res,apk
APK
framework-res.zip
Questions to ask before submission
im having issues repacking res it gives issues with apktool_dummy
in integers.xml and dimens.xml
The text was updated successfully, but these errors were encountered: