HOW TO Decompile/Recompile /edit smali ICS

I promised id make this so here it goes

Download Wanams Apk Manager
or Download link

and Win rar

A few notes..
when doing smali edits .. dont do them at the same time as xmls or pngs
Whe doing jar files and classes.dex i use
AutoAPKTool2.0.4
(or just smali baksmali in command
if enough people want this i will include it )

Lets Use a Deodexed ICS SystemUi.apk


Code:
-Place systemui.apk in place-apk-here-for-modding

-then run script.bat in apk manager root folder

-now select your project .. (option 22)
and then option 1 for systemui.apk
and hit enter

now press option 9 (decompile)

it should run a few lines then complete...

Now go into the folder titled projects and find your systemui folder

lets just use one file for example we will call it default_wallpaper.png

you would place this in res/drawable hdpi/default_wallpaper.png

replacing what is already there

now go back to the script and this time select option 11 (compile)

as long as you didnt mess up any .9pngs or include any extra unidentified pictures it will compile without errors ( if you encounter errors its something you did check the logs.txt)

so now the program will ask you is this a system file
say yes

next it will ask you if you want to make a copy of everything in a keep folder
to ensure everything works right.... now there are three options

If you edited pictures say yes

if you edited xml files say yes

if you edited smali files say no and skip to finalizing with win rar down below



so youve said yes bc you only made picture edits

sp now go into apkmanager folder called keep

and navigate back to res/drawable hdpi/default_wallpaper.png and delete it


and also:::::: only if you decided to edit any xml files.....

make sure you delete resources.src at this point


now go back to your script ... since it should say hit enter to continue..

hit enter



FINALIZING THE FILE WITH WINRAR
Code:
Now navigate back to place apk here for modding

and find unsignedsystemui.apk

double click it and open it with winrar

extract the contents


now navigate to the newly extracted unsignedsystemui folder

highlight everything and right click

say add to archive


rename it SystemUI.apk

set it as a zip (but rename zip extension to apk)

and set it to store

hit ok and Voila You have a newly edited and resigned Apk file

If You want to change Bat%Icon in status bar! This is how you can do it! Follow the guide step by step and you will be done within minutes!

http://forum.xda-developers.com/show....php?t=1434061


I didn't wanted to write so here I just got it from xda user so thnx to him.

For only .pngs!


Originally Posted by Andrewtst  View Post Changing/Replacing the .png file inside .apk

  • Amending normal .png no need to de-compile, just extract the file and modified using any photoshop tools or simply replace the .png
  • Just right click any .apk file and select 7-zip extract to, as seen below:
  • Now go to the extracted folder and amend / replace any .png file you like to replace. (Remember .9.png file cannot just simply replace, check following post for instruction.)

This is how to work with .9pngs!


Originally Posted by Andrewtst  View Post Modifying tricky .9.png file.

  • The .9.png cannot just simply amend using any photoshop and put back, because by doing so, either the amend .9.png won't appear or just simply give you FC in your phone when running it.

What to do:
  • De-compile the .apk.
  • Below showing the different between before and after de-compile of .9.png, as you can seen on right image,they is extra 4 black dot + 1 black bar and surrouding with transparent bar, all this area must be keep and not amend during photoshop. The de-compile image will auto increase 1 x pixel + 1 y Pixel.
  • Just amend without touching those area, save it and then put back to correct folder and compile back.
And This is how u can do XML!


Originally Posted by Andrewtst  View Post Modifying .xml file

  • After you have de-compile the .apk, now all inside .xml is readable where you can make some changes on the color selection, clock position and etc. by just simply open with notepad and modified.
  • Before de-compile, the .xml look like below which is not readable and understand by human.
  • After de-compile, now the .xml is readable and understand by human.
  • Now you can amend what ever you like, Google/Search XDA forum for which .XML to amend.
  • Use this color code checker site for getting your desire color code.
  • After done, don't forget, you must compile back the .xml before it is understandable by Android OS.
  • Screenshot below showing modifying the sub text .xml to ICS blue color.


    Change all
    Code:
    from android:color="#ffffffff to android:color="#ff3f9bbf
    at zzz_tw_secondary_text_sub.xml

Also have a great setup here. With special tools for frame rrs and systemui

And this for editing colors.xml which makes life so much easier

Color edit tool can be found here http://forum.xda-developers.com/show....php?t=1348613

Its for editing colors.xml in decompiled framework-res
Dont have to enter hex. Just click and select color

And an fyi. U also need twframework-res installed to decompile Mms.apk properly.

And if u want to edit .9pngs u need photoshop or paint.net.
Zoom in 800 percent so u can see the 1 pixel border.
Do not touch the border pixels. Use rectangle select.
And cut whats inside the border.
Open new. Paste and do ur changes
Then merge the edited cut layer back inside the border.

Or look up how to use draw9patch. In the sdk tools. But its not nearly as simple.\
You will also need notepad ++ to edit xml's and updater scripts. A simple text editor/notepad will corrupt them

    0 comments:

    Post a Comment

    Open Panel

    Blogroll

    counter