zoukankan      html  css  js  c++  java
  • android玩耍(-) adbshell安装

    一 什么是adbshell

    1 http://adbshell.com/
    1 Android Debug Bridge (adb) is a command line tool that lets you communicate with an emulator or connected Android device. 

      adb 是一个帮你与andriod模拟器或真机通信的CLI工具. adbshell 就是集成了adb工具包的shell接口.shell是什么就不啰嗦了.直接上干货 .

    二 adbshell 安装

      手机端:打开use调试模式,4.x版本以后多次单击版本号,触发隐藏选项,单选usb debugging,允许usb debug. usb连接电脑允许电脑端调试,电脑指纹识别确认.

      电脑端:安装usb驱动.

    http://adbshell.com/downloads

    安装完在devmgmt.msc 能识别设备.

    安装adbshell

    http://files.cnblogs.com/files/liuyuxing/adb.zip

    加入到环境变量.cmd进入.

    如此,则恭喜你已经通过adbshell 连接到手机了

    三 练手命令

    打开cmd

    adb devices 列出连接设备

    adb kill-server 干掉adb进程

    adb forward 12223 75360 设置adb 通信端口本地12223 对端75360

    adb usb 重启端口,等于断开usb重连

    adb tcpip xxx 通过ip地址连接

    adb install xxx.apk  安装xxx.apk -t 允许调试 -s 安装在sdcard -d 允许降级

    adb unistall xxx.apk 卸载  -k 保留文件

    shell >pm list packages 列出所有已安装包 可以用管道符

      pm path com.mt.mtxx.mtxx  列出美图秀秀的安装路径

      pm clear com.mt.mtxx.mtxx  清除美图的data

      pull 下载数据

      push 上传数据

      ls /rm /mkdir /touch /cp /mv /pwd /cd 跟bashshell 类似

      netstat /ip/ netcfg 类似bsh

      logcat  打印log ,

      ***貌似只能发送ctrl-c 的quit signal退出

      dumpsys   //dumpsys battery 查看电池信息

      dumpsys meminfo

      dumpsys data

      dumpsys dumpsys activity

      dumpsys gfxinfo com.mt.mtxx.mtxx  查看美图信息

      screencap /sdcard/screen.png  屏幕截图

      screenrecord --size <WIDTHxHEIGHT>  录屏 

      adb root  以root权限进入adb

      adb sideload <update.zip> 系统更新

      ps /top /

      getprop | grep adb  查看adb属性设置

      setprop service.adb.tcp.port 5555  设置adb端口号

    四 .应用场景

      模拟向手机发送home 按键,破解密码, 打印log进行调试等等.本人没有具体应用过,这里就不丢丑了.

    本站博客皆为原创,转载请标明出处.小三爷在此谢过了~~!

  • 相关阅读:
    给python脚本传递命令行参数
    python.exe和pythonw.exe的区别(区分.py、.pyw、.pyc文件)
    python包管理器pip
    python从新手到安装指南
    python基础知识
    使用Lua做为MMOARPG游戏逻辑开发脚本的一点体会
    游戏中各音效的音量默认值
    Unity Editor自定义菜单排序(MenuItem Order)
    没有安装vs通过Rider编译Dll
    MyBatis-Plus 代码生成器
  • 原文地址:https://www.cnblogs.com/liuyuxing/p/5023327.html
Copyright © 2011-2022 走看看