51Testing软件测试论坛

标题: adb 常见命令 [打印本页]

作者: qingzhi    时间: 2019-1-8 16:23
本主题需向作者支付 1 测试积点 才能浏览
作者: k974826180    时间: 2019-3-14 14:56
看看
作者: qingzhi    时间: 2019-10-10 14:16
杀掉应用:adb shell pm clear org.codeaurora.gallery  
作者: qingzhi    时间: 2019-10-10 14:18
@echo off
adb root
adb wait-for-device
set num=1
:memu
if exist androidLog%num% (
set /a num+=1
goto memu
) else (
md androidLog%num%
)

start cmd /C "adb logcat -G 256M"
start cmd /C "adb logcat -v threadtime -b radio>androidLog%num%/radiologs.txt"
start cmd /C "adb logcat -v time -b events>androidLog%num%/events.txt"
start cmd /C "adb logcat -v time -b system>androidLog%num%/system.txt"
start cmd /C "adb logcat -v time -b kernel>androidLog%num%/kmd_log.txt"
start cmd /C "adb logcat -v time >androidLog%num%/main.txt"  
start cmd /c "adb shell cat /proc/kmsg >androidLog%num%\dmesg.txt"
start cmd /c "adb shell top -t -t 1 >androidLog%num%\threads.txt"
start cmd /c "adb logcat -v threadtime >androidLog%num%\logcat.txt"
start cmd /c "adb shell top  >androidLog%num%\top.txt"
start cmd /c "adb shell dumpstate -h  >androidLog%num%\dumpstate.txt"
start cmd /c "adb shell dumpsys SurfaceFlinger >androidLog%num%\surfaceflinger.txt"
start cmd /c "adb pull /data/anr/ androidLog%num%\"
start cmd /c "adb pull /data/tombstones/ androidLog%num%\"
start cmd /c "adb shell rm -rf /data/anr/"
start cmd /c "adb shell rm -rf /data/tombstones/"
作者: qingzhi    时间: 2019-10-22 12:50
将内容写入文件的命令:
1.8K,setup:
adb shell "echo advanceFeatureMask=0x40 >> /vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo exposeFullSizeForQCFA=TRUE >> /vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo enableResourceManager=TRUE >> /vendor/etc/camera/camxoverridesettings.txt"
2.qcfa setup:
exposeFullSizeForQCFA=TRUE
enableResourceManager=TRUE

3.HEIF:
enableNativeHEIF=TRUE
adb shell "echo enableNativeHEIF=TRUE>> /vendor/etc/camera/camxoverridesettings.txt"
4.disable LLS:
disableLowLightCapture=FALSE
adb shell "echo disableLowLightCapture=FALSE >> /vendor/etc/camera/camxoverridesettings.txt"

作者: dazhi123    时间: 2019-10-30 14:42
11
作者: qingzhi    时间: 2020-5-15 09:36
新建,文件夹:
adb root
adb remoun
adb shell mkdir   vendor/etc/camera   指的是在vendor/etc 路径下创建一个文件夹camera

查看文件内容
adb root
adb remoun
adb shell cat   vendor/etc/camera/1.txt   指的是查看文件1.txt 的内容,路径是在vendor/etc/camera


作者: qingzhi    时间: 2020-5-15 09:45
批量安装apk命令:
@ECHO OFF
adb devices
adb devices
echo please input Device id:
set /p devid=""
pushd %~dp0

FOR %%i IN (*.apk) DO (   
    ECHO installing: %%i  
    adb -s %devid% install -r "%%i"  
    )  
popd

pause
作者: qingzhi    时间: 2021-7-16 14:31
@ECHO off  

@REM LOOP_LABEL  

OOP  

ECHO Please insert device…  

adb wait-for-device  

@REM loop install this link APK file  

FOR %%i IN (*.apk) DO (   

    ECHO installing:%%i  

    adb install "%%i"  

    )  

ECHO install done,please change next device!

PAUSE  

GOTO LOOP  

@ECHO on




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2