Apktool: [BUG]Issues repacking res it gives issues with apktool_dummy in integers.xml and dimens.xml

Information

Apktool 2.5.1-145201-SNAPSHOT

Stacktrace/Logcat

Include stacktrace here
I: Using Apktool 2.5.1-145201-SNAPSHOT
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'wfcSpnFormat' has no default translation.
W: Failed to generate resource table for split ''
W: C:\Users\Sac23\Desktop\hhh\framework-res\res\values\integers.xml:361: error: Error: String types not allowed (at 'APKTOOL_DUMMY_72' with value '').
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Sac23\AppData\Local\Temp\brut_util_Jar_64426037738495893106265858736697657594.tmp, p, --forced-package-id, 1, --min-sdk-version, 29, --target-sdk-version, 29, --version-code, 29, --version-name, 10, --no-version-vectors, -F, C:\Users\Sac23\AppData\Local\Temp\APKTOOL9077465573776423434.tmp, -x, -e, C:\Users\Sac23\AppData\Local\Temp\APKTOOL5862047175049083314.tmp, -0, arsc, -S, C:\Users\Sac23\Desktop\hhh\framework-res\res, -M, C:\Users\Sac23\Desktop\hhh\framework-res\AndroidManifest.xml]

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 19 (4 by maintainers)

Most upvoted comments

sometimes using option --use-aapt2 will do the trick

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

^.*(APKTOOL_DUMMY).*$

This regex match a whole line containing APKTOOL_DUMMY

image

There are of course a possibility it may break something. Games with removed APKTOOL_DUMMY have been working fine for me so far

Before:

I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\ids.xml:64: error: Found tag id where item is expected
W: 
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\layouts.xml:3: error: Found tag layout where item is expected
W: 

After:

I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...

Wow it working perfectly on framework-res.apk Oneui 3.1 for S20 G98x !

Well done !

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

^.*(APKTOOL_DUMMY).*$

This regex match a whole line containing APKTOOL_DUMMY

image

There are of course a possibility it may break something. Games with removed APKTOOL_DUMMY have been working fine for me so far

Before:

I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\ids.xml:64: error: Found tag id where item is expected
W: 
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\layouts.xml:3: error: Found tag layout where item is expected
W: 

After:

I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...