iBotPeaches / Apktool

A tool for reverse engineering Android apk files

Home Page:https://apktool.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]apktool d xx.apk generate packageInfo.renameManifestPackage as empty ''

Zhanghao0150 opened this issue · comments

commented

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

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

commented

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.

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