FORUMS

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

Optimize Battery Life with This Useful App

Battery life is an important aspect of your smartphone, especially if you use it for more … more

The OnePlus 2 & The Year of Smartphone Compromises

We are very close to entering the last third of 2015, and we have now seen many of … more

OnePlus 2 Teardown, Major Android Vulnerability – XDA TV

The OnePlus 2 has been officially released. That and much more news is … more

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

1,467 posts
Thanks Meter: 343
 
By Brut.all, Recognized Developer on 2nd March 2010, 01:25 AM
Thread Closed Subscribe to Thread Email Thread
7th March 2010, 05:19 AM |#41  
myn's Avatar
Senior Recognized Developer
Thanks Meter: 4,003
 
Donate to Me
More
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, 01:16 PM |#42  
Senior Member
Thanks Meter: 4
 
More
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, 12:50 AM |#43  
Senior Member
Thanks Meter: 0
 
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, 09:31 AM |#44  
OP Recognized Developer
Thanks Meter: 343
 
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 09:33 AM.
8th March 2010, 11:19 AM |#45  
Senior Member
Thanks Meter: 14
 
More
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, 11:27 AM |#46  
OP Recognized Developer
Thanks Meter: 343
 
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, 11:55 AM |#47  
Senior Member
Thanks Meter: 14
 
More
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, 12:27 PM |#48  
OP Recognized Developer
Thanks Meter: 343
 
More
@AnderWeb
Uppss... regression...

There will be a 0.9.2 with this and some other fixes - maybe today.
8th March 2010, 12:29 PM |#49  
Senior Member
Thanks Meter: 14
 
More
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, 04:06 PM |#50  
Senior Member
Flag Strzelin
Thanks Meter: 29
 
More
I hope you're thinking about windows version ;p
8th March 2010, 06:21 PM |#51  
Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Brut.all

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 :)

Okay that's fixed. Now I have:
Code:
scott@ubuntu:~/modmaps$ apktool d ~/Downloads/maps4.0.0-brut6.apk ~/modmaps/
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Edit: I ran it from my home directory instead and it worked.
Last edited by canadiancow; 8th March 2010 at 06:28 PM.

Read More
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