Monkey
adb? shell monkey -v 10 執(zhí)行monkey測試10次
adb?shell?monkey?-p 用此參數(shù)指定一個或多個包
adb?shell?monkey?100?>c:/log/b.txt? 將log信息寫到文檔中
adb?shell?monkey?-p?com.example.login?--throttle?300?100? 表示執(zhí)行100個偽隨機(jī)用戶事件流,事件間隔為300毫秒
--pct-touch? 觸摸事件
adb shell monkey -f? 后接測試腳本名
adb shell monkey -s? 隨機(jī)運(yùn)行
adb shell monkey --throttle??固定時間間隔
linux命令:
shutdown -h now 關(guān)閉系統(tǒng)
init 0 關(guān)閉系統(tǒng)
telinit 0 關(guān)閉系統(tǒng)
shutdown -h hours:minutes & 按預(yù)定時間關(guān)閉系統(tǒng)?
shutdown -c 取消按預(yù)定時間關(guān)閉系統(tǒng)?
shutdown -r now 重啟
reboot 重啟
logout 注銷?
文件和目錄?
cd /home 進(jìn)入 '/ home' 目錄'?
cd .. 返回上一級目錄?
cd ../.. 返回上兩級目錄?
cd 進(jìn)入個人的主目錄?
cd ~user1 進(jìn)入個人的主目錄?
cd - 返回上次所在的目錄?
pwd 顯示工作路徑?
ls 查看目錄中的文件?
ls -F 查看目錄中的文件?
ls -l 顯示文件和目錄的詳細(xì)資料?
ls -a 顯示隱藏文件?
ls *[0-9]* 顯示包含數(shù)字的文件名和目錄名?
tree 顯示文件和目錄由根目錄開始的樹形結(jié)構(gòu)
lstree 顯示文件和目錄由根目錄開始的樹形結(jié)構(gòu)
mkdir dir1 創(chuàng)建一個叫做 'dir1' 的目錄'?
mkdir dir1 dir2 同時創(chuàng)建兩個目錄?
mkdir -p /tmp/dir1/dir2 創(chuàng)建一個目錄樹?
rm -f file1 刪除一個叫做 'file1' 的文件'?
rmdir dir1 刪除一個叫做 'dir1' 的目錄'?
rm -rf dir1 刪除一個叫做 'dir1' 的目錄并同時刪除其內(nèi)容?
rm -rf dir1 dir2 同時刪除兩個目錄及它們的內(nèi)容?
mv dir1 new_dir 重命名/移動 一個目錄?
cp file1 file2 復(fù)制一個文件?
cp dir/* . 復(fù)制一個目錄下的所有文件到當(dāng)前工作目錄?
cp -a /tmp/dir1 . 復(fù)制一個目錄到當(dāng)前工作目錄?
cp -a dir1 dir2 復(fù)制一個目錄?
cp -r?dir1 dir2 復(fù)制一個目錄及子目錄
ln -s file1 lnk1 創(chuàng)建一個指向文件或目錄的軟鏈接?
ln file1 lnk1 創(chuàng)建一個指向文件或目錄的物理鏈接?
touch -t 0712250000 file1 修改一個文件或目錄的時間戳 - (YYMMDDhhmm)?
file file1 outputs the mime type of the file as text?
iconv -l 列出已知的編碼?
Adb命令:
adb root? 獲取 root 權(quán)限。
adb sideload
adb shell ps 打印進(jìn)程狀態(tài)。
adb shell top 展現(xiàn)上層 CPU 進(jìn)程信息。
adb shell getprop 獲取 Android 系統(tǒng)服務(wù)屬性
adb shell setprop 設(shè)置服務(wù)屬性。
adb shell dumpsys? 獲取系統(tǒng)數(shù)據(jù)。
adb logcat? 打印日志文件
adb shell ip? 主要用于顯示一些數(shù)據(jù)
adb shell netstat 主要用于網(wǎng)絡(luò)統(tǒng)計。
adb shell ping 沒啥好說的,和 PC 的 ping 命令一樣的。
adb shell netcfg 通過配置文件配置和管理網(wǎng)絡(luò)連接。
adb shell cp 字面意思,很好理解,復(fù)制。
adb shell pwd 定位當(dāng)前的操作位置
adb shell mv 移動或者更名文件
adb shell mkdir 創(chuàng)建一個文件夾
adb shell rm 刪除文件或者目錄
adb shell ls 列出目錄內(nèi)容。
adb shell pm clear 清除應(yīng)用緩存。
adb shell pm path 打印 apk 的路徑。
adb usb 設(shè)置設(shè)備以 USB 形式連接 PC
adb kill-server 終止 adb 進(jìn)程。
adb forward 端口映射,將 PC 端的某端口數(shù)據(jù)重定向到手機(jī)端的一個端口。
adb devices 主要是用于打印當(dāng)前連接的所有模擬器或者設(shè)備。