Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2016, 01:46
Mr.reCoder Mr.reCoder is offline
Friend
 
Join Date: Oct 2014
Location: Binary Land
Posts: 14
Rept. Given: 4
Rept. Rcvd 10 Times in 8 Posts
Thanks Given: 12
Thanks Rcvd at 16 Times in 3 Posts
Mr.reCoder Reputation: 10
decompile huawei android system app&apk

Hi all,

I want to de-compile and reverse Huawei android applications for example it's File Manager app to find how 'SafeBox' feature works. to be clear SafeBox is a feature that we can protect files with password.
the problem is ApkTool or other decompilers can't process and raise error.
Code:
java -jar apktool_2.1.1.jar d -f safebox.apk
ApkTool output:
Code:
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f0b0166 string/tab_item_bookmarks, config=-es-rUS
        at brut.androlib.res.data.ResType.addResource(ResType.java:66)
        at brut.androlib.res.data.ResType.addResource(ResType.java:55)
        at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:261)
        at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:217)
        at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:153)
        at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:115)
        at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:77)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:555)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:72)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:64)
        at brut.androlib.Androlib.getResTable(Androlib.java:64)
        at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:193)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
        at brut.apktool.Main.cmdDecode(Main.java:163)
        at brut.apktool.Main.main(Main.java:81)
Here is a thread about it but problem does not solved. using -r switch is useless because main class 'resources.arsc' remains untouched and does't decompile.
here is my apk:
Code:
http://www.mediafire.com/download/z98ub9u51ua23o3/safebox.rar
Best regards,
Able.
Reply With Quote
  #2  
Old 07-18-2016, 17:13
Mkz Mkz is offline
Friend
 
Join Date: Jan 2002
Posts: 98
Rept. Given: 0
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 5
Thanks Rcvd at 25 Times in 17 Posts
Mkz Reputation: 2
The file could be a resource-only apk, as there's no java code. But it could also be because there's a companion *.odex file which you didn't include. Looking at the manifest it looks like the 2nd option.

If the apktool's developer can't solve it easily, I doubt you'll find on this forum specialized help.

One advice I can give you is to use -r with apktool to have a look at the code (assuming there is indeed some), or use JEB to explore the code in an interactive manner.
For resources, use aapt.exe (from Android SDK tools) to list and inspect the resources, including the manifest:
Code:
aapt l -a safebox.apk
This will list:
- the resources stored as standalone files (e.g. png's)
- the resources compiled in resources.arsc
- the manifest structure (verbose)

You can also use other aapt options to actually list the resource values, e.g. "aapt.exe d --values resources safebox.apk"

The apk also contains a native lib (libhidisk_security.so) which you can explore with IDA, but the logic that will invoke the entry points will be in java code.
There are functions to encrypt and decrypt, but apparently only for the raw operations. Managing the keys and files is probably in the java part.
Reply With Quote
The Following 2 Users Say Thank You to Mkz For This Useful Post:
niculaita (07-18-2016), tonyweb (08-03-2016)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microblaze decompile eychei General Discussion 4 09-07-2018 08:27
Q: about decompile apk & Recompile apk Utshiha General Discussion 7 12-17-2016 23:07


All times are GMT +8. The time now is 19:16.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )