iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.23k stars 3.59k forks source link

not able to build apk #3076

Closed vaibhavc418 closed 1 year ago

vaibhavc418 commented 1 year ago

Information

  1. Apktool Version (2.7.0-dirty) -
  2. Operating System (Linux) -
  3. APK From? (Other) -
  4. Java Version (17.0.6) -

Facing this error:

╭─kali@kali ~/Downloads/root ╰─$ apktool b root1 -o new_app.apk Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true I: Using Apktool 2.7.0-dirty I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... W: aapt: brut.common.BrutException: brut.common.BrutException: Could not extract resource: /prebuilt/linux/aapt_64 (defaulting to $PATH binary) W: First type is not attr! W: aapt F 05-23 00:05:26 3194 3194 First type is not attr! brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 134): [aapt, p, --min-sdk-version, 21, --target-sdk-version, 29, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /tmp/APKTOOL980302471813830380.tmp, -0, resources.arsc, -0, png, -0, META-INF/androidx.customview_customview.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata-core.version, -0, META-INF/androidx.versionedparcelable_versionedparcelable.version, -0, META-INF/androidx.arch.core_core-runtime.version, -0, META-INF/androidx.activity_activity.version, -0, META-INF/androidx.lifecycle_lifecycle-runtime.version, -0, META-INF/androidx.drawerlayout_drawerlayout.version, -0, META-INF/androidx.interpolator_interpolator.version, -0, META-INF/androidx.appcompat_appcompat-resources.version, -0, META-INF/androidx.lifecycle_lifecycle-viewmodel.version, -0, META-INF/androidx.appcompat_appcompat.version, -0, META-INF/androidx.loader_loader.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata.version, -0, META-INF/androidx.viewpager_viewpager.version, -0, META-INF/androidx.cursoradapter_cursoradapter.version, -0, META-INF/androidx.savedstate_savedstate.version, -0, META-INF/androidx.fragment_fragment.version, -0, META-INF/androidx.vectordrawable_vectordrawable.version, -0, META-INF/androidx.core_core.version, -0, META-INF/androidx.vectordrawable_vectordrawable-animated.version, -0, arsc, -I, /home/kali/.local/share/apktool/framework/1.apk, -S, /home/kali/Downloads/root/root1/res, -M, /home/kali/Downloads/root/root1/AndroidManifest.xml]

iBotPeaches commented 1 year ago

You'll want to use aapt2 based on that error message.

grayhatpk commented 6 months ago

I am getting the same error, can any one give solution

grayhatpk commented 6 months ago

I got solution with this command : java -jar apktool_2.9.3.jar build -f -r -o patched.apk kgb-messenger