[TUT]Decompile and compile apk and jar files - Galaxy S Advance I9070 General

In this tutorial i will show you how to decompile and compile apk and jar files with apktool and apk multitool
Apk multi tool
It is easy to use than apk tool and i prefer to use it
- Download apk multitool.zip from here
- Extract apkmultitool.zip to somewhere in a single folder
- Place the apk you want to decompile inside files folder
open AndroidMultitool.exe which inside apkmultitool folder
{
"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"
}
Now click on select file under decompiling menu and open the file you want to decompile from files folder
now click decompile
After decompiling it will show like this
You will find the decompiled file in decompiled apk folder if its a apk and in decompiled jar if its a jar file, now show your modding skills in xml, smali files and pngs
After you complete modding lets recompile it. to recompile select the open file option below recompile menu and open the folder
click compile
the compiled apk will be in compiled_apk folder and jar file in compiled_jar folder. Now most important thing, if you are editing any file inside system the file will work without signing it, if it is in data partition you have to sign it. sign it using the signing option
​

Using Apk Tool
Apk tool
To use apk tool you need these 3 files
download this zip
extract the zip file to a single folder
search cmd.exe in c and copy it to that folder
it should look like this
open cmd.exe and you should see that it navigates to folder location like this
now copy the apk or jar file that you want to decompile in that folder. Before decompiling the file you must install it so first use this command to install it, i took SystemUI.apk for this tutorial
type “apktool if SystemUI.apk” and press enter
Now time to decompile, to decompile type “apktool d SystemUI.apk” and press enter. If its successfully decompiled it should show like this and the decompiled apk will be in the same folder named SystemUI
Now time to show your modding skills after completing editing the files you can compile it again
To compile it use “apktool b SystemUI”
it may show some errors you can simply ignore it
and the build apk will be inside SystemUI/dist folder
Now you have known how to decompile and compile apk and rar files with both apk tool and apk multitool​

reserved

after recompile,, i think we have to place META-INF from original apk to modified...

jagnik said:
after recompile,, i think we have to place META-INF from original apk to modified...
Click to expand...
Click to collapse
I haven't replaced META-INF for any apks that i have modded. And for me it worked without replacing META-INF. I also read about it, i think it is required apk is not working

It seems that OP forgot to say that visual basic power tools needs to be installed in order to make this run.
If anyone bothers about "stopped working" issue, just install the needed redistributable here: http://go.microsoft.com/fwlink/?LinkID=145727&clcid=0x804

Related

[Theme] [JB] Lock Screen Colors

Made some colored lock screens, followed the guide on the portal
Credit goes to Josepho1997
-= Not responsible for whatever happens to your device =-
Since i'm not updating these on a regular basis anymore, I thought i'd give you the files so you can just update the framework yourself.
Just open the newest framework-res.apk with 7zip, drag & drop the res folder from whatever color you want over to 7zip and click yes to copying the files over, close 7zip and you're done.
Just the colored files, not the framework
ALL COLORS.ZIP Zip version
ALL COLORS.RAR <-- All of them in one rar file
Green
Green - Biohazard
Purple
Purple - Decepticon
Blue
Blue - Deadmau5
Red
Red - Deadmau5
Pink
{
"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"
}
- Update -
Just added the files without the framework, feel free to copy them over.
If you have any requests just hit me up.
Can somone make a zip of these please love the Idea and work I am a user and abuser.
Made a zip version for you.
morphuex said:
Made a zip version for you.
Click to expand...
Click to collapse
Thank you been so long thought you for got. Now that I have them how do get them to work I am on rayman TX cm10 jb hope I am not being greedy just do not how to install
philseven said:
Thank you been so long thought you for got. Now that I have them how do get them to work I am on rayman TX cm10 jb hope I am not being greedy just do not how to install
Click to expand...
Click to collapse
First off you need to get the framework-res.apk file from your tablet to your PC. Use root explorer or some kind of file explorer that has root access. The file is located in /system/framework either copy it to your sdcard or send it to your cloud service such as box or google drive. Open it up on your PC with 7zip in another window go to the color you want, you should see a res folder, just drag and click the res folder over to the framework-res.apk you have open with 7zip, then merge when it asks you to. Now put the new framework-res.apk on your sdcard and copy it into the /system/framework folder make sure you have r/w on whichever file explore you are using, it'll ask you to replace the file, do so then reboot the system. If you did it correctly it should be changed.
morphuex said:
First off you need to get the framework-res.apk file from your tablet to your PC. Use root explorer or some kind of file explorer that has root access. The file is located in /system/framework either copy it to your sdcard or send it to your cloud service such as box or google drive. Open it up on your PC with 7zip in another window go to the color you want, you should see a res folder, just drag and click the res folder over to the framework-res.apk you have open with 7zip, then merge when it asks you to. Now put the new framework-res.apk on your sdcard and copy it into the /system/framework folder make sure you have r/w on whichever file explore you are using, it'll ask you to replace the file, do so then reboot the system. If you did it correctly it should be changed.
Click to expand...
Click to collapse
Okay thank you.

[Guide] COMPILE/DECOMPILE APK FILES MY WAY

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 it​4. 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

[GUIDE][GB]ics/jb recent app viewer

{
"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"
}
We can add it to our gb roms so we can get feel of jb and speed of gb
PLEASE THANK agmtpd if this post helps you.
_____________________ Add ICS/Jellybean look alike task switcher
Tools Required:
1. APKTOOL:: for decompiling/compiling
(u can use any decompiler as long as it compiles without any error)
2. JAVA runtime environment-- jre installed on windows
3. 7 ZIP
4. WinRAR
5. MOD.ZIP or MOD without button.zip (attached below)
MOD.zip includes "task manager" button at the bottom
MOD without button.zip obviously doesnt...
Procedure:
Setting up apktool
1. Unzip downloaded APKTOOL.zip to c:/apk (or any other convenient location)
2. copy ur rom's framework-res.apk to c:/apk/ and rename it as framework-stock.apk (dont delete this file neither modify it at any point)
3.open cmd and navigate to c:/apk/ and type command as
Code:
C:\apk>apktool if framework-stock.apk
Now you are all set to decompile framework-res.apk
DECOMPILING framework-res.apk
In cmd type
Code:
C:\apk>apktool d framework-res.apk frame
this will put all decompiled files in a folder named "frame"
EDITING decompiled framework-res.apk
1. open "c:/apk/frame/res" in explorer
2. extract all folders in the MOD.zip file to "c:/apk/frame/res/" and replace the files if asked
RECOMPILING framework-res.apk
1. In cmd type
Code:
C:\apk>apktool b frame framework.apk
if all goes well it will create an UNSIGNED framework.apk (u cant push it right now)
SIGNING framework-res.apk
1. open c:/apk/framework-res.apk in 7-ZIP not Winrar
2. open c:/apk/framework.apk in WINRAR and drag all the contents to the 7-zip window
and click "yes" in dialog when asked to copy files into framework-res.zip
DONE!!
c:/apk/framework-res.apk is the signed apk which you can push to system/framework/ using any method adb, CWM
or u can even use Miui file explorer to push framework-res.apk without any bootloops.....
if u get stuck in bootloop just flash ur stock framework-res.apk and then report here....
DO give proper credits if you are using this in your rom.... _________________________________________________
OR you can install this task killer. ICS Task Manager from market that is "ALMOST" look like a recent task/apps of ICS/JB.[/QUOTE]
Required tool
Apk tool::: http://www.4shared.com/zip/Z8rB_hIS/file.html
MOD.zip( WITH BUTTON):: http://dl.xda-developers.com/attach...57c8f01230fa20/50f689d9/1/2/6/4/8/1/1/MOD.zip
Mod.zip( without button):: http://dl.xda-developers.com/attach...50f68b4d/1/2/6/7/2/7/0/MOD-without_button.zip
Sent from my es209ra using xda premium

[TOOL] APKTools Windows GUI Decompile/Recompile/ZipAlign/SignAPK

Hi everyone, I want to share a tool that I make it myself for easy to modify APKs (Because laziness so I don't want to type cmd :silly: ).
REQUIREMENTS :
1. Windows XP or above.
2. .NET 2.0 is installed (default on XP, Vista, 7)
2. JRE/JDK Installed.
3. An APK that you want to do something with it.
FEATURE:
1. Decompile APK.
2. Recompile APK.
3. Batch SignAPK (You can select or Drag multiple file).
4. Batch ZipAlign APK (You can select or Drag multiple file).
The inputboxes are Drag&Drop able.
CREDITS & BIG THANKS TO :
- viperneo for MetroFrameworkUI.
- brutall for apktool.
- Anyone that make signapk.
- The Android Opensource Project for zipalign.
{
"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"
}
Download link in attachment
Hey SandPox, good job!
Hope that more people will find this useful post
wouldve been goog if igood juust drop my framwork app and priv app folders in and its find thee apks it would. so kind of batch. may as well put the new paging/alignign of the new -p .so files that can be done now with the zipalign tool. =
thanks for this tool... won't decompile everything with my device but still good tool
i am getting a finished with error code 1
when recompiling systemUI.apk
it decompiles but will not recompile
i am using the right framework-res file as well
Very usefull tool..
I use other tool, but sometimes have problem with recompile.
Now i know what i will use.
Thanks for all @SandPox
Can we decompile marshmallow, and recompile the marshmallow apks?
Marshmallow compatible? Is it just based on the apktool version that is installed?
Hi everyone, I want to share a tool that I make it myself for easy to modify APKs (Because laziness so I don't want to type cmd :silly: ).
REQUIREMENTS :
1. Windows XP or above.
2. .NET 2.0 is installed (default on XP, Vista, 7)
2. JRE/JDK Installed.
3. An APK that you want to do something with it.
FEATURE:
1. Decompile APK.
2. Recompile APK.
3. Batch SignAPK (You can select or Drag multiple file).
4. Batch ZipAlign APK (You can select or Drag multiple file).
The inputboxes are Drag&Drop able.
CREDITS & BIG THANKS TO :
- viperneo for MetroFrameworkUI.
- brutall for apktool.
- Anyone that make signapk.
- The Android Opensource Project for zipalign.
Download link in attachment
Nice Work
:good::good:

[GUIDE][COMPLETE] Apktool on Windows! (Installation,Decompile and Compile)

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
Installation​1. 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 apk​1. 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 apk​Follow 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 apk​Follow 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!

Categories

Resources