zoukankan      html  css  js  c++  java
  • 常用的bat命令

    获取输入法
    adb shell settings get secure default_input_method
    修改输入法
    adb shell settings put secure default_input_method jp.jun_nama.test.utf7ime/.Utf7ImeService
    获取系统分辨率
    adb shell wm size
    获取系统密度
    adb shell wm density
    获取电池信息
    adb shell dumpsys batterty
    获取cpu信息
    adb shell dumpsys cpuinfo
    获取内存信息
    adb shell dumpsys meminfo

    adb shell ps | find "uiautomator"

    adb shell kill 进程号

    adb shell dumpsys activity | find "mFocusedActivity"  获取包名和activity名

    功能 命令 命令说明 备注
    获取CPU占用 adb   shell ->cat proc/cpuinfo        
             top -n 1                                          
    adb shell top -n 1 -m   1  
    获取RAM占用 adb shell cat   /proc/meminfo    
    获取GPU数据      
    关闭USB充电电流 adb   root 67754400
        adb remount
        adb shell
        cd sys/class/power_supply/battery
        echo 0 > charging_enabled
       
    打开USB充电电流 adb   root 67754400
        adb remount
        adb shell
        cd sys/class/power_supply/battery
        echo 1 > charging_enabled
       
    进入飞行模式 adb   root 67754400
        adb remount
        adb shell settings put global airplane_mode_on 1   
        am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true 
       
    关闭飞行模式 adb   root 67754400
        adb remount
        adb shell
        settings put global airplane_mode_on 0 am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false 
       
    自定义ADB通讯端口      
    获取版本信息 adb shell getprop   ro.phicomm.inner.version    
    抓取logcat信息 adb shell logcat -v time > E:loglogcat-%DD%-%TT%.log    
    抓取kerbel log adb shell cat proc/kmsg >   E:logkernel-%DD%-%TT%.log    
    抓取radio log adb logcat -b radio   -v time > E:log adio%DD%-%TT%.log    
    抓取dumpsys adb shell dumpsys   > E:logDumpsys%DD%-%TT%.log    
    抓取   memoinfo  adb shell memoinfo   > E:logmemoinfo%DD%-%TT%.log    
    截图 adb shell   ./system/bin/screencap -p /data/data/demo.png    
    查看电量信息 dumpsys battery    
    卸载已经安装的应用adb   uninstall [-k] <package>。   其中package表示需要卸载的应用的包的名字,k表示是否保留应用的配置信息和cache数据。  
    创建SDCard mksdcard   1024M ~/名称.img
       
       
    安装应用程序 adb   install -r 应用程序.apk
       
       
    显示系统中全部Android平台:  android list targets    
    启动Activity adb   shell am start -n 包名/包名+类名(-n 类名,-a action,-d date,-m MIME-TYPE,-c   category,-e 扩展数据,等)。
       
       
    获取设备的ID和序列号 adb   get-product
        adb get-serialno
       
  • 相关阅读:
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
    Data Structure and Algorithm
  • 原文地址:https://www.cnblogs.com/dreamy890322/p/5972739.html
Copyright © 2011-2022 走看看