[TUT]Series of guides to become a PRO DEV!!!!!! - Galaxy Grand Duos i9082 General

[Hey guys Aditya here. After a month or so i'm posting tutorial and basic decompiling compiling using adb command!
THINGS YOU WILL NEED​
ON WINDOWS PC
1) Winrar
2) 7zip
3) Java
4) Apktool and adb tools!!!!! (Many tools are available download anyone of them)
5) notepad+ AWESOME THING
ON UBUNTU
1) Java
2) Android SDK
3) APKTOOL ofcourse
Let's get started! I asume you using a Windows PC
First of all download and install JAVA
From here
Download Latest Apktool, extract to :
Windows XP : C:\Document and setting\folder your computer name
Windows 7 : C:\user\folder your computer name
copy your apk & framework-res.apk/SemcGenericUxpRes.apk/framework 2 to same folder with apktool
Now you can start Editing apk
Example Editing Walkman
Open Command Prompt (CMD)
TO DECOMPILE
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar d semcmusic.apk ( can be whatever name you give to your apk )
Some apks need dependies like tw-framework.apk
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar if semcgenericuxpres.apk
java -jar apktool.jar d your.apk ( can be whatever name you give to your apk )
Now you can edit what you like to. E.g. Res layout etc!
(For more detalis refer Post #3)
TO COMPILE
To compile back the edited apk
Code:
java -jar apktool.jar yourapkname.apk
For signing apk just drop the android manifest and meta inf of older apk or original apk!!!!!!
F.A.Q
A.I'm getting error while compiling apk??
Check if you have installed framework-res.apk most of compiling errors are becoz of this
B.Can apktool batch decompile and recompile apk's??
Yes,many of modded apk manegers or tools can batch decompile and recompile apk's!!
C.Can i MOD any system app using apk tool?
Yes it can mod all types of apk's just make sure you have correctly installed framework and all other dependices!!!!
D.My modded apk is not working! What should i do???
This question is mostly asked to me! Firstly check weather you have put the Meta-Inf from original APK as this folder contain signatures required for apk to get install.Secondly if you have modded some xml check its correct or some code or values are wrong.If any values or wrong code can lead us to FC or Bootloop..!!!

Using ADB and taking logcat!!!!!
USING ADB AND TAKING LOGCAT
What ia adb??
adb stands for Android Debugging Bridge
For what it is used for
adb is commonly used to pull,push,taking system dumpFOR TAKING LOGCAT
What you will need
On windows
1) Java (Hmmm not needed but u should have. )
2) adb tools by me http://d-h.st/vHJ
Now to make it easy first of all check you have enabled USB Debugging in phone its in Developer Options.
PROCDURE
Make a new folder in C Drive
Extract these tools into it (Asume you folder name is adb)
Now open cmd
Code:
type cd..
cd.. again
cd adb
adb
Now you have installed adb on your PC!
TAKING LOGCAT
Code:
adb logcat>logcat.txt
For only redio related log type
Code:
adb -r logcat>logcatr.txt
For only errors type
Code:
adb -v logcat>logcate.txt
Push and pulling apps from system!
Pushing Apps
Pushing app is installing app on its intenrnal memory!Its simple and doesn't need extra powers!
Code:
adb push yourappname.apk /system/app or /system/framework
Place the app in the adb folder
Pulling Apps
Pulling app is to take out your system apps or frameworks etc!
Code:
adb pull /system/app or /framework yourapp.apk
By this method you can take a system dump
Code:
adb pull /system
Understanding Logcats!!!!!
Some keyword's that represent's error'
Code:
"E/" - error
"E/dalvikvm" - possibly crucial system error
"No such file or directory" - says it all
"couldn't" - android likes that, mostly shows faulty things.
"fail"/"failed" - mostly crucial error
"W/"/"warning" - says it all, but not always warn could be a boot failure cause
"exception"(especially NullPointerException) - points you that something went wrong in framework or application work
These type of errors help us understand the error's and we can easily call out from these bugs or errors!!!
Most common errors occuring in an logcat!
"couldn't find native method", the most common reason of a bootloop.
This error causes most of bootloop problems!!!
For example
Code:
E/dalvikvm( 100): ERROR: couldn't find native method
E/dalvikvm( 100): Requested: Landroid/view/GLES20Canvas;.nStartTileRendering:(IIIII)V
E/JNIHelp ( 100): RegisterNatives failed for 'android/view/GLES20Canvas', aborting
As you can see! The main reson for this error is smali present in android/view of framework.jar called GLES20Canvas.smali
This happens while you are trying to port ROMS!!!!
Now if you are having bugs in other apkor jars how can u find ahem! i.e logcat gives us only the location of smali files and not the name of apk or jar! For that you have to study hole android code sources! Some common folders i have posted here!!
Code:
"com/android/server" - services.jar (there is the same folder at framework.jar but most likely you don't need to touch it).
another place we could be mixed up:
"com/android/internal" - framework.jar
"com/android/internal/policy/impl/" - android.policy.jar
for framework.jar path ends up on internal, which represents telephony folder. policy/impl is the only android.policy.jar folder.
Other frameworks are actually not used in port as they contain core android functionality which is common.

Simple MOD's
Now you guy's have idea about how to take a Logcat,use adb,use apktool.
NOW SOME REAL STUFF
MOD's Related to SystemUI.apk
We will start with simple MOD's! Like replacing icons and to some extend changing layout!
Now we will start will replacing icons inside the SystemUI.apk
First of all pull app from /system/app using adb Refer #2
Then copy that app to apktool folder! Type this cmd
Code:
java -jar apktool.jar d SystemUI.apk
Now go to out folder of SystemUI.apk!
Will find META-INF! RES! ANDROID.manifest
Now Navigate to res/drawable-hdpi as our device uses HPDI
You will find many icons now be carefull here! If youare expert n photoshop or any bitmap editor eit these icons! Or search it! Google it you will find many!
Replace these default icons by ur edited once or downloaded once!!
XML EDITING
Some XML's are not so complicated as other once! Some xml's have just true or false! Example
Code:
<bool name="config_hardwareAccelerated">true</bool>
This tells me that Hardware Acceleration is enabled you can disable it by replacing true by false! You just need to experiment around!

Smali Editing!
Coming soon!

Patching!
Coming soon :d

Changelog
CHANGELOG
1 July Monday 6.04pm -- Inital Editing

Old info but very usefull for noobs. Keep it up
:thumbup:
Hit thanks if you think I helped you.
Sent from LG Nexus 4

Thats really awesome keep it coming am a noob and I rly want to learn n b a part of z dev team
Sent from my GT-I9082 using xda app-developers app

For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe

Razor! said:
For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe
Click to expand...
Click to collapse
Yup . Like chotu tools
Sent from my GT-I9082 using xda premium

Related

[TUTORIAL] Reverse engineering HTC FM Radio for noobs (on EVO 4G)

Okay, I'm writing this because I want to help any other newbies trying to learn how to reverse engineer. The technical details involved in this are extremely daunting, so the purpose of this tutorial is to first explain in layman terms exactly what you're trying to accomplish and what to expect. Then we'll go over the details. That way you're not completely blind going into this. I'm fairly new to the scene, so I'm not as knowledgeable as everyone else. If you see any errors in my post, let me know so I can change. I'm going to assume you know a little bit of Java, can find your way around a computer, and know nothing about Android. The techniques used should work with other Android phones. For this tutorial I'm using Windows 7, Cygwin, and my stock (not rooted) EVO 4G mobile phone.
The FM tuner for the Evo is run by a Broadcom chip: BCM4329. This chip is pretty amazing in that it does wireless, bluetooth, and it has an FM receiver/transmitter. We're interested in the FM receiver / transmitter.
Now, all android phones are based on a Linux kernel. Basically they're Linux running computers. The Android operating system is then installed onto the linux system. Every app is then run off of Android.
Android is based on Java but it is not a Java system. It uses a virtual machine called Dalvik. Google did this to get around licensing issues with Sun Microsystems. So they pretty much invented their own machine language (called byte code) for the Java language. This makes things complicated for the reverse engineer because from what I've read, once Java is converted into this machine language or byte code, it can't be converted back.
So let's rehash.
If you were programming strictly in Java, you would see these extensions:
Java source code = .java
Compiled Java source code = Java byte code = .class
Compressed file to package your program = .jar (Java Archive)
But since you're programming in Android and Dalvik, you will see these:
Java source code = .java
Compiled Java source code = Dalvik byte code = .dex
Compressed file to package your program = .apk
(I haven't mentioned this, but HTC further Optimizes their .dex code)
Optimized Dalvik byte code = .odex
I'm writing all of these down because it's very easy to get confused with all of the extensions. (for me at least!). remember how I said once you go dex, you can't go back to java? That's where JesusFreke comes in. He's a senior member of XDA, and he created "baksmali" and "smali", two programs that can convert the Dalvik code back into a human readable format. These files have extensions of .smali
Decompiled Dalvik byte code = .smali
But what can you do with .smali files? That's where this other senior member, brut.all comes in: He developed apktool. apktool takes JesusFreke's work to the next level. This program in conjunction with NetBeans, actually lets you trace through any program using the .smali code taken from JesusFreke's programs!
apktool does this by converting those .smali files into "fake" .java files that can be used by the NetBeans (program that compiles and makes java programs) IDE. I say "fake" because apktool embeds the .smali code into java files as comments. However, once you attach a debugger to NetBeans, you'll see that the debugger will follow line by line every execution statement found in the smali code!
So...... you can take the program you want, plug it into Net Beans using a debugger (using the default ddms command provided by Android SDK), and you can trace everything you do in the program. I have it connected to my phone, so whenever I push a button while running my HTC FMRadio app or unplug my headphones,I see the corresponding response to the HTCFMRadio code I have loaded in NetBeans. I can now see in real-time how the program operates from my own interactions... JAM.
Technical Aspects: How to get from ground zero to tracing HTCFMRadio?
1.) Download Android SDK - Go to google development site and follow instructions: Make sure to download the latest Java JDK. Once that is installed, download NetBeans 6.8. Unfortunately, smali debugging does not work with the lastest versions of NetBeans.
Download the "Java SE" version for minimal space
http://netbeans.org/downloads/6.8/index.html
You can follow the rest of Google walkthrough and download Eclipse and ADT plugin, but it's not pertinent to this. You're going to be using adb and ddms from the android SDK extensively, so make sure the path for </android SDK/tools> is included in the PATH variable in your ENVIRONMENT SETTINGS. To get here, right click My computer, click properties, Advanced Settings, ENVIRONMENT SETTINGS.
2.) Search for 7z and download it. It is an awesome and free compression tool that will be extremely useful. It can be used to "unzip" .jar, .apk, and other compressed formats.
3.) Get the Radio app. You can do this by going to "shipped-roms" website, downloading the latest Supersonic image, and following the directions in the unlockr tutorial for HTC kitchens at the unlockr website... (once you have extracted the files from the image, you can look in the system/app and system/framework directories to get the files listed below) or:
you can pull the following files from your phone:
Using the command prompt type (and with phone plugged in, and with USB debugging enabled on phone):
adb pull /system/app/HtcFMRadio.odex
adb pull /system/app/HtcFMRadio.apk
adb pull /system/framework ./framework
This will put HtcFMRadio.odex and HtcFMRadio.apk in the current directory and create a framework directory with more files. A couple of the files in the framework are needed for the HtcFMRadio app, but for simplicity, we're just going to pull the whole directory.
Now that we have the files, we have to make a few changes to make the app installable and to be viewable by the debugger. To do this we have to decompile the .odex format into a human readable format we can edit. That brings us to:
3.) Download baksmali and smali from Project Hosting on Google Code (google search smali).
Usually an Android application is made up of one file, an apk file. Inside the apk file is an AndroidManifest.xml file, a classes.dex file (compiled Java code for the program), and other folders. The other folders contain either graphics or other .xml files that tell the program how it should look to the user. We don't have to worry about those for now. This is important because APKTOOL only opens programs set up this way. But wait up? We didn't download one .apk file, we downloaded an .apk file and an .odex file! What gives? Well, if you right click the apk file and open it (using 7z), you'll see that it's missing the classes.dex file. The dex file for the app is actually the HtcFMRadio.odex file we downloaded. So, to make this system app more like a nominal app, we have to find a way to convert the HtcFMRadio.odex to a classes.dex file. That's easy with baksmali and smali!
Once you download goto command prompt and type:
java -jar baksmali-<version>.jar -d framework -x HtcFMRadio.odex
(Remember to match baksmali-<version>.jar with the filename of baksmali you downloaded)
If done correctly, you should see a newly created \out directory
This creates an out\com\htc\fm directory with many .smali files.
Now let's reverse the process and put it back as a dex file. Type at command prompt:
java -jar smali-<version>.jar out -o classes.dex
If done correctly you'll see a newly created classes.dex.
now, right click on HtcFMRadio.apk (select 7z and open). Drag classes.dex into the file. Say yes to the prompt. Now you have a normal apk file APKTOOL can read!
4.) Download APKTOOL from Project Hosting on Google Code and the helper apps for your OS. (If you're extracting files for windows OS you should have apktool.bat and aapt.exe). Extract (again using 7z, don't you love this program?) apktool.jar (keep it as a jar file, don't extract the stuff inside of it), apktool.bat, and aapt.exe to the directory you're working on. To make things neat, you can also delete HtcFMRadio.odex (you don't need it anymore) and classes.dex (make sure you put it in the HtcFMRadio.apk file first!)
If this is the first time you're using apktool, then you have to install the htc framework so apktool can baksmali the Radio app. You only have to do this once:
apktool if ./framework/com.htc.resources.apk
Alright, at the command prompt:
apktool d -d HtcFMRadio.apk
This extracts the contents of HtcFMRadio.apk and places them in the HtcFMRadio directory. However, there are two major differences between this content and the content created in step 3. If you go into the smali directory you'll see that instead of .smali files, you'll see .java files. And if you go back and edit the AndroidManifest.xml file, you will also see that it's in text! Android applications convert their xml files to binary format. Now that APKTOOL has converted everything to an IDE friendly format, we can use NetBeans to edit everything. The first thing we're going to do is edit AndroidManifest.xml (using notepad) and add the following:
android:debuggable="true" to the Application tag.
IT should now look like this:
<application android:theme="@android:style/Theme.Black.NoTitleBar" android:label="@string/fm_app_name" android:icon="@drawable/fm_radio" android:taskAffinity="android.task.fmradio" android:description="@string/htc_corp" android:allowTaskReparenting="true" android:debuggable="true">
This permission lets the debugger watch the program while it's running on the phone.
We are going to run into two problems if we try to install this program. One is that Android doesn't let you install more than one copy of a system app. The second issue is that if we change the signature of our system app, then we'll have to change the signatures of our other system apps as well! Ahh.... So, to get around that, we're going to trick Android into thinking we have a completely new program. We're going to do that by renaming the com.htc.fm class to com.htc.modradio class. Next step:
5.) Cygwin (or Linux virtual machine)
The easiest way that I can think of to replace strings in multiple files is by using linux. You can most definitely do it in WIndows, but I dont know how. If you let me know how, I can put it in this tutorial.
(update: you can use Notepad++ to easily find/replace strings in multiple files for Windows. You still, however, want to download Cygwin if you're going to develop with Android-NDK.)
For now, just search for Cygwin (Cygwin is a program that lets you run Linux commands from a command prompt using your Windows directories), and install it. Make sure to have the Perl option selected. You'll need Perl to make the following commands work.
Once you get Cygwin up and running
cd <to your HtcFMRadio directory>
in my case it's
cd /cygdrive/c/Users/Jerry/Desktop/HtcFMRadio
now type the following commands in this order:
this command changes all occurances of htc/fm to htc/modradio in your xml and .java files.
find ./ -type f | xargs perl -pi -e 's/htc\/fm/htc\/modradio/g'
this command changes all occurances of htc.fm to htc.modradio
find ./ -type f | xargs perl -pi -e 's/htc.fm/htc.modradio/g'
If you don't follow this order, your source code will get messed up.
If using cygwin, a bunch of .bak files will be created. Using windows search, find all .bak files in your HtcFMRadio directory, then select them all and delete them (Make sure they are only files with .bak!)
Now just rename the fm directory to modradio. It is located in HtcFMRadio/smali/com/htc
Now go to your windows command prompt and type:
apktool b -d .\HtcFMRadio modradio.apk
Now sign and install modradio.apk on your phone.
adb install modradio.apk
If you have never signed before, then you need to use keytool and jarsigner. These two files are in your JDK directory, so make sure you include your JDK directory in the PATH variable of your ENVIRONMENT SETTINGS. (To get here, right click on My Computer, click Properties, Advanced Settings, Environment Variables. Once you make change, open up a new COMMAND prompt to see changes).
cd to the directory which has modradio.apk
now type:
keytool -genkeypair
Answer all questions, then use the same password for all password prompts.
Next type:
jarsigner -verbose modradio.apk mykey
Type in the password you created in the above step. Your apk should now be signed.
Next install:
adb install modradio.apk
Success!
6.) Testing the app on phone
Go to your phone and you'll now see a new FMRadio icon next to your first. Click on it and watch it open. It should now be able to play music. Keep it open.
7.) Using Netbeans
Go into HtcFMRadio and delete the build directory created by APKTOOL.
Now open up Net Beans and click on File, New Project, Select Java Project with Existing Sources, click on Next
Select HtcFMRadio directory for Project Folder, rename Project Name to whatever you want. Let's type in ModRadio. click on Next
Next to "Source Package Folders" click on "Add Folder" and select the smali directory.
Click Finish. For a quick tutorial by Brut.all, search APKTOOL in youtube and click on: Apktool Demo 2 - Smali improvements
Right click on Libraries. Click on "Add Jar / Folder". You want to add Android.Jar. Since I have Android 2.1 loaded I went to /platforms/android-7 located in my android SDK directory.
Your project is now ready for editting!
8.) Running the Debugger to trace through program.
Next go back to Windows command prompt and type ddms. This runs the Dalvik Debug Monitor. A window should open up. In the left hand side you should see com.htc.modradio. That's our app! To the right you're going to see 2 numbers, you're interested in the one to the right, 4 cells away from com.htc.modradio. This number is a port number, and you're going to use it to communicate with NetBeans. (In my case it is 8603)
Go back to NetBeans and click on Debug, Attach Debugger.
In the host field type: localhost
In the Port field: type in the second number you saw. (8603)
If everything is working you'll see a bug appear next to com.htc.modradio in the Dalvik Debug Monitor. Look at the bottom bar of NetBeans for feedback. If you get errors make sure the numbers match, or try port 8700 and make sure you select com.htc.modradio in the Dalvik Debug Monitor. Port 8700 is the default port used for whatever program you select in Dalvik Debug Monitor.
9.) Setting a breakpoint
I'm making this a seperate step because it is completely arbitrary. When creating a break point be sure to follow this rule:
You must select line with some instruction, you can't set breakpoint on lines starting with ".", ":" or "#".
Rather than looking for a spot to breakpoint, though, I'll tell you where to put one so you can quickly see how the debugger traces through the code. You aren't "REQUIRED" to do the next step, but if you want to trace you have to put a breakpoint somewhere.
In Net Beans click on the Project tab, click on Source Packages, com.htc.modradio, and then doubleclick on BroadcomFMTuner.java
We're going to insert a breakpoint. Scroll down to line 3226 and on your keyboard press: CTRL-SHIFT-F8, select line in dropdown box and hit ok. (To keep it simple, I usually look for "invoke" instructions to set breakpoints at)
Now go to your phone and click on the physical "back" button on your phone. This will clear the radio,(you should still be able to listen to music). Drag your status bar down. You should see a radio icon. Click on it again. The radio backgroudn will appear, but you wont' see any text or anything. Now go back to your netbeans application. You should now see debug options highlighted! Click on Step Over (F8) to step through!
nice tutorial
Nice tutor! I'm glad that finally someone is interested in smali debugging feature ;-)
About package name changing: I must warn you, that this isn't always that easy. It's advanced task, you must understand, what are you doing - otherwise you will get FCs for some apps and you won't know, why. And you don't have to change Java classes package name, so actually changing com.example.android should be enough - there is no need for changing com/example/android and dir names.
And I have few words about the background/theory: dexes, smali, (de)compiling, etc., but I will write them tomorrow
So I don't have to change the directory names for all of the invokes? Which means I don't have to rename the directory either? That sounds much easier. So you're saying to only replace the name in the application tag in the AndroidManifest.xml file?
Wow I'm a noob
Your badass tutorial just made me realize how much further I have to go. Great work!
BTW, if someone could figure how to make use of the FM transmitter and create an FM modulation app I think that could be popular. Not everyone has cars with input jacks and I know I really could of made use of it for my vacation I just took.
Once you understand how the software interacts with the Broadcom chip it shouldn't take too much should it? I would envision something working just like wifi tether does. No need to turn on the radio, the app just takes control.
Cool! Thanks! Will this work with eclipse also?
oikjdfkrjhr said:
Cool! Thanks! Will this work with eclipse also?
Click to expand...
Click to collapse
According to Brut.all, no.
"Google smali debugging - you'll find an article written by Brut.all"
Eclipse can open the files, but certain workarounds have to be done to get the same tracing to work.
A FM Transmitter that is able to transmit audio to a receiver without any addition cords hardware etc would IMO make the EVO 4G Un-Stoppable!!! I'll donate to support the dev/s in this effort
Will this get FM Radio working on any android phone with that broadcom chip?
Wow, great tutorial. I was looking for the hitch-hackers guide to my new galaxy and I think I found it. Cheers
Thanks this is great. I almost got it 100% working. But there's one problem. I'm debugging some other apk. And I can't set any breakpoints because, since the apktool made fake java files, all the code is comments, so there's no place to set any breakpoints since there's no real executable code!
Help how to get around this?
At the beginning of a class I tried to add something like... int a=0; while keeping the same amount of lines... just before comment start...
Code:
package com.example.app; class MainActivity {
int a = 0; /*
.class public Lcom/example/app/MainActivity;
.super Landroid/app/Activity;
.source "MainActivity.java"
and put a breakpoint there, but it still says its not an executable location.
Any ideas? This is cool and I'm so close with your great tutorial. Thanks!
oikjdfkrjhr said:
Thanks this is great. I almost got it 100% working. But there's one problem. I'm debugging some other apk. And I can't set any breakpoints because, since the apktool made fake java files, all the code is comments, so there's no place to set any breakpoints since there's no real executable code!
Click to expand...
Click to collapse
http://code.google.com/p/android-apktool/wiki/SmaliDebugging
I tried to use Eclipse, but seems it forbids to add breakpoint on unknown (commented out) line :-/ I workarounded this and added breakpoint, then I was able to debug normally, but you should treat apktool debuging as unworkable on Eclipse - at least until someone will find some solution.
Click to expand...
Click to collapse
And actually midnjerry said this to you just few posts above.
neomagik said:
Will this get FM Radio working on any android phone with that broadcom chip?
Click to expand...
Click to collapse
Unfortunately not.
Refer to IntersectRaven's posts regarding enabling the FM Tuner for the Nexus One. He needed to create drivers for a custom Linux kernel to be used with a Desire ROM.
Smali debugging is important, however, because it allows developers to learn the code that implements the "undocumented" hardware for their phone (in this case, HTC phones with a working FM Radio app).
oikjdfkrjhr said:
Thanks this is great. I almost got it 100% working. But there's one problem. I'm debugging some other apk. And I can't set any breakpoints because, since the apktool made fake java files, all the code is comments, so there's no place to set any breakpoints since there's no real executable code!
Help how to get around this?
At the beginning of a class I tried to add something like... int a=0; while keeping the same amount of lines... just before comment start...
Code:
package com.example.app; class MainActivity {
int a = 0; /*
.class public Lcom/example/app/MainActivity;
.super Landroid/app/Activity;
.source "MainActivity.java"
and put a breakpoint there, but it still says its not an executable location.
Any ideas? This is cool and I'm so close with your great tutorial. Thanks!
Click to expand...
Click to collapse
if you're using NetBeans, just keep trying to insert breakpoints at every "invoke" type statement.
A really interesting thread. Thanks for sharing your knowledge with us. A topic like this should have its own Forum like ‘Android Engineering Tutorial’. We need more tutorials like this one!
Bluetooth Driver Files released by HTC!
Just went to
http://developer.htc.com/
Bluetooth driver files released! We should be able to better control the radio now.
Any progress? I'll donate to the first person who gets an app to broadcast my music to my radio.
Sent from my HTC EVO using XDA App
@midnjerry,
sorry if this is way off topic, but it does deal with the fundamental aspects that you have established here.
Can I use this method to reverse engineer the Google Voice app, so that I can have the same program installed twice for my two different Google voice accounts?
I just want to name the application something else, so that I can install it twice with two different sign in names.
reekotubbs said:
@midnjerry,
sorry if this is way off topic, but it does deal with the fundamental aspects that you have established here.
Can I use this method to reverse engineer the Google Voice app, so that I can have the same program installed twice for my two different Google voice accounts?
I just want to name the application something else, so that I can install it twice with two different sign in names.
Click to expand...
Click to collapse
Yeah, I think you can do that. Just change package name of an app to something else.
Brut.all said:
Yeah, I think you can do that. Just change package name of an app to something else.
Click to expand...
Click to collapse
@Brut.all
Can I do that in Eclipse or do I need to use need to use Smali Debugging? Just asking because I am not looking to debug the program only install it twice.

[GUIDE] Complete Guide for Building Up Android Modding Environment

Note: This Guide Is Specified For Android 4.0.# ICS, but also work with GingerBread.
Before we mod our Android Device, we need to set up a modding environment right?​
1. Install JDK.
Search Download and install. The installation of JDK needs JRE (Simply if Java is installed into your computer)
2. Download APK Manager for ICS here
http://db.tt/tuhzSEEl. Extract it.
3. Install framework. Copy your phone's system/framework/framework-res.apk to 'other' folder inside APKManager folder. If there are any additional framework files, copy it into the folder too. More information will be given at the buttom of thr thread. Hold the Shift Key on keyboard amd right click the "other" folder inside APKManager folder and, click "Open CMD Window here". Type:
Code:
java -jar apktool.jar if framework-res.apk
And, if any additional framework files,
Code:
java -jar apktool.jar if *.apk
Replace * by your filename.
OK, delete all the framework apks from the "other" folder.
4. Copy the apk that you want to mod.
Most probably system/framework/framework-res.apk and system/app/SystemUI.apk to "APKManager/place-apk-here-for-modding".
Then, start modding apk processes.​
1.When you decompile apk (not necessary for framework-res.apk) , copy the 3 files from "APKManager/other/Original Apktool/" to "APKManager/other/" , replaces the old files.
2. Open script.bat, enter 22 to select the current project (Enter the code of the apk you want to mod then press enter!)
3.Enter 9 Enter to start decompiling process. Do not close the SCRIPT window!
4. "APKManager/projects/*.apk/" here contains the decompiled apk.
5. Do your mod.
6. When you compiling any ICS System apks(unnecessary for normal GingerBread apks), copy the 3 files from "/other/ICS Apktool/" to "/other/", replaces the old files.
6. Return to the SCRIPT window. Enter 11 enter to start compiling apk.
7. NOTE: You [mustn't] sign the apk if it is a system apk. Only sign user apks.
8. Make a flashable zip for your apk.
9. Flash via CWM. (Must with a full nandroid backup before flashing anything!)
Reserved.
Reserved.
Nice tut mate!
Right for beginners like me
Short and has a point. Very good guide. :good:
Thanks friend for this tutorial
Gustavo RD78 said:
Thanks friend for this tutorial
Click to expand...
Click to collapse
papabubadio said:
Short and has a point. Very good guide. :good:
Click to expand...
Click to collapse
M90 said:
Nice tut mate!
Right for beginners like me
Click to expand...
Click to collapse
Thank you too!
Sent from my ST25i using xda premium
dont sign ?
thanks
Thank you!!!!
Greetings.
Enviado desde mi Motorola Atrix
x-dira said:
dont sign ?
thanks
Click to expand...
Click to collapse
You don't have to sign apks if the apk is a system apk.
Sent from my ST25i using xda premium
so, can i add CRT ANIMATION using this method??
j.r.j said:
so, can i add CRT ANIMATION using this method??
Click to expand...
Click to collapse
Good guide, but I think you need to expand on the point about making a flashable zip (unless the APK Manager does this - sorry don't use Windows)
Yes,
Go framework-res.apk/res/values/bools.xml
Change the value from TRUE to FALSE in the line like...
config_animateScreenLight
Great tut brov.... +1
to sign non-system apks:-
java -jar signapk.jar certificate.pem key.pk8 your-app.apk your-app-signed.apk
Example: java -jar signapk.jar certificate.pem key.pk8 ttpod.apk ttpod-signed.apk
danist727 said:
Yes,
Go framework-res.apk/res/values/bools.xml
Change the value from TRUE to FALSE in the line like...
config_animateScreenLight
Click to expand...
Click to collapse
ok, i found framework-res.apk/res but cant find the " values/ " path..
i attached my framework-res.apk
thx for replying
真的很谢谢你:silly:

[Guide] Make your first custom Rom- easiest way

Newbies Thinks to make custom rom.. but dunno how
But when forever king's guide here NO prob!​
Things we Need-
1 winrar or winzip
base rom
Brain
notepad ++
Things You will find in Rom (when will you extract-:
1- Boot.img (in some roms not)
2-System
3- Meta-inf
No need to touch Boot.img, Meta inf as i will tell later on
So open system folder
Open Build.prop in system folder and open with notepad++
Open this page
tweaks by forever king
See open build.prop tweaks
And open build.prop and scroll to last....
Press enter
and type
"#Tweaks"
Now add all tweaks in that Webpage
Mods
You can add many mods like
1 Beats Audio (2.3+)
2 Adrenaline Engine (2.3+)
3 SlaidyBoost (2.3+)
4 Megabassbeats (2.2+ need$ xloud)
U need to port them to ya fone , dont ask me as i also dunno l0l
Adding tweaks to ya rom (build.prop)
Open build.prop (system folder)
find line ' ro.build.id=xxxxxxx '
Now change this to ' ro.build.id=yournameorwhatever '
Adding Apps to your Rom
1 Open system>app (folder)
Add .apk files to it (copy n paste xD)
2 Adding Init.d tweaks (if your base rom having init.d support in boot.img)
Open this webpage
tweaks by forever king
Scroll down (lil bit)
and see init.d tweaks
Add like this
Make new file and paste any script
like
"echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree"
this and save this file (no extention , save without .txt or any)
3 Adding bootanimation
Replacing bootanimation
-download bootanimation u want to use and rename it to "bootanimation.zip"
-delete animation u find in /./"rom"/system/media and then paste bootanimation u downloaded
Now modifying framework (u see statubar in rom and many tweaks)
Using UOT kitchen
Thanks to "CallMeVentus" for guide
Finnaly Done... will add more when i am freek xD >.<
Now Compress it in .zip
Now sign the Rom Signer
Open and see how
now flash Rom and test.....
if workeD then coool
Never say 'thanks' , hit it ​
Advance for N00bs
Never say thanks,hit it ​
How to make Rom transparent
See my guide = http://forum.xda-developers.com/showthread.php?t=1799373
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to decompile android app , u need this TUT for making rom transparent or editing apps..
See my guide= http://forum.xda-developers.com/showthread.php?t=1772220
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to add powermenu on your Rom
http://forum.xda-developers.com/showthread.php?t=811532
Thanks untermensch
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some tweaks making Rom fast
http://www.mediafire.com/?t8rsdmedu5w2vo5 (by me)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to Deodex Rom and >odex back
Things nEeded
Code:
backsmali.jar
* smali.jar
* custom java.awt.jar
* dexopt wrapper
* recent version of busybox
Download this
Open CMD CD to folder extracted those scripts and type
1 Deodexing Framework files-
Code:
java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
(i am taking android.policy.jar as example , if framework.jar or whatever just change 'android.policy.jar' to 'framework.jar' and 'framework.odex'
This will make out folder
now smali that out folder by
typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
HTML:
open android.policy.jar with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed android.policy.jar
2 Deodexing any App file i am taking systemUI.apk as example
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x SystemUI.odex
Again out folder created now make it smali
by typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
open SystemUI.apk with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed SystemUI.apk
Click to expand...
Click to collapse
3 Now we will learn to odexing back
1/ backup your original files (apk jar and odex) to /sdcard/Mod/
2/ copy modified deodexed files (.apk and .jar) in /system/framework/
3/ open a CMD prompt in the folder of adb.exe (usualy /android-sdk-windows/platform-tools/)
4/ type command :
Code:
adb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jaradb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
It will makepatched_apknameyouodexing file now remove (renaming) "patched_" line so it will be "apknameyouodexing.odex"
Now copy Signatures- (in same CMD)
Code:
# if not already done ...
adb shell
su
# copy the original .odex and .jar in system/framework (not .apk) :
cp /sdcard/MOD/original.XXX.odex /system/framework
cp -f /sdcard/MOD/XXX.jar /system/framework # where XXX.jar is the original odexed .jar
# give all permissions to XXX.odex files :
chmod 777 /system/framework/original.XXX.odex
chmod 777 /system/framework/patched_XXX.odex
# copy signature :
busybox dd if=/system/framework/original.XXX.odex of=/system/framework/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
response must be :
busybox dd if=/system/framework/original.XXX.odex of=/system/framewor
k/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s
Done now odex/deodex your Rom , so easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Changing splash Screen (bootsccreen before bootanimation)
Ok. 1st of all i dont maDe this script and i dont know who made it xD but i would day 'thanks' to Him
http://www.mediafire.com/?sr6lso6w7vj21o6
How to use this!! >>??
Decompile boot.img Scroll down to see HoW to decompile it/use DSIXDA kitchen
Ramdisk>initlogo.rle (make new folder and paste initlogo.rle into it)
now extract that downloaded kit in it
1 Now open CD to location and type
Code:
convert_image to rle.bat initlogo.rle
(if u named .rle file to 'yourfilename'
then type
Code:
convert image to rle.bat yourfilename.rle
2 the filename.raw file and filename.rle file will be created at the same location as filename.rle
Now yoU will see filename.png edit it like what you Want xD
3 For compiling filename.png to .rle , CD to that folder having dose files!
typE
Code:
convert rle to image.bat filename.png
Use this if you see Decompiled .rle Burred-
Code:
@bin\convert -depth 8 -size 333x774 rgb:initlogo.raw initlogo.png
(take your phone's size i just took which my mind told xD)
4 Now you will see new file named
filename.png.rle rename it to filename.rle
Done now replace it into your extracted boot.img and repack it
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Decompilng Boot.img
I didnt made this Script http://www.modaco.com/topic/340710-tool-edit-bootimg/ is originall thread thanks to him
Download Boot.img tools
So easy to use
Just extract it in folder
Now place boot.img also in it
Now open 'start.bat'
* Press 1 to decompile the boot.img
* replace the ramdisk.gz (if you want)
* replace the kernel (if you want)
* Press 2 and it will compile the boot.img again!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying updater-script (found in /META-INF/com/google/android)
Open with Notepad++
Now you can see in this pic theres written 'Welcome to Cm installer....'
{
"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 make this!
open updater-script
you will see 1st line ! make enter so you can add 1 line (at first)
Now add
Code:
ui_print("your text anything");
Code:
package_extract_dir("system", "/system");
tells extract directory system to system (in android)
Code:
mount("system");
tells mount specific directory like u can change location to dev folder
Code:
unmount("/system");
means unmount from where you mounted ! before
Code:
show_progress(0.200000, 5);
tells us that show progress like you can see when installing Rom yellow lines comes (CWM) u can control by this. its by Seconds..
Code:
symlink("busybox", "/system/xbin/fold");
means make symbolic link to that file at folder 'xbin'
Code:
format("MTD", "system");
means format mounted system folder
Code:
delete("/data/local");
Tells that delete /data/local folder
Code:
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set pem means setting permission like chka2sd permission rww-rww-rww
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
it means flash boot.img make raw file (image) at tmp/boot (afterwards android do which i dunno) and delete that file!
Now save this file
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying settings.apk
Creed$ rom!
you can see 'author name' which is not in our normal settings!
how he D!d?
Decompile apk by apkmanager ( i wont tell again xD , not by apktool )
1 goto res>xml open "device_info_settings.xml"
2 scroll to last and add line before "</PreferenceScreen>" line
3 add this line
Code:
<Preference android:title="Rom name (or whatever" android:summary="My rom name (what ever)" style="?android:preferenceInformationStyle" />
you can add many of them
4 Now compile from apkmanager when ask delete any file from 'keep folder' delete this file from keep folder and Install apk
too easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Enabling CRT animation on 2.3x
CRT animation is dam cool animation effect when locking phone so see how to make in your rom
But what is it?
1 Decompile framework-res.apk
2 goto res>values>bools.xml
3 Change "<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>"
Done.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Swipe to clear notifications
http://forum.xda-developers.com/showthread.php?t=1483193
thanks hansip87
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When i do something (just that thing which i moded) i got bootloap/loop!
1 Open that think you will get loop
2 open terminal
3 type
Code:
su
logcat>sdcard/logcat.txt
So end. i will add more if i got any in mind/guidE xD
A nice guide for the noobs, but I think all of this is a little basic. But if you keep adding onto this, then it will be a great guide.
Nice
asvantypography said:
Nice
Click to expand...
Click to collapse
thanks button dere
invasion2-- adding sooon!!
Is it possible to deodex from terminal emulator?
-XoRoX- said:
Is it possible to deodex from terminal emulator?
Click to expand...
Click to collapse
sooory dude! but u can thru fone.... I saw app' odex me ' or maybe it was 'deodex me' I dunno it works/not
Thanks for your work!
john9 said:
Thanks for your work!
Click to expand...
Click to collapse
button there >.< read....this..every user commenting btw welcome!
Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2
eggydrums said:
Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2
Click to expand...
Click to collapse
press thanks n welcome...I will add sooon its long so its future plan xD
modifying settings tut is wrong.
we have to edit xml in strings and public also
lol ur wrong
Avilove.Cullen said:
modifying settings tut is wrong.
we have to edit xml in strings and public also
Click to expand...
Click to collapse
ps. I am not editing settings.xml!
its lyk this! I made it dude! public.xml?
which entry? of Icon? no Icon needed!
Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images
varun.chitre15 said:
Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images
Click to expand...
Click to collapse
ok... will makE comlelty fr noobs !
dude I sa!d credits to dere devs ok will add link soon xD
fr icons u r wrong
decompile microfire 2's rom decompil settings.apk lol seee fire icon deres entry in public.xml Icons- which sum roms having coloured icons ! seee I can calll aksh too he also say this!
its ofcourCe v need png entry in settings.xml (or whereva)
and 1 png of that name I'm drawable-xxx
For adding strings, adding those strings in string.xml and public.xml is not necessary.... u cat do that too... but it works without adding too... i checked it ma self.... just remv "@string\" and "your_text".....
When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2
mistere372002 said:
When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2
Click to expand...
Click to collapse
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.
varun.chitre15 said:
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.
Click to expand...
Click to collapse
OK so say you wanted to add a list item called start clock. You would add the preferencescreen code and specify the target in settings.XML only? You wouldn't add lines to Id.XML or strings.XML and values.XML and then specify where in the layout folder of the appropriate XML in that folder?
Sent from my LG-E739 using Tapatalk 2
Who knows the reason for always apps optimizing in my custom Rom in every reboot?( always android is upgrading)
Sent from my SK17i using xda premium

[TOOL][BATCH]ApkToolKit[V1.1]

Hello, I present to you a new batch file which helps in decompiling and recompiling apks plus a few more features.
APK TOOLKIT​
Unique Features
This script is simple clean and elegant, which does the job.
It does not make use of folder therefore very less path errors.
You just have to enter the path of your apk and it will do the job and create the output in the same location, so no more unnecessary copying and pasting
Real time logs that let you know what's happening.
All required tools are included so you do not have to download anything else except java.
Requirements
Java
Features
Decompile apk
Recompile apk
Sign apk
Zipalign apk
Sign and Zipalign apk
Compile, Sign and Zipalign apk
Compile and Zipalign apk
Install apk
Clean Install apk (uninstalls the apk and then reinstalls it)
Push apk
Downloads
Version 1.1
http://www.mediafire.com/?03qer10nrbrbmgb
Github: https://github.com/Shalzz/ApkToolKit
Note:For windows only
Changelog:
added option to change heap size
Credits
Brut.all
iBotPeaches
jesusfreke
Make a prompt to press enter to exit the batch file. First time around, I had to press ctrl+c.
nantax said:
Make a prompt to press enter to exit the batch file. First time around, I had to press ctrl+c.
Click to expand...
Click to collapse
I do not wish to make an exit option when u can just close the window or press ctr+c.
Sent from a pay phone.

[TOOL][WINDOWS] Android Multitool

Android Multitool
Hello,
I´m glad to present my Android Multitool wich makes it easier to decompile/recompile applications + jar framework files. You can also sign your apk by easily clicking a button.
Requirements:
Winows OS XP / 7 / 8 / 8.1 / 10
Installed Java on Windows
Installed Microsoft Powerpacks
Installed .NET framework
- 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.
- ADB inside: Push files into your file system with a few clicks
It looks like this so far:
{
"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 AndroidMultitool folder to C:\. Otherwise it probably won´t work
-copy your framework-res.apk in the Framework-Files folder and other files you want to mod in the "Files" folder (this folder is for all your files you want to mod, don't pick files from any other location)
-Next you have to start AndroidMultitool.exe
-select your framework-res.apk and push the "install" button (check log for errors)
Decompiling and recompiling apk files:
-select the apk you want to mod/decompile and push the "decompile" button (check log for errors)
Note: You can check the "use baksmali" checkbox, then e.g. the useless .line text will be removed
-your decompiled apk will be located in C:\AndroidMultitool\Decompiled_apk"apkname" as a folder
-if you want to compile your apk again, select your decompiled folder, check the "apk" radio button and compile it again (check log for errors)
-your recompiled apk will be located in C:\AndroidMultitool\Compiled_apk"apkname"
Decompiling and recompiling jar files:
-select in the combobox ".jar" (check the "use baksmali" checkbox for deleting the useless .line comments)
-select the ".jar" file you want to mod
-push the "decompile" button
-your decompiled jar file will be locaten in C:\AndroidMultitool\Decompiled_jar"jarname"
-for recompiling you have to check the "jar" radiobutton and select the folder within your decompiled ".jar" file
-push the compile button
-your compiled jar file will be located in C:\AndroidMultitool\Compiled_jar"jarname"\classes.dex
-delete the "classes.dex" file in your ".jar" file
-copy the new "classes.dex" file you compiled in the ".jar" file
Signing apk files:
-select the ".apk" you want to sign
-push the "sign" button
-the signed apk file is located in C:\AndroidMultitool\Signed_apk"apkname_signed"
Using tags:
You want to decompile many files from different devices or different android versions / frameworks? Tagging makes it possible!
- before installing your framework type in any tag (like "hero")
- then install your framework and work normally
Android Debug Bridge
You want to push files with adb to your device? Follow these instructions:
Please klick on the "advanced" register in the tool
-push "check" to control if your device is ready
-if the device is not ready please follow the instructions, which are listed in the tool (device offline, no device...)
-if the device is ready, choose a file you want to push
-choose a path on the device, where the file should be placed later
-push the "push" Button
-alternately: press "Reboot device" to reboot your device and to let changes take effect
If there are any questions or bugs, please post them in the thread.
Follow me on Google+ : Daniel Huber
[DOWNLOAD] see next post #2
Enjoy easier apk handling!
Having issues with the program?
Try the batch version developed by @bovirus (it's also in the AndroidMultitool folder)
Questions and answers:
Q: The programm does not start, it crashes.
A: Please install Powerpacks, this one: http://go.microsoft.com/fwlink/?LinkID=145727&clcid=0x804
Q: What do you mean exactly with "!!!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! " .. I don't understand.
A: You have to open your old apk (this one you selected for decompiling in the folder /files) and copy from that apk the AndroidManifest.xml and the META-INF folder to the apk you just decompiled and recompiled.
Q: I followed all steps in the startpost but I'm still getting this error: "apktool is not recognized as internal or external command"
What can I do?
A: Please refer to this post by @LasVegasRomeo: http://forum.xda-developers.com/showpost.php?p=51017662&postcount=681
Credits:
Developers (brut.all, iBotPeaches) of the base Apktool
mike_galaxy_s for his help on testing
@bovirus for batch development
------------------------------------------------------
Changelog:
v3.5.9:
updated build tools and platform-tools (aapt, adb and needed dll's)
updated 7za, apktool, smali and baksmali to latest version
added bovirus's batch version to the main directory (users can choose between gui and batch now)
added a folder (Framework-Files) for the framework-res.apk (only use this folder for the framework files from now on)
added a Help folder with all commands
v3.5.8:
updated build tools and platform-tools (aapt, adb and needed dll's)
updated apktool, smali and baksmali to latest version
v3.5.7:
updated build tools and platform-tools (aapt, adb and needed dll's)
updated apktool, smali and baksmali to latest version
v3.5.6:
fix progressbar not disappearing after decompiling
fix loop after/while compiling
save compiling path and jump into it when he starts folder browsing
update user interface
v3.5.5:
fix infinite loop on compiling when errors appeared
folderbrowserdialog (compiling): jump into /decompiled_apk default
update build tools and platform-tools (aapt, adb and needed dll's)
v3.5.4:
add option to copy AndroidManifest.xml automatically into the apk after compiling
layout cleanup
force overwrite already compiled or decompiled files when new compiling/decompiling thread started
update to apktool rc3 (mainly lollipop support)
v3.5.3:
copy AndroidManifest.xml and META-INF folder automatically into the apk after compiling
added some links
code cleanup
v3.5.2:
add more detailed log
fix decompiling/compiling/signing/installing framework multiple times sometimes
add batch decompiling (preview)
fix donation image not fitting center
add txt files with descriptions for all tools inside (thanks to @bovirus)
v3.5.1:
update all files
v3.5:
code rework
fix UI freezing on long tasks
add progress bar
many other small fixes
v3.4:
access files from all locations of the pc (you're not limeted to the /Files folder)
add version number to the tool
v3.3:
add tag support (tagging allows multiple framework support)
rework interface
small additions and fixes
support for Win7 / 8 / 8.1 (no extra versions)
v3.2.1:
add apktool b9
v3.2:
add different apktool, aapt and batch files
should solve some problems on de - and recompiling
v3.1:
Fixes for adb push
button to reboot device
many other fixes and code rework
v3.0:
SlimBean apktool ((de)compiling also with inverted folders from trds)
ADB (AndroidDebugBridge for pushing files to your device)
Some Links in the tool for support and donation
v2.2 Beta1:
apktool 2.0.0
Details:
Details
v1.5.x -> v2.0.0
Java JRE 1.7 is required!
Update apktool to v2.0.0
aapt is now included inside the apktool binary. Its not required to maintain your own aapt install under $PATH. (However, features like -a / --aapt are still used and can override the internal aapt).
Remove framework $HOME/apktool/framework/1.apk or manually update via (FrameworkFiles)
Eagle eye users will notice resources are now decoded before sources now. This is because we need to know the API version via the manifest for decoding the sources.
Parameter Changes
Smali/baksmali 2.0 are included. This is a big change from 1.4.2. Please read the smali updates here for more information.
-o / --output is now used for the output of apk/directory.
-t / --tag is required for tagging framework files
-advance / --advanced will launch advance parameters and information on the usage output.
-m / --match-original is a new feature for apk analysis. This retains the apk is nearly original format, but will make rebuild more than likely not work due to ignoring the changes that newer aapt requires.
After [d]ecode, there will be new folders (original / unknown) in the decoded apk folder.
original/ = META-INF folder / AndroidManifest.xml, which are needed to retain the signature of APKs to prevent resigning. Used with -c / --copy-original on uild.
unknown/ = Files / folders that are not part of the standard AOSP build procedure. These files will be injected back into the rebuilt APK.
apktool.yml collects more information than before
SdkInfo = Used to re-populate the sdk information in AndroidManifest.xml since aapt requires it to be passed at runtime.
packageInfo = Used to help support Android 4.2 due to renamed manifest packages. Automatically detects difference between manifest and resources and performs automatic --rename-manifest-package on uild.
versionInfo = Used to re-populate the version information in the AndroidManifest.xml since aapt requires it to be passed at runtime.
compressionType = Used to determine the compression that resources.arsc had on the original apk to duplicate on uild.
unknownFiles = Used to record the name/location/compression type of non-standard files in Apk.
v2.1:
fixed freezes
bigger UI for better overview
option to save log to a text file
other small fixes
v2.0:
complete code rework
folder structure for a better overview
decompiled, recompiled, signed files will be located in their own folder
no more messy file handling
added radio buttons for choosing jar or apk
some graphical changes
added info button in the "installing framework" section
V1.2:
Added ability to decompile and recompile ".jar" files
Added baksmali
FolderBrowserDialog: If you push the "browse" button you are in the right directory now and needn't to scroll and search the "AndroidApktool" folder
other small fixes
V1.1:
Added ability to sign .apk
Changed comboboxes to browse buttons
bigger log - screen
Initial Release
- Latest mod version
Latest version is: 3.5.9 (23.10.2018) updated by bovirus
This version is based on original v. 3.5.9 by Flextrick plus with these updates
- apktool (by iBotPeaches) v. 2.3.4 stable
- apktool commands list
- baksmali/smali (by JesusFreke) v. 2.2.5 stable
- baksmali/smali command list
- Android Build Tools (by Google) v. 28.0.3 stable
- Android Build Tools commands list
- Android Platform Tools (by Google) v. 28.0.1 stable
- Android Platform Tools commands list
- 7zip (by Igor Pavlov) v. 18.05
- DOS batch updated (now support file names with spaces)
With the DOS batch (file AMT.BAT) you can
- install framework file
- select application
- decompile application
- compile application
- sign application
Android Multitool v. 3.5.9 (updated) - Download
- Android Multitool previous version
Library of previous version (Google Drive)
Note: Please take care that v. 3.5.9 (stock) included in the Google Drive repository DON'T include all updates reported before.
- Use always updated framework-res.apk
If you get error during decompilation/compilation of the apk, please check if you are using and updated version of framework.res.apk.
Please try to search, find and download an updated version of framework.-res.apk
Note: I suggest to rename the framework downloaded file name (without spaces) adding some info about it (like brand-model of device and Android version), like
framework-Samsung-S8-Android-7.1.2.apk
put the file in it in Framework-Files sub-folder of Android Multitool and install it in Android Multitool.
Then try again to decompile/recompile the application.
- External references
- apktool by iBotpeaches
apktool by iBotPeaches - XDA thread
apktool by iBotPeaches - XDA thread
- baksmali/smaly by JesusFreke
baksmali/smaly by JesusFreke - Download (bitbucket.org)
baksmali/smaly - XDA discussion thread
baksmali/smaly by JesusFreke - Source (Github)
- 7zip by Igor Pavlov
7zip by Igor Pavlov - Tool to decompress/compress files
- Android Platform Tools by Google
Android Platform Tools by Google - latest Windows version
..
Very nice tool!
One feature request, could you have a checkbox for say the -b command so that we can get rid of the useless .linexx and .prologue lines? That would make this tool perfect
Another feature is adding the twframework-res.apk as a framework file? Thats essential for modding samsung system apk's. I usually have to install both twframework-res.apk and framework-res.apk before decompiling. Maybe adding 2 slots for the framework in the tool?
Thanks again!!
Good work bro....
Very nice..
Sent from my GT-S6312 using xda app-developers app
clark44 said:
Very nice tool!
One feature request, could you have a checkbox for say the -b command so that we can get rid of the useless .linexx and .parameterxx lines? That would make this tool perfect
Another feature is adding the twframework-res.apk as a framework file? Thats essential for modding samsung system apk's. I usually have to install both twframework-res.apk and framework-res.apk before decompiling. Maybe adding 2 slots for the framework in the tool?
Thanks again!!
Click to expand...
Click to collapse
Sure, adding a second slot will be no problem!
But I don't know what you mean with this checkbox, could you explain me exactly what you mean?
~ via Nexus
Flextrick said:
Sure, adding a second slot will be no problem!
But I don't know what you mean with this checkbox, could you explain me exactly what you mean?
~ via Nexus
Click to expand...
Click to collapse
When I decompile using baksmali this is the command I run...
Code:
java -jar baksmali.jar -b -o c:/smali c:/smali/classes.dex
The -b command prompts baksmali to remove all .line type code from the smali.
Here is an example .smali file before and after the -b command...
BEFORE: http://pastebin.com/gYKQ90cW
AFTER: http://pastebin.com/17i8k1X2
This method of decompiling smali makes it much much simpler to compare to other code.
Thanks!! :highfive:
Ah, I'm understanding. Yes, I think that's possible as well!
~ via Nexus
Flextrick said:
Ah, I'm understanding. Yes, I think that's possible as well!
~ via Nexus
Click to expand...
Click to collapse
Cool. Cant wait
One more thing, will you be adding the ability to decompile more then one apk/jar?
At once? Would work, I think.
Two possibilities:
The first apk decompiles, and then the second one
Or: Both are decompiling at the same time, but in two different processes.
~ via Nexus
Flextrick said:
At once? Would work, I think.
Two possibilities:
The first apk decompiles, and then the second one
Or: Both are decompiling at the same time, but in two different processes.
~ via Nexus
Click to expand...
Click to collapse
One then the second and so on would save the most memory and prevent crashes on weaker machines
androidapktool.exe does not open on my win 7 32 bin in admin mode.... i have java 7u25 installed.
need java 6?
Flextrick said:
ANDROID APKTOOL
exe crashed on my PC
Win 7 x64, Java 7 w/ update 21 (64-bit) installed.
(AMD FX-8120, 16Gb ram)
Just try with java 6
Click to expand...
Click to collapse
fvadym said:
Flextrick said:
ANDROID APKTOOL
exe crashed on my PC
Win 7 x64, Java 7 w/ update 21 (64-bit) installed.
(AMD FX-8120, 16Gb ram)
Just try with java 6
Click to expand...
Click to collapse
AndroidApktool.exe won't start, neither with 6u45 nor with 7u25 (latest versions)
whats wrong... ?
i have copied framework-res.apk into C:\AndroidApktool from my samsung galaxy s3 i9300, FW XXEMD3 / 4.1.2 jelly bean.
i tried to run it as normal and as an adminstrator... nothing happened at all.
Click to expand...
Click to collapse
yeah not running on windows 8 either
is there something we have to install, too?
Hello, there can be a lot of things.
Maybe you are missing the .NET framework, or some dll´s.
I also uploaded a new .exe just for testing. New is the progressbar.
Download: http://www.mediafire.com/?6y7qi0x8h9q6pt7
Cheers
Flextrick said:
Hello, there can be a lot of things.
Maybe you are missing the .NET framework, or some dll´s.
I also uploaded a new .exe just for testing. New is the progressbar.
Download: http://www.mediafire.com/?6y7qi0x8h9q6pt7
Cheers
Click to expand...
Click to collapse
Test new .exe......
best regards "D"
Could anybody test trying to install .NET Framework?
Hopefully I get a solution for this problem, otherwise I'll make an Installer.
~ via Nexus
@Flextrick
I have NET Framework 4.5, Java 7 Update 25 and Java SE Development Kit 7 Update 25.
Edit:
You've got a Private Message
"D"
Ok. For starting the Tool is no Java necessary.
I think the dll's are missing, hopefully I get it working as far as possible.
~ via Nexus

Categories

Resources