{Tutorial} (Basics of ADB) For Beginners Part-1

Search This thread

beeewell

Senior Member
Apr 25, 2012
260
90
Nexus 6
Google Pixel 3a
Thanks and a small contribution

Thanks to doctor_droid and everyone that has contributed to this thread !! :good:

In case this helps someone else, when I typed adb devices, the list of devices was blank. After numerous searches on Google, my problem was that I did not have the Google USB driver installed. After installing it, all was well

Here's a link to install the Google USB Driver:

http://developer.android.com/sdk/win-usb.html#download
 
  • Like
Reactions: virginwidow

6stringbass

Member
Feb 5, 2012
11
1
ADB question

So after working with Android phones (and even using ADB) for quite some time I finally read the ADB primer that Doctor Droid has thoughtfully posted. I knew some of the capabilities of ADB before this and now believe I understand more of them. I am specifically wondering if ADB will allow those of us with stock unrooted phones to replace the platform.xml file used in 4.4.2 that had changed the external SD card permissions to one that removes those restrictions. There are some times that you'd like to fix that "feature" but not root the phone (can you say Wife's phone?) and this looks like it may hold the key to that. Am I going in the right direction?

Steve
 

prof123

Senior Member
Apr 10, 2014
113
10
Please, is this for 1st time connection to a PC or what? I really don't understand.

Sent from my GT-N7100 using XDA Premium 4 mobile app
 

Azeraph

Member
May 31, 2014
31
6
Anyone know how to pull the entire phone in one shot, I was just wondering if there is a way without cwm or twrp installed and if it's OEM stock? That's what i'm after.

Is there a backup and restore from the pc using adb? What i mean can i restore a image of the phone without cwm or twrp and the screen is gone?:)
 

pyroman2425

Member
Mar 1, 2015
19
0
35
HELP

I am desperate to begin in understanding the adb. but as I put in the start server command the only thing it gives me is a port number and failure. can someone help pls. I have all the right drivers I have tried in download and recovery but neither of them give a different result only 5307 failure port adb did not ack daemon fail

---------- Post added at 05:23 AM ---------- Previous post was at 04:50 AM ----------

can someone pls tell me how to make the annoying popup stuff on the side of my screen while im trying to scroll the page go away lol
 

DeathGrin13

Member
Sep 5, 2013
33
6
I am having trouble getting "adb logcat" to work, after following all instructions, i run adb logcat in command prompt and it just sits there like it's working, but nothing ever happens. any ideas? any help is very much appreciated! thank you for the tut as well!

*Edit* I have a Sprint Galaxy Note 4 running Sprint Hybrid X series 2.3 Deodexed
 
Last edited:
The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
It is a tool that lets u communicate with ur android device that is connected to ur pc.

In the first tutorial we shall learn some basics of adb and then advance to use pro commands in further tutorials.

Requirements

1. Adb link - http://developer.android.com/sdk/index.html
Direct link for windows 32bit
http://dl.google.com/android/adt/adt-bundle-windows-x86-20130917.zip

Direct link for windows 64bit
http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20130917.zip

(Link may be removed after some time by google itself)

2. Windows based pc ( yes we will use windows and not linux as i dun want to communicate anything that i havent tried by myself ):p


1. Download and extract the zip in any drive , lets say C:

2. Go to C:/adb/sdk/platform-tools and u will something like
View attachment 1937059
su5u6e8y.jpg



3. Now press shift key + right click on mouse/keypad
http://xdaforums.com/attachment.php?attachmentid=1936847&stc=1&d=1367732560
select open command window here

then type adb start-server

in order to ensure ur device is connected and recognized by adb , type adb devices , u will get something like this
View attachment 1940190

Now once your adb is setup up, lets play.....

GETTING LOGCAT THROUGH ADB​

Easiest of all
just type
adb logcat

u will see entire log ur phone,
use ctrl+c to skip it

To get logcat in a file
type
adb logcat > logcat.txt

u will see a file logcat which will save ur phone's realtime process log.

TO GET A BUGREPORT

type adb bugreport
bt bt bt.. this will show info that wont b readable ..
so type

adb bugreport>result.txt

http://xdaforums.com/attachment.php?attachmentid=1936973&d=1367737608
yjy3edy5.jpg


USING ADB WITH SUPERUSER PERMISSIONS

for this , u must be rooted ;)

command

adb root
if it is success it will show something like
tytedu4y.jpg

http://xdaforums.com/attachment.php?attachmentid=1937056&stc=1&d=1367740210



INSTALLING AN APP VIA ADB

to install any app, make sure there is no space in the name of the apk...
and u should know its location,

command that u use is adb install

i have installed a game papertoss via this command, if u get success u will get something like this

View attachment 1936893
View attachment 1940189

COPYING A FILE VIA ADB​

this is pretty easy

command u use is

adb pull
i have given a example by pulling the framework-res.apk from system/framework folder
View attachment 1940191

the file that u pull, u will see it in the platform -tools folder


PUSHING A FILE INTO YOUR PHONE​

very similar to pull, bt this copies file from ur pc to ur android .

command u use is

adb push

For eg,
i have pushed the papertoss.apk file from C:\sanket\apps to sdcard/nimbuzz folder through the command

adb push C:\SANKET\apps\papertoss.apk /sdcard/nimbuzz

if u get success u will see something like this
http://xdaforums.com/attachment.php?attachmentid=1937039&stc=1&d=1367739756

this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android


more commands added
thanks to @Guich


Code:
adb remount

This command remount the /system partition in read/write

Code:
adb usb
Restarts the adbd daemon listening on USB

Code:
adb shell
Run remote shell interactively

The command set shall b updated within few days.
Feel free to drop ur comments, corrections, commands.;)

All commands have been verified by me..
once i learn more, i will share more.
criticism is welcomed if its healthy

Thread material is not copied and will never be.:cool:
Thread will be updated with newer and complex commands soon with pics.

For developers, this is just a piece of cake which they can do with their eyes closed :D
i have made this specially for beginners ( like me :D )

Man after that tutorial i really feel like sh*t that i was actually scared of manipulating/messing with adb and fastboot hahaha

Cheers mate ! Thanks a bunch ;)
 

VeroThiel

New member
Dec 15, 2015
1
0
Hiya, I just wanted to create a backup with ADB, worked fine once before, but now I can't get past the "Now unlock your device and confirm the backup operation." The screen to confirm shows up on my phone (HTC m8, Android 5.0.1, USB Debug activated), but I can't click on "Backup now" (not the exact wording), it will only let me do "Do not create backup", or sometimes I can't press either of them. In the latter case, I need to kill the adb server. This happens both, via USB connection and via Wi-Fi. Any ideas where I'm going wrong?
Thanks,
Veronika
 

malini senthil

New member
Jan 18, 2016
1
0
I could see nothing (next line is empty) when i give "adb devices" command.I am using android 4.4 on radxa rock pro board and ubuntu
 

Cokecan42

New member
Jun 27, 2016
1
1
This command remount the /system partition in read/write


Restarts the adbd daemon listening on USB


Run remote shell interactively

The command set shall b updated within few days.
Feel free to drop ur comments, corrections, commands.;)

All commands have been verified by me..
once i learn more, i will share more.
criticism is welcomed if its healthy

Thread material is not copied and will never be.:cool:
Thread will be updated with newer and complex commands soon with pics.

For developers, this is just a piece of cake which they can do with their eyes closed :D
i have made this specially for beginners ( like me :D )

Man after that tutorial i really feel like sh*t that i was actually scared of manipulating/messing with adb and fastboot hahaha

Cheers mate ! Thanks a bunch ;)

Hello my login Name is Cokecan42
If anyone one could help me or direct me on how to back up and root my phone . I would greatly appreciate it. I am decent on working with my phone . I work with my computer. I dual booted Linux mint along beside windows 7 so I'm not totally aliterate.
So if anyone could it would be greatly appreciated

Thanks in advance

Cokecan42
 
  • Like
Reactions: VogonP0et

VogonP0et

Senior Member
Aug 12, 2011
131
118
Shropshire
Hello my login Name is Cokecan42
If anyone one could help me or direct me on how to back up and root my phone . I would greatly appreciate it. I am decent on working with my phone . I work with my computer. I dual booted Linux mint along beside windows 7 so I'm not totally aliterate.
So if anyone could it would be greatly appreciated

Thanks in advance

Cokecan42
It would help to know what phone you have, as the tools available differ. You're generally better off just installing a custom recovery such as TWRP if it's available.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
    It is a tool that lets u communicate with ur android device that is connected to ur pc.

    In the first tutorial we shall learn some basics of adb and then advance to use pro commands in further tutorials.

    Requirements

    1. Adb link - http://developer.android.com/sdk/index.html
    Direct link for windows 32bit
    http://dl.google.com/android/adt/adt-bundle-windows-x86-20130917.zip

    Direct link for windows 64bit
    http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20130917.zip

    (Link may be removed after some time by google itself)

    2. Windows based pc ( yes we will use windows and not linux as i dun want to communicate anything that i havent tried by myself ):p


    1. Download and extract the zip in any drive , lets say C:

    2. Go to C:/adb/sdk/platform-tools and u will something like
    View attachment 1937059
    su5u6e8y.jpg



    3. Now press shift key + right click on mouse/keypad
    http://xdaforums.com/attachment.php?attachmentid=1936847&stc=1&d=1367732560
    select open command window here

    then type adb start-server

    in order to ensure ur device is connected and recognized by adb , type adb devices , u will get something like this
    View attachment 1940190

    Now once your adb is setup up, lets play.....

    GETTING LOGCAT THROUGH ADB​

    Easiest of all
    just type
    adb logcat

    u will see entire log ur phone,
    use ctrl+c to skip it

    To get logcat in a file
    type
    adb logcat > logcat.txt

    u will see a file logcat which will save ur phone's realtime process log.

    TO GET A BUGREPORT

    type adb bugreport
    bt bt bt.. this will show info that wont b readable ..
    so type

    adb bugreport>result.txt

    http://xdaforums.com/attachment.php?attachmentid=1936973&d=1367737608
    yjy3edy5.jpg


    USING ADB WITH SUPERUSER PERMISSIONS

    for this , u must be rooted ;)

    command

    adb root
    if it is success it will show something like
    tytedu4y.jpg

    http://xdaforums.com/attachment.php?attachmentid=1937056&stc=1&d=1367740210



    INSTALLING AN APP VIA ADB

    to install any app, make sure there is no space in the name of the apk...
    and u should know its location,

    command that u use is adb install

    i have installed a game papertoss via this command, if u get success u will get something like this

    View attachment 1936893
    View attachment 1940189

    COPYING A FILE VIA ADB​

    this is pretty easy

    command u use is

    adb pull
    i have given a example by pulling the framework-res.apk from system/framework folder
    View attachment 1940191

    the file that u pull, u will see it in the platform -tools folder


    PUSHING A FILE INTO YOUR PHONE​

    very similar to pull, bt this copies file from ur pc to ur android .

    command u use is

    adb push

    For eg,
    i have pushed the papertoss.apk file from C:\sanket\apps to sdcard/nimbuzz folder through the command

    adb push C:\SANKET\apps\papertoss.apk /sdcard/nimbuzz

    if u get success u will see something like this
    http://xdaforums.com/attachment.php?attachmentid=1937039&stc=1&d=1367739756

    this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android


    more commands added
    thanks to @Guich


    Code:
    adb remount

    This command remount the /system partition in read/write

    Code:
    adb usb
    Restarts the adbd daemon listening on USB

    Code:
    adb shell
    Run remote shell interactively

    The command set shall b updated within few days.
    Feel free to drop ur comments, corrections, commands.;)

    All commands have been verified by me..
    once i learn more, i will share more.
    criticism is welcomed if its healthy

    Thread material is not copied and will never be.:cool:
    Thread will be updated with newer and complex commands soon with pics.

    For developers, this is just a piece of cake which they can do with their eyes closed :D
    i have made this specially for beginners ( like me :D )
    7
    Good job :)


    A little suggestion, from a guy used to Linux. Beginners are always lost with shells, so for this one :

    Code:
    adb shell
    Run remote shell interactively
    Why not proposing some shell commands to explain a little about this adb feature ?
    Or you can add a paper/article about it, such as this one : http://www.fortystones.com/40-linux-shell-commands-beginners/
    6
    Good job! :)

    I think you can add in op this command:

    Code:
    adb remount
    This command remount the /system partition in read/write

    Code:
    adb usb
    Restarts the adbd daemon listening on USB

    Code:
    adb shell
    Run remote shell interactively

    Code:
    adb devices
    List all connected devices


    Anh, adb will work in recovery too, write it in op if you want :)
    4
    reserved for future
    3
    for this , u must be rooted ;)

    command

    adb root

    ...
    ...

    very similar to pull, bt this copies file from ur pc to ur android .

    command u use is

    adb push


    this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android

    ...
    ...

    more commands added
    thanks to @Guich


    Code:
    adb remount

    This command remount the /system partition in read/write

    Nice mate but you could add small notification here that these commands will only work properly if you have patched adbd binary in your android device (ro.secure=0 in default.prop or insecure adbd installed) and not only su binary (in adb push, you will need patched adbd only if you want to push to protected partition like system partition even if it is mounted as read and write..!!).


    Code:
    adb root
    Code:
    adb remount
    These 2 command are fair on most devices but some are funky..!!! so you may need another command to remount partition as read and write.
    example:
    Code:
    adb shell "su" "" "mount -o remount,rw [B][COLOR="Red"]/system[/COLOR][/B]"
    This will efficiently mount system partition as read and write (you can put any partition name instead of /system for e.g, /preload)

    Again adb is very powerful tool especially for debugging, direct pushing and installing of apps. Many tools here in xda are born with help of adb engine, so make sure to use and consume it to the last drop ;)
    Yours;