FORUMS
Remove All Ads from XDA

[UTIL] Apktool - Tool for reverse engineering apk files

925 posts
Thanks Meter: 4,310
 
Post Reply Email Thread
7th July 2012, 03:23 PM |#21  
rtfpessoa's Avatar
Senior Member
Flag Lisbon
Thanks Meter: 669
 
Donate to Me
More
Thanks to @iBotPeaches i fixed the deodex script and all is working ok now.
Keep the good work!!!
7th July 2012, 10:08 PM |#22  
Pneuma1985's Avatar
Senior Member
Flag Around
Thanks Meter: 1,069
 
Donate to Me
More
Still not working properly on sense 4.0.3 apk files... Still throws tons of integer mismatches and doesnt decompile the dialer which is what we were hoping for...
The current error for everyone that Im aware of is

Quote:

C:\Android\Apktool 1.4.7>apktool d HtcDialer.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Arsc files with zero
or multiple packages
at brut.androlib.res.AndrolibResources.loadMainPkg(An drolibResources.jav
a:67)
at brut.androlib.res.AndrolibResources.getResTable(An drolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:4 5)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.ja va:151)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:10 1)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

7th July 2012, 10:10 PM |#23  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by Pneuma1985

Still not working properly on sense 4.0.3 apk files... Still throws tons of integer mismatches and doesnt decompile the dialer which is what we were hoping for...
The current error for everyone that Im aware of is

PHP Code:
C:\Android\Apktool 1.4.7>apktool d HtcDialer.apk
I
Loading resource table...
Exception in thread "main" brut.androlib.AndrolibExceptionArsc files with zero
 
or multiple packages
        at brut
.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a
:67)
        
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a
:43)
        
at brut.androlib.Androlib.getResTable(Androlib.java:45)
        
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:151)
        
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
        
at brut.apktool.Main.cmdDecode(Main.java:128)
        
at brut.apktool.Main.main(Main.java:65

God, that is a nasty error. Send me that APK please? ibotpeaches (at) gmail (dot) com.

I'll step through it and see why its doing that.
7th July 2012, 10:11 PM |#24  
Pneuma1985's Avatar
Senior Member
Flag Around
Thanks Meter: 1,069
 
Donate to Me
More
Quote:
Originally Posted by iBotPeaches

God, that is a nasty error. Send me that APK please? ibotpeaches (at) gmail (dot) com.

I'll step through it and see why its doing that.


HtcDialer
http://www.mediafire.com/?2ba1acea9n8e19s

Give me a sec uploading resources and framework for you...In case you dont have the 4.0.3 resources and framework...http://www.mediafire.com/?zu4jc43fy7qd996
7th July 2012, 10:12 PM |#25  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by Pneuma1985

HtcDialer
http://www.mediafire.com/?2ba1acea9n8e19s

Thanks. I'll look into it tonight. Just bought an SGS3
7th July 2012, 10:32 PM |#26  
raziel23x's Avatar
Senior Member
Flag Novi
Thanks Meter: 1,026
 
Donate to Me
More
I look forward to your findings and further improvements as your and brut.all have worked on a great tool.

Sent from my DROID RAZR using Tapatalk 2
8th July 2012, 01:21 PM |#27  
Senior Member
Flag Kiev
Thanks Meter: 197
 
More
iBotPeaches
Can`t decompile systemui from Sony Ericsson XPERIA ray 4.0.4 rom.
Getting this error:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
	at sun.awt.image.ByteInterleavedRaster.getSamples(Unknown Source)
	at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:60)
	at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
	at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
	at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:68)
	at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
	at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:94)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
	at brut.apktool.Main.cmdDecode(Main.java:128)
	at brut.apktool.Main.main(Main.java:65)
Apktool 1.4.3 decompiles systemui without errors.
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.88 MB, 346 views)
File Type: apk framework_res.apk - [Click for QR Code] (7.07 MB, 571 views)
8th July 2012, 06:23 PM |#28  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
v1.4.8 (Beta – Released July 8th – 2012) Codename: yyj
  • Fixes for HTC Sense 4.0.4 apks that have an extra com.htc package
  • Fixes merged from yyj (https://github.com/yyjdelete)
  • Reverted 9patch fix due to errors

http://miui.connortumbleson.com/othe...tool_1.4.8.jar (v1.4.8) - 8e5cc3c3d4f513cba8d53d64674e4b3c

(THIS IS A BETA. I'm no longer doing this "private" beta stuff. Everyone can test future versions now). Make sure you have the newest APPT.
The Following 4 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
8th July 2012, 07:33 PM |#29  
a-id's Avatar
Senior Member
Thanks Meter: 180
 
Donate to Me
More
Hi, iBotPeaches! What could be wrong?

Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
D:\ROM\TOOLS\ApkTools\Phone\res\values-de\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
 add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-de\strings.xml:195: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-es\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
 add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-es\strings.xml:195: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-es-rUS\strings.xml:197: error: Multiple substitutions specified in non-positional format; did you mea
n to add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-es-rUS\strings.xml:198: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-it\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
 add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-it\strings.xml:195: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\User\A
ppData\Local\Temp\APKTOOL3107178834914996807.tmp, -I, D:\User\apktool\framework\1.apk, -S, D:\ROM\TOOLS\ApkTools\Phone\res, -M, D:\ROM\TOOLS
\ApkTools\Phone\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
        at brut.androlib.Androlib.buildResources(Androlib.java:249)
        at brut.androlib.Androlib.build(Androlib.java:172)
        at brut.androlib.Androlib.build(Androlib.java:155)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\User\AppData\Local\Temp\APKTOOL3107178834914996807.tmp,
 -I, D:\User\apktool\framework\1.apk, -S, D:\ROM\TOOLS\ApkTools\Phone\res, -M, D:\ROM\TOOLS\ApkTools\Phone\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
        ... 6 more

 !!!Aborted!!!
Attached Files
File Type: rar ApkTools.rar - [Click for QR Code] (4.53 MB, 625 views)
File Type: apk Phone.apk - [Click for QR Code] (1.01 MB, 113 views)
8th July 2012, 07:37 PM |#30  
iBotPeaches's Avatar
OP Recognized Developer
Flag Tampa
Thanks Meter: 4,310
 
Donate to Me
More
Quote:
Originally Posted by a-id

Hi, iBotPeaches! What could be wrong?


!!!Aborted!!![/CODE]


Yeah, looks like its not catching single quotes or the regex pattern for %1$x etc. I'll work on this some more.

http://pastebin.com/e4vEReKK

Thanks for reporting/supporting things guys. Hopefully we can get this stable soon.

EDIT: Yeah lots of errors with non-English languages. I would advise not to use v1.4.8 in release productions of anything. Working on re-doing some of the code that maps unicode, etc.
The Following 2 Users Say Thank You to iBotPeaches For This Useful Post: [ View ]
8th July 2012, 08:12 PM |#31  
Senior Member
Flag Los Angeles
Thanks Meter: 143
 
Donate to Me
More
My XMLs come out all funky. Lots of superfluous white space. Is this intentional?

Code:
<?xml version="1.0" encoding="utf-8"?>















<PreferenceScreen android:title="@string/display_settings_title"
  xmlns:android="http://schemas.android.com/apk/res/android"
>
    <com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness"


 />

    <CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer"
 />

    <ListPreference android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:persistent="false" android:entries="@array/screen_timeout_entries" android:entryValues="@array/screen_timeout_values"




 />

    <ListPreference android:title="@string/battery_style" android:key="battery_styles" android:persistent="false" android:entries="@array/battery_style_entries" android:entryValues="@array/battery_style_values"



 />

    <ListPreference android:title="@string/pref_nightmode_title" android:key="nightmode" android:entries="@array/render_entries" android:entryValues="@array/render_values" android:defaultValue="@string/config_night_modes"



 />

    <PreferenceCategory />

    <ListPreference android:title="@string/animations_title" android:key="animations" android:persistent="false" android:entries="@array/animations_entries" android:entryValues="@array/animations_values"



 />

    <ListPreference android:title="@string/pref_alertdiaog_sytle_title" android:key="alterdialogstyle" android:entries="@array/alertdialog_sytle" android:entryValues="@array/alertdialog_values" android:defaultValue="@string/config_alertdiaog_styles"



 />


    <CheckBoxPreference android:title="@string/pref_electron_beam_animation_on" android:key="electron_beam_animation_on"
 />
    <CheckBoxPreference android:title="@string/pref_electron_beam_animation_off" android:key="electron_beam_animation_off"
 />

</PreferenceScreen>
It's messing up some of my automated scripts. Reverting to 1.4.7 for now until I find out whether this is a feature or a bug. lol
Attached Files
File Type: apk Settings.apk - [Click for QR Code] (1.32 MB, 402 views)
Post Reply Subscribe to Thread

Tags
apktool, apktools, customise apk, decompile, edit apk, recompile, reverse

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes