adb shell命令

1、logcat:

遇到报错信息:

logcat: Unexpected EOF!

This means that either the device shut down, logd crashed, or this instance of logcat was unable to read log
messages as quickly as they were being produced.

If you have enabled significant logging, look into using the -G option to increase log buffer sizes.

查看一下logcat缓冲区大小:

D:\work\test\log>adb shell logcat -g
main: ring buffer is 256 KiB (3 MiB consumed), max entry is 5120 B, max payload is 4068 B
system: ring buffer is 256 KiB (251 KiB consumed), max entry is 5120 B, max payload is 4068 B
crash: ring buffer is 256 KiB (15 KiB consumed), max entry is 5120 B, max payload is 4068 B
kernel: ring buffer is 256 KiB (245 KiB consumed), max entry is 5120 B, max payload is 4068 B

先修改为5MB大小试试:

D:\work\test\log>adb shell logcat -G  5M

D:\work\test\log>adb shell logcat -g
main: ring buffer is 5 MiB (4 MiB consumed), max entry is 5120 B, max payload is 4068 B
system: ring buffer is 5 MiB (238 KiB consumed), max entry is 5120 B, max payload is 4068 B
crash: ring buffer is 5 MiB (15 KiB consumed), max entry is 5120 B, max payload is 4068 B
kernel: ring buffer is 5 MiB (239 KiB consumed), max entry is 5120 B, max payload is 4068 B

2、设置Android系统的时间(用win10系统验证)。

先设置年月日

adb shell date  %date:~0,4%-%date:~5,2%-%date:~8,2% set

在设置时分秒

adb shell date %time:~0,2%:%time:~3,2%:%time:~6,2% set

验证:

D:\>adb shell date
Sat Nov 27 12:41:25 GMT 2021

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值