HowTo (Windows) setup adb and fastboot to run like a DOS command in a command prompt - G1 Android Development

This will allow you to use adb and fastboot as if they were any other DOS command by typing them in a Command Prompt window from any directory.
Thanks to MERKJONES for giving me the idea... of course it only occurred to me after he mentioned it, that this would be quite useful for a lot of people besides ourselves
There are two ways of doing this.
#1
as per MERKJONES suggestion you can just add the files to your "windows/system32" directory.
#2
I like to keep my files organized in my own folders and be able to put them on any partition that I want. So to do this we just need to add the path of your folder containing adb and fastboot files to the windows Environment path.
IN XP/WINDOWS 7/VISTA
Right click on "my computer"
Left click on "properties"
Then.........
IN VISTA/WINDOWS 7 (this is an extra step for these two OS"s ignore this if you are using XP)
Click on "Advanced System Settings" in the left hand pane.
IN ALL WINDOWS
Make sure you are on the "Advanced" tab of the System Properties Panel.
Click on "Environment Variables" button.
Look for a line/variable that says "Path" in "System variables" pane.
Double click on "Path" to open a new window that should be say "Edit System Variable" or select the "Path" variable and click on the Edit Button.
Navigate to the end of the line/value and add
;path to files (where "path to files" is the location of your adb and fastboot files)
For example for me this is
;E:\AndroidFiles
So your path should look something like this
%SystemRoot%\system32;%SystemRoot%;E\AndroidFiles
Now reboot and you can open up a DOS Command Prompt window and use these programs in any directory you want by just typing them like any other DOS command.

Awesome.... I hope this can help some folks out

or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say

tubaking182 said:
or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say
Click to expand...
Click to collapse
LOL... Was thinking the same thing. This has been talked about over and over
PS... the "other" way of doing it I think was actually written by Stericson originally

momentarylapseofreason said:
LOL... Was thinking the same thing. This has been talked about over and over
PS... the "other" way of doing it I think was actually written by Stericson originally
Click to expand...
Click to collapse
You are right of course, I probably should have checked first... so no offense to anyone there are sooooo many threads to keep up with and a search can often bring up so many threads that is easy to miss something.
Actually I am sure that although Stericson may have also written it... he is far from the first person as it is really quite a common thing ... I just wanted to help let people know there was an easier way of doing things.
or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say
Click to expand...
Click to collapse
No offense.... but I personally don't like throwing file after file into my system32 folder as it can get messy... hence adding it to the Environment Path
Sometimes things can be repeated over and over and still get lost in a long thread... so I tried to make it more obvious for people to find the information

pixel-painter said:
You are right of course, I probably should have checked first... so no offense to anyone there are sooooo many threads to keep up with and a search can often bring up so many threads that is easy to miss something.
Actually I am sure that although Stericson may have also written it... he is far from the first person as it is really quite a common thing ... I just wanted to help let people know there was an easier way of doing things.
No offense.... but I personally don't like throwing file after file into my system32 folder as it can get messy... hence adding it to the Environment Path
Sometimes things can be repeated over and over and still get lost in a long thread... so I tried to make it more obvious for people to find the information
Click to expand...
Click to collapse
you dont have to put it in your system32 folder.
Put your backed up img files (all files from nandroid backup) in the same folder as fastboot, then open command-prompt
you then need to change directory to the location of the folder with this command
cd c:\where ever the fastboot folder is
(if its just in the c drive then the command would look like this)
cd c:\fastboot
enter, and you will then get
C:\fastboot>
then just type these commands.
fastboot flash system system.img
fastboot flash userdata data.img
fastboot flash boot boot.img
fastboot reboot
this is how i restore and have been doing it this way everytime no problems.

^^ Sorry but I think you missed the point entirely The idea is to avoid doing that so one can use the programs from any directory.
Both #1 and #2 are really just 2 different ways of accomplishing the same thing

hi im using 5.0.1H build and would like to have root terminal control back. all my commands come back permission denied. Fastboot works for me for nandroid but when i try to follow the instructions on gaining superuser i get this
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb push bin/s
u /system/bin
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb shell chmo
d 4755 /system/bin/su
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb uninstall
koushikdutta.superuser
- waiting for device -
what could i be doing wrong.

Hi,
Try doing:
adb devices see if your phone is recognized by the computer
adb remount enable read /write access
Now you can use your other commands.
maydaysos said:
hi im using 5.0.1H build and would like to have root terminal control back. all my commands come back permission denied. Fastboot works for me for nandroid but when i try to follow the instructions on gaining superuser i get this
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb push bin/s
u /system/bin
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb shell chmo
d 4755 /system/bin/su
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb uninstall
koushikdutta.superuser
- waiting for device -
what could i be doing wrong.
Click to expand...
Click to collapse

Related

[HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux

When I first attempted to install the SDK, I found tutorials that only had bits and pieces about the whole procedure. A lot of Google searches and hours of eye strain. I wanted to write a solid tutorial, but instead of publishing it in a personal blog, I chose to publish it here on xda-developers. This is the definite forum to come to if you are interested in Android/G1/HTC Dream development or costumization. I wrote this to make the enlarge the knowledge of this community.
!! THIS TUTORIAL IS FOR THE LATEST UBUNTU RELEASE: JAUNTY JACKALOPE 9.04 !!
!!START -------------------------------------- Optional Preparation --------------------------------------
This applies if you -
Are interested in installing Ubuntu for the first time.
Are/will be reinstalling Ubuntu from scratch.
Want to keep your SDK installation easy to reach.
Want to keep things nice and clean.
And your machine -
Has a second hard drive.
Has free space for another small partition.
This procedure will make things easier during installation of the SDK and in the long run. Hopefully you've read about partitions. If you are dualbooting, please read this first to get an idea of what you're doing.
While installing Ubuntu and on the Prepare Disk Space screen (partition editor), select "Specify partitions manually (Advanced)"
On the Create Partition dialog, select the following options:
Type for the new partition: Primaryor Logical if you're dualbooting and know what you are doing.​
New partition size in megabytes: 5120MB (5GB) might work. BUT:
ccyrowski said:
It should be noted that if you ever plan on compiling kernels and/or cupcake ROM's you will NEED ubuntu8.04. You'll also need at least 10GB.
Click to expand...
Click to collapse
Location for the new partition: Beginning
Use as: Ext4 or Ext3Filesystem doesn't matter. (?)​
Mount point: /AndroidSDKEnter this manually​
Complete Ubuntu installation as usual.
-------------------------------------- Optional Preparation -------------------------------------- END!!​
You will now install the SDK.​
!!START -------------------------------------- Installing Android SDK --------------------------------------
Installing the SDK is the easiest of all.
Download the SDK.169.9 MB [http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip]​
Right-click and select Extract Here.
Move the contents of the android-sdk-linux_x86-1.5_r3 directory to your desired location.If you followed Optional Installation, move the contents to your /AndroidSDK directory in the root of your filesystem.​
Close directory window.
-------------------------------------- Installing Android SDK -------------------------------------- END!!​
You will now set up your bashrc file and UDEV to recognize your HTC Device.​
!!START -------------------------------------- ADB + FASTBOOT --------------------------------------
The Android Debug Bridge (adb) is one of the tools that will help you the most when you run into flashing problems or running shell commands directly from your machine. UDEV will not recognize your G1 out of the box, but we will configure it with some rules so it can connect.
We will work with /AndroidSDK as the location of your sdk. If this is not your setup, I think you're smart enough to figure it out.
Editing .bashrc file to use tools from /AndroidSDK/tools/ directory -
Go to your home folder.Example: /home/wddglr/​
Press Control + H to view hidden files.
Look for your .bashrc file and double click to open it with gedit.
Add the following lines to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
IMPORTANT NOTE
savethechicken said:
This is the way that I have my .bashrc file setup. For those having problems with it not recognizing the adb as a command try this...
Code:
export PATH=$PATH:/AndroidSDK/tools
I removed the {} around ${PATH} and it is working if I had them on it would say that it didn't recognize the command. Removed them and all works well.
Click to expand...
Click to collapse
Setting up UDEV to recognize HTC Device -
Type the following into a terminal (Applications > Accessories > Terminal):
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Now add the following line to the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click save and close.
To restart udev, open up a terminal and enter:
Code:
sudo /etc/init.d/udev restart
Setting up fastboot -
Download this fastboot binary from http://android-dls.com.130.4 KB [http://android-dls.com/files/linux/fastboot]​
Once downloaded to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option:Execute: [√] Allow executing file as program​
Click Close.
Move the fastboot bianary to your /AndroidSDK/tools/ directory.
Reboot.
-------------------------------------- ADB + FASTBOOT -------------------------------------- END!!​Now you can use adb and fastboot directly from any terminal. If you chose to do the Optional Preparation, you can now save your Eclipse Workspace and your downloaded/custom ROMs/Themes in this new /AndroidSDK directory keeping things easier to reach and safe from evil disk errors or other mishaps!!! :O​If you are having problems, send me a PM. I will be happy to help.
*applaudes* awesome. Should be added to helpful threads.
very nice! perhaps add a "(How-To)" prefix to thread??
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
nicholasbithell said:
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
Click to expand...
Click to collapse
it does not exist, you will make it.
do the command as stated above.
Code:
gksu gedit /etc/udev/rules.d/51-android.rules
Damn you beat me to it!
I was just thinking earlier about doing this same "How-To" guide, I was surprise to see it posted just now.
Anyways, great job!
Can someone sticky this thread. Now I have ADB & fastboot on my Win7, Ubuntu, and OS X Partition. Thank you wddglr.
bravo...linux rocks even better now!...
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
savethechicken said:
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
Click to expand...
Click to collapse
It happens to me also from time to time. especially when i reboot and want to go into adb while the device is rebooting. although that file, 51-adndroid.rules, is what helped me get adb to recognize the device. the guide on developer.android.com talked about 50-android.rules but after a few deep searches i found this: http://groups.google.com/group/android-developers/browse_thread/thread/1d3488c601243686
Okay A few questions for you....
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
I dont remember the first line ever being there, but I could be mistaken!
Any help would be greatly appreciated!
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
nicholasbithell said:
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
Click to expand...
Click to collapse
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 9.04, not 8.10. I hope this helps.
wddglr said:
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 8.10, not 9.04. I hope this helps.
Click to expand...
Click to collapse
Okay this is how I moved my "AndroidSDK" Folder to root....
[email protected]:~$ su
Password:
[email protected]:/home/nick# mv /home/nick/Desktop/AndroidSDK /
[email protected]:/home/nick#"
And I went to the bashrc file and it is entered in there correctly.
This is still what I get even after restarting Udev...
" bash: : command not found
[email protected]:~$ adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:~$ su
Password:
[email protected]:/home/nick# adb
bash: adb: command not found"
Edit: This is what my .bashrc file looks like, well the top part of it anyways....
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
wddglr said:
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
Click to expand...
Click to collapse
I dont understand what this line does...
"gksu nautilus"
when i type it in it asks me for my administrative password and then after i put it in it hangs for a sec and then back to...
bash: : command not found
[email protected]:~$ gksu nautilus
[email protected]:~$
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
I dont have Nautilus as a file browser I have Thunar I believe.
Then gksu thunar
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
For permissions it says that I am the owner and the group (I=Nick) for Others it says Read and Write, Access says Read and write. So it seems it has all the right permissions. Any other Ideas?
Partitioning HD
First off, thank you for this thread, it's most excellent. I have a question that is slightly off topic, but not so much. I have Ubuntu 9.04 installed on my recovery partition. This partition is only 10 GB, while I have Vista on my main. I have almost 100 GB free on my main drive, and what I want to know is, if I resized my partitions to give more space to Ubuntu, how would it affect my comp? (if at all). And which OS should I be on while resizing, Ubuntu or Vista?

[GUIDE] How To Root The Sprint CDMA Hero (Windows)

I have compiled this guide from the other one posted on this forum, the discussion therein, and my own knowledge. If you have any suggestions on making it better or to correct any mistakes I may have made please let me know.
This guide is intended for Windows and includes detailed instructions. It will cover the steps necessary to root, flash the new recovery image, create a full backup. This will work with software versions 1.29.651.1 and 1.56.651.2 (aka Android 1.5). If you have updated to 2.1 please following this guide here. I am not responsible for any damage done to your phone using this guide. Root at your own risk.
I have put to together a video on YouTube for you to follow along as well. The version numbers of certain files are now outdated in the video so change file names as necessary.
If you own a non-Sprint Hero, you will need to do some extra steps. Follow the guide in the How to Root Non-Sprint CDMA Hero thread.
Step 1: Download the Android SDK from http://developer.android.com/sdk/index.html The Windows file is called android-sdk_r06-windows.zip. Extract the files to your C: drive so that you now have the folder C:\android-sdk-windows
Step 2: Download the asroot2 exploit file from http://forum.xda-developers.com/attachment.php?attachmentid=244212&d=1257621154 Extract asroot2.zip to C:\android-sdk-windows\tools folder.
Step 3: Download the Hero recovery image from http://forum.xda-developers.com/showpost.php?p=4898505&postcount=1g Place this file in C:\android-sdk-windows\tools as well.
Step 4: Make sure USB Debugging is off by going to Settings>Applications>Development. Now connect the phone to your PC via USB cable.
Step 5: Mount your sdcard; Browse to the HTC Sync folder and install HTC Sync on your pc. After it is done installing unmount the sdcard then enable your USB debugging.
Step 6: Open a command prompt by clicking the Start button and typing cmd into the search box and pressing enter or found under All Programs>Accessories.
Step 7: You will now enter a series of commands which I will place inside code boxes to indicate the entire command. You may copy and then paste them into the command prompt window by right clicking. Only enter one command at a time.
1:
Code:
cd C:\android-sdk-windows\tools
2:
Code:
adb devices
If you've been following this guide you will see your phone's serial number. If you get "device not found" error, you either need to make sure you the drivers were properly installed or make sure you enable USB debugging AFTER you connect the USB cable. Continue on once you get the proper phone serial output.
3:
Code:
adb push asroot2 /data/local/
4:
Code:
adb shell
5:
Code:
chmod 0755 /data/local/asroot2
6:
Code:
/data/local/asroot2 /system/bin/sh
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#​Now for a few last commands.
7:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
8:
Code:
cd /system/bin
9:
Code:
cat sh > su
10:
Code:
chmod 4755 su
You are now officially rooted. A few more steps and you will have flashed the recovery image.
11:
Code:
exit
12:
Code:
exit
13:
Code:
adb push recovery-RA-heroc-v1.6.2.img /sdcard
Pushing is equivalent of copy the file to the root of your sdcard. By the time you finished reading this it should be done. You'll know its done because the ouput will say something like transferred X bytes in X secs.
14:
Code:
adb shell reboot
This will cause the phone to restart automatically. Wait till it is fully booted to continue.
15:
Code:
adb shell
16:
Code:
su
17:
Code:
cd /sdcard/
18:
Code:
flash_image recovery recovery-RA-heroc-v1.6.2.img
FLASHING TO THE RECOVERY TAKES SEVERAL SECONDS-- BE PATIENT. ENTER THE NEXT COMMAND ONLY AFTER THE COMMAND PROMPT RETURNS TO THE # (ROOT SYMBOL).
19:
Code:
reboot recovery
Step 8: This is the last command; you may now close the cmd prompt. This will cause your phone to boot into recovery mode; it should take no longer than 30 secs. The third option on the list is "- Backup/Restore"; select it. Now, select the first option "- Nand backup". The phone will prompt you to press HOME to confirm which is want you want to do. The backup will begin. You will see the screen say, "Performing backup : .........." When done, the bottom of the screen will say "Backup complete!" and you will be given the menu options again. Go back to the main menu and select reboot system. Rebooting your phone after installing the new recovery image may take several minutes.
Step 9: Once your phone is fully booted, mount the sdcard. You will see a folder called "nandroid"; I highly recommend you copy this to your pc in case you lose your sdcard data or reformat it. Your phone is rooted, 100% backed up, and ready to install a custom rom if you wish!
wow dude,
instructions worked great on Win7
i was able to download the missing usb_drivers by running SDK Setup in C:\android-sdk-windows, and selecting the usb driver from the available packages. I was unable to download the index for the SDK Setup program until I enabled "force http://" in the settings menu.
had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
izanagi said:
wow dude,
i'm about to follow these instructions. thank's for the precise list!
(btw, about to try it on Win7.. may have to change some folder pathing but we'll see)
okay.. typo on the first command in parentheses, and I'm missing the usb_drivers folder (do you have it / can sent it to me) so am unable to install the device in win7.
Click to expand...
Click to collapse
Heh, thanks for the misspell heads up. I did my rooting from Win7 pc; it automatically installed correct drivers for me. To check go to the Control Panel>View devices and printers. You see one device named "Android Phone". Otherwise as far as Ive heard installing HTC Sync installs proper drivers.​
izanagi said:
*** edit had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
**** edit: all done.. your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
Click to expand...
Click to collapse
Thank you for taking the time help make my guide better. I'm very glad to know there are little to no hiccups.
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
detox702 said:
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
Click to expand...
Click to collapse
This guide is for the CDMA Hero not the Eris!
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no. I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip". This is done from the boot menu. Does the rom load automatically? Did I do something wrong? I got root with no problem. A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Never mind. I held down Home and Power at
the same time instead of Home THEN power! ARRGH! Loading up now as I type. Sorry.
ELIMINATED said:
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no.
I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip".This is done from the boot menu.
Does the rom load automatically? Did I do something wrong? I got root with no problem.
A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Click to expand...
Click to collapse
yuck... break up your sentences, that's alot of crap to throw on someone all at once... and the bold doesn't help it any.
check to see if you have the custom recovery installed....
-turn off phone
-hold vol down + power
-should search for some stuff then give three options
-press "home" to enter recovery image
do you see "!" and a phone.... does it just hang or do you see a green/yellow menu?
At the end of his post he says he figured it out. He wasn't holding down home key
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
awesomeindeed said:
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
Click to expand...
Click to collapse
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
thank you TS. I've been lurking xda for a couple years now when i had the mogul and tp. First time on an android device. Thank you for your time in helping me.
someone buy this man a drink!!!
Invaluable piece of work right here, helped me get it done in no time at all....real clear concise and very helpful....REQUEST THIS BE A STICKY!!!!!
fenske09 said:
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
Click to expand...
Click to collapse
That was the name of the zip file not the extracted folder.
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
newtodroid said:
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
Click to expand...
Click to collapse
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
theresthatguy said:
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
Click to expand...
Click to collapse
also make sure you have the heroc version there's a hero and heroC, i messed that up once and had similar results
new ROM
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
kristaps said:
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
Click to expand...
Click to collapse
you converted your sd card to fat32,ext2,swap and now the apps are looking for the program on your sd card,
turn off your phone
take out sd card
turn on phone
uninstall app
turn off phone
put in sd card
turn on phone
reinstall app
this should fix you

[How to]? ADB on Ubuntu 10.10?

Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Still need help
t0ph0id said:
Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Click to expand...
Click to collapse
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
blas4me said:
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
Click to expand...
Click to collapse
I would love a quick step-by-step. Been trying to figure this out but failing. Hard.
ADB & FASTBOOT Help: Updated 6/6/12
WORKS FOR x86 VERSION OF 12.04 - 12.10 TO MAKE IT WORK FOR x64 FOLLOW LINK BELOW, THEN COME BACK HERE AND FINISH SETUP. I ALSO ADDED A VIDEO, CHECK IT OUT
1. You must have java installed before you start set up.
http://askubuntu.com/questions/131207/android-sdk-cant-be-installed-on-ubuntu-12-04-64
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand Unix based systems, but you catch on, especially if your a android user.
JUST A TIP: I make my SDK folder androidsdk, for simplicity and that's how I learned to install. so I'm just showing you the way I learned. I have rooted over 20 different Android devices, and I've installed this method on multiple Linux distros without a problem. For those of you that are new to Linux, know that Linux is hardwired for Andorid devices, same kernal and all, and that's why it's wise to do all things Android on Linux machines, I try to anyway
RECENT CHANGES TO SDK: updated 11/1/12: Just installed on Ubuntu 12.10, and the Linux adb installer is no longer needed, when I ran adb command after copying SDK to my /usr/local/ directory, my device showed up. Some resent changes to the SDK, also changed the way you set up, but not very much. The SDK provides all the files you need to set up, including fastboot.
NOTE: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1. Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
a. Make android file executable
2. Open teminal.
a. Navigate to your SDK directory
Code:
cd /home/username/androidsdk/tools
you should get [ $ ] at the end of your path.
b. Type
Code:
./android
your SDK Manager should start.
ADVICE: I suggest you only download tools and platform-tools to make the setup quick, you can go back later and install what you need
NOTE: For development purposes you need a copy of ADB & Fastboot in your tools folder, Eclipse looks for ADB in the folder, so if you plan on developing, then you'll need those files there.
3. Open home folder, press ctrl & H to show hidden files, find bashrc
a. Paste in terminal from your document after you input your user name:
Code:
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
export PATH=${PATH}:/androidsdk/platform-tools
export PATH=${PATH}:/home/*********/androidsdk/tools
export PATH=${PATH}:/home/*********/androidsdk/platform-tools
4. Paste in terminal from your document after you input your user name:
Code:
export PATH=$PATH:/androidsdk/tools
export PATH=$PATH:/androidsdk/platform-tools
export PATH=$PATH:/home/*********/androidsdk/tools
export PATH=$PATH:/home/*********/androidsdk/platform-tools
NOTE: For this part you'll need your devices id, here's a list, if your devices id isn't here, use code below.
Acer 0502
ASUS 0b05
Dell 413c
Foxconn 0489
Fujitsu 04c5
Fujitsu Toshiba 04c5
Garmin-Asus 091e
Google 18d1
Hisense 109b
HTC 0bb4
Huawei 12d1
K-Touch 24e3
KT Tech 2116
Kyocera 0482
Lenovo 17ef
LG 1004
Motorola 22b8
NEC 0409
Nook 2080
Nvidia 0955
OTGV 2257
Pantech 10a9
Pegatron 1d4d
Philips 0471
PMC-Sierra 04da
Qualcomm 05c6
SK Telesys 1f53
Samsung 04e8
Sharp 04dd
Sony 054c
Sony Ericsson 0fce
Teleepoch 2340
Toshiba 0930
ZTE 19d2
In terminal type:
Code:
lsusb
and that will give a list of all USB devices attached to your machine.
a. In terminal, type:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
b. Add these lines, put your device ID between quotations, then save
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
c. In terminal type:
Code:
sudo restart udev
5. Download the Linux ADB installer zip, extract to your home folder, make script executable and to run with auto prompt (plug your phone in if it isn't already) then just double click and choose run, then let it do it's thing Takes a second, and it should ask for permissions = user password
NOTE: When you run nautilus your going into file system directory as root, so proceed with caution, and back up any file you plan on editing. Installing SDK doesn't make a folder in /usr/local/ any more, so you'll have to copy SDK to that directory as root.
6. Open terminal, type:
Code:
sudo nautilus
a. Go to :File system /usr/local
b. Copy and paste a copy of your SDK folder there
c. Close root session
d. Close terminal
7. Open terminal, type:
Code:
adb devices
you should see your device, then type fastboot devices it should just go to the next line, you have to be in fastboot to see your device
Now you should have ADB & Fastboot on your beautiful Ubuntu machine!!!!!!!!!!
With narration
http://www.youtube.com/watch?v=HsCd1nMywR8&hd=1
Without
http://www.youtube.com/watch?v=IGAiHkPuhg8
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Just wanted to say thanks, awesome post.
Thanks
star.gazer said:
Just wanted to say thanks, awesome post.
Click to expand...
Click to collapse
I've been waiting to hear feedback, was it a simple process.
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
being HTC ("0bb4"), the other
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.
Who are you!!!!!!!!!
mizch said:
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one being HTC ("0bb4"), the other not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.[/QUOTE/]
The other number is the new HTC id, for those who have other android devices, I included the auto script. I've been waiting for someone like you to come along, "a mister know it all", but it's kool. Just to let you know I got Aero Windows from OMGubuntu. I still get updates. as I'm typing my Update Manaer just notified me, that there are updates for me. Obviously your not familiar with setting up ADB&Fastboot on Ubuntu. And you should be smart enough to see that the instructions are just for ADB&Fastboot setup. The instructions for Aero are inside the zip. I put everything here instead of starting a new post, duh, how many members have you helped on this forum. Don't try to confuse other members, with your babble. Next time don't just glance read, read, read, Maybe you just need a friend Two words for you " Open Source "
Click to expand...
Click to collapse
I've been waiting for someone like you to come along, "a mister know it all", but it's kool.
Click to expand...
Click to collapse
Hope you feel better now.
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
nategs said:
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
Click to expand...
Click to collapse
Thanks for the feedback.
Thanks
Thank you for the easy to follow post. I am a new user to Ubuntu (and Linux in general) and this was an extremely user friendly tutorial.
blas4me said:
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand linux based systems, but you catch on, especially if your a android user. You can just copy & paste all of the command. I've done this on 10.04 about four or five times, and 10.10 twice so far.
Edit: I just set up adb on my other lappy, and I notice the SDK is a little different. There is no adb file in the tools folder, it's just in another folder. You don't have to give it permissions, so just follow the instructions, and enjoy the new additions to the SDK.
Note: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1.Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
2.Open folder and got to tools folder
a.right click on adb, go to properties and check allow execution, choose or add open with auto prompt, do same for android file then double click on android and choose run
b.download and install, let it finish
Note: When I say add these line, I'm saying add the lines under the alphanumeric instructions
3.Open home folder, press ctrl & H to show hidden files, find bashrc
a.add these lines to the top of file,# include, then space it from next paragraph of text
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
4.Open terminal, type: export PATH=$PATH:/androidsdk/tools
a.in terminal, type: gksudo gedit /etc/udev/rules.d/51-android.rules
b.add these lines, then save
c.in terminal type: sudo restart udev
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
(plug your phone or phones in if it isn't already)
5.Extract the installer zip to your home folder, make script executable and to run with auto prompt, then just double click and choose run, then let it do it's thing
Note: When you run nautilus your going into file system directory
6.Open terminal, type: sudo nautilus
a.go to /usr/local/androidsdk/tools
b.make adb file executable, and choose or add open with auto prompt, then close root session and close terminal
7.Open terminal, type: adb devices, you should see your device or devices
8.Set up fastboot, go here for the file
http://forum.xda-developers.com/showthread.php?t=537508
a.once downloaded, copy to tools folder in your home directory, and enter root session with sudo nautilus command and add fastboot to /usr/local/androidsdk/tools
b.don't forget to make both files executable, and open with auto prompt,then close root session, close terminal.
9.Open terminal, type: adb devices
a.type:fastboot devices
(if it just go's to the next line your cool, you need to be in fastboot to see your device, if you get fastboot not found, then go back to the fastboot files and make sure you did part:8b
Now you should have adb&fastboot on your beautiful Ubuntu machine!!!!!!!!!!!
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
Excellent Post. Thank you very much.
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
blas4me said:
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
You'll get it
Mogomra said:
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
Click to expand...
Click to collapse
Your SDK folder should be in your home directory. You should rename your SDK folder to androidsdk for simplicity, if your pasting the commands from my post. I see the path you tried to export and it's not correct. I said in my post that they changed the location of the adb file, but to follow the instructions. You need to redo your bashrc file, just copy and paste my code lines, and you can't go wrong, trust me. I want your adb&fastboot up & running. Let me know what happens.
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Devildog8791 said:
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
Click to expand...
Click to collapse
You can set edge bindings from two applications, SCSM or Compiz
Mogomra said:
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Click to expand...
Click to collapse
That's strange I've never heard of anybody using that path, can you still just type in " adb devices " and see you phone or do you have to type " sudo adb "
blas4me said:
You can set edge bindings from two applications, SCSM or Compiz
Click to expand...
Click to collapse
So instead of going to the sides, you are going to the corners, correct?

GUIDES & FAQs [Android]: ADB Workshop by Adrynalyne and Guide by Captainkrtek

DO NOT POST IN THIS THREAD BEFORE READING THE WHOLE POST
PLEASE ADD GUIDES TO COMMON ISSUES YOURSELVES
To my recollection, the previous WM Guides thread was successful.. so we'll be moving on to android as well - from beginner to pro.
I hope this thread will provide answers to a decent percentage of your questions.
Please hold until guide collecting is finished..
In the meanwhile you are ALL invited to send me links or full guides to add to this thread.. remember, we are all about sharing.
COMING SOON! (in the meanwhile, you've got a great battery life guide at http://forum.xda-developers.com/showthread.php?t=471521 - be sure to thank BruceElliot for it!)
also, if you decide to post a guide, please keep the guide as neat as possible, with a title containing the LEVEL ([BEGINNER], [INTERMEDIATE], [PRO]) and the commonly searched words so that people who look for it can find it easily. (if you can, use the same color (dark orange) and same size (4) and Bold.. for the main title.. tho that's not a must )
post #2. [BEGINNERS+INTERMEDIATE] Replacing System Files using Android Commander
post #3. [EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
post #4. [QUICK FAQ's] Common QnA's for beginners by Timmymarsh (work in progress)
[BEGINNERS] Replacing system files using Android Commander
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
[EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
This following guide was rewritten by Captainkrtek, please make sure to thank him for it
Original Post:
(http://forum.xda-developers.com/showthread.php?t=879701)
This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Android control other device with IOIO Board.
It use ADB.
http://androidcontrol.blogspot.com/2011/10/ioio-board-for-android-control-io.html
timmymarsh said:
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Click to expand...
Click to collapse
Thank you for your patience and taking the time to answer those questions. I loved your simple and easily digestible format.
There is a note
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Click to expand...
Click to collapse
this note is all wrong..
1. linNUX is not *NIX.
2. Mac OS-X is a *NIX OS, it is based upon UNIX, they use their own variant called Darwin. Darwin does not require capitolization.
3. The word should be POSIX. Linux is POSIX compliant and POSIX defines the capitolization standardards
soft brick
Taioba said:
Is there any way to use ADB even though I can not enable USB debugging by the android?
I have an Atrix with soft-brick. How can I restore a file (framework-res.apk) knowing that my USB debugging is off?
I can enable ADB via fastboot?
Thanks!
Click to expand...
Click to collapse
I found this for atrix 4g....
http://forum.xda-developers.com/showthread.php?t=965546
hope it helps
knoknot said:
i have a bricked s2 not so sure how to go about reviving it via adb
Click to expand...
Click to collapse
check this thread
http://forum.xda-developers.com/showthread.php?t=1237815
thanks. searched for that
Thanks for it.
Great Guys............ :good:
Thanks for sharing.
Thanks for sharing this guild :d, i am new member for reccod
Great job~ Sometimes could be used this.
I'm using Windows 10 RTM and I've set the path, yet I still get the "unrecognized application" error in the command console. What am I missing?
Nevermind, a restart fixed it. Used to be you didn't have to.... sheesh.
nir36 said:
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
Click to expand...
Click to collapse
Thanks, this Guide is very informative
Help with LG D722
I'm using LG D722 phone and I somehow unlocked bootloader and installed twrp recovery. I backed up Lollipop that's what I'm using and i want to restore custom ROM
I know I need to install Google Apps after installing Custom ROM. But Do I also need to install Modem files on my device ? Because I can't find them on XDA Forums. Please give me a link or something. The help is not just appreciated but seriously needed.
Success. Thanks
Hello, I walk testing one recovery but I'm booting before flashing, the question is, will the recovery feel same when booted vs flashed? I've booted and used to flash a pair of zips but felt very laggy and bugged although did the work right. Thanks
Edit: solved, tried myself
Sent from my SHIELD Tablet K1 using XDA-Developers mobile app
http://forum.xda-developers.com/showthread.php?t=872128&page=2

I've removed bloat without rooting...

EDIT: SORRY EVERYONE - IT SEEMS THAT FOR MOST PEOPLE THE BLOATWARE IS REPLACED UPON REBOOTING THE PHONE. I AM WORKING ON A SOLUTION FOR THIS.
So, I was playing around with the Ace Hack kit, and realized that when you get to step 2, you have temporary root access in the adb shell.
Note: I had to change the USB connection type from 'Charge Only' to 'Disk Drive' for this to work.
DISCAILMER: THIS IS PRETTY EASY, BUT I TAKE NO RESPONSIBILITY IF YOU KILL YOUR PHONE
So, I mounted /system as rw and went to /system/app and removed all the bloatware apk's.
Here are the steps I followed:
Downloaded the ace hack kit found in this thread: http://forum.xda-developers.com/showthread.php?t=952352
Extracted the files and opened the README-WNDOWS file.
I skipped over step 1, because just to get this level of access a gold card is not needed, I went to step 2, and did this:
* Make sure the phone is running and adb debugging is enabled.
* Open a command prompt as administrator and navigate to the location of the extracted ace hack kit
* Run hackerize-ace setup-downgrade
This should give you a # prompt (meaning you have temporary root access)
Next mount /system as rw by typing this at the # prompt:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
once that is done, go to the app folder by tpying:
cd /system/app
do a ls to see what APK's are installed, for the most part you should be able to identify which apks are bloatware. Instead of deleting them, I renamed them just to make sure I wasn't messing anything up by typing this:
mv filename.apk filename.old
you can instantly see the apps removed from the program list.
Once you have rebooted and made sure everything is working ok, and that you have not messed anything up, you can repeat this procedure to delete the .old files, but I just left them, as its not really necessary.
ONE IMPORTANT NOTE: ONCE YOU ARE DONE RENAMING OR DELETING THE APK FILES, DO NOT TYPE EXIT AS INSTRUCTED IN THE README-WINDOWS FILE. INSTEAD, CLOSE THE COMMAND PROMPT WINDOW SO THE BATCH FILE DOES NOT TRY TO CONTINUE TO ROOT THE PHONE
Once you reboot the phone, the temporary root access is gone, and the /system is mounted again as read only.
Hope this helps someone
You should also be able to "Add" apk's in this manner!
Awesome. I'm going to try this.
Brilliant! I hope this works...
I was going to try and use VISIONary when I get mine, but if this is a proven method, then I'll give it a shot.
derekroper said:
* Make sure the phone is running and adb debugging is enabled.
* Open a command prompt as administrator and navigate to the location of the extracted ace hack kit
* Run hackerize-ace setup-downgrade
Click to expand...
Click to collapse
These are the steps I'm not quite sure about. I've never used adb so..Once I open a cmd prompt in windows how exactly do I navigate to the folder, do I have to type something like:
c/documents/apps....
Just want to be sure.
lrs421 said:
These are the steps I'm not quite sure about. I've never used adb so..Once I open a cmd prompt in windows how exactly do I navigate to the folder, do I have to type something like:
c/documents/apps....
Just want to be sure.
Click to expand...
Click to collapse
On your phone, go to Settings -> Applications -> Development and check USB debugging then plug your phone in and set it to charge only.
Find out where you have adb stored at (For me, it's C:\android\tools\adb.exe).
Open a command prompt and issue this command: cd C:\android\tools
Then you can type adb /? and it'll tell you all the available commands you can use. Push is to move files to the phone - pull is to move files to the computer.
lrs421 said:
These are the steps I'm not quite sure about. I've never used adb so..Once I open a cmd prompt in windows how exactly do I navigate to the folder, do I have to type something like:
c/documents/apps....
Just want to be sure.
Click to expand...
Click to collapse
Ok, so here:
* Make sure the phone is running and adb debugging is enabled.
(Do this on the phone by going to Settings -> Applications -> Development -> Check USB Debugging)
* Open a command prompt as administrator and navigate to the location of the extracted ace hack kit
(Depending on your OS, this is a little different, but in windows 7, click Start -> All Programs -> Accessories -> Right click on command Prompt and click Run as Administrator, then change directory to the location that you extracted the files to, this is different depending on where you extracted them, but if you extracted them in c:\files then type cd \files)
* Run hackerize-ace setup-downgrade
(Do this by typing hackerize-ace setup-downgrade)
JaysFreaky said:
On your phone, go to Settings -> Applications -> Development and check USB debugging then plug your phone in and set it to charge only.
Find out where you have adb stored at (For me, it's C:\android\tools\adb.exe).
Open a command prompt and issue this command: cd C:\android\tools
Then you can type adb /? and it'll tell you all the available commands you can use. Push is to move files to the phone - pull is to move files to the computer.
Click to expand...
Click to collapse
Following this method you dont really need to know adb commands, all the adb commands are in the hackerize batch file....
derekroper said:
Ok, so here:
* Make sure the phone is running and adb debugging is enabled.
(Do this on the phone by going to Settings -> Applications -> Development -> Check USB Debugging)
* Open a command prompt as administrator and navigate to the location of the extracted ace hack kit
(Depending on your OS, this is a little different, but in windows 7, click Start -> All Programs -> Accessories -> Right click on command Prompt and click Run as Administrator, then change directory to the location that you extracted the files to, this is different depending on where you extracted them, but if you extracted them in c:\files then type cd \files)
* Run hackerize-ace setup-downgrade
(Do this by typing hackerize-ace setup-downgrade)
Click to expand...
Click to collapse
Thanks guys, I'm going to try this in a few minutes.
Very nice write up, and I assume you still have sound at the end of this, unlike the permanent root?
Chaptop said:
Very nice write up, and I assume you still have sound at the end of this, unlike the permanent root?
Click to expand...
Click to collapse
Yep because I am not uploading a rom, I am only gaining temporary root, this makes no perm changes to your phone except for the APK files you rename or delete.
derekroper said:
Yep because I am not uploading a rom, I am only gaining temporary root, this makes no perm changes to your phone except for the APK files you rename or delete.
Click to expand...
Click to collapse
Awesome, thanks a lot man.
What am I doing wrong....
lrs421 said:
What am I doing wrong....
Click to expand...
Click to collapse
Hmm, dont know, type dir and take a screenshot so I can see the contents of that directory
im at the same position. did everything the same and ended up there also.
lrs421 said:
What am I doing wrong....
Click to expand...
Click to collapse
davwman said:
im at the same position. did everything the same and ended up there also.
Click to expand...
Click to collapse
Ah, I think you guys only downloaded the docs from the Hack kit page, you need to download the actual hack kit from here:
http://forum.xda-developers.com/showthread.php?t=952352
The link says 'Ace Hack Kit V2 Updated hack kit'
derekroper said:
Ah, I think you guys only downloaded the docs from the Hack kit page, you need to download the actual hack kit from here:
http://forum.xda-developers.com/showthread.php?t=952352
The link says 'Ace Hack Kit V2 Updated hack kit'
Click to expand...
Click to collapse
Yup, just figured it out, at the # sign now...fingers crossed.
Ok, so I see the listed apps how the hell do I erase them now
derekroper said:
Ah, I think you guys only downloaded the docs from the Hack kit page, you need to download the actual hack kit from here:
http://forum.xda-developers.com/showthread.php?t=952352
The link says 'Ace Hack Kit V2 Updated hack kit'
Click to expand...
Click to collapse
I downloaded the right thing what am I missing?

Categories

Resources