[THEMING GUIDES][EASY METHODS][ALSO FOR NOOBS][Playing with 9.pngs] - Micromax A110

///How to easily edit 9.pngs easily \\\
Lets start ...
Step 1
Decompile the app.
Step 2
Enter into res/drawables
Step 3
open 9.png with paint.net(preffered)not tested others
Get it here (www.getpaint.net)
Step 4
change its color to ur wish (note--dont touch those 4 borders at the ends)
Step 5
Close and save png
Step 6
Now recompile
Step 7
Install
congo it works fine.............
No need of draw9patch...
Notes:
Must knw how to compile- recompile apps.
Must try more coming soon..........
Dont Spoil This Thread Please!!!!
PRESS LIKE BUTTON IF U LIKE MY WORK

Today i will guide you on how to decompile with Apk Tool,so I would post here
Needed files :-
Windows
ApkTool
Java JDK/JRE 32 bit
Cmd/terminal knowledge
Step 1
First you need to extract that zip folder to anywhere you choose, preferably on root of c/drive E.g: C:/android/apktool extracting the files to 'apktool' folder.
Step 2
Now copy the apk you would like to mod into your Apk Tool folder.
Step 3
Command Prompt:
Open up your Command Prompt by going to:
Start -> run -> type : Cmd
Step 4
Your cmd will probly look like this..
C:\users\yourname>
so type in
cd.. (Yes include the '..' and press enter after you type each command.)
this will get you to back directory so now you will see
C:\users>
so type again
cd..
you should now see this:
C:\>
now type in:
cd 'apktoo'l/'directory'
for me it looks like:
cd android/apktool
now you should see:
C:/android/apktool>
and you are in the apktool directory
Step 5
Installing Framework
Now that you are in directory we need to install the device's framework to your system for it to compile correctly so type this:
apktool if framework-res.apk
This will install the devices framework to your system. need to do this.
Step 6
Decompiling
Now to decompile the apk you want to edit, type this:
apktool d framework-res.apk framework1
Step 7
Recompiling...
Now to recompile your new apk type this:
apktool b framework1 framework-res-new.apk
framework1 is the folder with your edited files
framework-res-new.apk is your new apk file
We cannot use the new apk's... we have to take what we did and add it back to the original apk file to keep proper signature
use something like 7zip or winrar, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original apk
Your new modded APK is now ready, Congrats!:highfive:
Good Luck ..
must try

Just For Knowledge....
If... we use 7zip.. extract apk on desktop..
then replace modified.png with orignal.png
then aad to orignal apk
or
we just hunt png which we want to replace.
just extract that one with same res. & name
then add that on it right place
Is that working???
i.e. I want to replace icon of Gallary3d (JB4.3) (Gal+Cam)
with icon of samsung s4 icon Gallary2 (Gal+Cam)

Related

[i9001][DEV/GUIDE]----Make your own ROM & KERNEL!----

Ok,let's start with kernel first....
I want this guide to be n00b friendly...so lets start!
1)Install Ubuntu 10.10 or later(virtual distro may work too!)......Ubuntu coz its easy for beginners....This guide should work on Fedora distros,but u will need to download separate packages.
Use this for samsung devices:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
3)Open terminal and download the the necessary tools:
For 32/64 bitsi use this)
Code:
apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
For 64 bits ONLY:
Code:
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
4)Download the code soucery toochain:Toolchain
Note:This is an old toolchain.u may/should use a newer one...(optional)
ur machine is good to GO!
Ok,so i assume u have set up your machine
Now,all of the files should be placed in ~/Downloads (for my convinience to explain!but u may put it anywhere)
extract the sources and everything else u downloaded....then go into the top directory
Code:
cd Kernel
u enter into the root of the kernel directory with this
then type :
Code:
gedit Makefile
The Make file will open.........look out for this and change CROSS_COMPILE= "your toolchain path"
EXAMPLE:
Code:
CROSS_COMPILE ?= /home/sarthak/Downloads/Toolchains/arm-eabi-4.4.3/bin/arm-eabi-
This will open up the Makefile in a gedit,and the changed values will correspond to wherever u placed your toolchain................the EXTRAVERSION refers to current sub-version of your linux kernel version on ur phone
Get the config from your phone..Type:
Code:
adb pull /proc/config.gz
This will fetch a working config from the current kernel on your phone....u can alternatively make a new one with "make menuconfig"
Then gunzip it and copy it to to ur kernel source root:
Code:
gunzip config.gz
rename to .config
Now,make the necessary changes in your source.When you are done,type:
Code:
make -jX
,where X=no.op cpu threads multiplied by 1 or 2.
Sit down and have a smoke!
The resulting kernel will be in Kernel/arch/arm/boot/zImage
Easy,ain't it?
Remember,this guide doesnt teach u how to make particular changes,it just helps u setting up your build environment and compiling from a given source.
This will work for all android phones!
Making Rom Under Windows
This post is for making your custom rom under Windows environment..
FEw basic steps based on guide by bangalore rohan
-Cygwin
-Android Kitchen by dsixda
-Patience
-Base ROM(like xxkps,zskp7,etc.)
LOOK AT THIS POST FOR A KITCHEN THAT SUPPORTS i9001
-MagicISO
PS-> WIndows 7 users set the UAC level to minimum until you finish the whole thing. And also, make sure that nothing wxcept the META-INF folder in your ROM ins capital in letters!
STEP 1
First of all, let us get the ROM files:
A)
Download terminal emulator from market.
Then open it and type 'su' without quotes and press enter. Then it will ask for root rights.
Grant them.
Then type this line and press enter key
Code:
tar -c /system/* >> PDA.tar
You will get a file named pda.tar in ur sd card.
Then after that type 'mount'
While getting pda.tar if ur phone hangs wait for sometime if it still doesn't repond then remove battery and start the phone .
2)Another way to get the files
Get something like Root Explorer from market........
Copy the /system folder somewhere and put it onto ur comp.
After that, you may find something with folders like, : app, vendor,etc,media and xbin.
NOTE-There are other ways,like mounting the system.ext4.img in linux....
Step 2:Installing cygwin on Windows(U dont need this on linux!)
Installing the Cygwin and Setting up the Kitchen
Download the Cygwin files attached below. Extract the zip to a folder. Now, you can see 3 icons, a read-me,a setup, and a folder. Choose the setup. Here You will choose install from local directory. Next, Navigate to the the folder of extraction of cygwin and choose the folder Cygwin_packages inside the cygwin extraction folder. Wait for some time. Then, You will come across a list of file. Click the 2-circle-arrows,untill, it displays “install”
After the procedure is complete, run the batch file. Now, minimise it and extract the android kitchen.
Keep it in some location like C:\Kitchen
Now, open the batch file window and type
cd C:\Kitchen
Wait for some time and then when the location the changed, type
./menu
As this is a HTC kitchen, you can't use all the features.....U can also manually make changes w/o use kitchen.
Go back to the directory,and make a .zip(I REPEAT-A .zip) of the files like META-INF,data,system etc.
When u r done,u r good to flash it !
Ending Notes/Tips
Do not forget to sign the rom!u can find it in the rom kitchen menu..
Its pretty much the same of linux,but
*U dont need to install Cygwin(or u cant!)
*It's much faster!
U can also use kitchen to unpack/re-pack a boot.img of ur choice.
To get boot.img,download any kernel,take the boot.img out,and using kitchen,split it
U will get ramdisk and zImage....Replace the zImage with your own!
Then pack it again...
To make updater-script,use META-INF from some other rom,or make ur own..
WANT TO MAKE UR OWN THEME?Take a look below..........(by wilfredcool007)
Theme Developing, XML Editting:
Tools Needed :
APK Manager Photoshop or other photo editing software’s ( corel draw etc etc) FS Resizer or GIMP NOTEPAD ++ From the start:
Make sure u hav a deodexed ROM….If your ROM is not deodexed dendsixda's kitchen with the help of cygwin to deodex…. You will get a zip or rar file in which u will find “meta inf” and “system”…. We will be concentrating only on the system folder…..Extract it to the desktop or which ever location u want…. Inside the system folder u would see folders called “app” “framework” “media” “bin” etc…. Let me explain what does these folders Hav to do,,,,,
v “app” is the major folder which has to do with all the pre installed apps(default apps) like calculator camera mms(messaging) touchwiz bluetooth etc…..
v “framework” is the folder associated with the body formation (i.e) the skeleton of out fit…..examples like the battery icon,icons in the notification panel like “autorotate” “Wi-Fi” “GPS” etc….
v “media” consists of “bootanimation.zip” file allows u to change the boot animation ( we would discuss about this later)
Procedure for only ICON changing
TUTORIAL ON HOW TO CHANGE THE ICON OF APPS:
STEP 1: First go into the “apps” folder and extract everythin(if u wish extract everythin or extract only the file u want) to the desktop…….
Don’t be bothered about the .odex files… concentrate only on the .apk files….. for ex: if u wish to change the “messaging” icon…select mms.apk….enter into that and u would find folders called “res” “metainf”…….. ENTER into “res” folder and u would see folders such as “drawable” “drawable ldpi”( or similar to that) leave the folders like “xml” etc and just concentrate on “drawable-ldpi” and extract it to the desktop…..enter into that folder and u would find all the images which u see on the mobile while messaging….. Hope u would remember how the icon for the messagin app be….now search for that….for this apk it would be as “ic_launcher_smsmms”….. and BINGO your done…… download a png of the icon u want from google (for that go into google and type message icon png and select images…. Select the image of ur choice and save it) now copy that downloaded image (for ex the downloaded image name is 123.png replace that name to “ic_launcher_smsmms”)After renaming it copy and replace the default image in the “drawable ldpi” folder….. Similarly make changes for wat ever icon u want but REMBEMBER the icon ur changing should hav the same name of the default icon” Since u’ve modded(changed) only the “drawable ldpi” folder copy that folder in which u hav changed the icon to the folder in “res” of “mms.apk”…… to make it clear delete the default drawable ldpi and replace it with the one u modded from the desktop……(to replace just drag from the desktop to the rar file) IF WINRAR asks a confirmation “update changes made” click YES…… cool now u’ve changed the icon of the messaging app…. Similarly try replacing the default icon of the calculator camera dialer tab activity etc by just moving into the apk file “res”à”drawable ldpi (hdpi, land-ldpi or wateva) To go more interior take dialer tab activity and follow the above steps first.,….den replace the number icons, dialer_tab_background image with any image u like J but it should be of PNG and of the same default name while replacing it in the folder…… That’s it now u’ve learnt how to change the icons and images…… Now do the reverse of STEP 1….. copy the modded(changed) apk files from the desktop into the “system”à”app” folder and don’t forget to save the changes….. TUTORIAL ON HOW TO CHANGE THE ICON OF FRAMEWORK:
SIMILARLY just like how u replaced the icons of “apps” try replacing icons of framework folder…. Open “framework” folder…..u’ll find many .JAR files and “framework-res.apk” and “twt-framework.apk” Go into framework-res.apkàresàand extract drawable (ldpi,hdpi,mdpi,land-hdpi) or wateva file is der to ur desktop…. Just as how u did it in “apps” replace the PNGS in it…. For ex: replace the alarm clock icon “auto rotate” “vibrate” “sound””battery icons” etc….. After doing all the changes in drawable folder replace the drawable folder in “framework-res.apk” and replace this “framework-res.apk” in the framework folder of the RAR file…. XML EDITTING:
XML editing is the trickiest and difficult part yet a challenging part
To do this u must need “apk manager” version 4 or higher…..
These are the folders inside the apk manager
Take the apk file for which u r goin to edit the xml for example to change the conversion of sms to mms from 4pgs to any no of pgs u want……copy the “mms.apk” file from “system”à”app” to “PLACE APK HERE FOR MODDING” of the apk manager….. HINT: for beginners u can edit only one file at a time :O After this open “SCRIPT”
ULL find a window like this…..IF u hav placed mms.apk file in “PLACE APK HERE FOR MODDING” den “NONE” would be shown as “mms.apk” or if u had placed “touchwiz.apk” it would show as “touchwiz.apk” on the place of NONE
Now press no 9….. the “DECOMPILING” would start and would finish with no alert…
now go to the “APK manager” folder and go into “PROJECTS” u’ll find mms.apk or wateva apk u hav used….
Den go into “RES”à”XML” ..... u’ll find “mms_config” open it with notepad or notepad++….(notepad++ is advisable and recommended)
You will find a line called <int name="smsToMmsTextThreshold">4</int> replace that four with whatever number u want….
Well u hav learnt how to edit the XML’s also…….try to edit xml of touchwiz (androidmanifest.xml) to enable touch wiz rotation or touchwiz(launcher_config{to change number of rows and columns}….”default_mainapplication_order”{to change order of the apps in the touch wiz}
All the changes must be made in the projects folder and COMPILE it again by pressing number 11…..
copy the COMPILED .APK back into “apps” or “framework-res” or from wer ever u took the apk file…..
THEME DEVELOPING DOESN’T COME WITHIN A DAY SO TRY IT REPEATEDLY TILL U GET THE ART OF IT
Click to expand...
Click to collapse
Make An Odin-Flashable One-Package(by broodplank1337)
Here's how to make an odin flashable:
unpack the base rom:
adsp.mbn
amss.mbn
boot.img
cache.img.ext4
preload.img.ext4
recovery.img
system.img.ext4
Now go into adb shell and do:
Code:
adb shell
su
mount -o remount rw /system
dd if=/dev/block/mmcblk0p8 of=/sdcard/boot.img bs=4096
dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img bs=4096
dd if=/dev/block/mmcblk0p15 of=/sdcard/system.img.ext4 bs=4096
copy those files in the base rom dir
then do the following:
Code:
tar -c adsp.mbn amss.mbn boot.img cache.img.ext4 preload.img.ext4 recovery.img system.img.ext4 > craniumrc5.tar
then do this:
Code:
md5sum –t craniumrc5.tar >> craniumrc5.tar
mv craniumrc5.tar craniumrc5.tar.md5
Click to expand...
Click to collapse
NOTE:U can change 'Cranium' to anything u wish!
Windows users,take a look at this for managing .tar.md5 archives!(buy nikagl)
DOWNLOADS
Rom kitchen by dsixda
Cygwin packages
Sign Your Zip
QtADB(Nice Software to manage ,well Everything!)
Sample Kernel Sources On Github
Cranium Kernel by sakindia123
Feacore_Phoenix by manveru0
sakindia123 said:
finally the last one.this should be enough!
Click to expand...
Click to collapse
Reading and waiting
Sent from GT-I9001 using XDA Premium
i'll try to install those tools in Arch Linux. Wish me luck cuz i m really nOOb)
Arch Linux a simple, lightweight linux distribution
u cud say i completed the guide ,so go ahead and take a look!
A good one... but isnt the theme devoloping which u've written is my file...
wilfredcool007 said:
A good one... but isnt the theme devoloping which u've written is my file...
Click to expand...
Click to collapse
yup i know........that's i put it in quotes
didnt know u were on xda.......will add ur name der
sakindia123 said:
yup i know........that's i put it in quotes
didnt know u were on xda.......will add ur name der
Click to expand...
Click to collapse
^_^ cool thanks
---------- Post added at 06:01 PM ---------- Previous post was at 05:45 PM ----------
http://www.multiupload.com/IBYDUCRX4S
@sakindia123: the above link is a file which helps in auto signing the ROM
thought it might complete ur work
Updated the guide with even more information!
a lil of something about adding modules would be nice too
oh , u might also find this thread useful ( yes yes i'm aware it's a whole different kernel on the desire )
thanks for that link...pretty interesting stuff!
also, u might do "make modules" or even "make" to compile modules...
hope u finish your guide,otherwise I have installed ubuntu for nothing
sakindia123 said:
Ok,let's start with kernel first....
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
Click to expand...
Click to collapse
Colud you provide commands(for git repo) and links(what to download from samsung.com) for this part??
sakindia123 said:
4)Download the code soucery toochain:Toolchain
Note:This is an old toolchain.u may/should use a newer one...(optional)
Click to expand...
Click to collapse
Could you provide link for latest toolchain, because i cannot find last one.
Sorry for asking details but it would be nice if that HOWTO was for Noobs .
And of course, done a very good job.
oisis said:
Colud you provide commands(for git repo) and links(what to download from samsung.com) for this part??
Could you provide link for latest toolchain, because i cannot find last one.
Sorry for asking details but it would be nice if that HOWTO was for Noobs .
And of course, done a very good job.
Click to expand...
Click to collapse
i will upload new toolchain later
and i just saw that i9001 doesnt have a git repo by samsung................
in the search field,search for "i9001"...as simple as that!
BTW, to clone any repo,here's the syntax
Code:
git clone url
where url is replaced with the url of git repository
sakindia123 said:
i will upload new toolchain later
and i just saw that i9001 doesnt have a git repo by samsung................
in the search field,search for "i9001"...as simple as that!
Click to expand...
Click to collapse
So we have to download from this site latest SGS+ package: GT-I9001_OpenSource.tar.gz. Right?
sakindia123 said:
BTW, to clone any repo,here's the syntax
Code:
git clone url
where url is replaced with the url of git repository
Click to expand...
Click to collapse
So this part is not working for us because there is no GIT repo for i9001.
What about the kernel, it can be any linux kernel or we have to download kernel for Android from some site? I just download Cranium kernel but maybe someday will need vanilla kernel(not from Cranium).
I created a thread for DOS (sorry, no unix, could have done that too but mainly use my Win7 laptop for this stuff) scripts that allow building the Odin package based on broodplanks instructions:
http://forum.xda-developers.com/showthread.php?t=1399356
Regards,
Nika.
if u want to compile vanilla kernel,first clone the Cyanogen Mod kernel source like this (since android servers are probably down)
Code:
git clone git://github.com/CyanogenMod/cm-kernel.git
For more instructions,take a look here

[Guide]How To Edit Apk + Video

I am here with my first tutorial...:silly::silly:
So lets start..
Things Required are
1. Apk manager
2. Notepad++
3. A bit of mind
4. Java(JDK) installed
:victory::victory::victory::victory::victory:
So pull out your apk from the phone to computer
and place it inside the folder "place apk here for modding" in apk manager (after extracting apkmanager)
now open script and type 22 and hit enter
now select your apk no. ex. 1 type 1 and hit enter.
Now type 9 to decompile your apk
GO to projects folder in that u'll find a folder name apkname.apk
now edit it whatever u like......blah blah blah........:highfive::highfive::highfive:
now after editing we need to compile it.
so open script
type 11 hit enter...
it'll ask u if it is a system apk or not if it is press y else n and hit enter.
if it is a system apk again press y and enter.
Now go to the keep folder...
if u have edited any .xml files then delete resource.arsc
and all the .xml which u have edited...
again restore script press any key and ur apk is ready...
Video Tutorial by me :laugh::laugh:
http://www.youtube.com/watch?v=NuavNsIaErE
Hey U didnt hitted Thanks button yet​

[GUIDE] [N00B] How to decompile/recompile .apk

GUIDE
What will you Need:
ApkTool
Java JDK/JRE 32 bit
Terminal knowledge
Brain
Instructions
Extract zip folder to anywhere you choose. E.g: C:/android/apktool extracting the files to 'apktool' folder.
3.Now copy the apk to your Apk Tool folder.
2. Open your terminal
Your terminal will look like this...
C:\users\yourname>
Code:
[COLOR="Black"]cd.. → go back
cd.. android → go to this folder[/COLOR]
(Yes, it contains "..")
So you must be in your folder apktool (E.q: C:/android/apktool>)
3. Installing Framework
Code:
apktool if framework-res.apk
(framework-res.apk is only example.. You can type "apktool if SystemUI.apk",...)
4. Decompiling
Code:
apktool d framework-res.apk framework1
(framework-res.apk is apk which you want to decompile and framework1.. You can type "apktool if SystemUI.apk",...)
Now you can enjoy it!
5. Recompiling/Finished Product
Code:
apktool b framework1 framework-res-new.apk
(framework1 is the folder with your edited files and framework-res-new.apk is your new apk file)
You can't use the new apk... You have to take what you did and add it back to the original apk file to proper signature.
Use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original .apk.
Congratulations! You modded .apk!​
you can help i know...
Mlopik said:
GUIDE
What will you Need:
ApkTool
Java JDK/JRE 32 bit
Terminal knowledge
Brain
Instructions
Extract zip folder to anywhere you choose. E.g: C:/android/apktool extracting the files to 'apktool' folder.
3.Now copy the apk to your Apk Tool folder.
2. Open your terminal
Your terminal will look like this...
C:\users\yourname>
Code:
[COLOR="Black"]cd.. → go back
cd.. android → go to this folder[/COLOR]
(Yes, it contains "..")
So you must be in your folder apktool (E.q: C:/android/apktool>)
3. Installing Framework
Code:
apktool if framework-res.apk
(framework-res.apk is only example.. You can type "apktool if SystemUI.apk",...)
4. Decompiling
Code:
apktool d framework-res.apk framework1
(framework-res.apk is apk which you want to decompile and framework1.. You can type "apktool if SystemUI.apk",...)
Now you can enjoy it!
5. Recompiling/Finished Product
Code:
apktool b framework1 framework-res-new.apk
(framework1 is the folder with your edited files and framework-res-new.apk is your new apk file)
You can't use the new apk... You have to take what you did and add it back to the original apk file to proper signature.
Use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original .apk.
Congratulations! You modded .apk!​
Click to expand...
Click to collapse
Hey boss... can you tell me how to rename a app... i need it badly.. please.and thanks in advance

[Guide/Tut] G2 DEODEXING APK IN 3 SIMPLE STEPS- ANY ROM- PERFECT DEODEXING

OF LATELY A LOT OF PEOPLE SEEM TO FACE DECOMPILING ISSUES POST DEODEXING, SOME DO NOT KNOW HOW TO DEODEX. SO I MADE THIS VERY SIMPLE YET 100% WORKING GUIDE. FOLLOW IT ANY ONE, I MEAN ANYONE CAN SUCCESSFULLY DEODEX ANY APK IN HIS G2 ROM [THIS METHOD WORKS PERFECTLY FOR OTHER PHONES AS WELL]
WHAT YOU NEED:-
1. TOOLS FOR DEODEXING:- DOWNLOAD HERE
2. FRAMEWORK FOLDER FROM YOUR PHONE [FOUND IN "/system" folder"]
3. APK AND ODEX FILE TO BE DEODEXED [eg. LGSystemUI.apk & LGSystemUI.odex]-Found either in [/system/app OR /system/priv-app]
LETS START:-
PREPARATION-
---Download and unzip the tools folder above to the folder c:\baksmali . Indtall 7zip utility from the tools as made available above.
---Place the entire "framework" folder in the c:\baksmali folder. Also place the apk and odex file to be deodexed in c:\baksmali folder.
---Open up a dos prompt in c:\baksmali folder ...
*STEP 1*
Type the following command:
HTML:
java -jar baksmali.jar -d c:\baksmali\framework -x nameofodexfile.odex
You will see that an out folder is created in the c:\baksmali folder
*STEP 2*
Type the following command:
HTML:
java -jar smali.jar -o classes.dex out
You will see that a file "classes.dex" is created in the c:\baksmali folder
*STEP 3*
-Open your apk file using 7zip utility.
-Simply Drag the classes.dex file and drop in the 7zip open window. Click YES.
-YOU HAVE SUCCESSFULLY CREATED THE DEODEXED APK FILE.
NOTE:
1. If during step 1 you get errors, it is likely that either the framework is different or apk & odex belongs to a different ROM.
2. Use 7zip as it is better and safe than winrar for handling apk files.
3. If above steps are followed, the chances of any errors are "0".
4. While decompiling apks use apktool 1.5.2. This handles smali files much better than 2.0.3 version.
I certainly hope this guide proves helpful to those intending to take up theming/modding... Best of Luck... If you have any concerns get in touch with me- I will gladly help....
Thank you XDA for this wonderful forum
Consider pressing thanks button if you find this tutorial helpful- It promotes development...
Hi, very good tutorial! Just what I needed. Thanks!
rastigo said:
OF LATELY A LOT OF PEOPLE SEEM TO FACE DECOMPILING ISSUES POST DEODEXING, SOME DO NOT KNOW HOW TO DEODEX. SO I MADE THIS VERY SIMPLE YET 100% WORKING GUIDE. FOLLOW IT ANY ONE, I MEAN ANYONE CAN SUCCESSFULLY DEODEX ANY APK IN HIS G2 ROM [THIS METHOD WORKS PERFECTLY FOR OTHER PHONES AS WELL]
WHAT YOU NEED:-
1. TOOLS FOR DEODEXING:- DOWNLOAD HERE
2. FRAMEWORK FOLDER FROM YOUR PHONE [FOUND IN "/system" folder"]
3. APK AND ODEX FILE TO BE DEODEXED [eg. LGSystemUI.apk & LGSystemUI.odex]-Found either in [/system/app OR /system/priv-app]
LETS START:-
PREPARATION-
---Download and unzip the tools folder above to the folder c:\baksmali . Indtall 7zip utility from the tools as made available above.
---Place the entire "framework" folder in the c:\baksmali folder. Also place the apk and odex file to be deodexed in c:\baksmali folder.
---Open up a dos prompt in c:\baksmali folder ...
*STEP 1*
Type the following command:
HTML:
java -jar baksmali.jar -d c:\baksmali\framework -x nameofodexfile.odex
You will see that an out folder is created in the c:\baksmali folder
*STEP 2*
Type the following command:
HTML:
java -jar smali.jar -o classes.dex out
You will see that a file "classes.dex" is created in the c:\baksmali folder
*STEP 3*
-Open your apk file using 7zip utility.
-Simply Drag the classes.dex file and drop in the 7zip open window. Click YES.
-YOU HAVE SUCCESSFULLY CREATED THE DEODEXED APK FILE.
NOTE:
1. If during step 1 you get errors, it is likely that either the framework is different or apk & odex belongs to a different ROM.
2. Use 7zip as it is better and safe than winrar for handling apk files.
3. If above steps are followed, the chances of any errors are "0".
4. While decompiling apks use apktool 1.5.2. This handles smali files much better than 2.0.3 version.
I certainly hope this guide proves helpful to those intending to take up theming/modding... Best of Luck... If you have any concerns get in touch with me- I will gladly help....
Thank you XDA for this wonderful forum
Consider pressing thanks button if you find this tutorial helpful- It promotes development...
Click to expand...
Click to collapse
when i unzip the tools zip the baksmali is a file not a folder so i cant add the framework to the file? not sure if you can help me further
jaymazz13 said:
when i unzip the tools zip the baksmali is a file not a folder so i cant add the framework to the file? not sure if you can help me further
Click to expand...
Click to collapse
you've to create a folder in c:\
then you rename this new folder baksmali
in this folder you have to unzip the file downloaded here
after unzipped
now you can put here your framework
It works great!
One question, how to odex again?

How can I look at the code that is running an app?

I have built a few web sites but now I'm learning how to build apps. Is there a way to look at the code that is running a particular app on my phone so I can get an idea of how it is put together?
Can I open an app from my phone with Android Studio?
Follow the steps given below.
Procedure to open the source code:
Step 1:
Make a new folder and copy over the .apk file that you want to decode.
Now rename the extension of this .apk file to .zip (e.g. rename from filename.apk to filename.zip) and save it. Now you can access the classes.dex files, etc. At this stage you are able to see drawables but not xml and java files, so continue.
Step 2:
Now extract this .zip file in the same folder (or NEW FOLDER).
Download dex2jar and extract it to the same folder (or NEW FOLDER).
Move the classes.dex file into the dex2jar folder.
Now open command prompt and change directory to that folder (or NEW FOLDER). Then write d2j-dex2jar classes.dex (for mac terminal or ubuntu write ./d2j-dex2jar.sh classes.dex) and press enter. You now have the classes.dex.dex2jar file in the same folder.
Download java decompiler, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.
Save all of these class files (In jd-gui, click File -> Save All Sources) by src name. At this stage you get the java source but the .xml files are still unreadable, so continue.
Step 3:
Now open another new folder
Put in the .apk file which you want to decode
Download the latest version of apktool AND apktool install window (both can be downloaded from the same link) and place them in the same folder
Download framework-res.apk and put it in the same folder (Not all apk file need this file, but it doesn't hurt)
Open a command window
Navigate to the root directory of APKtool and type the following command: apktool if framework-res.apk
apktool d myApp.apk (where myApp.apk denotes the filename that you want to decode)
now you get a file folder in that folder and can easily read the apk's xml files.

Categories

Resources