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:
Related
How to Make Your Own Custom Rom
Click to expand...
Click to collapse
Part 1 : Setting Up Dsixda's Android Kitchen.
So, Do you want to make a custom rom or, mod one that is made already? If your answer to this question is yes then you are at the right place. In this article I will help you get started with setting up an environment to make your own custom roms or edit the ones that are developed already. We are going to take help of dsixda's Android Kitchen Utility to help us in this task and in this article I am going to help you get started by guiding you through the installation process of Android Kitchen on your Personal Computer. So, you might have the question in your mind what exactly is Android Kitchen and what does it do and whom it is for? Continue reading to know all this as well as to get instructions on setting it up on your PC.
What is Dsixda's Android Kitchen?
Who is this kitchen for?
-Those who are brand new to creating custom ROMs and want an easy place to start learning
-Those who just want to modify shipped ROMs or someone else's custom ROMs to their liking
-Those who are confused by all those scripts and complex commands required for building and extracting
Please note:
-The kitchen will not automatically turn you into a developer. A developer is someone who writes code or builds something from the ground up and understands exactly what goes on behind the scenes. The kitchen hides all that and puts a user-friendly interface above it. However, this may be the push that gets you into development in the future.
My goal is to give you the tools to make your life easier and save you lots of time, and at the same time help you learn about the Android OS.
A little bit of prior UNIX command-line knowledge would be useful to get started with the kitchen, but the help guides should be enough for a newbie. Knowledge of command lines is always important if you ever want to get involved in Android or development.
Code:
===========================================================
Android Kitchen - by dsixda (xda-developers.com)
===========================================================
Main Menu
1. Set up working folder from ROM
2. Add root permissions
3. Add BusyBox
4. Disable boot screen sounds
5. Add wireless tethering
6. Zipalign all *.apk files to optimize RAM usage
7. Change wipe status of ROM
8. Change name of ROM
9. Check update-script for errors
10. Show working folder information
Advanced Options
11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
20 - Tools for boot image (unpack/re-pack/etc.)
21 - Unpack data.img
22 - Sign APK or ZIP file(s)
23 - Convert update-script or updater-script
24 - Miscellaneous optins / Plugin scripts
99. Build ROM from working folder
00. About/Update kitchen
x. Exit
How To Install Kitchen?
1. Install latest Java JDK. It's pretty simple just follow the instructions and you are done.
2. Download and Extract Cygwin Packages and Android Kitchen on your desktop or somewhere easy to
access.
3. Once extracted go through kitchen_readme.txt and you will get an overview of how to setup the
kitchen.
4. To begin, install Cygwin first. So, run setup.exe from the extracted files and go through the installation
process.
5. Run Cygwin.exe once and it will create a folder with your username on /home/ directory.
6. Navigate to the folder where you installed Cygwin and go inside .../ home// folder.
7. Copy the extracted kitchen folder to this location.
8. Once copied, rename it to kitchen (type all letters in lower case for Linux is case sensitive).
9. Run Cygwin.exe and navigate to kitchen folder. for that simply type the command cd kitchen and press Enter
10. Once inside kitchen folder, type ./ menu to run android kitchen. Note: if you get a permission denied error then type chmod +x menu or chmod 777 menu in Cygwin command line utility first and then only run the command ./menu .
11. You will be presented with the Android Kitchen menu seen above. Use these options and get started. That's all. You have successfully installed android kitchen on your PC. Though this is originally meant for only HTC based roms some of it's features will come handy for modding Samsung Roms too. Please note that because of the same reason all the functions/features of Android Kitchen may not work for you.
Wow. Why did you copy and create a new thread and paste it? Why? Don't we have enough spam already?
EDIT: I don't see the point of this. Couldn't just share a link to the thread?
Interesting.
Thanks!
Sent from my Xperia™ PLAY using TapatalkHD
Lol. Nah, I think I will just stick with good ol' Linux and good ol' terminal and gedit (the proper way )
Sent from my E15i using XDA
Aha!!!
This is what i need... Great! Thankx
Nice info
Creating Custom ROM For Xperia 2011 Device
SatrioDwiPrabowo said:
Nice info
Click to expand...
Click to collapse
Is there any guide how to make custom rom for 2011 device like : Xperia Ray .. ???
engkozhe said:
Is there any guide how to make custom rom for 2011 device like : Xperia Ray .. ???
Click to expand...
Click to collapse
Use dsixda for basic tools rest you do whatever you want theme it add scripts do whatever you want !
Sent from my HTC Explorer A310e using xda premium
Ok. Tnx
Sent from my ST18i using xda app-developers app
I got stuck on services.odex n i cant get the classes.dex file, how can i deodex. Odex n put it on jar file? Tnx
ST18 with custom kernel
engkozhe said:
I got stuck on services.odex n i cant get the classes.dex file, how can i deodex. Odex n put it on jar file? Tnx
ST18 with custom kernel
Click to expand...
Click to collapse
To deodex ROMs use the option in Kitchen for it!
Sent from my HTC Explorer A310e using xda premium
Oh... One more question, can we put apk directly to system folder on cygwin? And how do you create credit on updater script?? Thank you
Sent from my ST18i using xda app-developers app
engkozhe said:
Oh... One more question, can we put apk directly to system folder on cygwin? And how do you create credit on updater script?? Thank you
Sent from my ST18i using xda app-developers app
Click to expand...
Click to collapse
You can add apps in /system/app or /data/app
But if you add in data you will have to create appropriate lines in updater script!
Sent from my HTC Explorer A310e using xda premium
Interesting.
...
updated
Guide to decompile android application
REQUIREMENT
Apktool [click here to download][Thanks to brut.all for this apktool]
Java JDK/JRE 32 bit [please google it guy's]
Little knowledge on cmd
_________________________________________________________________________________________________________________________
Preparation before WORKING
Process :-
1)now install the java in your pc/lappy
then copy the apktool.zip & goto directory C:/
make a folder name apktool (u can name it by watever u like)
now goto that folder & paste the zip
extract that zip there...
2) now copy the .apk or jar file which u wnt to decompile
& paste it on apktool folder.....
also copy the framework-res.apk of that rom &
paste it on that folder..
Decompiling application
3) now open cmd
Your cmd will probly look like this..
C:\users\yourname>
so type in
cd.. (yes include the '..' and press enter after you type each command)
this will get you to back directory so now you will see
C:\users>
so type again
cd..
you should now see this:
C:\>
now type
cd apktool (and you are in the apktool directory)
4)Installing Framework
Now that you are in directory we need to install the device's framework to your system for it to compile correctly so type this:
apktool if framework-res.apk
this will install the devices framework to your system (need to do this)
5)now to decompile the apk you want to edit.. type this:
apktool d music.apk mod
music.apk is the apk your decompiling
mod is the folder you're creating for the decompiled apk
do whatever you want to do with your apk...
NOW RECOMPILING
6)now to recompile your new apk type this:
apktool b mod music-new.apk
mod is the folder with your edited files
music-new.apk is your new apk file
Now we are NOT done... we cannot use the new apk's...
now make two separate folder a & b
copy-paste the original music.apk in 'a'
& music-new.apk in 'b'
use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "new-edited" apk and copy them into Original apk
now add to archive ...the origanl apk in zip format
& at the end of the file name .apk ( i mean give the file format name as .apk insted of .zip)
Now you are almost done.....:thumbup:
IF it is a system app then don't sign it....otherwise u have to sign that app....
[=>Guide On How To Sign The Moded App<=]
NOTE:- If you are getting this error =>" java is not a recognized internal or external command "
[=>Then Follow this Guide<=][Thanks to KartzXDA]:good:
That's all
don't forget to hit thanks or comment....:good:
All Mod-Rom by Abhijit Guha(mee)
1} X-zooM[V2] (Netlock free : Transparent Rom):good:
2}Tutorial On Decompiling Android Apps
3.Guide To Make Transparent Power Widget.
4.Guide To Change Statusbar Clock & Notification colour.
5.Guide On How To Sign The Moded App.
6.Guide On How To SetUp Environmental Variables
cool.........
thank for nice guide
sent from my ass ®
Insted of so much to cd folder just right click the folder while holding shift button and you will see adbance options... now open command prompt.. It will save time and is very easy ....
Sent from my GT-S7500 using xda premium
lokeshsaini94 said:
Insted of so much to cd folder just right click the folder while holding shift button and you will see adbance options... now open command prompt.. It will save time and is very easy ....
Sent from my GT-S7500 using xda premium
Click to expand...
Click to collapse
I think you haven't followed something...... this guide is for begginers...so it should be simple one.... not eeky
This is simple method to cd a folder in cmd without all that long commands.... I always use it... Try it once and you will know what i am trying to say....
Sent from my GT-S7500 using xda premium
Thank s for this awesome guide
Sent from my Galaxy Nexus using Tapatalk 2
Awesome guide, very simple to decompile and recompile with it.
Cool guide! I will use it to do some tests with my apks
solved problem lol ... good tutorial ...
xda facebook page should share more tutorials like this!!
Yeah mine says java is not a recognized internal or external command, operable program or batch file. I probably have to add the environment variable, but im not sure how to.
EDIT: got it.
AlwaysDroid said:
Yeah mine says java is not a recognized internal or external command, operable program or batch file. I probably have to add the environment variable, but im not sure how to.
EDIT: got it.
Click to expand...
Click to collapse
You getting this error coz you giving those command in some other directory.........
Note:- First u have to go th that directory or folder where ur apktool files are kept...... then u will not get such error......
Follow that guide from begging then u will get wat I wanna say. best of luck :good:
aguha1044 said:
You getting this error coz you giving those command in some other directory.........
Note:- First u have to go th that directory or folder where ur apktool files are kept...... then u will not get such error......
Follow that guide from begging then u will get wat I wanna say. best of luck :good:
Click to expand...
Click to collapse
No, I just forgot to add the java bin to PATH variable. All good
Sent from my GT-I9000 using xda premium
For the OP. Some ROMs like miui ROM use two frameworks ( framework-res.apk and framework-miui-res.apk) so you need to specify that on the guide. I am just trying to help
tapatalked² cowsquadGnex®
AlwaysDroid said:
No, I just forgot to add the java bin to PATH variable. All good
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
can you tell how to add JAVA bin? I am getting the same error on cmd. thank you
How to setup the environment variable
zain0300 said:
can you tell how to add JAVA bin? I am getting the same error on cmd. thank you
Click to expand...
Click to collapse
TECHNICAL INFORMATION
The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
The PATH system variable can be set using System Utility in control panel on Windows, or in your shell's startup file on Linux and Solaris.
SOLUTION
Here PATH represents the bin path of installed version of Java that contains classes. (e.g. C:/jdk1.6.0/bin)
Setting Path on Windows
Windows 7
1. Select Computer from the Start menu
2. Choose System Properties from the context menu
3. Click Advanced system settings > Advanced tab
4. Click on Environment Variables, under System Variables, find PATH, and click on it.
5. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
6. Reopen Command prompt window, and run your java code.
Windows XP
1. Start -> Control Panel -> System -> Advanced
2. Click on Environment Variables, under System Variables, find PATH, and click on it.
3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
4. Close the window.
5. Reopen Command prompt window, and run your java code.
Windows Vista
1. Right click My Computer icon
2. Choose Properties from the context menu
3. Click Advanced tab (Advanced system settings link in Vista)
4. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may
select to add a new variable and add PATH as the name and the location of the class as the value.
5. Reopen Command prompt window, and run your java code.
Setting Path on Solaris and Linux
To find out if the java executable is in your PATH, execute:
% java -version
This will print the version of the java executable, if it can find it. If you get error java: Command not found. Then path is not properly set.
To find out which java executable the first one found in your PATH, execute:
% which java
Below are the steps to set the PATH permanently,
Giving instructions for two most popular Shells on Linux and Solaris.
For bash Shell:
Edit the startup file (~/ .bashrc)
Modify PATH variable:
PATH="$PATH":/usr/local/jdk1.6.0/bin
export PATH
Save and close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
For C Shell (csh):
Edit startup file (~/ .cshrc)
Set Path
set path="$PATH":/usr/local/jdk1.6.0/bin
Save and Close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
Hit "Thanks" if anyone helped you. :good:
Xperia Arc LT15i
Rooted/Bootloader Unlocked
JellyBean - FXP137/CM10
KartzXDA said:
TECHNICAL INFORMATION
The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
The PATH system variable can be set using System Utility in control panel on Windows, or in your shell's startup file on Linux and Solaris.
SOLUTION
Here PATH represents the bin path of installed version of Java that contains classes. (e.g. C:/jdk1.6.0/bin)
Setting Path on Windows
Windows 7
1. Select Computer from the Start menu
2. Choose System Properties from the context menu
3. Click Advanced system settings > Advanced tab
4. Click on Environment Variables, under System Variables, find PATH, and click on it.
5. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
6. Reopen Command prompt window, and run your java code.
Windows XP
1. Start -> Control Panel -> System -> Advanced
2. Click on Environment Variables, under System Variables, find PATH, and click on it.
3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH,
you may select to add a new variable and add PATH as the name and the location of the class as the value.
4. Close the window.
5. Reopen Command prompt window, and run your java code.
Windows Vista
1. Right click My Computer icon
2. Choose Properties from the context menu
3. Click Advanced tab (Advanced system settings link in Vista)
4. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may
select to add a new variable and add PATH as the name and the location of the class as the value.
5. Reopen Command prompt window, and run your java code.
Setting Path on Solaris and Linux
To find out if the java executable is in your PATH, execute:
% java -version
This will print the version of the java executable, if it can find it. If you get error java: Command not found. Then path is not properly set.
To find out which java executable the first one found in your PATH, execute:
% which java
Below are the steps to set the PATH permanently,
Giving instructions for two most popular Shells on Linux and Solaris.
For bash Shell:
Edit the startup file (~/ .bashrc)
Modify PATH variable:
PATH="$PATH":/usr/local/jdk1.6.0/bin
export PATH
Save and close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
For C Shell (csh):
Edit startup file (~/ .cshrc)
Set Path
set path="$PATH":/usr/local/jdk1.6.0/bin
Save and Close the file
Open new Terminal window
Verify the PATH is set properly
% java -version
Hit "Thanks" if anyone helped you. :good:
Xperia Arc LT15i
Rooted/Bootloader Unlocked
JellyBean - FXP137/CM10
Click to expand...
Click to collapse
i read all this but still could not figured it out since there were few options i did not find on my windows 7 laptop.
Edit: Ok i found all the options now but what does this mean "modify PATH by adding the location of the class to the value for PATH"?
zain0300 said:
i read all this but still could not figured it out since there were few options i did not find on my windows 7 laptop.
Edit: Ok i found all the options now but what does this mean "modify PATH by adding the location of the class to the value for PATH"?
Click to expand...
Click to collapse
Under system variables, find for the variable Path. Click on Edit. Then one window will come up with two text boxes. One is variable name and another one is variable value. Edit the variable value of text box. Add the the path of bin ( e.g., ; C:\jdk\bin [Don't forget to add semicolon before the path]) to the text box.
Please have a look at the attachments.
Hit "Thanks" if anyone helped you.
Xperia Arc LT15i
Rooted/Bootloader Unlocked
JellyBean - FXP137/CM10
KartzXDA said:
Under system variables, find for the variable Path. Click on Edit. Then one window will come up with two text boxes. One is variable name and another one is variable value. Edit the variable value of text box. Add the the path of bin ( e.g., ; C:\jdk\bin [Don't forget to add semicolon before the path]) to the text box.
Please have a look at the attachments.
Hit "Thanks" if anyone helped you.
Xperia Arc LT15i
Rooted/Bootloader Unlocked
JellyBean - FXP137/CM10
Click to expand...
Click to collapse
thankx for your replies. I mistakenly deleted all the other paths that were already there, can I bring them back?
thanks button pushed.
zain0300 said:
thankx for your replies. I mistakenly deleted all the other paths that were already there, can I bring them back?
thanks button pushed.
Click to expand...
Click to collapse
copy this in the path variable value after that add ;C:\jdk....\bin
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\
Hit "Thanks" if anyone helped you. :good:
Xperia Arc LT15i
Rooted/Bootloader Unlocked
JellyBean - FXP137/CM10
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.
[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
WARNING: INSTALL GOOGLE´S ANDROID SYSTEM WEBVIEW FROM THE PLAYSTORE / GAPPS FIRST
https://play.google.com/store/apps/details?id=com.google.android.webview
Do you wan´t to use google´s updatable webview on a cm rom?
well too bad, even if you install and disable the built in webview, the system still dosen´t uses it, so what can we do?
modify a config in the framework called
"config_webViewPackageName" from com.android.webview to com.google.android.webview
you can do this via xposed with http://repo.xposed.info/module/net.typeblog.webview
however xposed for 5.1 is glitchy and will break a lot of optimizations if you are running a based cm run that has those.
so the solution? well flash the zip below, its a modified framework from cm12-13/04/2015 (DD/MM/YY btw)
https://drive.google.com/open?id=0BwduAK2l37OaSUprcG5LejNiS2s&authuser=0
Instructions:
Download zip from the link provided
Flash via recovery
??
profit
this is mine
BTW: I didn´t test on any other device, altought i dont think it will work since our framework contains some hammerhead-specific values
Thank you lord! I was searching for this for so long. This is going to be awesome to me!!
Best Regards,
Jairo.
May I ask how you did it? I decompiled framework-res.apk in Chroma ROM and then I navigated to "\framework-res\res\values" but I didn't find a config.xml file. Isn't this where the modification is done? Am I doing something wrong? @opssemnik
fr3quency said:
May I ask how you did it? I decompiled framework-res.apk in Chroma ROM and then I navigated to "\framework-res\res\values" but I didn't find a config.xml file. Isn't this where the modification is done? Am I doing something wrong? @opssemnik
Click to expand...
Click to collapse
its /res/values/strings.xml
opssemnik said:
its /res/values/strings.xml
Click to expand...
Click to collapse
I found it after decompiling your framework-res.apk and searching from Windows Explorer.
I went into strings.xml and replaced "com.android.webview" with "come.google.android.webview". Then I recompiled and pushed the new framework-res.apk to /system/frameworks(I had some translation errors but it was first time seeing who things). Anyway, the system doesn't boot at all and shows only the bootanimation for 15+ minutes. Could you help me?
I downoaded this folder: http://www.droidviews.com/tutorial-how-to-decompile-and-recomplie-apk-files/ and replaced the apktool inside of it with this one: http://forum.xda-developers.com/showpost.php?p=59436776&postcount=2812
I installed the framework via "apktool if framework-res.apk" just in case.
fr3quency said:
I found it after decompiling your framework-res.apk and searching from Windows Explorer.
I went into strings.xml and replaced "com.android.webview" with "come.google.android.webview". Then I recompiled and pushed the new framework-res.apk to /system/frameworks(I had some translation errors but it was first time seeing who things). Anyway, the system doesn't boot at all and shows only the bootanimation for 15+ minutes. Could you help me?
I downoaded this folder: http://www.droidviews.com/tutorial-how-to-decompile-and-recomplie-apk-files/ and replaced the apktool inside of it with this one: http://forum.xda-developers.com/showpost.php?p=59436776&postcount=2812
I installed the framework via "apktool if framework-res.apk" just in case.
Click to expand...
Click to collapse
after you recompile it, you must put the META-INF folder from the original apk into your new APK,then push it to system/framework and set its permissions to 644 (rw-r-r)
opssemnik said:
after you recompile it, you must put the META-INF folder from the original apk into your new APK,then push it to system/framework and set its permissions to 644 (rw-r-r)
Click to expand...
Click to collapse
It still doesn't boot and stays at bootanimation. I decompiled and recompiled the .apk again and using WinRar i copied the META-INF folder from the original .apk to the new one. Then I rebooted into recovery and typed these commands:
Code:
adb shell
cd system/framework
rm framework-res.apk
adb push framework-res.apk /system/framework (This is the recompiled apk with the META-INF folder)
adb shell chmod 644 /system/framework/framework-res.apk
adb reboot
Edit: I didn't install Google WebView this time.
fr3quency said:
It still doesn't boot and stays at bootanimation. I decompiled and recompiled the .apk again and using WinRar i copied the META-INF folder from the original .apk to the new one. Then I rebooted into recovery and typed these commands:
Code:
adb shell
cd system/framework
rm framework-res.apk
adb push framework-res.apk /system/framework (This is the recompiled apk with the META-INF folder)
adb shell chmod 644 /system/framework/framework-res.apk
adb reboot
Edit: I didn't install Google WebView this time.
Click to expand...
Click to collapse
install it from the playstore before doing this, also are you lastest snapshot apktool ? (its newer than rc4)
opssemnik said:
install it from the playstore before doing this, also are you lastest snapshot apktool ? (its newer than rc4)
Click to expand...
Click to collapse
The apktool I used is newer... I think; it was posted at a later date, thus newer. Could you upload your folder with your apktool that you used if you have enough bandwidth?
Edit: I installed it from the Play Store and pushed the .apk. Is there a way to see if it used Google or AOSP webview?
Will do once i get home
See the user agent or read the config , altought the latter probably will nerd system permissions.
Or you could delete system webview and see if webkit based apps still work
Since framework is updated regularly in cm nightlies, so is there any way to do this on the fly using latest framework files.
Thnx
fr3quency said:
The apktool I used is newer... I think; it was posted at a later date, thus newer. Could you upload your folder with your apktool that you used if you have enough bandwidth?
Edit: I installed it from the Play Store and pushed the .apk. Is there a way to see if it used Google or AOSP webview?
Click to expand...
Click to collapse
did you get it after all? if not i upload my apktool folder
prabhu_91 said:
Since framework is updated regularly in cm nightlies, so is there any way to do this on the fly using latest framework files.
Thnx
Click to expand...
Click to collapse
would require a custom build of cm with it, or a custom apk of the webview or a xposed module(see OP) or apktool / some kind of apk modifying program to be native compiled for android(so it could be ran as an addon.d script on recovery). you could always keep flashing older framework-res, generally cm dosen´t do much to it, but once it does, the mod will need to be updated.
BTW, making for VIVID-20150426v3
opssemnik said:
did you get it after all? if not i upload my apktool folder
Click to expand...
Click to collapse
Yeah I got it working. Thanks for the help!
Sorry ignorance, but what is the function of this file?
i need com.android.webview
could you please upload a com.android.webview flashable zip. i don't want com.google.android.webview, i'm facing major issue with google's updatable webview. i need a aosp webview. plz help me