iBotPeaches / Apktool

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

[BUG] Can't enable debuggable #2854

Closed llg94th closed 2 years ago

llg94th commented 2 years ago

Information

  1. Apktool Version (apktool -version) - 2.6.1
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - apkcombo APK link: https://apkcombo.com/vi/bigo-live-lite-live-stream/sg.bigo.live.lite/download/phone-1.5.1-apk

Stacktrace/Logcat

Include stacktrace here
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool d bigolite.apk -f
I: Using Apktool 2.6.1 on bigolite.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\lovel\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatfrom_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatto_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_pic_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatfrom_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_pic_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_pic_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_pic_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable/btn_country_pressed.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/icon_tuwen_top2.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable/btn_country.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatto_normal.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool --version
2.6.1
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool b bigolite --use-aapt2
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool d bigolite.apk -f -r
I: Using Apktool 2.6.1 on bigolite.apk
I: Copying raw resources...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool b bigolite --use-aapt2
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool b bigolite -d
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new> apktool --version
2.6.1
Press any key to continue . . .
PS F:\EasyApkDisassembler.V1.3.2\Apktool new>

Steps to Reproduce

  1. apktool d bigolite.apk -> Cant find 9patch chunk in file
  2. apktool b bigolite -d -> apk can not install
  3. I have try other way with 'apktool d bigolite.apk -r' -> good
  4. apktool b bigolite -d -> apk with Androidmanifest.xml without debuggale=true

How i can enable debugging for it? And still update apktool for this?

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. https://apkcombo.com/vi/bigo-live-lite-live-stream/sg.bigo.live.lite/download/phone-1.5.1-apk

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? yes
  2. If you are trying to install a modified apk, did you resign it? yes
  3. Are you using the latest apktool version? yes
iBotPeaches commented 2 years ago
➜  2854 apktool d 2854.apk 
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.6.2-6c94ca-SNAPSHOT on 2854.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Skipping staged alias stagedId (1fe0000) finalId: 1020055
I: Skipping staged alias stagedId (1fe0001) finalId: 1020056
I: Skipping staged alias stagedId (1fe0002) finalId: 1020057
I: Skipping staged alias stagedId (1ff0000) finalId: 101064c
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_pic_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatto_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable/btn_country_pressed.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_pic_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/icon_tuwen_top2.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatfrom_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_pic_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_pic_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatto_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatto_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-ldrtl-xhdpi-v4/chatfrom_press.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable/btn_country.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/chatfrom_press.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  2854 apktool b 2854 --use-aapt2 -d
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.6.2-6c94ca-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
➜  2854 aapt d xmltree 2854/dist/2854.apk| grep 'debuggable'
ERROR: no dump xmltree resource file specified
➜  2854 aapt d xmltree 2854/dist/2854.apk AndroidManifest.xml| grep 'debuggable'
      A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
➜  2854 

Not seeing an issue here.

llg94th commented 2 years ago

@iBotPeaches Do you have try install the APK that was built. I have try to install it on LD Player or Emulator of Android SDK but can not install