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] Apktool failes to rebuild Google Chrome #3010

Closed
talliberman opened this issue Mar 1, 2023 · 2 comments
Closed

[BUG] Apktool failes to rebuild Google Chrome #3010

talliberman opened this issue Mar 1, 2023 · 2 comments

Comments

@talliberman
Copy link

talliberman commented Mar 1, 2023

Information

  1. Apktool Version (apktool -version) - 2.7.1 (from git)
  2. Operating System (Mac, Linux, Windows) -Linux
  3. APK From? (Playstore, ROM, Other) - ApkMirror

Stacktrace/Logcat

I: Using Apktool 2.7.1-120611-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /tmp/chrome_beta/base/res/values/attrs.xml:52: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f05002d already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:51: Originally defined here.
W: 
W: /tmp/chrome_beta/base/res/values/attrs.xml:63: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f050035 already has bag item @null.

Steps to Reproduce

  1. apktool d base.apk
  2. apktool b base

APK

If this APK can be freely shared, please upload/attach a link to it.
https://www.apkmirror.com/apk/google-inc/chrome-beta/chrome-beta-111-0-5563-30-release/chrome-beta-111-0-5563-30-10-android-apk-download/

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? no modifications
  3. Are you using the latest apktool version? yes

How to reproduce the issue

We assume the following APKM file is located in /tmp/chrome_beta/com.chrome.beta_111.0.5563.30.apkm:
https://www.apkmirror.com/apk/google-inc/chrome-beta/chrome-beta-111-0-5563-30-release/chrome-beta-111-0-5563-30-10-android-apk-download/

# Run ubuntu docker
$ sudo docker run --rm -ti --entrypoint /bin/bash ubuntu
$ apt update
$ apt -y install git vim default-jdk unzip wget
$ git clone https://github.com/iBotPeaches/Apktool.git
$ cd Apktool/

$ git log -n 1
commit 120611879c44ca214ead40d59c34acfbc4b09001 (HEAD -> master, origin/master, origin/HEAD)
Author: Igor Eisberg <8811086+IgorEisberg@users.noreply.github.com>
Date:   Sun Feb 19 13:57:03 2023 +0200

    fix: accept empty resources.arsc (#2998)
    
    * fix: accept empty resources.arsc
    
    * fix: accept empty resources.arsc (fix isFrameworkApk=true)


# Required because of unicode error in compilation
$ find . -type f -print0 | xargs -0 sed -i /Ryszard/d
$ rm -rf brut.apktool/apktool-lib/src/test/

$ ./gradlew build shadowJar

$ cd /tmp/chrome_beta

$ unzip com.chrome.beta_111.0.5563.30.apkm

$ java -jar /Apktool/brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar -version
2.7.1-120611-SNAPSHOT

$ java -jar /Apktool/brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar d base.apk 
I: Using Apktool 2.7.1-120611-SNAPSHOT on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

$ java -jar /Apktool/brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar b base
I: Using Apktool 2.7.1-120611-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /tmp/chrome_beta/base/res/values/attrs.xml:52: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f05002d already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:51: Originally defined here.
W: 
W: /tmp/chrome_beta/base/res/values/attrs.xml:63: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f050035 already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:62: Originally defined here.
W: 
W: /tmp/chrome_beta/base/res/values/attrs.xml:73: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f050038 already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:72: Originally defined here.
W: 
W: /tmp/chrome_beta/base/res/values/attrs.xml:84: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f05003d already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:83: Originally defined here.
W: 
W: /tmp/chrome_beta/base/res/values/attrs.xml:89: error: Resource entry APKTOOL_DUPLICATE_attr_0x7f05003f already has bag item @null.
W: /tmp/chrome_beta/base/res/values/attrs.xml:88: Originally defined here.
...

@talliberman talliberman changed the title Apktool failes to rebuild Google Chrome [BUG] Apktool failes to rebuild Google Chrome Mar 1, 2023
@alkeryn

This comment was marked as spam.

@iBotPeaches
Copy link
Owner

Thanks for the report. I've been tracking this duplicate null issue in here - #2836

Closing for duplicate.

@iBotPeaches iBotPeaches closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2023
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

3 participants