Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

Like Tree1Likes
  • 1 Post By t0ast3d

test: Reply
 
LinkBack Thread Tools
Old August 30th, 2010, 08:56 PM   #1 (permalink)
Member
Thread Author (OP)
 
t0ast3d's Avatar
 
Join Date: Aug 2010
Location: Oklahoma
Posts: 373
 
Device(s): HTC Hero, EVO 4G, Samsung Moment
Carrier: Not Provided

Thanks: 4
Thanked 73 Times in 47 Posts
Exclamation [HOW TO] Basic ADB Commands

If you find this helpful or think it would be helpful to others, tip it for a sticky!


Here's a little guide I put together for you to learn basic adb commands.


I'm posting this thread assuming you already have your SDK set up

^ I believe there is a sticky right below/above this thread on how to do so ^


With that said, let's dive right in!



1. Turn on ADB

Go to Menu > Settings > Applications > Development > USB Debugging


2. Running ADB

Open up command prompt and type your way to the directory you have your SDK in.

Mine is in C:\

So for example, mine would be: cd c:\AndroidSDK/tools

You are now in


3. Basic ADB commands

ADB push (sends files to your phone) -- adb push c:\example.apk /sdcard/example.apk

ADB pull (Receives files from your phone) -- adb pull /system/app/example.apk c:\example.apk

ADB install (installs application) -- adb install c:\example.apk

adb shell (Begins shell connection with phone)

adb reboot (reboots phone)

adb reboot recovery (reboots phone into recovery)

adb reboot bootloader (reboots the phone into bootloader/the white screen)

adb remount (remounts the system)


4. Commands to run while in ADB Shell

cd (changes directories) -- cd /system/app

ls (lists all files in the directory) -- cd /system/app

rm (removes files) -- rm /system/app/example.apk

cp (copies files) similar to cat -- cp /system/app/example.apk /sdcard/example.apk

cat (copies files) -- cat /system/app/example.apk > /sdcard/example.apk

exit (exits shell) -- exit


Might add a little more later if requested.

Hope you learned something!
Wizard59 likes this.

__________________
Безжалостная сила

Check out the new site! - http://iluvsn0w.us/


Help a new father? - Not expected but greatly appreciated

Need custom themes?

Email: chasetillar@gmail
t0ast3d is offline  
Last edited by t0ast3d; August 30th, 2010 at 08:58 PM.
Reply With Quote
The Following 13 Users Say Thank You to t0ast3d For This Useful Post:
ALD3 (July 14th, 2012), ardchoille (July 27th, 2011), chadb740 (January 10th, 2012), fadeds (January 22nd, 2013), KLBrey (December 5th, 2012), manbat (May 6th, 2013), mistaj33 (May 12th, 2012), siddharth24 (June 6th, 2012), taknactn (February 16th, 2011), trophynuts (December 11th, 2011), Wizard59 (August 25th, 2012), wubbzy (May 17th, 2012), XsupaXshawnX (September 21st, 2011)
Sponsors
Old September 6th, 2010, 09:21 AM   #2 (permalink)
New Member
 
Join Date: Jun 2010
Location: DFW Metroplex
Posts: 14
 
Device(s): HTC EVO 4G - Sprint - Froyo 2.2
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Good Post, however how would one be able to possibly create an APK which just copies a folder or folders with files in them to the SD card under a specific location. I'm working on a Theme deployment with DreamLyfe and trying to tie in the files and folders in an APK. I have experience wit hthe ADB and it's nice, but need to fig out how to assemble in SDK.
osirusrising is offline  
Reply With Quote
Old October 29th, 2011, 06:46 PM   #3 (permalink)
Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Carrier: Not Provided

Thanks: 2
Thanked 37 Times in 33 Posts
Default

ADB is also documented here http://developer.android.com/guide/developing/tools/adb.html.
jiminaus is offline  
Reply With Quote
Old December 24th, 2011, 03:44 PM   #4 (permalink)
Senior Member
 
johnny424's Avatar
 
Join Date: Nov 2011
Location: Washington Dc
Posts: 1,499
 
Device(s): AT&T SGS3-Google Nexus 7
Carrier: AT&T

Thanks: 435
Thanked 462 Times in 269 Posts
Default

nice post..i am still learning and searching for useful things..even though im a few months late : ) ..thanks again for insightful info
__________________
A simple THANK YOU will do
johnny424 is offline  
Reply With Quote
Old January 10th, 2012, 08:50 PM   #5 (permalink)
Junior Member
 
Join Date: Jan 2012
Posts: 37
 
Device(s):
Carrier: Not Provided

Thanks: 34
Thanked 1 Time in 1 Post
Default

Please post many more commands.
After Eclipse is installed, where do I find a list of commands that are used to program?
I've go Eclipse, SDK/AVD manager installed.
What are the commands used to write a program?
My searches all turn up empty.
Is there a place that has all of the java commands?
chadb740 is offline  
Reply With Quote
Old January 11th, 2012, 03:39 AM   #6 (permalink)
Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Carrier: Not Provided

Thanks: 2
Thanked 37 Times in 33 Posts
Default

Quote:
Originally Posted by chadb740 View Post
Is there a place that has all of the java commands?
http://developer.android.com/reference/
jiminaus is offline  
Reply With Quote
Old January 21st, 2012, 12:49 AM   #7 (permalink)
Member
 
Join Date: Jan 2011
Location: Pgh
Gender: Male
Posts: 229
 
Device(s): Alcatel Authority Hussein Ascend, cm7
Carrier: Not Provided

Thanks: 5
Thanked 19 Times in 16 Posts
Default

I using QtADB, A gui representation of ADB, what can I do with that? Most of the first post, is there, in a gui.
reggjoo is offline  
Reply With Quote
Old March 28th, 2012, 04:33 PM   #8 (permalink)
New Member
 
Join Date: Mar 2012
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the turorial
droidbot45 is offline  
Reply With Quote
Old May 17th, 2012, 06:43 PM   #9 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 1,177
 
Device(s): Samsung Galaxy Prevail, Nexus 7
Carrier: Boost Mobile

Thanks: 573
Thanked 470 Times in 269 Posts
Default

Quote:
Originally Posted by t0ast3d View Post

2. Running ADB

Open up command prompt and type your way to the directory you have your SDK in.

Mine is in C:\

So for example, mine would be: cd c:\AndroidSDK/tools

Another idea is to add the sdk path to your PATH variable per the instructions here: Installing the SDK | Android Developers
palmtree5 is online now  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:44 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.