iBotPeaches / Apktool

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

[BUG]: W: First type is not attr! #2866

Closed ravener closed 2 years ago

ravener commented 2 years ago

Information

  1. Apktool Version (apktool -version) - 2.6.1-dirty
  2. Operating System (Mac, Linux, Windows) - Android (Termux)
  3. APK From? (Playstore, ROM, Other) - Other, see below for link to APK.

Stacktrace/Logcat

~/love  apktool b -o game.apk test
32 bit support is deprecated. Apktool will not support 32bit on v3.0.0.
I: Using Apktool 2.6.1-dirty
I: Checking whether resources has changed...
I: Building resources...
W: First type is not attr!
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 134): [/data/data/com.termux/files/usr/tmp/brut_util_Jar_180353324009176398335618267416584824288.tmp, p, --min-sdk-version, 16, --target-sdk-version, 31, --version-code, 30, --version-name, 11.4, --no-version-vectors, -F, /data/data/com.termux/files/usr/tmp/APKTOOL14738061755206897523.tmp, -0, resources.arsc, -0, png, -0, arsc, -I, /data/data/com.termux/files/home/.local/share/apktool/framework/1.apk, -S, /data/data/com.termux/files/home/love/test/res, -M, /data/data/com.termux/files/home/love/test/AndroidManifest.xml]

Steps to Reproduce

  1. apktool b -o game.apk somedirectory

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

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

APK is from https://github.com/love2d/love-android/releases/download/11.4/love-11.4-android-embed.apk

Simply decoding and rebuilding the apk should be able to reproduce the bug I believe.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? I barely changed anything, All I did was add an assets folder.
  2. If you are trying to install a modified apk, did you resign it? I'm still trying to build the apk.
  3. Are you using the latest apktool version? Yes
ravener commented 2 years ago

I just tried with another package https://github.com/rendiix/termux-apktool

This one worked fine, I'm not sure how to react now, that one uses a more recent version 2.6.2-SNAPSHOT so the issue might've already been fixed or the bug is related to how Termux's official repositories packaged it.

iBotPeaches commented 2 years ago

This says its "dirty" and then suggests its running on Android. Neither of which is really supported.

I know that error I patched it in these aapts. https://github.com/iBotPeaches/platform_frameworks_base/commits/master

So I am closing for not being an official release nor a supported platform.