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] Cannot build APK - cannot assign ID [x] to [resource] because package already has id [x] #3801

Open
philiprace opened this issue Feb 7, 2025 · 0 comments

Comments

@philiprace
Copy link

philiprace commented Feb 7, 2025

Information

  1. Apktool Version (apktool -version) - APK Editor Studio v1.7.2
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - other (apkmirror)
  4. Java Version (java --version) - build 1.8.0_441-b07

Stacktrace/Logcat

I: Using Apktool 2.11.0 on com.ebay.mobile_6.116.0.1-6116001_minAPI26(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com.apk with 4 threads
I: Copying raw classes.dex file...
I: Copying raw classes10.dex file...
I: Copying raw classes11.dex file...
I: Copying raw classes12.dex file...
I: Copying raw classes13.dex file...
I: Copying raw classes2.dex file...
I: Copying raw classes3.dex file...
I: Copying raw classes4.dex file...
I: Copying raw classes5.dex file...
I: Copying raw classes6.dex file...
I: Copying raw classes7.dex file...
I: Copying raw classes8.dex file...
I: Copying raw classes9.dex file...
I: Building resources with aapt2...
W: error: can't assign ID 0x81010000 to resource com.ebay.mobile.uiThreeDimensionalModelViewerDynamic:drawable/sceneform_hand_phone because package already has ID 81.
W: error: failed assigning IDs.
Exception in thread "main" brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Philip\AppData\Local\Temp\brut_util_Jar_65160648751296062942020340567947012560.tmp, link, -o, C:\Users\Philip\AppData\Local\Temp\APKTOOL2875898626570267625.tmp, --allow-reserved-package-id, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 33, --rename-manifest-package, com.ebay.mobile, --rename-instrumentation-target-package, com.ebay.mobile, --version-code, 6194102, --version-name, 6.194.1.2, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --no-compile-sdk-metadata, --warn-manifest-validation, -I, C:\Users\Philip\AppData\Local\apk-editor-studio\frameworks\1.apk, -I, C:\Users\Philip\AppData\Local\apk-editor-studio\frameworks\127.apk, --manifest, C:\Users\Philip\AppData\Local\Temp\apk-editor-studio\apk\{5dd32d57-96f5-4200-ab6e-5bdce37a688c}\AndroidManifest.xml, C:\Users\Philip\AppData\Local\Temp\apk-editor-studio\apk\{5dd32d57-96f5-4200-ab6e-5bdce37a688c}\build\resources.zip]
	at brut.androlib.AaptInvoker.invoke(SourceFile:0)
	at brut.androlib.ApkBuilder.buildResources(SourceFile:0)
	at brut.androlib.ApkBuilder.build(SourceFile:0)
	at brut.apktool.Main.main(SourceFile:0)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Philip\AppData\Local\Temp\brut_util_Jar_65160648751296062942020340567947012560.tmp, link, -o, C:\Users\Philip\AppData\Local\Temp\APKTOOL2875898626570267625.tmp, --allow-reserved-package-id, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 33, --rename-manifest-package, com.ebay.mobile, --rename-instrumentation-target-package, com.ebay.mobile, --version-code, 6194102, --version-name, 6.194.1.2, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --no-compile-sdk-metadata, --warn-manifest-validation, -I, C:\Users\Philip\AppData\Local\apk-editor-studio\frameworks\1.apk, -I, C:\Users\Philip\AppData\Local\apk-editor-studio\frameworks\127.apk, --manifest, C:\Users\Philip\AppData\Local\Temp\apk-editor-studio\apk\{5dd32d57-96f5-4200-ab6e-5bdce37a688c}\AndroidManifest.xml, C:\Users\Philip\AppData\Local\Temp\apk-editor-studio\apk\{5dd32d57-96f5-4200-ab6e-5bdce37a688c}\build\resources.zip]
	at brut.util.OS.exec(SourceFile)
	... 4 more

Steps to Reproduce

  1. select tools > framework manager
  2. click install and choose the apk listed
  3. close framework manager
  4. select 'open apk'
  5. select the linked apk file
  6. then attempt to save apk### Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files(.apks that live in /system/framework or /system/priv-app)

APK

(https://www.apkmirror.com/apk/ebay-mobile/ebay/ebay-6-116-0-1-release/ebay-fashion-car-parts-tech-6-116-0-1-android-apk-download/download/?key=957a7ee313c98e2fdde9a51b0ad5a5ce733271f4&forcebaseapk=true)

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? no, unsure how to do this.
  2. If you are trying to install a modified apk, did you resign it? no, cannot build.
  3. Are you using the latest apktool version? yes

just a side note, this is very possibly not a bug - i am well out of my comfort zone and am probably doing something entirely wrong here. if someone could give me some guidance on how to navigate the issue i'm facing that would be greatly appreciated.

Thanks.

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