How to access your ADB shell.

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site
Thanks have to go to the following for this information (where I learned the ADB shell):

Android Developers and The unlockr

So you want to have full access to your Samsung epic 4g but dont want to have to type all those rooting commands on the virtual or physical keyboard? Or maybe you just want to remove some of those pesky .apk files so you can remove certain apps (cough nascar cough cough). Well here is your thread to connect your Epic 4g to your PC.

Step 1: Download the USB drivers (direct links)

32bit OS: http://download2us.softpedia.com/dl.../SAMSUNG_USB_Driver_for_Mobile_Phones_x86.exe

64bit OS: http://download2us.softpedia.com/dl...93/drivers/others/usb_drivers_GalaxyS_x64.zip

Thanks Kieth Newman for the links in rooting thread.

Install the drivers. This will load not only the USB driver for the phone, but also the ADB and necessary software to run the shell (minus the SDK).

Step 2: Download the Android SDK (direct link)

http://dl.google.com/android/android-sdk_r06-windows.zip

Make a folder on the root of your 'c' drive named android (mine is c:\androidSDK and is the path Ill use in this guide). Extract the contents of the zip file then navigate through the extracted file 1 level until you see the following files: add-ons, platforms, tools, SDK readme, and SDK setup. Copy all those files into the c:\androidsdk folder.

Step 3: Connecting to and testing the ADB shell connection.

On your epic 4g navigate to: settings>applications>developement and select usb debugging as this allows for the shell to interface with your phone. Plug in your epic with the usb cable provided with your phone and wait for drivers to load. Then on your computer hit start and type "cmd" (without quotes) in the search box (vista/7) or select run and type cmd (XP) then hit enter. You now have a virtual MS DOS window open type the following (each line is its own command and hit enter after typing each line):

cd\
cd androidsdk\tools
adb devices

This should come up with your devices serial number and show that the connection is ready to be initiated.

step 4: Running the ADB shell

Make sure your phone is in USB debugging mode, connected to your pc and open a virtual dos window again: hit start and type "cmd" (without quotes) in the search box (vista/7) or select run and type cmd (XP) then hit enter. Type the following to enter the ADB shell (each line is its own command and hit enter after typing each line):

cd\
cd androidsdk\tools
adb shell

You should now see a "$" (no quotes) and that signifies that you have the adb shell up and running. Congratulations! you're now able to issue commands to your phone over your PC. This shell is the interface where one click roots and such are done. Now you are able to root your phone. Good luck!

**Disclaimer** I do not accept responsibility for rooting and bricking your phone by issuing the wrong commands.
 
Last edited:

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
Process is the same for mac with 2 caveats. Install SDK to your home folder. No need to install drivers. Turn USB debugging on. Open terminal and type:
Code:
cd android-sdk-mac_86/tools
./adb devices
./adb shell

Caveat 1:
Unix devices use / instead of \

Caveat 2:
adb commands require "./" before them.
 

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site
Process is the same for mac with 2 caveats. Install SDK to your home folder. No need to install drivers. Turn USB debugging on. Open terminal and type:
Code:
cd android-sdk-mac_86/tools
./adb devices
./adb shell

Caveat 1:
Unix devices use / instead of \

Caveat 2:
adb commands require "./" before them.

Thanks for the mac version! I was going to 'steal' my wifes macbook and do a write up on it but this saves me the time! Thanks a million!
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
no problem. If you want to know the ADB commands... like
(./)adb kill-server if you are having trouble connecting and to start over or, (./)adb reboot recovery to reboot into recovery mode. You can just type adb and a list of the commands available will be displayed. One you would need with a rooted phone and remount installed to remove stock Sprint apps would be:
(./)adb remount
then:
(./)adb shell
cd /system/app/
ls
then to remove them:
rm NAMEOFAPP.apk

() for mac and linux users.
 

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site
For removing apps I always type the following:

mount -o remount,rw -t rfs /dev/stl5 /system (to remount for access to the system folder beyond reading)
cd /system/app
rm application.apk
mount -o remount,ro -t rfs /dev/stl5 /system (to remount to read only for protection)
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
right, thats before having remount installed. Once that is installed, all you need to do is type adb remount before accessing the shell.
 

caliskimmer

Retired Moderator
Jul 11, 2010
1,869
24
0
Visit site
Sweet! Thanks guys! I could never get the adb shell to run except by luck. Now I have a guide!

Sent from my awesome Samsung Epic 4g
 

cody

Active member
May 16, 2010
37
0
0
Visit site
right, thats before having remount installed. Once that is installed, all you need to do is type adb remount before accessing the shell.

sweet, new to android, but not new to hack and moding phones. android is a lot different than other platforms.

one question....

you said "before having remount installed". can you explain this remount thing?

Thanks, Cody
 

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site
I think what he means is you can use the "adb remount" command to mount the drive to read/write and read only. I like using the full command as Im already in the shell and really dont think about mounting the system until Im already where I need to be.
 

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site
When I rooted I tried to access the /system/app directory and couldnt do anything but read and I was wondering what was up since I had SU access. Then I found the remount to read/write command on a moment forums and viola! I had the apks I wanted off in a matter of minutes.
 

solo1shyne#AC

New member
Aug 20, 2010
4
0
0
Visit site
I followed all the steps. I was rooted. downloaded a few rooted apps. Charged phone went to bed. Got up and my root was not being recognized. I went back through the steps again and everything is showing correct. It shows me the device and the $ sign in the cmd prompt. When I try and open an app that has root it says your device is not rooted. Any thoughts?
 

liquidxit2

Well-known member
Jul 20, 2010
738
25
0
Visit site

rollinstarz

New member
Jan 26, 2011
1
0
0
Visit site
i keep getting an error message on the cmd prompt when i try to access the adb shell.

it says its not a recognized internal or external operable program or batch file.

wat does this mean?!??!?!?!
 

Frogger420

Active member
May 12, 2011
42
1
0
Visit site
Ok I forgot how to do this since it was so long since I rooted a phone. I took the easy way and one click rooted this time, but I had all the right stuff already on my pc in c:android \ platform-tools not androidsdk\tools. after getting the correct directory. I just type su after the $ sign and click enter. Then I look at the phone and click allow on superuser to get to the root # symbol I need to install custom recovery. :)