安卓shell命令


Adb shell進入目標設備的Linux Shell環境

$ ps 列出所有進程

$ ps|grep xxx 刷選xxx相關進程

殺死進程

    kill -s 9 PID

    Kill -9 PID @link

 

Kill進程

重新掛載:

    mount -o remount,rw rootfs /system/

復制/刪除:

復制 cp /system/xbin/sudo /system/xbin/su 格式:cp 源文件 目標文件

刪除 rm -f /system/xbin/su 或 rm /system/xbin/su

S1、刪除文件夾以及文件夾中的所有文件命令:

rm -rf 目錄名字

其中:

-r:向下遞歸刪除

-f:直接強行刪除,且沒有任何提示

S2、刪除文件命令

rm -f 文件名

將會強行刪除文件,且無提示@link

移動 mv /sbin/su /sbin/aa @link

mv /system/xbin/daemonsu /system/xbin/usonmead

cp /system/xbin/usonmead /system/xbin/daemonsu

 

Am/pm:

    am kill com.kingroot.RushRoot @link link2

    pm uninstall com.kingroot.RushRoot 卸載

    pm install –f filePath 安裝

    pm uninstall eu.chainfire.supersu @link

    pm block com.xxx.xxx(包名) 凍結  ← 適用於 Android 4.4.x

pm hide  com.xxx.xxx(包名) 隱藏  ← 適用於 Android 5.0 以上版本

權限/屬性:

表達式 chmod 權限 目標文件

例子:

chmod 0777 /system/bin/.ext

chmod 06755 /system/bin/.ext/.su

chmod 06755 /system/xbin/su

chmod 0755 /system/xbin/daemonsu

chmod 0755 /system/etc/install-recovery.sh

chmod 0755 /system/etc/init.d/99SuperSUDaemon

chmod 0644 /system/etc/.installed_su_daemon

chmod 0644 /system/app/Superuser.apk

打印:

    echo "\"It is a test\"" @link

參考:

    Linux中shell文件操作大全

    adb shell中的am pm命令 AM/PM命令

    Android執行shell命令詳解

    android: shell 命令


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM