• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide]Setting up ADB and Fastboot

Search This thread

rognlorie

Senior Member
Mar 18, 2016
90
8
Amory, MS
Definition:

ADB is the android debugging bridge that allows you to control your phone from your PC and is a bridge allowing you transfer stuff from it

Fastboot is usually used in bootloader and used a lot in unlocking your bootloader and commands in it

Setting up ADB:

1.Download the ZIP file from the attachments and extract it in C:\SDK\platform-tools (You will need to create these folders)
2. Go to command prompt by typing this word in menu search
3.Start writing

You will see

Don't freak out everything will be explained

4.Connect device and make sure that USB Debugging is enabled from Settings:Applications:Development(on GB)
Settings:Developer Options(on ICS and HC)

5.Write


6.There are common commands used on ADB:

Push and Pull means copy form directory to another

ADB Shell for in device commands


Setting up fastboot: Your phone must be on bootloader


Commands List:


PS: When i wrote <directory> it means like C:\Users\Desktop\Desktop\file
Or you can put the file in the the platform-tools folder you created so
write Ex:
What if I cannot get to settings how can I get it into fast boot?
 

mOh19973

Senior Member
Sep 1, 2011
71
49
Beirut
What if I cannot get to settings how can I get it into fast boot?

Depends on your phone but usually fast boot can be accessed by a volume key + power button when the phone is turned off. While i highly doubt you’re asking for the Desire S it was holding Volume Down + Power while the phone is switched off.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    Definition:

    ADB is the android debugging bridge that allows you to control your phone from your PC and is a bridge allowing you transfer stuff from it

    Fastboot is usually used in bootloader and used a lot in unlocking your bootloader and commands in it

    Setting up ADB:

    1.Download the ZIP file from the attachments and extract it in C:\SDK\platform-tools (You will need to create these folders)
    2. Go to command prompt by typing this word in menu search
    3.Start writing
    Code:
    cd C:\SDK\platform-tools
    adb.exe
    You will see
    Code:
    Android Debug Bridge version 1.0.29
    
     -d                            - directs command to the only connected USB devic
    e
                                     returns an error if more than one USB device is
     present.
     -e                            - directs command to the only running emulator.
                                     returns an error if more than one emulator is r
    unning.
     -s <serial number>            - directs command to the USB device or emulator w
    ith
                                     the given serial number. Overrides ANDROID_SERI
    AL
                                     environment variable.
     -p <product name or path>     - simple product name like 'sooner', or
                                     a relative/absolute path to a product
                                     out directory like 'out/target/product/sooner'.
    
                                     If -p is not specified, the ANDROID_PRODUCT_OUT
    
                                     environment variable is used, which must
                                     be an absolute path.
     devices                       - list all connected devices
     connect <host>[:<port>]       - connect to a device via TCP/IP
                                     Port 5555 is used by default if no port number
    is specified.
     disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                     Port 5555 is used by default if no port number
    is specified.
                                     Using this command with no additional arguments
    
                                     will disconnect from all connected TCP/IP devic
    es.
    
    device commands:
      adb push <local> <remote>    - copy file/dir to device
      adb pull <remote> [<local>]  - copy file/dir from device
      adb sync [ <directory> ]     - copy host->device only if changed
                                     (-l means list but don't copy)
                                     (see 'adb help all')
      adb shell                    - run remote shell interactively
      adb shell <command>          - run remote shell command
      adb emu <command>            - run emulator console command
      adb logcat [ <filter-spec> ] - View device log
      adb forward <local> <remote> - forward socket connections
                                     forward specs are one of:
                                       tcp:<port>
                                       localabstract:<unix domain socket name>
                                       localreserved:<unix domain socket name>
                                       localfilesystem:<unix domain socket name>
                                       dev:<character device name>
                                       jdwp:<process pid> (remote only)
      adb jdwp                     - list PIDs of processes hosting a JDWP transport
    
      adb install [-l] [-r] [-s] <file> - push this package file to the device and i
    nstall it
                                     ('-l' means forward-lock the app)
                                     ('-r' means reinstall the app, keeping its data
    )
                                     ('-s' means install on SD card instead of inter
    nal storage)
      adb uninstall [-k] <package> - remove this app package from the device
                                     ('-k' means keep the data and cache directories
    )
      adb bugreport                - return all information from the device
                                     that should be included in a bug report.
    
      adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
    stem] [<packages...>]
                                   - write an archive of the device's data to <file>
    .
                                     If no -f option is supplied then the data is wr
    itten
                                     to "backup.ab" in the current directory.
                                     (-apk|-noapk enable/disable backup of the .apks
     themselves
                                        in the archive; the default is noapk.)
                                     (-shared|-noshared enable/disable backup of the
     device's
                                        shared storage / SD card contents; the defau
    lt is noshared.)
                                     (-all means to back up all installed applicatio
    ns)
                                     (-system|-nosystem toggles whether -all automat
    ically includes
                                        system applications; the default is to inclu
    de system apps)
                                     (<packages...> is the list of applications to b
    e backed up.  If
                                        the -all or -shared flags are passed, then t
    he package
                                        list is optional.  Applications explicitly g
    iven on the
                                        command line will be included even if -nosys
    tem would
                                        ordinarily cause them to be omitted.)
    
      adb restore <file>           - restore device contents from the <file> backup
    archive
    
      adb help                     - show this help message
      adb version                  - show version num
    
    scripting:
      adb wait-for-device          - block until device is online
      adb start-server             - ensure that there is a server running
      adb kill-server              - kill the server if it is running
      adb get-state                - prints: offline | bootloader | device
      adb get-serialno             - prints: <serial-number>
      adb status-window            - continuously print device status for a specifie
    d device
      adb remount                  - remounts the /system partition on the device re
    ad-write
      adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
    tloader or recovery program
      adb reboot-bootloader        - reboots the device into the bootloader
      adb root                     - restarts the adbd daemon with root permissions
      adb usb                      - restarts the adbd daemon listening on USB
      adb tcpip <port>             - restarts the adbd daemon listening on TCP on th
    e specified port
    networking:
      adb ppp <tty> [parameters]   - Run PPP over USB.
     Note: you should not automatically start a PPP connection.
     <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
     [parameters] - Eg. defaultroute debug dump local notty usepeerdns
    
    adb sync notes: adb sync [ <directory> ]
      <localdir> can be interpreted in several ways:
    
      - If <directory> is not specified, both /system and /data partitions will be u
    pdated.
    
      - If it is "system" or "data", only the corresponding partition
        is updated.
    
    environmental variables:
      ADB_TRACE                    - Print debug information. A comma separated list
     of the following values
                                     1 or all, adb, sockets, packets, rwx, usb, sync
    , sysdeps, transport, jdwp
      ANDROID_SERIAL               - The serial number to connect to. -s takes prior
    ity over this if given.
      ANDROID_LOG_TAGS             - When used with the logcat option, only these de
    bug tags are printed.
    Don't freak out everything will be explained

    4.Connect device and make sure that USB Debugging is enabled from Settings:Applications:Development(on GB)
    Settings:Developer Options(on ICS and HC)

    5.Write
    Code:
    adb devices
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    List of devices attached
    Device name

    6.There are common commands used on ADB:
    Code:
    adb reboot 
    adb reboot recovery
    adb reboot bootloader
    adb push C:\<directory>\file /sdcard/
    adb pull /sdcard/file C:\<directory>\
    adb install C:\<directory>/file.apk
                  or /sdcard/<directory>/file.apk
    adb remount
    Push and Pull means copy form directory to another

    ADB Shell for in device commands
    Code:
    adb shell
    #mv /sdcard/file /system/app
    #cp /sdcard/file /system/app
    #rm /sdcard/file 
    #mkdir /sdcard/yourfoldernamehere
    #ls /sdcard/<directory>

    Setting up fastboot: Your phone must be on bootloader
    Code:
    cd C:\SDK\platform-tools

    Commands List:
    Code:
    fastboot devices – lists which devices in fastboot mode are currently attached to your computer
    
    fastboot boot <filename> – boots a rom stored on your pc specified by the filename
    
    fastboot flash <partition> <filename> – flashes a rom stored on your pc, partition can be one of {boot, recovery, system, userdata}
    Example: fastboot flash recovery C:\<directory>\recovery.img

    PS: When i wrote <directory> it means like C:\Users\Desktop\Desktop\file
    Or you can put the file in the the platform-tools folder you created so
    write Ex:
    Code:
    adb push file.apk /sdcard/
    2
    you need to flash it when you are in bootloader using fastboot command:

    fastboot flash boot boot.img
    2
    I have been trying to do a factory reset of the Nabi 2, and since I can't seem to access the "Mommy Mode", I thought I could do it from the recovery menu. So far I have yet to find any factor reset option available. Is there such a beast or am I out of luck?

    This is not the Nabi 2 forum...
    And don't even know what the hell the "Mommy Mode" is, but with the command <adb reboot recovery> should bring you to the recovery.

    Sent from my Nexus 7 using xda app-developers app
    2
    Hello, i tried several ways found on internet....nothing worked for me on win 8.1 64 bit.... Any idea?
    If you follow the 3rd link on jmcclue's post, it might be work for you. My observation is the problem stem from fastboot itself because if it is the HTC drivers problem neither ADB nor Fastboot would be working. For Win 8.1 Pro x64 bit with the latest HTC driver installed, ADB commands work flawlessly, but fastboot wouldn't work even updated to Windows 2967917. So by changing to fastboot.reg according to the 3rd link on imcclue's post, fastboot commands are working on my PC (Win 8.1 Pro x64 bit) flawlessly. So far I have no problem on fastboot and adb. However, if your DS is equipped with 4ext recovery management, flashing either ROM or Hboot could be done by this app anyway.
    1
    Link to that guide will be helpful