iBotPeaches / Apktool

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

Many errors decompiling this specific app #2279

Closed testesleah84 closed 4 years ago

testesleah84 commented 4 years ago

Information

  1. Apktool Version (apktool -version) - 2.4.1
  2. Operating System (Mac, Linux, Windows) - Windows 10 Pro
  3. APK From? (Playstore, ROM, Other) - Playstore

Stacktrace/Logcat

I: Using Apktool 2.4.1 on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\chenj\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Baksmaling classes6.dex...
I: Baksmaling classes7.dex...
I: Baksmaling classes8.dex...
I: Baksmaling classes9.dex...
I: Baksmaling classes10.dex...
I: Baksmaling classes11.dex...
I: Baksmaling classes12.dex...
I: Baksmaling classes13.dex...
I: Baksmaling classes14.dex...
I: Baksmaling classes15.dex...
I: Baksmaling classes16.dex...
I: Baksmaling classes17.dex...
I: Baksmaling classes18.dex...
I: Baksmaling classes19.dex...
I: Baksmaling classes20.dex...
I: Baksmaling classes21.dex...
I: Baksmaling classes22.dex...
I: Baksmaling classes23.dex...
I: Baksmaling classes24.dex...
I: Copying assets and libs...
I: Copying unknown files...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: Error copying file:
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:214)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:180)
        at brut.apktool.Main.cmdDecode(Main.java:170)
        at brut.apktool.Main.main(Main.java:76)
Caused by: brut.directory.DirectoryException: Error copying file:
        at brut.directory.DirUtil.copyToDir(DirUtil.java:91)
        at brut.directory.AbstractDirectory.copyToDir(AbstractDirectory.java:208)
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:207)
        ... 3 more
Caused by: java.io.FileNotFoundException: base\unknown\   (Access is denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:87)
        ... 5 more

Steps to Reproduce

  1. apktoold base.apk

APK

https://play.google.com/store/apps/details?id=com.gojek.app&hl=en_SG https://apkpure.com/gojek-ojek-taxi-booking-delivery-and-payment/com.gojek.app Same results when trying to decompiling APKs from Playstore as well as apkpure.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Haven't got to change anything yet.
  2. If you are trying to install a modified apk, did you resign it? No
  3. Are you using the latest apktool version? Yes.

I am able to decompile other APKs without errors.

Ticklefish commented 4 years ago

It looks like this APK has been protected with Dexguard or similar to stop people from modding it.

testesleah84 commented 4 years ago

Is there a way to get around that? Or is this the end of the road?

testesleah84 commented 4 years ago

The DUMMYVAL resources and more are there to allow decode. There has been 0 success of recovering any human readable name. Android doesn't care about resource names, it cares about resource IDs. Dexguard strips the human readable name, so remaking the APK back to human readable format is nearly impossible.