Android/adb

This WIKI has been created for non-rooted devices, for rooted devices please create another wiki OR add a rooted section at bottom

About ADB
ADB stands for Android Debug Bridge, and it is a part of the Android Software Development Kit (SDK). It can be installed with

Install ADB & Fastboot
Fastboot will get installed under same package as adb

Install :

Enable USB debugging
Enable the USB Debugging option under Settings > Developer options.

For Android 4.2 and newer, Developer options is hidden by default; use the following stepsː ̽
 * 1) On the device, go to Settings > About.
 * 2) Tap the Build number seven times to make Settings > Developer options available enable.
 * 3) Go back to system settings and scroll down to bottom > Developer Options
 * 4) Now hit Enable USB-Debugging

Tips: You might also want to enable the Stay awake option, to prevent Device from sleeping while plugged into the USB port.

Detect devices
If your device is listed then you can connect to your android devices shell (first time you must accept authorized request on your device when you typing below command)

If you want to run adb without root privileges then you must add your user in to plugdev group:

Multiple devices connected
If you have multiple devices connected to your PC then you must use -s for specify which device otherwise you will see a message similar toː

error: more than one device/emulator

Set TCP port
If you prefer to use adb over a WiFi connection instead of using the cable you can type below command with the USB plugged in first timeː

Print IP address
To get your IP of your connected android device you can typeː

Connect
Now you should be able to connect to your deviceː

Now control your device as usual via adb.

Kill ADB deamon
Sometimes it might be necessary to kill adb if you your device will not be shown after you have connected the device if it's already running before you connecting the device, then just start the daemon again after you killed adb daemon.

Push all files in a folder
Files from myfolder will be transferred into storage/on/device Notice the trial slash

Pull all files in a folder
Notice the trial slash

Exampleː Print IMEI via a call service
Convert the output to a readable formatː

Uninstall a package
Exampleː

Tips For uninstall several packages at once you must do it in a loop

Dumpsys
A tool that runs on Android devices and provides information about system services. To get a diagnostic output for all system services for your connected device, simply run adb shell dumpsys. However, this outputs far more information than you would typically want. For more manageable output, specify the service you want to examine by including it in the command.

List options
If above command does not work then you can useː

HTC backup
With a non rooted device, the only things you can backup locally is what the couple device/android will let you do. That is pretty much the same files you can copy with the already mentioned software. With the Android 4.x devices, a nice solution to make such a partial backup is the so-called "adb backup".

where:


 * -f : the path of the *.ab file that will be saved on your computer. This file is a compressed file that contains an archive of the data/apks from your device.
 * -apk|-noapk : indicates if the *.apk files should be backed up (default is -noapk)
 * -shared|-noshared: enable/disable backup of the device's shared storage / SD card contents (default is -noshared)
 * -all : indicates that you want the entire system backed up. you can use the packages filter to just backup specific packages, or use -all for a full system backup.
 * -system|-nosystem: indicates if all the system applications and data are included when backing up. (default is -system)
 * : this is where you can list specific packages to backup. Use these if you want to back up only specific applications. If using -all, you do not need to specify packages.

To backup the phone into

will start the daemon and show you the devices on the USB.

will backup every thing the device will let you to backup.

will restore the backup into the device.

To stop the daemon: