雷电模拟器dnconsole命令汇总

雷电模拟器之文件操作

删除相册中的文件

ldconsole adb –index 0 –command “shell rm /sdcard/DCIM/1.png”

雷电模拟器应用操作

假设启动名为test1的模拟器, 以抖音为例 :

判断应用是否安装:

ldconsole adb –name test1 –command “shell pm list packages|grep com.ss.android.ugc.aweme”

启动应用:

ldconsole runapp –name test1 –packagename com.ss.android.ugc.aweme

退出应用:

ldconsole killapp –name test1 –packagename com.ss.android.ugc.aweme

查看应用版本:

ldconsole adb –name test1 –command “shell dumpsys package com.ss.android.ugc.aweme|grep versionName”

检测应用是否运行:

ldconsole adb –name test1 –command “shell pidof com.ss.android.ugc.aweme”

检测应用界面是否活动:

ldconsole adb –name test1 –command “shell dumpsys activity|grep mFocusedActivity|grep com.ss.android.ugc.aweme”

是否在Android桌面:

ldconsole adb –name test1 –command “shell dumpsys activity|grep mFocusedActivity|grep com.android.launcher”

 

雷电模拟器模拟操作

开启一个540*960分辨率的名为test1的模拟器:

上滑模拟:

ldconsole adb –name test1 –command “shell input swipe 270 700 270 200”

下滑模拟:

ldconsole adb –name test1 –command “shell input swipe 270 200 270 700”

左滑模拟:

ldconsole adb –name test1 –command “shell input swipe 270 480 0 480”

右滑模拟:

ldconsole adb –name test1 –command “shell input swipe 270 480 540 480”

点击模拟:

ldconsole adb –name test1 –command “shell input tap 495 475”

长按模拟:

ldconsole adb –name test1 –command “shell input swipe 270 480 270 480 800”

中文输入模拟:

ldconsole action –name test1 –key call.input –value “中文输入”

模拟按键:

ldconsole action –name test1 –key call.keyboard –value back

按键值可以是: back,home,menu,volumeup,volumedown

摇一摇:

ldconsole action –name test1 –key call.shake –value null

雷电模拟器截屏

假设有一个名为test1的模拟器正在运行,使用下面的命令可以进行截屏:

dnconsole adb –name test1 –command “shell /system/bin/screencap -p /sdcard/1.png”

则会在模拟器内部存储的根目录生成一个1.png的文件

雷电模拟器dnconsole命令汇总

再用pull命令将文件保存到本地:

dnconsole pull –name test1 –remote /sdcard/1.png –local d:\1.png

ldconsole adb –name test1 –command “pull /sdcard/1.png d:/1.png”

 

雷电模拟器控制命令

雷电模拟 器官网: 雷电安卓模拟器-手游模拟器安卓版_android手机模拟器电脑版_雷电模拟器官网

在模拟器安装目录下输入ldconsole,回车,看到以下命令用法:

dnplayer Command Line Management Interface

All rights reserved.

Usage:

dnconsole [parameter]

Commands :

quit

quitall

launch

reboot

list

runninglist

isrunning

list2

add [–name ]

copy [–name ] –from

remove

rename [–name ] –title

modify

[–resolution ]

[–cpu ]

[–memory ]

[–manufacturer asus]

[–model ASUS_Z00DUO]

[–pnumber 13800000000]

[–imei ]

[–imsi ]

[–simserial ]

[–androidid ]

[–mac ]

[–autorotate

[–lockwindow

installapp –filename

installapp –packagename

uninstallapp –packagename

runapp –packagename

killapp –packagename

locate –LLI

adb –command

setprop –key –value

getprop [–key ]

downcpu –rate

backup –file

restore –file

action –key –value

scan –file

sortWnd

zoomIn

zoomOut

pull –remote –local

push –remote –local

backupapp –packagename –file

restoreapp –packagename –file

globalsetting [–fps ] [–audio ] [–fastplay ] [–cleanmode ]

launchex –packagename

 

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/8792422ab6.html