[Guide] COMPILE/DECOMPILE APK FILES MY WAY - Miscellaneous Android Development

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

Related

[TUTO] How to deodex stock rom for galaxy S DUOS S7562

[TUTO] How to deodex stock rom for galaxy S DUOS S7562
In the world of Android, a lot of themes, tweaks and tricks require the need of a Custom Deodexed rom. Deodexed roms are firmwares where the .APK files of the System Software itself are packaged in a way so that they can be modified easily without causing any harm to the framework or the Android Environment.
This tutorial will cover all the steps required to deodex stock rom for galaxy s duos s7562, so that you don’t need to install a Custom Rom yourself!
Disclaimer: Follow all the instructions carefully mentioned in this article, I should not be held responsible in any manner if your Android Device doesn’t boot up or gets bricked due to not following the instructions.
Required :
1. Your device should already be rooted.
2. You should already have Android ADB in your computer and should have basic ADB knowledge.
3. JDK already installed in you’re PC (http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html)
4. 7zip installed (http://www.7-zip.org/download.html)
5. Cygwin installed (http://www.cygwin.com/)
6. dsixda's Android Kitchen installed (http://forum.xda-developers.com/showthread.php?t=633246)
7. Busybox should already be installed in your device.
8. CWM already in you’re phone
9. Make nandroid backup (just in case).
10. sgs2toext4.jar ((created by drphrozen) attached
11. DiskInternals LinuxReader (http://www.diskinternals.com/download/Linux_Reader.exe)
Tutorial :
1. Download you’re favorite stock rom
2. Use 7zip to extract it (ignore errors)
You will have these files, we need only system.img.ext4
3. We have to convert it to ext4 format with sgs2toext4.jar
Open a command window and set the directory where you have sgs2toext4.jar file.
Now type sgs2toext4.jar and press enter
The .jar will run in a new window & will ask you to drag & drop the system.img.ext4 file there.
Do the same and wait till the process completes
4.Open the results file with DiskInternals LinuxReader an extract all files in new folder named system
5.Compress the system folder with 7zip (tar and store format) named system.img.ext4.tar
6.Put the file in kitchen folder (in original_update)
7.Lunch Cygwin terminal an cd to kitchen folder and load the menu (./menu)
You have to modify the API from 10 to 15
Look the file in C:\cygwin\home\user\kitchen\tools\deodex_files (api_level.txt)
8.Choose option (1) and do like these :
9.Choose option (0) ADVANCED OPTIONS
10.And then option (11) deodex files in your ROM
Then (b) deodex both folders and then
Take a caffe and be patient, the operation take a time to finish, if all operation finish without problem you will have this :
However, some apks failed to deodex, see the screenshot, for me only one apk failed it’s not very important
To resolve this, go to :
C:\cygwin\home\user\kitchen\WORKING_xxxxxx_xxxxxx\system\app\
and delete the odex apks (you can recognize them by their respective .odex files present in the same folder)
Make sure to delete both apk as well as its respective .odex file.
you can close the kitchen now if you do not want to add more MODs
THATS IT ! you have successfully deodexed both /system/app as well as /system/framework/.
Now to port the deodexed rom do the following :
11.Copy both app and framework folders to your sdcard, from :
C:\cygwin\home\user\kitchen\WORKING_xxxxxx_xxxxxx\system\
12.Connect your phone to computer.(Make sure you have select USB debugging in Settings>Developer options>USB debugging
13.Open Command prompt, Goto folder where android sdk installed. Then goto platform-tools folder in it. Right click on free space in folder while pressing shift key.Select open command prompt here.
Now enter commands. )
14.Enter following codes:
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/app/* /system/app/
rm /system/app/*.odex
cp /sdcard/framework/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
(if you are using adb shell in su for the first time, keep phone screen on. After entering "su" code, super user request prompt in phone. Press allow )
who look for my cygwin i used in this tuto
https://docs.google.com/folder/d/0B7VA567j483ubnBUMXBvamswN3M/edit?pli=1
just extract it in c:\ lunch Cygwin.bat it will creat your user folder in c:\cygwin\home
then move kitchen folder in cygwin\home to your user folder created
cheers
all credits goes to devs from this great forum
Que
what is the use of deodexing Rom.what is its main advantage. in galaxy s duos
Cool.. is there any themes available for S duos?
Phelin said:
Cool.. is there any themes available for S duos?
Click to expand...
Click to collapse
Yes, check out the theme I made
http://forum.xda-developers.com/showthread.php?t=2276756
Hit thanks if I helped
sent from GT-S7562 , with a better stock ROM
Check out the theme I made specially for galaxy s duos.c1
This is the v2.00
Here are the screen snaps
{
"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"
}
The link to theme is
http://forum.xda-developers.com/showthread.php?t=2279483
Sent from my GT-S7562 using xda app-developers app
V3.00 greenblast theme for s duos is released
Link
http://forum.xda-developers.com/showthread.php?t=2279483
Lockscreen
Tap to select in toggles is changed
Have a look
Sent from my GT-S7562 using xda app-developers app

[GUIDE] All in one guide for everyone

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..

[Tutorial]-{how to compile and decompile apk

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

[TUT]Decompile and compile apk and jar files

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

[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