Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Thread Closed

[UTIL][08.12.11] Apktool v1.4.3 - a tool for reverse engineering apk files

OP Brut.all

7th March 2010, 06:19 AM   |  #41  
myn's Avatar
Senior Recognized Developer
Thanks Meter: 4,002
 
2,658 posts
Join Date:Joined: Nov 2007
Donate to Me
Quote:
Originally Posted by seaweeduk

Here's the modded deskclock (was only the widget I wanted to make changes to) and a screenshot in case any one was interested



Remove the old deskclock.apk from /system/app and install the attached replacement if you want it

Looks good. I also like how you made the clock app have a transparent background
7th March 2010, 02:16 PM   |  #42  
Senior Member
Thanks Meter: 4
 
318 posts
Join Date:Joined: Aug 2009
Quote:
Originally Posted by myn

Looks good. I also like how you made the clock app have a transparent background

That was cyanogen I just changed the widget style and size :)
8th March 2010, 01:50 AM   |  #43  
Senior Member
Thanks Meter: 0
 
469 posts
Join Date:Joined: Feb 2008
More
I can't seem to get it to work.
Code:
scott@ubuntu:~/modmaps$ apktool d ~/Downloads/maps4.0.0-brut6.apk ~/modmaps/
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.androlib.Androlib.decode(Androlib.java:47)
	at brut.androlib.Androlib.decode(Androlib.java:37)
	at brut.apktool.Main.main(Main.java:40)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:37)
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:30)
	at brut.androlib.ApkFile.decode(ApkFile.java:66)
	at brut.androlib.Androlib.decode(Androlib.java:45)
	... 2 more
Caused by: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.util.OS.exec(OS.java:52)
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:35)
	... 5 more
8th March 2010, 10:31 AM   |  #44  
OP Recognized Developer
Thanks Meter: 339
 
1,467 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by canadiancow

I can't seem to get it to work.

Code:
scott@ubuntu:~/modmaps$ apktool d ~/Downloads/maps4.0.0-brut6.apk ~/modmaps/
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.androlib.Androlib.decode(Androlib.java:47)
	at brut.androlib.Androlib.decode(Androlib.java:37)
	at brut.apktool.Main.main(Main.java:40)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:37)
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:30)
	at brut.androlib.ApkFile.decode(ApkFile.java:66)
	at brut.androlib.Androlib.decode(Androlib.java:45)
	... 2 more
Caused by: brut.common.BrutException: could not exec command: [baksmali, -l, -s, /home/scott/Downloads/maps4.0.0-brut6.apk, -o, /home/scott/modmaps/smali]
	at brut.util.OS.exec(OS.java:52)
	at brut.androlib.AndrolibSmali.baksmali(AndrolibSmali.java:35)
	... 5 more

As you can see, there was an error in "baksmali -l -s /home/scott/Downloads/maps4.0.0-brut6.apk -o /home/scott/modmaps/smali" command - you could run it manually and check, what was the error. CLI executing eats errors :-/

You may have too old baksmali version. "-l" parameter was introduced in 1.1 version, I have added this requirement on a project page.

Current version has smali/baksmali builtin and is much debug prone :)
Last edited by Brut.all; 8th March 2010 at 10:33 AM.
8th March 2010, 12:19 PM   |  #45  
Senior Member
Thanks Meter: 14
 
494 posts
Join Date:Joined: Jan 2010
I have problems rebuilding, think is aapt related but dont know why...
Code:
$ apktool d htc_ime.apk out
$ cd out/                  
$ apktool b            
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: Could not build apk for dir: /home/adw/android_devel/apkTool/out/.
        at brut.androlib.Androlib.build(Androlib.java:65)                                                                                                      
        at brut.apktool.Main.main(Main.java:42)                                                                                                                
Caused by: brut.androlib.AndrolibException: Could not build apk for dir: /home/adw/android_devel/apkTool/out/.                                                 
        at brut.androlib.ApkFile.build(ApkFile.java:135)                                                                                                       
        at brut.androlib.ApkFile.build(ApkFile.java:96)                                                                                                        
        at brut.androlib.Androlib.build(Androlib.java:60)                                                                                                      
        ... 1 more                                                                                                                                             
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /home/adw/android_devel/apkTool/out/build/tmp.apk, -I, /home/adw/android_devel/android-sdk-linux_86/platforms/android-2.1/android.jar, -M, /home/adw/android_devel/apkTool/out/./AndroidManifest.xml, -S, /home/adw/android_devel/apkTool/out/./res]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:131)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:100)
        at brut.androlib.ApkFile.build(ApkFile.java:103)
        ... 3 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /home/adw/android_devel/apkTool/out/build/tmp.apk, -I, /home/adw/android_devel/android-sdk-linux_86/platforms/android-2.1/android.jar, -M, /home/adw/android_devel/apkTool/out/./AndroidManifest.xml, -S, /home/adw/android_devel/apkTool/out/./res]
        at brut.util.OS.exec(OS.java:52)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:129)
        ... 5 more
Any hints?
8th March 2010, 12:27 PM   |  #46  
OP Recognized Developer
Thanks Meter: 339
 
1,467 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by AnderWeb

Any hints?

Run aapt command manually and check error messages:

Code:
aapt p -F /home/adw/android_devel/apkTool/out/build/tmp.apk -I /home/adw/android_devel/android-sdk-linux_86/platforms/android-2.1/android.jar -M /home/adw/android_devel/apkTool/out/./AndroidManifest.xml -S /home/adw/android_devel/apkTool/out/./res
8th March 2010, 12:55 PM   |  #47  
Senior Member
Thanks Meter: 14
 
494 posts
Join Date:Joined: Jan 2010
Seems the htc_ime i've used isn't the same one you used for the vid?
Code:
apt: warning: string 'kb_tutorial_exit' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja sv                                                                                                           
aapt: warning: string 'kb_tutorial_fuzzy_body' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                  
aapt: warning: string 'kb_tutorial_fuzzy_title' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                 
aapt: warning: string 'kb_tutorial_longpress_body' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                              
aapt: warning: string 'kb_tutorial_longpress_title' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                             
aapt: warning: string 'kb_tutorial_main_desc' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                   
aapt: warning: string 'kb_tutorial_main_title' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                  
aapt: warning: string 'keyboard_ime_settings_fqwerty_space_summary' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja sv                                                                                
aapt: warning: string 'keyboard_ime_settings_fqwerty_space_title' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                               
aapt: warning: string 'main_menu_title' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                         
aapt: warning: string 'vibration_feedback' has no default translation in /home/adw/android_devel/apkTool/out/./res; found: da ja no sv                                                                                                      
/home/adw/android_devel/apkTool/out/./res/xml/land_phone_sip.xml:32: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'label' with value '#').                                                         
/home/adw/android_devel/apkTool/out/./res/xml/land_qwe_symbol_sip.xml:18: error: Error: No resource type specified (at 'label' with value '@').                                                                                             
/home/adw/android_devel/apkTool/out/./res/xml/land_qwe_symbol_sip.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'label' with value '#').                                                    
/home/adw/android_devel/apkTool/out/./res/xml/land_qwe_symbol_sip.xml:24: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                          
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                                  
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                         
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                               
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                                     
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_de.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                               
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_de.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                      
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_de.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                            
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_de.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                                  
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_engre.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                            
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_engre.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                   
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_engre.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                         
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_engre.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                               
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_enrus.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                            
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_enrus.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                   
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_enrus.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                         
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_enrus.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                               
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_fr.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                               
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_fr.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                      
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_fr.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                            
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_fr.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                                  
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_gre.xml:18: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                              
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_gre.xml:19: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'topLabel' with value '#').                                                     
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_gre.xml:24: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                           
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_gre.xml:43: error: Error: No resource type specified (at 'label' with value '@').                                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_rus.xml:43: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                              
/home/adw/android_devel/apkTool/out/./res/xml/land_qwerty_rus.xml:55: error: Error: No resource type specified (at 'label' with value '@').                                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip.xml:6: error: Error: No resource type specified (at 'label' with value '@.?,').                                                                                                       
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip.xml:9: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                                       
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip.xml:30: error: Error: No resource type specified (at 'label' with value '@').                                                                                                         
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_engre.xml:6: error: Error: No resource type specified (at 'label' with value '@.?,').                                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_engre.xml:9: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_engre.xml:30: error: Error: No resource type specified (at 'label' with value '@').                                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_enrus.xml:6: error: Error: No resource type specified (at 'label' with value '@.?,').                                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_enrus.xml:9: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                                 
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_enrus.xml:30: error: Error: No resource type specified (at 'label' with value '@').                                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_gre.xml:6: error: Error: No resource type specified (at 'label' with value '@.?,').                                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_gre.xml:9: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_gre.xml:30: error: Error: No resource type specified (at 'label' with value '@').                                                                                                     
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_rus.xml:6: error: Error: No resource type specified (at 'label' with value '@.?,').                                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_rus.xml:9: error: Error: No resource found that matches the given name (at 'label' with value '?').                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p12_sip_rus.xml:30: error: Error: No resource type specified (at 'label' with value '@').                                                                                                     
/home/adw/android_devel/apkTool/out/./res/xml/p20_sip.xml:14: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').                                                                                   
/home/adw/android_devel/apkTool/out/./res/xml/p20_sip.xml:22: error: Error: No resource type specified (at 'topLabel' with value '@').                                                                                                      
/home/adw/android_devel/apkTool/out/./res/xml/p20_sip.xml:33: error: Error: No resource type specified (at 'label' with value '@').                                                                                                  
/home/adw/android_devel/apkTool/out/./res/xml/p20_sip_csy.xml:14: error: Error: No resource found that matches the given name (at 'topLabel' with value '?').
And a bunch more...
8th March 2010, 01:27 PM   |  #48  
OP Recognized Developer
Thanks Meter: 339
 
1,467 posts
Join Date:Joined: Jul 2009
More
@AnderWeb
Uppss... regression...

There will be a 0.9.2 with this and some other fixes - maybe today.
8th March 2010, 01:29 PM   |  #49  
Senior Member
Thanks Meter: 14
 
494 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by Brut.all

@AnderWeb
Uppss... regression...

There will be a 0.9.2 with this and some other fixes - maybe today.

Great news take your time dude.
8th March 2010, 05:06 PM   |  #50  
Senior Member
Flag Strzelin
Thanks Meter: 29
 
272 posts
Join Date:Joined: May 2009
More
I hope you're thinking about windows version ;p

Thread Closed Subscribe to Thread

Tags
apk, apktool, reengineering, resources, xml
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes