5,596,637 Members 42,660 Now Online
XDA Developers Android and Mobile Development Forum

[Utility][Tool][Windows] Baksmali / Smali Manager (update 23/11/2013)

Tip us?
 
majdinj
Old
(Last edited by majdinj; 23rd November 2013 at 05:57 PM.) Reason: version 1.58 is online
#1  
majdinj's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 2824
Posts: 980
Join Date: Nov 2006
Location: AlAhsa
Prompt [Utility][Tool][Windows] Baksmali / Smali Manager (update 23/11/2013)

Baksmali / Smali Manager



Quote:
Credits to the owner of smali and baksmali codes: JesusFreke.

You can visit his project page here:
https://code.google.com/p/smali/
What is Baksmali / Smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.

Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With baksmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).

Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.

What does this tool do?
Simply it baksmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).

Will it affect apk and jar original signature?
No, it will preserve original signature.

Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.

What are the steps to work with this manager?
Run Baksmali_tool.bat file, this will create all needed folders in the first run..
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, push it to your device by option #3 if it was system apk or jar; and if it was non system apk file, install it by option #4.

If baksmali and smali code are outdated, what to do?
Just visit codes owner page, and download the latest smali and baksmali code versions and put them in "tools" folder (make sure to rename them to baksmali and smali without version number)

Future development?
Feel free to report any bugs or suggestion to improve upcoming releases

Download
- Baksmali-Manager_v1.58 @ 23/November/2013 (The newest)
- Baksmali-Manager_v1.57 @ 13/October/2013
- Baksmali-Manager_v1.56 @ 8/October/2013
- Baksmali-Manager_v1.55 @ 5/October/2013
- Baksmali-Manager_v1.5 @ 29/June/2013
- Baksmali-Manager_v1.4 @ 23/June/2013
- Baksmali-Manager_v1.3 @ 19/June/2013
- Baksmali-Manager_v1.2 @ 11/June/2013
- Baksmali-Manager_v1.1 @ 7/June/2013
- Baksmali-Manager_v1.0 @ 6/June/2013

Change-log:
Code:
v1.58 @ 23/November/2013
- Added option to baksmali using .locals instead of .registers in option 1
- Clear reboot options after pushing your file to your device in option 3
- Update baksmali and smali codes to v2.0.2

v1.57 @ 13/October/2013
- Added ability to push to preload partition in option 3.
- Added ability to perform hot reboot after pushing the modded file in option 3
- Update baksmali and smali codes to v2.0 (date 10/10/2013).

v1.56 @ 8/October/2013:
- Fixed some syntax for full compatibility with new WIN 8 cmd version (Thanks to @c0pyright for testing).

v1.55 @ 5/October/2013:
- Update baksmali and smali codes to v2.0b6 (date 14/9/2013).
- Update adb, zipalign engine from android sdk 20130917.
- Corrected some typo errors.

v1.5 @ 29/June/2013:
- Fixed adb remount bug for some ROMs in push option.
- Baksmali argument is updated; now you can choose whether to baksmali with x argument (retain .line, .parameter, .prologue, and .local) or b argument (remove .line, .parameter, .prologue, and .local).

v1.4 @ 23/June/2013 (v1.4):
- Added Pull apk or jar From Android Device to the main menu.
- Added zipaligning process during Smali (better RAM management).
- Fixed apk installing process (added signing process step for installing apk process).
- Added direct link to this xda page in update option.
- More script polishing...

v1.3 @ 19/June/2013 (v1.3):
- Added adb push finished file to device system partition (for system files) "This option needs to have insecured boot image OR adbd insecure installed on android device".
- Ability to choose whether to reboot device after pushing files to device.
- Added adb install finished apk (for non-system files).
- Adjustable Java heap memory size.
- Adjustable finished file compression level.
- Updated Smali and Baksmali codes (date 15/6/2013).


v1.2 @ 11/June/2013 (v1.2):
- Fixed bug of file path in Read Log option.
- Fixed number 10 file that was not shown in Set Current-file option.

v1.1 @ 7/June/2013 (v1.1):
- Deleting the folder and file in project and finish folder of same project name before baksmali or smali (no more overlapping :fingers-crossed:).
- Added Read log file functionality in the main menu.
- Ability to open classout folder after baksmali.
- Ability to open finish folder after smali.
- Ability to renamed finished modded file to its original name.
- Neat smali and compression processing (i.e, hidden processing :cool:).
- Fixed set Current-file option to visualize only apk and jar files.

v1.0 @ 6/June/2013 (v1.0):
- First release of Baksmali / smali manager

Special Thanks to XDA Portal Team For Featuring This Utility:
http://www.xda-developers.com/androi...smali-manager/
Attached Thumbnails
Click image for larger version

Name:	001.png
Views:	1057
Size:	37.5 KB
ID:	2054932   Click image for larger version

Name:	002.png
Views:	1094
Size:	40.8 KB
ID:	2062571  
The Following 62 Users Say Thank You to majdinj For This Useful Post: [ Click to Expand ]
 
hara74
Old
#2  
hara74's Avatar
Senior Member
Thanks Meter 602
Posts: 1,334
Join Date: Feb 2012
Location: Herrstein
hi m8,
thanks for this nice tool
will try it next time I make a new theme

sent from my G-Note
Biftor™SlimKat Rom V6.0 - HATOs Green Dragon
Modem: XXLT4
Kernel:


HATO-Themes
hara´s Batterie Icons


to hit the Thanks Button is not a shame
 
zeyadhan
Old
#3  
zeyadhan's Avatar
Senior Member
Thanks Meter 116
Posts: 447
Join Date: Jul 2012
Location: tripoli
great work majd keep it up
MY DEVICES
 

GALAXY S3
XPERIA S
XPERIA X10
SENSATION XL
GALAXY NOTE
GALAXY MEGA6.3
XPERIA Z
GALAXY NOTE 3



HIT IF I HELPED
 
iBotPeaches
Old
#4  
iBotPeaches's Avatar
Senior Member
Thanks Meter 2042
Posts: 693
Join Date: Apr 2011
Location: KCK

 
DONATE TO ME
no credit to the author of smali/baksmali? :/
 
majdinj
Old
#5  
majdinj's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 2824
Posts: 980
Join Date: Nov 2006
Location: AlAhsa
Quote:
Originally Posted by iBotPeaches View Post
no credit to the author of smali/baksmali? :/
I think the authers are these guys (jesusfreke@jesusfreke.com, bgruv@google.com, JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
 
iBotPeaches
Old
#6  
iBotPeaches's Avatar
Senior Member
Thanks Meter 2042
Posts: 693
Join Date: Apr 2011
Location: KCK

 
DONATE TO ME
Quote:
Originally Posted by majdinj View Post
I think the authers are these guys (jesusfreke@jesusfreke.com, bgruv@google.com, JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
Yes, thats the same person. I'd just put JesusFreke, as thats his username.
The Following User Says Thank You to iBotPeaches For This Useful Post: [ Click to Expand ]
 
majdinj
Old
#7  
majdinj's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 2824
Posts: 980
Join Date: Nov 2006
Location: AlAhsa
Version 1.1 is online
The Following 2 Users Say Thank You to majdinj For This Useful Post: [ Click to Expand ]
 
majdinj
Old
#8  
majdinj's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 2824
Posts: 980
Join Date: Nov 2006
Location: AlAhsa
version 1.2 is online
some bugs fixed
 
ezaechiel
Old
#10  
ezaechiel's Avatar
Senior Member
Thanks Meter 594
Posts: 504
Join Date: Mar 2013
Location: Issou

 
DONATE TO ME
What a great idea to simplify life ^^.

Thanks majdinj.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes