Thanx to xda member A_U
Original thread here http://forum.xda-developers.com/showthread.php?t=2213985. Press thanx for his work:thumbup:
What is decompiling?
Android apps are BASICALLY made up of Java codes and XML files. After compiling the app, these files cannot be viewed. Decompiling is a process which decompiles the binary form of XMLs and .Java files into readable form. The XML files can be retained as it is, but the .java files are converted into smali files, a totally different language.
What is recompiling?
Recompiling is simply a way to convert the XML and smali files back into the binary form and building up of the APK with the changes made. All apps after recompiled have to be signed (except system apps).
Let's start!
Hello
I want to keep things simple and very easy. I will write a 5 step guide for setting up apktool and start modifying your app's or any other android framework. This guide will be strictly for windows users, since setting up and using apktool in windows is the easiest.
So lets begin -
What you need before you learn how to use apktool -
A computer running windows
A working internet connection for downloading the following -
JAVA SDK and JRE
Android SDK
Apktool core tool
Sign apk tool
Basic command prompt commands and path knowledge
A good linux format code editing program like NotePad ++ [Get it from HERE]
STEP 1 - Install JAVA - Go HERE
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Just go to the above website and download java SDK and JRE.
We mostly use only SDK libraries but JRE is required when you want to modify games or apps like whatsapp. So its best if we install both.
install them in any directory for example C:\ drive and you are good to go to next step 2.
STEP 2 - Install Android SDK- Go HERE
Just go to the above website and download the SDK.
Install it in an easy path. For example - C:\android
The short path will be useful when you are using adb for logcat purposes, since typing in a long path every-time you want to access the adb executable file is painful.
So once you installed the SDK move on to next step 3
STEP 3 - Download Apktool - Go HERE
For downloading apktool related files, you need to go HERE
Download latest apktool version, currenlty 1.5.2
Download the batch file and aapt.exe
Create a folder anywhere in the pc and put all the apktool.jar, aapt.exe and the batch script in that folder. [see screenshot]
This will be the operating folder for you now.
Next move to next step 4
STEP 4 - Using apktool for decompiling anything
Open command prompt
navigate to the folder where you placed apktool.jar, batch script and the aapt.exe [see screenshot]
For this guide i am using a simple framework-res.apk for reference.
Once you are in the folder via cmd prompt, you need to install the file using the " IF " command
type the following command -
Code:
[B]apktool if [I]name-of-the-app[/I] .apk[/B]
For example, once the command is executed correctly, it will look like this -
Code:
[B]apktool if framework-res.apk[/B]
Once the app is installed you need to decompile it.
For decompiling use the command "d". The "d" stands for decompile.
Code:
[B]apktool d [I]name-of-the-app[/I] .apk[/B]
For example -
Code:
[B]apktool d [I]framework-res.apk[/I][/B]
After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml's and smali files which can be edited for different mod's.
For example, here's how it will look once the app is decompiled -
Then after you are finished with your modding, you need to recompile your app for using it.
To recompile the app use the following command " B ". The "b" simply means recompile.
Code:
[B]apktool b [I]name-of-the-app-folder[/I][/B]
NOTE - While recompiling the app, you just need to type the name of the folder the app's files contains.
For example -
Code:
[B]apktool b [I]framework-res[/I][/B]
framework-res is the name of the folder
The final modded app will be in the dist folder located inside the original app folder created by apktool.
For example -
Congrats ! If everything went well, you successfully created a modified app !
Now the most important step is below in step 5
STEP 5 - Signing the apk
to sign an apk download the "sign-apk.rar" from below attachements
extract it to any place.
open a new command prompt and change into the sign-apk directory using cmd
move the modified-unsigned apk into this folder [see screenshot] -
then type the following command -
Code:
[B]java -jar signapk.jar certificate.pem key.pk8 [I]path-of-the-folder-contaning-the-apk .apk path-of-the-new-signed-apk .apk[/I][/B]
For example -
Code:
[B]java -jar signapk.jar certificate.pem key.pk8 [I]framework-res.apk framework-res-signed.apk[/I][/B]
Once compiled, the signed apk will be found in the same folder.
This is FINAL APK.
Simply rename it to the original apk and push it into the system ! DONE !
If you have any errors or problems related to apktool, post them here, I will try to solve them. [/SIZE]
Click to expand...
Click to collapse
Sent from my GT-I8262 using XDA Premium 4 mobile app
Simple guide to sign apk
U need to sign apk if u are using monster$ rom
Sent from my GT-I8262 using XDA Premium 4 mobile app
Reserved last
Sent from my GT-I8262 using XDA Premium 4 mobile app
Great wrk bro
Sent from my GT-I8262 using Tapatalk
I want to try this. Looking forward for more of your modifying tutorial bro :good:
One question, will it work to any stock rom? or preferably deodexed stock rom?
Geddd said:
I want to try this. Looking forward for more of your modifying tutorial bro :good:
One question, will it work to any stock rom? or preferably deodexed stock rom?
Click to expand...
Click to collapse
It will only work on deodexed apkz:thumbup:
Sent from my GT-I8262 using XDA Premium 4 mobile app
Omkar$ said:
It will only work on deodexed apkz:thumbup:
Sent from my GT-I8262 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
how about this, do you have an idea on how to remove carrier's name in AOSP lockscreen? I'm using xposed module to get back that lockscreen. because both name are on the same position
the link for "sign-apk.rar" plz
thx
Geddd said:
how about this, do you have an idea on how to remove carrier's name in AOSP lockscreen? I'm using xposed module to get back that lockscreen. because both name are on the same position
Click to expand...
Click to collapse
forum.xda-developers.com/showthread.php?t=1773879
great tutorial bt if you dnt hve pc i recomend apktool for android..moding with ease
send from my powerful core
send from my powerful core
secsettings.apk
hi
i can"t decompres secsetting.apk correctly and i can't compres adroid.policy
files are from my core i8260
Related
A tool package to decompile & disassemble APKs (android packages).
FEATURES
- All features are integrated into the right-click menu of Windows.
- Decompile APK classes to Java source codes.
- Disassemble APK to smali code and decode its resources.
- Install APK to phone by right-click.
- Recompile APK after editing smali code and/or resources.
During recompile:
- Optimize png images
- Sign apks
- Zipalign
REQUIREMENTS
Java Runtime Environment (JRE) must be installed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
HOW TO INSTALL THE PACKAGE
* Extract the attached archieve to hard disk.
* Open the extracted folder.
* double-click 'shellext-add.cmd'
HOW TO UNINSTALL THE PACKAGE
* Run shellext-remove.cmd & you are done.
ITEMS ADDED TO RIGHT-CLICK CONTEXT MENU
APK
Browse Java Code of APK
Disassemble APK and Decode Resources
Install APK to Phone
Folder
Recompile APK from Disassembly
HOW TO DISASSEMBLE APK
Suppose you want to disassemble yourapp.apk, all you have to do is:
* right-click 'yourapp.apk' file
* select -> 'Disassemble APK and Decode Resources'
A folder named 'yourapp-disasm' will be created in the same folder as
the apk. It will contain the smali disassembly and decoded resources .
You can modify the smali code and/or resources inside that folder.
For instant access to methods and fields and for better understanding
of the smali disassembly, you can browse the hierarchy of reconstructed
Java source code in the JD-GUI Java Decompiler. The Java source codes
will be displayed like a Java project in IDE.
* right-click 'yourapp.apk' file
* select -> 'Browse Java Code of APK'
HOW TO RECOMPILE APK FROM DISASSEMBLY
To assemble, sign and zipalign to a new APK, wether you modified the
source code and/or resources or not:
* right click 'yourapp-disasm' folder
* select -> 'Recompile APK from Disassembly'
HOW TO INSTALL APK TO PHONE
To install a non-system apk from pc (keeping its data if it was already
installed on the phone)
* connect android phone to pc via usb cable
* right-click an APK in windows explorer
* select -> 'Install APK to Phone'
NOTES ABOUT SYSTEM APKS
Manufacturer's framework files:
Standard framework is embedded into apktool, so you don't need to do
anything for most apk files. But some manufacturers, for example HTC,
add their own framework files and use them in system apps. Apktool
needs these framework files to decode and build apks. To use apktool
against such apps, you must pull framework from a device and
install/register it to apktool.
for a solution see, http://code.google.com/p/android-apktool/wiki/FrameworkFiles
META-INF dir in resulting apk:
This dir contains apk signatures mostly and after modifying apk it is
no longer has valid signatures. you have to be careful when putting a
recompiled system apk back on your device. Pushing that new apk to your
phone will result in Force Closes (FCs).
for a solution see, http://code.google.com/p/android-apktool/wiki/FAQ
TOOLS INCLUDED
* android-apktool 1.3.2 by Brut.all - http://code.google.com/p/android-apktool/downloads/list
* dex2jar-0.0.7.7-SNAPSHOT - http://code.google.com/p/dex2jar/downloads/list
* jd-gui-0.3.3.windows - http://java.decompiler.free.fr/?q=jdgui#downloads
HOW TO UPDATE INCLUDED TOOLS
* Peroidically check for updates to the included tools.
* Web links are provided also inside the 'tools' folder.
* When an update is available, download and extract it to the
corresponding folder inside the 'tools' folder.
PACKAGE UPDATE v3 - AUGUST 2012
* android-apktool 1.4.3
* dex2jar-0.0.9.9
* Added Recompile from source feature
PACKAGE UPDATE v4 - JANUARY 2013
* android-apktool 1.5.1
* dex2jar-0.0.9.12-a
* jd-gui-0.3.5.windows
* Modified: names of menu items for more clarity
* Added: optimize png images, sign and zipalign during recompiling.
* Added: Install APK to Phone
PACKAGE UPDATE v4.1 - 27 JANUARY 2013
* Fixed: package fails to install properly when APK extension is currently assigned to another app.
* Fixed: minor fixes when selecting 'Recompile APK from Disassembly'
PACKAGE UPDATE v4.2 - 2 FEBRUARY 2013
* Updated: android-apktool 1.5.2
* Fixed: the install and uninstall scripts have become more UAC friendly.
Enjoy
amroush_1800
Hi amroush_1800, thanks for sharing this tool ! Thumbs up !
oriundus said:
Hi amroush_1800, thanks for sharing this tool ! Thumbs up !
Click to expand...
Click to collapse
If you like it, hit the big THANKS button
gonna try it
nice tool.. i just wish it could decompile classes.dex
PapaDocta said:
nice tool.. i just wish it could decompile classes.dex
Click to expand...
Click to collapse
classes.dex will be decompiled into smali & java source code.
I tried decompiling a framework.jar but it will only shows the content of the jar but not the classes.dex inside also extracted the classes.dex and tried opening it but it won't show anything..
amroush_1800 said:
classes.dex will be decompiled into smali & java source code.
Click to expand...
Click to collapse
Sent from my Desire HD using XDA App
PapaDocta said:
I tried decompiling a framework.jar but it will only shows the content of the jar but not the classes.dex inside also extracted the classes.dex and tried opening it but it won't show anything..
Click to expand...
Click to collapse
* Rename framework.jar to framework.apk
* Right-click framework.apk and select 'Decompile APK'
If I run shellext-add.cmd I get 5 times.
ERROR: Access Denied (in original: FEHLER: Zugriff verweigert)
I am running Win 7.
Could you please help?
Thanks!
amroush_1800 said:
* Rename framework.jar to framework.apk
* Right-click framework.apk and select 'Decompile APK'
Click to expand...
Click to collapse
thanks.. that worked
DirkStorck said:
If I run shellext-add.cmd I get 5 times.
ERROR: Access Denied (in original: FEHLER: Zugriff verweigert)
I am running Win 7.
Could you please help?
Thanks!
Click to expand...
Click to collapse
right click then run as administrator
Brilliant script ........
Ok lets say I have dissassembled the .apk ---- how do I assemble it back to .apk?
Help would be appreciated
Thks great tool.
bnieuwhof said:
Brilliant script ........
Ok lets say I have dissassembled the .apk ---- how do I assemble it back to .apk?
Help would be appreciated
Click to expand...
Click to collapse
Could just use android sdk
anyone know if a update has come down for this tool?
thanks you very much
hi I have got a serious problem and i have edited opera mini using this but now i need to convert jar file to dex how ???? this is really serious for me plz help!!!
Huh... running shellext-add.cmd as administrator on Win7 PC, I get
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
ERROR: Access is denied.
ERROR: Access is denied.
Press any key to continue . . .
Any help available?
rtfm1777 said:
Huh... running shellext-add.cmd as administrator on Win7 PC, I get
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
ERROR: Access is denied.
ERROR: Access is denied.
Press any key to continue . . .
Any help available?
Click to expand...
Click to collapse
forget the shellext-add.cmd
I copyed APK_OneClick folder to desired place
then right click apk and select open with then choose default program..., go to APK_OneClick/tool and select decompile.cmd
thxxxxxxxxxxxx.that is really helpful.
i love this forum
always there is solution
thxxxxxxxx
sorry about my english
HEY GUYS HERE I AM WITH ANOTHER GUIDE...
I HAVE RECEIVED MANY REQUESTS FOR THIS...
MANY PEOPLES GET ERRORS/BOOTLOOPS ON COMPILING APK'S...
Click to expand...
Click to collapse
TOOLS I USE:
1. APKTOOL(to play with apk's)
2. APKTOOL for ics (i don't have link, search for it)
3. notepad++(to edit files)
4. 7zip(to edit files)
5. APK One click (optional)(to make things very easy)
Click to expand...
Click to collapse
SETTING UP FILES:
1. Install Notepad++ and 7zip
2. Download apktool-install-windows-* file
3. Download apktool-* file
4. make a folder in windows directory named apktool
example C:/APKTOOL
5. Unpack both downloaded packages to apktool folder named apktool
example C:/APKTOOL/here
Click to expand...
Click to collapse
COMPILING/DECOMPILING
1. Copy stock framework-res.apk, twframework-res.apk and files you want to edit to apktool folder(in my case settings.apk)
2. Go to start > run > type cmd > enter
3. Type:
cd C:\apktool
Click to expand...
Click to collapse
TIP: window 7 users you can skip 2 and 3 step and
go to C:\ just hold shift and press right mouse click on apktool folder.
you will see open command window here, click on it4. Type: apktool if framework-res.apk (enter)
apktool if twframework-res.apk (enter) this will install your frameworks which is needed to decompile system apk files...
5. Type: apktool d settings.apk can be something else in your case
6. Minimize cmd and go to apktool folder you will find settings folder
edit files you want to edit. when done go back to cmd
7. Type: apktool b settings it might give you errors so read it and find the errors but
if it shows building apk file then forget about errors.
8. When done minimize cmd and go to apktool/settings/dist/
and there is your modded apk file...
now's important part
9. Now open modded apk and stock apk in 7zip
10. Drag/drop meta-inf folder and AndroidManifest.xml from stock apk to modded apk
11. Rename modded apk same as stock apk. (capital/block letters)
example modded > settings.apk >Settings.apk
12. All done now push moded apk to phone and enjoy!!!
Click to expand...
Click to collapse
USING APK One click
HOW TO INSTALL
* Download and Extract the achieve to a folder.
* Open the extracted folder & run shellext-add.cmd
* if some errors occur during install:
- Open Windows Control Panel -> User Account Control Settings
- Set the slider to 'Never notify'
- Reboot Windows
- re-run shellext-add.cmd
HOW TO USE
* Install frameworks with apktool as mentioned above
* Right-click apk file you want to edit and select 'Decompile APK'.
* A folder containing the output will be created in the same directory as the APK.
HOW TO RECOMPILE APK
* Modify the smali code or resources
* Right-click xxx_decompiled folder and select > Recompile APK from source
Click to expand...
Click to collapse
SCREENSHOTS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LINK TO FEW OF MY WORK:
Aroma installer based ATOMODS to have all cool mods, tweaks, apps, cwm recovery, kernel etc on any rom even stock rom...(MUST TRY)
[AROMA] █ ATOMODS █ [Galaxy Ace Plus GT-S7500][Mods/Tweaks/Apps/CWM/Kernel]
Guide for those who want to customize there rom on there own... doo cool mods like center clock,CRT animation, ics and jelly bean style mods etc...
[GUIDE] [MODS] Collection of mods for all gingerbread[2.3] phones..
Learn compiling and decompiling apk files my way
[Guide] COMPILE/DECOMPILE APK FILES MY WAY
Guide on how to make you own custom rom(easy way) (using kitchen)
[GUIDE] [how to] CREATE OWN ROM [FOR ANY ANDROID DEVICE] [FOR N00B] [EASIEST METHODS]
Link to apktool for ics bro
http://forum.xda-developers.com/showthread.php?t=15581
LINK NOT VALID
No thread specified. If you followed a valid link, please notify the administrator
lokeshsaini94 said:
SCREENSHOTS
Click to expand...
Click to collapse
In my case I don't see meta-inf !! Can I skip that step.
What I did..!!
For sample I have taken Dropbox.apk.
Decompiled and Recompiled again.
Got the new apk.
viijay4b7 said:
In my case I don't see meta-inf !! Can I skip that step.
What I did..!!
For sample I have taken Dropbox.apk.
Decompiled and Recompiled again.
Got the new apk.
Click to expand...
Click to collapse
The old apk has metainf folder... Drag it into new apk...
Sent from my Galaxy Nexus using xda premium
thanks bro.
Sent from my LG G4 using XDA Labs
Hi guys,
Here is third version of my ROM Tools PC Version (Automatic decompile classes.dex file to edit smali content) exclusively for Galaxy Y and Galaxy Ace I
Why it is here now? Because it may be the case that this version only works on Gingerbread, or only on Galaxy Devices or maybe only on Ace and Y. So, I decided to release it here first.
Totally tested for every feature and bug free, it is now loaded with new awesome features.
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Changelog :
Code:
Version 3
8 May 2013
-Added many new features
-Option to reboot
-Option to recovery
-Option to Hot Reboot
-Option to view and save logcat with nice integration of verbose and long command
-Option to fix permissions
-Option to RESET PASSWORD of pattern lock or passwork or pin
-Added a small Easter egg
Version 2
18 April 2013
- Changed it from a script to multi tool
- Added folders for convenience
- Made eye candy
- Made it noob proof
- It's like changing Baichung Bhutiya to Lionel Messi
Version 1
- Just one smali.bat file and one baksmali.bat file with one one line each of commands to Baksmaling and Smaling (duh!)
PHP:
I am not responsible for your device being dead,
you flashing stock ROM,
you using your device as a brick,
or the decrease in love of your Girlfriend because you use your mobile so much
What does it do?
As you are aware, there are smali files in jar files and apks you need to edit for adding 4-way boot into power menu, extending Power options, changing clock colour, adding CRT effect, changing the pop up that comes up when you touch the easter egg image, adding brightness slidebar, adding lidroid toggles, etc and so manyyyy things
In order to edit them, you need to decompile apk and classes.dex
It is not a problem in editing smali files of apk as they are decompiled itself by APK-Multitool(I use it)
But, it does not work for jar files
I know that there is smali.jar and baksmali.jar for it but I don't like repeatedly commading same operations when I can do it with one click
This program decompiles and recompiles classes.dex from any jar or apk in one click(very useful when you only need to decompile dex file only)
However, it's main objective is to recompile and decompile classes.dex only, but I added few more option to make it really a full fledged ROM Tool
Expect a few more features in upcoming releases
Pre-Requisites:-
*PC
*My Tool
*Java JDK(or JRE) (If you are running Windows 7 64 bit, you may need to add Java in environment variable)
*7-Zip (For in zip operations[pull out classes.dex])
*classes.dex file(on which you will operate)
*Android Phone to be connected to PC with USB Debugging on to use features other than decompiling and recompiling
Guide:-
Main Options
1. Download my Tool.
2. Extract it in any folder.
3. Place classes.dex in the input folder. DO NOT RENAME IT.
4. Run script.bat. Choose Option 1, Decompile classes.dex . In a few seconds, there will be a prompt that it is "Done. Press anykey to continue" (Note:- If you have UAC [User Account Control] on, you may run it as administrator or it might not be able to create folder if you have extracted it in System Drive)
5. Go to decompiled folder. There will BE classout folder. Make any changes in smali in classout folder(ALWAYS USE NOTEPAD++). DO NOT RENAME CLASSOUT FOLDER.
6. Again open script.bat if you had closed it or if not, then return to the window.
7. Choose 2 option "Compile classes.dex" . A new classes.dex will be formed in output folder.
8. Enjoy
Note:- Once you change things in classout folder, and you decompile another classes.dex, previous version in decompiled folder will be deleted. So if you want backup of it, move it somewhere else
Same thing will happen to classes.dex on output folder when you compile another one.
Other options
1. Connect you phone to PC with USB Debugging on and not on USB Tethering. Make sure you aren't using adb before using the tool. If so, Go to Alt+Ctrl+Del and to Task Manager and close adb.exe process
2. Choose the option what you want.
a) Logcat, either view or save it
If you view it, a window will appear with logcat in it. If you are done, just close that window
If you save it, it will be saved in the same folder where Script.bat is present. To stop saving it, Press Ctrl+C and type Y and press Enter
b) Reboot, may take some time in rebboting and rebooting in recovery.
c) Fix permissions and Reset password
3. Try to find Easter Egg
Download:-
ROMToolsPCv3.zip
Woah !
Good Job !
btw Easter egg in app ?
---
Instead of ctrl + alt + del combo
you can use ctrl + shift + esc
it brings up only the task manager
Thanks OP. Can you add an option to go to download (odin) mode . I really need that coz my vol- button got broken. Anyway this tool is really great.
Awesome tool
Doesn't it require ADB support? I mean, I haven't heard of another way of rebooting a phone or putting it into recovery mode via terminal.
Or does this have ADB and related tools included?
Good job! Thanks for the great work! :good:
Yes
All adb and other required items are included
And sure thing, will add download mode in next release. I don't know why I didn't add it in this release?
Please report any bugs
And please do suggest what should be added in next release
Here too!
Kudos broda :good: :thumbup::thumbup:
Thanks,
TheDemiGod
Future RD
@j_habeeb
Thanking everyone here?
Woah! :0
checkin the source of all apk's
Awesome man! :thumbup:
BTW i had seen this in some other forum also
anubhavrev said:
Woah! :0
checkin the source of all apk's
Awesome man! :thumbup:
BTW i had seen this in some other forum also
Click to expand...
Click to collapse
apks?
And yes, it was published in Android General Software and hacking from where it was published on portal, but this version is not yet published there as it may only work for these phones
Looking forward to reports if you guys can check this with other devices with other android versions :good:
iamareebjamal said:
apks?
And yes, it was published in Android General Software and hacking from where it was published on portal, but this version is not yet published there as it may only work for these phones
Looking forward to reports if you guys can check this with other devices with other android versions :good:
Click to expand...
Click to collapse
classes.dex stores the source code ..
search dex2jar and classes.dex on google
anubhavrev said:
classes.dex stores the source code ..
search dex2jar and classes.dex on google
Click to expand...
Click to collapse
lol
You think I don't know that sherlock. Who released this tool?
I was just confused that what you meant by your previous post
lol ...i hope u didn't XD
P.S.- u're a themer right ? check pm...
anubhavrev said:
lol ...i hope u didn't XD
P.S.- u're a themer right ? check pm...
Click to expand...
Click to collapse
I did it man :/
See that OP tag written to Senior Member?
And replied
iamareebjamal said:
I did it man :/
See that OP tag written to Senior Member?
And replied
Click to expand...
Click to collapse
Sent from my GT-S5360 using xda app-developers app can't see a thing ! Sorry but had to ask..
@iamareebjamal: Now you're on my credit list when I release my rom! This tool helped me a lot
"Its not your fault if you are born poor, But it's your fault if you die poor!" - Bill Gates
So hi folks i m gonna create this guide which will solve everyone's problem in any matter
So before we start the things required are(with links):-
-Android SDK
-Microsoft Powerpacks
-Notepad++
-Photoshop or GIMP or any other photo editing software.
-Java JRE
-Cygwin
-Android Kitchen
-Android ApkTool
And will be updating when i come to the topic
Setting Up the ADT Bundle
The ADT Bundle provides everything you need to start developing apps, including a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline your Android app development. If you haven't already, go download the Android ADT Bundle. (If you downloaded the SDK Tools only, for use with an existing IDE, you should instead read Setting Up an Existing IDE.)
Install the SDK
Unpack the ZIP file (named adt-bundle-<os_platform>.zip) and save it to an appropriate location, such as a "Development" directory in your home directory.
Caution: Do not move any of the files or directories from the adt-bundle-<os_platform> directory. If you move the eclipse or sdk directory, ADT will not be able to locate the SDK and you'll need to manually update the ADT preferences.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ANDROID APKTOOL
Requirements:
Winows OS
Installed Java on Windows
Installed Microsoft Powerpacks
- Easy handling: Select your apk and push the "decompile" button!
- This tool makes modding much faster and easier, no cmd handling any more.
- You can read the log which is integrated in the tool to find your mistake in the error.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How to use this tool?
Follow this small how to!
Here you go..
-Well, first extract the AndroidApktool folder to C:\. Otherwise it won´t work, maybe
-copy your framework-res.apk and the apk you want to mod in the AndroidApktool folder
-Next you have to start AndroidApktool.exe
-select your framework-res.apk and push the "install" button (check log for errors)
-select the apk you want to mod/decompile and push the "decompile" button (check log for errors again)
-your decompiled apk will be located in C:\AndroidApktool\"apkname" as a folder
-if you want to compile your apk again, select your decompiled folder and compile it again (check log for errors again)
!!!NOTE!!! After compiling you have to copy the AndroidManifest.xml and the META-INF folder from your old apk to your newly compiled one!! Otherwise you´ll get bootloop !!!NOTE!!!
-your recompiled apk will be located in C:\AndroidApktool\"apkname"\dist
-you want to sign your apk? Just select your .apk and push the "sign" Button! Your signed .apk will be saved as "apkname_signed.apk"
Download
Android ApkTool
Thnx to Flextrix for this apktool
Will be updating it...............
Setting up the Android kitchen
1. Before you do anything install the java jdk(find it in dsixda's thread)
2. Download and extract the cygwin_packages.zip provided by dsixda
3. Run the set up(make sure there is no previous cygwin installation)
4. Follow the kitchen read me txt!!!
5. local package directory *must* be the path to the cygwin_packages folder that you just extracted
6, when it shows all the package names, go to the top and select "all <-> default" until it changes to "all <-> install" (you must click on the arrows)
7. Run the cygwin at least once and close, now you will see a folder inside the cygwin installation like this: Home\your user name\
8. Download the kitchen and extract to the home\your user name\
9. Rename the dsixda-android-kitchen-*** folder to just "kitchen"
10. Now your ready to run the kitchen type:
Code:
cd kitchen(enter)
./menu(enter)
11. If you did things right you should see this:
Step Two: Setting up a working folder
1. First our folder structure should look like this:
Code:
cygwin folder/home/your user name/kitchen
2. Inside the kitchen it should look like this:
3. Now we need a rom to work on, for this tutorial. Place the original rom zip in the original_update folder inside the kitchen.
4.run the cygwin.exe again type:
Code:
cd kitchen(enter)
./menu(enter)
5.now enter option 1, enter again. You should see your rom listed, choose and enter
6.you will be asked about changing the working folders name, at this point it makes no difference so just continue.
7.you will be asked to convert to update-scrip do it and continue
8. Now you can view the roms info
9. congratulations you have a working folder!!!
Step Three :repackaging the rom
Now that you have made some changes it's time to test!!
1. Run the kitchen and enter option 99 - "biuld rom from working folder"
2. Choose mgldr or clk
3. I recommend that you go with all default options until you get more experience with the kitchen.
4. When its all done you will find a folder inside "cygwin/home/yousername/kitchen" called output_zip
5. Inside the folder is your new rom ready to be flashed and tested!!!
Reserved 2
Reserved 3
Reserved 4
Cool guide..btw there are many guides on this topic..but i still respect your hardwork..gud luck for ur future guides..
APK TOOL | WINDOWS
How-To Guide For Beginners
Intro
Q- What is apk tool?
A- It is a tool for reverse engineering Android apk files. More info here.
Q- What can i do with it?
A- You can easily decompile and compile apks. For example.. if you don't like the new icon of your favorite application, you can get the older icon and replace the new icon with it. Also you can do a lots of other things like change strings.
Prerequisites
Java 7 (JRE 1.7) ( Most Windows computers have already it installed )
This guide is for everybody! So no other prerequisites
Installation1. Create on your desktop a folder. I called it "xda". Maybe try using simple folder names, don't use names with "_" or "*" etc.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Save the apktool.bat file in the folder you have created. I'm gonna save it on "xda" folder. Here there is the file.
3. Now it's time to save the jar file of apktool. Find the last here and put it in your folder, remember my folder is "xda". Then go in the folder and rename apktool_2.2.0.jar into apktool.jar. At the same time move the "file.apk" into your folder. As you can see i have an "example.apk" in my "xda" folder. Now you are ready to decompile and compile apks!
Decompile an apk1. Open the terminal. If you don't know how to do it, just write " cmd " in your windows search bar.
2. This is how terminal looks like!
3. Now get the path of your folder. If you want to do it fast look at point 3.4. If you don't know how to do it, open the folder and click on the bar. It will give you a path like " C:\Users\your name\desktop\your folder name " and copy it.
4. Now navigate into the folder you have created! Just write on terminal and send.
Code:
cd path
3.4. You can by-pass points 3 and 4: press "shift" and "right click" (with mouse) and in the menu select "open the window of command here"!
5. Write this in terminal and you will be able to start decompile and compile apks!
Code:
apktool
6. Decompiling! For decompile an apk you need to write this
Code:
apktool d nameofyourfile.apk
7. If you look in your folder you will find another folder called "nameofyourfile without.apk". Here there is the apk decompiled. Now you can mod your favorite application!
Compile an apkFollow 1-5 steps for decompiling an apk
1. For compiling just write this on terminal
Code:
apktool b nameofthefolder
2. You can find the apk in this directory: name of your folder/name of your apk folder/dist and here you have the apk.
As you can see, i have it on xda/example/dist.
VERY IMPORTANT: YOU NEED TO SIGN THE APK BEFORE INSTALLING OR IT WILL GIVE AN ERROR.
Use "ZipSigner" on Play Store to do it. Click here to get it.
Credits
ibotpeaches for this awesome tool
xda for the website
Yes, ok, continue
Sent from my ALE-L21 using XDA-Developers mobile app
NeedleGames said:
Yes, ok, continue
Sent from my ALE-L21 using XDA-Developers mobile app
Click to expand...
Click to collapse
done.
gosha98_ said:
Compile an apkFollow 1-5 steps for decompiling an apk
1. For compiling just write this on terminal
Code:
apktool b nameofthefolder
2. You can find the apk in this directory: name of your folder/name of your apk folder/dist and here you have the apk.
As you can see, i have it on xda/example/dist.
VERY IMPORTANT: YOU NEED TO SIGN THE APK BEFORE INSTALLING OR IT WILL GIVE AN ERROR.
Use "ZipSigner" on Play Store to do it. Click here to get it.
Click to expand...
Click to collapse
If you use the command
Code:
apktool b [B][COLOR=blue]-c[/B][/COLOR] nameofthefolder
you will NOT have to resign the apk[emoji6] (UNLESS YOU EDIT the file AndroidManifest.xml , if you edit this file, you MUST resign the apk)
lucadalba said:
If you use the command
Code:
apktool b [B][COLOR=blue]-c[/B][/COLOR] nameofthefolder
you will NOT have to resign the apk[emoji6] (UNLESS YOU EDIT the file AndroidManifest.xml , if you edit this file, you MUST resign the apk)
Click to expand...
Click to collapse
yep, thanks Luca
do you have any information on baksmali
crashpsycho said:
do you have any information on baksmali
Click to expand...
Click to collapse
To backsmali use this command for decompiling:
Code:
apktool d [B][COLOR=blue]-r[/COLOR][/B] Appname.apk
lucadalba said:
To backsmali use this command for decompiling:
Code:
apktool d [B][COLOR=blue]-r[/COLOR][/B] Appname.apk
Click to expand...
Click to collapse
What about recompile command sorry ive had alot of trouble finding baksmali commands anywhere its like a secret club
Sent from my SM-G920T using Tapatalk
crashpsycho said:
What about recompile command sorry ive had alot of trouble finding baksmali commands anywhere its like a secret club
Sent from my SM-G920T using Tapatalk
Click to expand...
Click to collapse
Just normally recompile with
Code:
apktool b -c Appname
Thread updated!