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 d xx.apk generate packageInfo.renameManifestPackage as empty '' #3593

Open
Zhanghao0150 opened this issue May 7, 2024 · 3 comments

Comments

@Zhanghao0150
Copy link

Zhanghao0150 commented May 7, 2024

Information

  1. Apktool Version (apktool -version) - 2.9.3
  2. Operating System (Mac, Linux, Windows) - windows
  3. APK From? (Playstore, ROM, Other) - Other
  4. Java Version (java --version) - java version "1.8.0_151"

Stacktrace/Logcat

I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: error: invalid manifest package override '--rename-instrumentation-target-package'.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ADMINI~1\AppData\Local\Temp\brut_util_Jar_9050589367046671593848687923057941143.tmp, link, -o, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL1546329328070160166.tmp, --package-id, 127, --min-sdk-version, 21, --target-sdk-version, 28, --rename-manifest-package, , --rename-instrumentation-target-package, , --version-code, 24050601, --version-name, 1.0.1, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, --warn-manifest-validation, -e, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL4786412764296688971.tmp, -0, arsc, -I, C:\Users\Administrator\AppData\Local\apktool\framework\1.apk, --manifest, D:\sdk-tool-yiyou\workspace\auto_31\juyounew\decompile\AndroidManifest.xml, D:\sdk-tool-yiyou\workspace\auto_31\juyounew\decompile\build\resources.zip]

Steps to Reproduce

  1. apktool
    apktool d xxx.apk, generate apktool.yml like this:
version: 2.9.3
apkFileName: u8.apk
isFrameworkApk: false
usesFramework:
  ids:
  - 1
  tag:
sdkInfo:
  minSdkVersion: '21'
  targetSdkVersion: '28'
packageInfo:
  forcedPackageId: 127
  renameManifestPackage:
versionInfo:
  versionCode: 24050601
  versionName: 1.0.1
resourcesAreCompressed: false
sharedLibrary: false
sparseResources: false

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)
No

APK

If this APK can be freely shared, please upload/attach a link to it.
No

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?Yes, still eror
  2. If you are trying to install a modified apk, did you resign it?build failed, so not able to install
  3. Are you using the latest apktool version?Yes
@iBotPeaches
Copy link
Owner

Odd - its like your aapt2 doesn't know about that flag.

@Zhanghao0150
Copy link
Author

Odd - its like your aapt2 doesn't know about that flag.

Yes, when I use 'java -jar apktool.jar b xxxxx' to build, during the resource building process, the 'aapt2 link' command is invoked with the '--rename-instrumentation-target-package' option appended, but the value passed to it is empty, like this: '--rename-instrumentation-target-package ""'


Sorry, as my English is not proficient, this paragraph was translated with the assistance of ChatGPT.

@iBotPeaches
Copy link
Owner

Ah I misread. It is complaining because its trying to rename a package to an empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants