Last active
July 23, 2017 05:38
-
-
Save michaellee8/72fce42784bc6b18de42d6724a9826da to your computer and use it in GitHub Desktop.
Fast android file transfer between devices/phones/tablets using adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mini bash script to quickly copy files between android devices using adb | |
# dependencies : depends on adb, install first by sudo apt install adb | |
# $1 : serialno of source device | |
# $2 : serialno of destination device | |
# $3 : parent directory of file/dir to be copied | |
# $4 : name of file/dit to be copied | |
# example : bash android-file-transfer <device-sn-source> <device-sn-destination> /sdcard/ DCIM | |
# remarks : if it shows the devices is currently offline, set the device's USB mode to MTP | |
# remarks : to get serialno of connected devices, used adb devices -l | |
# remarks : uses USB 3.0 port if aviliable | |
adb -s $1 pull $3$4 ./android-file-trans-tmp && adb -s $2 push ./android-file-trans-tmp/$4 $3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment