Go Back   Android Forums > Android Phones > LG Esteem > Esteem - All Things Root

Like Tree7Likes
  • 2 Post By nuttmeg
  • 1 Post By Fuzzy13
  • 1 Post By ShinySide
  • 1 Post By nuttmeg
  • 2 Post By ShinySide

test: Reply
 
LinkBack Thread Tools
Old August 21st, 2012, 12:01 AM   #1 (permalink)
Senior Member
Thread Author (OP)
 
nuttmeg's Avatar
 
Join Date: Feb 2011
Location: Lone Star State
Posts: 7,330
 
Device(s): (SGS3)(Evo 3D)(LG Esteem)(Kindle Fire CM10)(Note 2)(LG L9)(LG F3)(Galaxy Note 3)
Carrier: Not Provided

Thanks: 1,800
Thanked 2,536 Times in 1,730 Posts
Send a message via Yahoo to nuttmeg
Default [Tutorial] How to edit smali files

Posting what i found, Thanks goes to Yorzua over @ XDA: http://forum.xda-developers.com/showthread.php?t=1052731

Thought this would make a semi good tut for anyone that wants to try and learn what smali is and how to create one.

Tools needed :
baksmalimanager.zip
This is an example of a smali file changed (in this case, Global.Actions.smali located in android.policy.jar)

_______________ Power Menu modded (smali changed) ______________



Open my zip kit ( recomended in a Theming Folder for example with apkmanager and all files you would like to mod )

What you get :
  • Baksmali
  • Baksmali ( executable Jar File )
  • Command.exe ( Shell file )
  • Notepad text with the two commands for decompile and compile already made for you ( just copy and paste into command.exe )
  • Smali
  • Smali ( executable Jar File )


1. So the only thing you need is to place your apk in the smali kit folder


2. To Decompile :

Code:
java -jar baksmali.jar -x yourfile -o classout
(classout folder can be renamed to whatever you want, doesnt matter until you dont forget to change the name too in the second command)

3. Make the modifications you want for smali files


4. To Compile again :

Code:
java -Xmx512M -jar smali.jar classout -o classes.dex

5. Copy and paste the file classes.dex into your apk _ you will overwrite the old one.


Thanks to Rafalense

  1. If you follow my Tuto, you should always use apk manager 4.9 editing framework as you want to mod xml __ even better with XP rather than any windows else.
  2. Apk manager is not needed to decompile/recompile png's
  3. you just forget zip and use instead 7zip which allow you to directly drag any file you want to another zip without decompiling/compiling.
  4. Another rule is that you cant drag a xml from a zip to your hdd folder.
    you must decompile the apk first. if the xml is already modded, then you can drag it everywhere and re-drag it where you want.
  5. Never set framework-res as 1.apk
    apk manager does everything for you, you just need to decompile,
    set always level of compression to 0 in order to avoid issues during compilation work on the framework folder decompiled and just compile.
  6. If you proceed step by step, you should be fine.
  7. Note that systemUI.apk gives a lot of issues during decompilation
    Smali files are included in systemUI so better use my tool for smali's files
  8. Last one, i will prepare a tuto to take out the title in Power menu soon
horsecharles and ShinySide like this.

Advertisements
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Join our Android Facebook Page Droidz DNA
Sign up for @copyapp with this link, and we'll both get 5 GB of free cloud storage in addition to the usual 15 GB: https://copy.com?r=bMXFAm
nuttmeg is offline  
Last edited by nuttmeg; August 21st, 2012 at 12:31 AM.
Reply With Quote
The Following 7 Users Say Thank You to nuttmeg For This Useful Post:
Fuzzy13 (August 21st, 2012), gbiggie (August 21st, 2012), horsecharles (August 21st, 2012), mike28 (August 21st, 2012), mrpnut (August 21st, 2012), ShinySide (August 21st, 2012), V SuperUser V (August 21st, 2012)
sponsored links
Old August 21st, 2012, 11:26 AM   #2 (permalink)
Senior Member
 
Fuzzy13's Avatar
 
Join Date: Dec 2011
Location: A-T-L-A-N-T-A
Posts: 7,288
 
Device(s): Nexus 5. (White 16GB)
Carrier: $60 AT&T pre paid pushing 50-60mbps

Thanks: 1,540
Thanked 2,504 Times in 1,433 Posts
Default

This is awesome. Looking at the word smali makes me twitch though. Ish looks like some unidentified language.

I would love if someone could port the ics power menu. Hint hint
nuttmeg likes this.
__________________
Suckaface
Fuzzy13 is offline  
Reply With Quote
The Following User Says Thank You to Fuzzy13 For This Useful Post:
nuttmeg (August 21st, 2012)
Old August 21st, 2012, 11:34 AM   #3 (permalink)
Senior Member
Thread Author (OP)
 
nuttmeg's Avatar
 
Join Date: Feb 2011
Location: Lone Star State
Posts: 7,330
 
Device(s): (SGS3)(Evo 3D)(LG Esteem)(Kindle Fire CM10)(Note 2)(LG L9)(LG F3)(Galaxy Note 3)
Carrier: Not Provided

Thanks: 1,800
Thanked 2,536 Times in 1,730 Posts
Send a message via Yahoo to nuttmeg
Default

Quote:
Originally Posted by Fuzzy13 View Post
This is awesome. Looking at the word smali makes me twitch though. Ish looks like some unidentified language.

I would love if someone could port the ics power menu. Hint hint

I'd tinker with it around 3 am and got mad as hell and grab a cigar, you think messing with xml was a headache, this is horrible. ahahaha
nuttmeg is offline  
Reply With Quote
Old August 21st, 2012, 11:41 AM   #4 (permalink)
Disabled
 
Join Date: Jul 2011
Location: Palm Bay, Florida
Posts: 5,504
 
Device(s): Huawei Ascend-PlayfulGod's CM7.2 0912 @729 LG Esteem(stock) LG Esteem- running #2
Carrier: Metro

Thanks: 944
Thanked 2,683 Times in 1,460 Posts
Default

Quote:
Originally Posted by nuttmeg View Post
I'd tinker with it around 3 am and got mad as hell and grab a cigar, you think messing with xml was a headache, this is horrible. ahahaha
That would be an understatment. Ahaha
nuttmeg likes this.
ShinySide is offline  
Reply With Quote
The Following User Says Thank You to ShinySide For This Useful Post:
nuttmeg (August 21st, 2012)
Old August 21st, 2012, 11:53 AM   #5 (permalink)
Senior Member
Thread Author (OP)
 
nuttmeg's Avatar
 
Join Date: Feb 2011
Location: Lone Star State
Posts: 7,330
 
Device(s): (SGS3)(Evo 3D)(LG Esteem)(Kindle Fire CM10)(Note 2)(LG L9)(LG F3)(Galaxy Note 3)
Carrier: Not Provided

Thanks: 1,800
Thanked 2,536 Times in 1,730 Posts
Send a message via Yahoo to nuttmeg
Default

Quote:
Originally Posted by ShinySide View Post
That would be an understatment. Ahaha

i had to watch myself for a minute there when i had posted that, that smali had me HOT. lmao
ShinySide likes this.
nuttmeg is offline  
Reply With Quote
Old August 21st, 2012, 12:19 PM   #6 (permalink)
Disabled
 
Join Date: Jul 2011
Location: Palm Bay, Florida
Posts: 5,504
 
Device(s): Huawei Ascend-PlayfulGod's CM7.2 0912 @729 LG Esteem(stock) LG Esteem- running #2
Carrier: Metro

Thanks: 944
Thanked 2,683 Times in 1,460 Posts
Default

I posted about samli once..Looked something like this when I hit post: **** ** ******* ****** *** ***** **** ******** ****** * *** * *****!!!!!!!!!!!!!!!!!
nuttmeg and joshadaniels04 like this.
ShinySide is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Phones > LG Esteem > Esteem - All Things Root
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:37 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.