ADB Commands Cheat Sheet



CHEAT SHEET
*Check if device is recognized by adb
adb devices

*Kill/Restart (sometimes helps with connection issues)
adb kill-server

  • after hitting enter type in any command to make it restart ADB


*Un/Install APKS
adb install APKNAME.apk


adb uninstall APKNAME.apk


adb install -r APKNAME.apk


adb uninstall -r APKNAME.apk


for %f in (C:\your_app_path\*.apk): adb install "%f"

  • to install a TON of apks at once


*Log Grab - ensure device is hooked up and recognized by adb
adb logcat -v long > XX.txt

  • this is creates longform logs, each new log entry creates a new line
  • to kill the log, hit CTRL+C or unplug device

*Record Screen - this does not record audio, can record both orientations but try to stick to one during length of recording. Otherwise recording is cut off
adb shell screenrecord /sdcard/XXXX.mp4

  • basic, low-res
  • to kill capture, hit CTRL+C or unplug device
  • screen captures are saved on the device - open up the device in file explorer to view it

adb shell screenrecord --bit-rate 100000000 /sdcard/XXXX.mp4

  • super hi-res, looks pretty, not much heftier than basic screen capture
  • to kill capture, hit CTRL+C or unplug device
  • screen captures are saved on the device - open up the device in file explorer to view it

*List Packages on Device
adb shell 
cd /system/vendor/app
ls *.apk

  • OR

ls -l


adb shell pm list packages


*Set Date/Time
adb shell date -s 20150709.000000

  •  20150709 – fill in date

Hacky Ways to check where app is installed & how to remove system apps

List all packages installed: pm list packages -f'

Get Full path: 

adb shell pm path com.example.someapp
 
  • mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
  • rm /system/app/your_app
  • rm /data/data/your_app
  • remove any entries in /data/system/packages.xml
  • remove any entries in /data/system/packages.list
  • edit AndroidManifest.xml and get rid of android:sharedUserId="android.uid.shared"

 

  •  000000 – hour(00) minute (00) second (00)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值