I just posted this in General but realized this might be a more appropriate place for it ..
Anyone else not like the unicorn as the "ROM Control" icon on Juggernaut 5.0?
No offense to the creator .. unicorns just aren't my thing.
Here is a Settings.apk that changes the icon to something a little more standard looking.
Prerequisites
Root
ADB
Something to mount /system/ as writable (I use ES File Explorer)
Instructions
1. Place the attached "Settings.apk" in the folder where you have ADB setup (usually either "tools" or "platform-tools" in your SDK folder)
2. Type "cmd" in Run Dialog
3. Type cd and then type the path to the folder where you have ADB setup
Example
Code:
cd c:/android/android-sdk/platform-tools/
4. On your phone, mount system as writable (IMPORTANT : Your system must be writable or you will get a read-only error in the command prompt)
5. Push the modified "Settings.apk" to the /system/app/ folder
Code:
adb push Settings.apk /system/app/
You may or may not get some Force Closes after doing this - IT'S OKAY!
6. Reboot your phone - the fastest way is just type "adb reboot" since you already have the command prompt up and are in the correct directory.
Congratulations! You changed your ROM Control icon!
Related
Is it possible for me to just take the mms.apk from a gb rom and install it on my current asop rom without any issues ?
My current rom doesnt use the asop mms.apk and I want to go back to it
Also if its possible and someone has that mms.apk can you please post it
Here You go! The file's attached. I recommend it to install it with ADB. You may also use (I think) something like Root Explorer, which I don't use, because it is a paid app Here I present you a free way to do it.
How to do it? Here (I'm assuming you use Windows):
1) First make sure You install Your phone's USB drivers in your system
2) Then download Android's SDK:
http://developer.android.com/sdk/index.html
3) Don't really remember how it went after Installation, but you should have an "android-sdk-windows" folder (assuming you use Windows). Put it on your Desktop.
4) Enable USB Debugging in your phone (Under Applicaions -> Development in Settings). Then connect your phone to PC via USB
5) Do a WinKey+R combo. "Run" window should appear. Type
Code:
cmd
and hit Enter.
6) A black console should appear. Type:
Code:
cd Desktop
cd android-sdk-windows
cd platform-tools
dir
you should be able to do a bunch of files, including adb.exe. If you don't, you either messed up folder names or didn't put android sdk folder in your Desktop.
7) Now (in normal Windows Explorer) move Mms.apk to your platform-tools folder inside android-sdk-windows.
8) Now, in console do:
Code:
adb start-server
adb remount (if at this point it says "no device found" you either screwed up your phone's USB drivers, or USB connection, or something else, no idea)
adb shell
9) Now type:
Code:
cd /system/app
cp Mms.apk Mms.apk.bak (to backup your current messaging app, in case something goes wrong, you just do the opposite - cp Mms.apk.bak Mms.apk)
exit
10) Now type:
Code:
adb push Mms.apk /system/app/Mms.apk (should say it's fine)
adb kill-server
Remove your phone from USB, reboot it. Should be done just fine.
Thanks so much warnec!
Im hoping this solves my delayed sms problem with htc messaging app.
Also, i installed this on my Incredible S with revolution hd 2.3.3, and sometimes it force closes, is this normal?
Regards
Anyone else not like the unicorn as the "ROM Control" icon on Juggernaut 5.0?
No offense to the creator .. unicorns just aren't my thing.
Here is a Settings.apk that changes the icon to something a little more standard looking.
Prerequisites
Root
ADB
Something to mount /system/ as writable (I use ES File Explorer)
Instructions
1. Place the attached "Settings.apk" in the folder where you have ADB setup (usually either "tools" or "platform-tools" in your SDK folder)
2. Type "cmd" in Run Dialog
3. Type cd and then type the path to the folder where you have ADB setup
Example
Code:
cd c:/android/android-sdk/platform-tools/
4. On your phone, mount system as writable (IMPORTANT : Your system must be writable or you will get a read-only error in the command prompt)
5. Push the modified "Settings.apk" to the /system/app/ folder
Code:
adb push Settings.apk /system/app/
You may or may not get some Force Closes after doing this - IT'S OKAY!
6. Reboot your phone - the fastest way is just type "adb reboot" since you already have the command prompt up and are in the correct directory.
Congratulations! You changed your ROM Control icon!
Lol i actually liked the old "juggernaut" icon but the unicorn looks kinda cool, lol (no homo)
Thanks for this..might need this for future reference.
Sent from my SGSII T989 | Juggernaut5/Darkside X v1
@matthewjett Can you pm your systemui and framework res? I love the look of your status bar.
Sent from my SGH-T989 using xda premium
I'll see if I still have them .. just wiped for a fresh install.
They're both UOT Kitchen mods ...
The battery is Jazzk and the icons are HD Sense.
For those who want to deodex the Stock Rom of Samsung Galaxy Y and having a problem deodexing the Email.apk/Email.odex of Galaxy Y here is a tutorial on how to deodex it successfully. I already tried this process on my own device and it worked perfectly.
What you will need is:
1. baksmali.jar (not my work so credit's not mine)
2. smali.jar (not my work also)
3. java.awt.jar (not mine either)
4. xUltimate-v2.3.3.zip (definitely not my work)
5. Busybox Installer (must be the latest version. this is downloadable for free from the android market)
6. files from \system\app and \system\framework of you phone (most importantly)
Instruction:
1. Download all the attached files at the bottom of this post. Wait until the download finishes.
2. Extract xUltimate-v2.3.3.zip by right-clicking it and selecting "Extract to xUltimate-v2.3.3.zip\"
3. Connect your phone to your computer (just make sure that "USB debugging" option of your phone is checked. To see if it's checked go to Menu -> Settings -> Applications -> Development and there you will see "USB debugging" option, it must be checked)
4. Go to xUltimate-v2.3.3 folder (this is what you extracted in step #2). Run "Main.exe" and wait until the options shows.
5. When options are already shown, type "1" in your keyboard then press enter. Wait until it finishes then press enter to continue.
6. This type type "2" in your keyboard and wait until it finishes then press again enter to continue.
7. Before proceeding to the next step we will remove first the "Email.odex" in the "orig_app" folder to avoid error in the process of deodexing the other odex files. To do this, go to "orig_app" folder then find the file "Email.odex" then move it into your desktop by right-clicking the file and selecting "cut" then right-click on desktop and select "paste"
8. Go back to xUltimate program and select now the option #3 by typing "3" on your keyboard and press enter. Wait until it finishes and press enter to continue.
9. Type "4" in your keyboard and press. Wait again until it finishes and close the xUltimate program when it's finished.
10. In this step we will manually deodex Email.apk/Email.odex so that we can include it in pushing the deodexed files in your phone. Go to your drive C: and make there a folder named "missingchord". After creating a folder go to "xUltimate" folder then "jar" folder then find this files there baksmali.jar, smali.jar, and java.awt.jar copy the following files then paste those three files in the "missingchord" folder.
11. Go to "orig_framework" folder and find this files bouncycastle.odex, core.odex, ext.odex, framework.odex, android.policy.odex, services.odex, core-junit.odex, twframework.jar, and twframework.odex then copy those files and paste it in the "missingchord" folder.
12. Find the "Email.odex" file that to move into your dekstop then copy it then paste it in "missingchord" folder.
13. Open command prompt. To do this go to start -> run then type cmd then press enter. Command prompt should be open by this time
14. Type this in the command prompt
Code:
cd c:\missingchord
then this (choose from the two codes below if which of it will work for you)
Code:
java -jar baksmali.jar -c :java.awt.jar:twframework.jar -x Email.odex
or
Code:
java -jar baksmali.jar -c :java.awt.jar:twframework.jar -a 10 -x Email.odex
15. Wait until it finishes without error. Then type this again in command prompt
Code:
java -jar smali.jar out
16. Wait until step #15 finishes without error. Find for the file "out.dex" inside "missingchord" folder then rename it to "classes.dex"
17. Go to "orig_app" and find for "Email.apk" then add "classes.dex" (from the "missingchord" folder) inside the "Email.apk". To open "Email.apk" you can use WinRar or any other similar software. Save the "Email.apk" after you successfully added the "classes.dex" inside the "Email.apk" file.
18. Copy "Email.apk" and paste it in the "done_app" inside "xUltimate" folder
19. Copy the "done_app" and "done_framework" into your sdcard
19. In xUltimate folder look for "jar" folder then right-click it and select "Open command prompt here". If you don't know how to "open command prompt here" then try to search it in the web.
20. At this point, i'm assuming that you already installed the latest version of busybox on your phone and your phone is still connected in your computer. When the command prompt is open type this following code one at a time.
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
21. Your phone will automatically reboot. Wait for it until it finish rebooting. Then check all you applications if there are missing application.
22. You have now deodexed rom. Enjoy!
Note: If you got an error in step #20 in cp /sdcard/done_app/* /system/app/ command then you must restart you computer and try again step #20 after restarting you computer.
For those who have tried this guide and got a problem, please allow me to know it so that i can help you resolve your problem.
Please press "Thanks" if you find this thread useful
PS: Those attached files are not my work so no credit goes to me.
missingchord said:
For those who want to deodex the Stock Rom of Samsung Galaxy Y and having a problem deodexing the Email.apk/Email.odex of Galaxy Y here is a tutorial on how to deodex it successfully. I already tried this process on my own device and it worked perfectly.
What you will need is:
1. baksmali.jar (not my work so credit's not mine)
2. smali.jar (not my work also)
3. java.awt.jar (not mine either)
4. xUltimate-v2.3.3.zip (definitely not my work)
5. Busybox Installer (must be the latest version. this is downloadable for free from the android market)
6. files from \system\app and \system\framework of you phone (most importantly)
Instruction:
1. Download all the attached files at the bottom of this post. Wait until the download finishes.
2. Extract xUltimate-v2.3.3.zip by right-clicking it and selecting "Extract to xUltimate-v2.3.3.zip"
3. Connect your phone to your computer (just make sure that "USB debugging" option of your phone is checked. To see if it's checked go to Menu -> Settings -> Applications -> Development and there you will see "USB debugging" option, it must be checked)
4. Go to xUltimate-v2.3.3 folder (this is what you extracted in step #2). Run "Main.exe" and wait until the options shows.
5. When options are already shown, type "1" in your keyboard then press enter. Wait until it finishes then press enter to continue.
6. This type type "2" in your keyboard and wait until it finishes then press again enter to continue.
7. Before proceeding to the next step we will remove first the "Email.odex" in the "orig_app" folder to avoid error in the process of deodexing the other odex files. To do this, go to "orig_app" folder then find the file "Email.odex" then move it into your desktop by right-clicking the file and selecting "cut" then right-click on desktop and select "paste"
8. Go back to xUltimate program and select now the option #3 by typing "3" on your keyboard and press enter. Wait until it finishes and press enter to continue.
9. Type "4" in your keyboard and press. Wait again until it finishes and close the xUltimate program when it's finished.
10. In this step we will manually deodex Email.apk/Email.odex so that we can include it in pushing the deodexed files in your phone. Go to your drive C: and make there a folder named "missingchord". After creating a folder go to "xUltimate" folder then "jar" folder then find this files there baksmali.jar, smali.jar, and java.awt.jar copy the following files then paste those three files in the "missingchord" folder.
11. Go to "orig_framework" folder and find this files bouncycastle.odex, core.odex, ext.odex, framework.odex, android.policy.odex, services.odex, core-junit.odex, twframework.jar, and twframework.odex then copy those files and paste it in the "missingchord" folder.
12. Find the "Email.odex" file that to move into your dekstop then copy it then paste it in "missingchord" folder.
13. Open command prompt. To do this go to start -> run then type cmd then press enter. Command prompt should be open by this time
14. Type this in the command prompt
Code:
cd c:\missingchord
then this (choose from the two codes below if which of it will work for you)
Code:
java -jar baksmali.jar -c :java.awt.jar:twframework.jar -x Email.odex
or
Code:
java -jar baksmali.jar -c :java.awt.jar:twframework.jar -a 10 -x Email.odex
15. Wait until it finishes without error. Then type this again in command prompt
Code:
java -jar smali.jar out
16. Wait until step #15 finishes without error. Find for the file "out.dex" inside "missingchord" folder then rename it to "classes.dex"
17. Go to "orig_app" and find for "Email.apk" then add "classes.dex" (from the "missingchord" folder) inside the "Email.apk". To open "Email.apk" you can use WinRar or any other similar software. Save the "Email.apk" after you successfully added the "classes.dex" inside the "Email.apk" file.
18. Copy "Email.apk" and paste it in the "done_app" inside "xUltimate" folder
19. Copy the "done_app" and "done_framework" into your sdcard
19. In xUltimate folder look for "jar" folder then right-click it and select "Open command prompt here". If you don't know how to "open command prompt here" then try to search it in the web.
20. At this point, i'm assuming that you already installed the latest version of busybox on your phone and your phone is still connected in your computer. When the command prompt is open type this following code one at a time.
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
21. Your phone will automatically reboot. Wait for it until it finish rebooting. Then check all you applications if there are missing application.
22. You have now deodexed rom. Enjoy!
Note: If you got an error in step #20 in cp /sdcard/done_app/* /system/app/ command then you must restart you computer and try again step #20 after restarting you computer.
For those who have tried this guide and got a problem, please allow me to know it so that i can help you resolve your problem.
Please press "Thanks" if you find this thread useful
PS: Those attached files are not my work so no credit goes to me.
Click to expand...
Click to collapse
Can I use this if maps and phonesky has a error?
Jay_SEAN said:
Can I use this if maps and phonesky has a error?
Click to expand...
Click to collapse
Well, I tested from my side with the Play Store and it worked. Make a backup with CWM and try it.
ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount system /system/
Miscellanous commands:-
su: Initiates root request
du: Shows files, folders and size
date: Shows todays date
surfaceflinger: Shows your bootanimation (Tested on GB)
grep: Used to search through text files
chmod: Sets permission to files
sh: Initiates shell mode
echo: Displays the text you wrote with the command. Analogous to PRINT command on QBasic
Forgot next ones, will write later
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
My Uncle: For gifting me this Phone
My Teachers: For teaching me English(I would not be here without them)
You: For future Thanks
Till now, thats it, will add some more things later
If any problem, I will add it too
Suggestion? They are welcome
Nice thread , every thing is very clearly stated.
Thx, Nice guide.
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
ItachiSama said:
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
Click to expand...
Click to collapse
I use the command you mentioned every time. Thanks for reminding. I can't remember why I wrote that command there!
ADB
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
USB Debugging MUST be turned ON in the device for ADB to see it & Developer options is hidden in Android 4.2 and
above, Hitting Build number 10 times in
About Phone/Tablet reveals the menu (Thanks lilHermit for reminding me to add it)
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE (If you however want to set environment variables.)
We can easily append the sdk platform-tools and tools folder to your systems environmental path variable directly from command line(cmd) by simply issuing one command and performing a system reboot:
Code:
SETX PATH "%PATH%;SDK_Install_Path\platform-tools;SDK_Install_Path\android-sdk-windows\tools" -m
Just replace the "SDK_Install_Path" in the above with the proper path of your SDK installation. Example: C:\android-sdk-windows
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Note:
If you have spaces in path of apk, you can execute the command without breakage if you include the path inside quotes. (Thanks to etcman)
Eg:-
Code:
adb install "G:\Program Files\AreeB.apk"
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
Miscellanous commands:-
su: Initiates root request
du: Shows file foldrs and size
date: Shows todays date
ls: Shows list of directory
cd: Changes working directory
rm: Removes the file
logcat: Displays logcat
mount: Mounts the partition
busybox: Busybox Applets
Forgot next ones, will write later
All credits go to
iamareebjamal
For writing this up.