Wednesday, September 28, 2016

transfer data between android and liinux using adb and usb debugging

1- on linux install adb Android Debug Bridge
$ sudo apt-get install adb

2- on android, go to developer options and check on "USB debugging"
if using samsung s5, click on ""Build number."" in "about device" seven times in order to make "developer options" appear in the menu

3- on linux start adb
$ sudo adb devices -l

4- on android will ask you authorize key from linux, so accept it

5- now we can use command push and pull to transfer data between linux and android

- list root directory
$ adb shell ls / 

- copy data from folder /data to current directory on the linux
$ adb pull /data

- send data file1 to folder /data on android
$ adb push file1 /data


No comments:

Post a Comment