2015/10/30

Android ADB常見操作 

//重新啟動裝置
adb reboot

//顯示連接裝置
adb devices


//連線到裝置
adb shell

//啟動adb server
adb start-server

//關閉adb server
adb kill-server

//將檔案從本機複製到裝置
adb push local_path remote_path

//將檔案從裝置複製到本機
//-p顯示傳輸過
adb pull remote_path local_path

//get adb version
adb version

//取得裝置狀態
adb get-state


//複製資料庫
adb shell 
'run-as com.YouPackage cat /data/data/com.YouPackage/databases/database.name > target_path'