Skip to content
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] Can't recompile apk -- error: attribute android:xxx not found. #3831

Open
gradyl16 opened this issue Mar 26, 2025 · 0 comments
Open

[BUG] Can't recompile apk -- error: attribute android:xxx not found. #3831

gradyl16 opened this issue Mar 26, 2025 · 0 comments

Comments

@gradyl16
Copy link

gradyl16 commented Mar 26, 2025

Information

  1. Apktool Version (apktool -version) - 2.11.1
  2. Operating System (Mac, Linux, Windows) - Pop!_OS 22.04 (Linux)
  3. APK From? (Playstore, ROM, Other) - Other: Uptodown
  4. Java Version (java --version) - 17.0.14 (2025-01-21)

Stacktrace/Logcat

--------------------------------------------------- DECOMPILATION LOG ---------------------------------------------------
I: Using Apktool 2.11.1 on jp.pokemon.pokemontcgp.apk with 8 threads
I: Baksmaling classes.dex...
I: Loading resource table...
I: Baksmaling classes2.dex...
I: Decoding file-resources...
I: Loading resource table from file: /home/[REDACTED]/.local/share/apktool/framework/1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Copying original files...
I: Copying assets...
I: Copying unknown files...

--------------------------------------------------- RECOMPILATION LOG ---------------------------------------------------
I: Using Apktool 2.11.1 on jp.pokemon.pokemontcgp.apk with 8 threads
I: Checking whether sources have changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources have changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources have changed...
I: Building resources with aapt2...
W: /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/AndroidManifest.xml:2: error: attribute android:requiredSplitTypes not found.
W: /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/AndroidManifest.xml:2: error: attribute android:splitTypes not found.
W: /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/AndroidManifest.xml:32: error: attribute android:dataExtractionRules not found.
W: error: failed processing manifest.
Exception in thread "main" brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_38071763668742047783418439069096325094.tmp, link, -o, /tmp/APKTOOL8
981027309842818811.tmp, --allow-reserved-package-id, --package-id, 127, --min-sdk-version, 24, --target-sdk-version, 34, --version-code, 92581, --version-name, 1.1.2, --no-auto-version, --no-version-vectors, --no-vers
ion-transitions, --no-resource-deduping, --no-compile-sdk-metadata, --warn-manifest-validation, -I, /home/[REDACTED]/.local/share/apktool/framework/1.apk, --manifest, /home/[REDACTED]/cs/projects/personal/pokemon-tcgp-h
acking/android/xapk/jp.pokemon.pokemontcgp/AndroidManifest.xml, /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/build/resources.zip]
        at brut.androlib.AaptInvoker.invoke(SourceFile:213)
        at brut.androlib.ApkBuilder.buildResources(SourceFile:352)
        at brut.androlib.ApkBuilder.build(SourceFile:93)
        at brut.apktool.Main.main(SourceFile:322)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_38071763668742047783418439069096325094.tmp, link, -o, /tmp/APKTOOL8981027309842818811.tmp, --allow-reserved-package-id, --packa
ge-id, 127, --min-sdk-version, 24, --target-sdk-version, 34, --version-code, 92581, --version-name, 1.1.2, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --no-compile-sdk-me
tadata, --warn-manifest-validation, -I, /home/[REDACTED]/.local/share/apktool/framework/1.apk, --manifest, /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/AndroidManifest.x
ml, /home/[REDACTED]/cs/projects/personal/pokemon-tcgp/android/xapk/jp.pokemon.pokemontcgp/build/resources.zip]
        at brut.util.OS.exec(SourceFile:143)
        at brut.androlib.AaptInvoker.invoke(SourceFile:209)
        ... 3 more

Steps to Reproduce

# Retrieve xapk from link below, move to working dir
mv ~/Downloads/pokemon-tcg-pocket-1-1-2.xapk .

# Unzip xapk archive
unzip pokemon-tcg-pocket-1-1-2.xapk

# Decompile with default opts:
apktool d jp.pokemon.pokemontcgp.apk

# Attempt recompilation
apktool b jp.pokemon.pokemontcgp

Frameworks

N/A

APK

Pokemon TCG Pocket xapk download page (see green download button in lower left corner)

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? => yes
  2. If you are trying to install a modified apk, did you resign it? => N/A
  3. Are you using the latest apktool version? => yes

Other Notes

<manifest android:requiredSplitTypes="base__abi" android:splitTypes="" ...>
    <application android:dataExtractionRules="@xml/data_extraction_backup_rules" ...>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant