android
Last updated
adb devices
adb -s 192.168.88.39:42745 ls / # `-s` if more than one device/emulator
global options:
-e use TCP/IP device (error if multiple TCP/IP devices available)
-s SERIAL use device with given serial (overrides $ANDROID_SERIAL)
-t ID use device with given transport id[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 # powershell pipe中文乱码fix
$remote = "/sdcard/Download"
$remote = "/sdcard/DCIM/Camera"
$remote = "/sdcard/DCIM/Screenshots"
adb shell ls -lhS $remote
adb shell "du -d 1 $remote/ | sort -rn"
# Download
adb pull -a $remote # -a: preserve file timestamp and mode; sub-folders
adb shell ls $remote/*.* | %{ adb pull -a "$_"} # powershell , w/ speed
# Delete
Get-ChildItem -Path . -File | %{ adb shell "ls -l '$remote/$_'" } # s/ls/rm/
# Upload
adb push --sync newer.file $remote/ # file
adb push . $remote/NewFolder # folderadb shell dumpsys meminfo # http://i.imgur.com/DKsJ1Cb.png
adb shell getprop ro.build.ab_update # check if dual boot partitionapt install fastboot
fastboot devices
fastboot flash recovery twrp.img
fastboot reboot # hold [Vol-Up]