Closed ebspeter closed 6 years ago
I suppose this is a androix-86
emulator running in VirtualBox. As I can see from getevent -l
, there is no Linux device file representing the "touchscreen", I am afraid this emulator might not be supported. You can probably try GenyMotion or the original Android emulator.
That was the quickest reply ever on Github!
I didn't notice that, but the inputs are there:
F:\www\docker\android\win32>adb shell input
Usage: input [<source>] <command> [<arg>...]
The sources are:
trackball
joystick
touchnavigation
mouse
keyboard
gamepad
touchpad
dpad
stylus
touchscreen
The commands and default sources are:
text <string> (Default: touchscreen)
keyevent [--longpress] <key code number or name> ... (Default: keyboard)
tap <x> <y> (Default: touchscreen)
swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll <dx> <dy> (Default: trackball)
EDIT: I realized that is the options for the command and not the device, but tap works fine:
F:\www\docker\android\win32>adb shell input tap 400 530 //Clicks Home
I will try another emulator, what do you mean by "the original Android emulator"?
Do you have any advice on running emulators on Docker? I am trying to automate using an app from Google play.
Thanks!
I credit slack, which pushes this issue to me and I happen to be with my keyboard. "The original Android emulator" means the one shipped with Android SDK. Best compatibility, though being a bit inefficient (memory hungry) and lack of some features. We have a small server running such emulators plus real devices connected though WiFI/USB. We use the "farm" to test many APKs concurrently. I coded up a tiny scripts to manage them: https://github.com/appetizerio/haem 'running emulators on Docker' you mean dockerized Android emulators?
Yes,
I've got one of these up and running: https://github.com/softsam/docker-android-emulator but can only view (VNC inputs not supported) and no playstore installed. Was thinking if maybe you had some advice.
I have also been thinking to install a new VM with the full Android SDK and run multiple emulators on that.
Cool, i just watched the video this morning. I have a dedicated 4core/16Gb to play with, not sure if it's enough though.
The device is actually /dev/input/event3, maybe you could expose an optional argument to pass the device address into appetizer trace.
example:
appetizer trace record --device 192.168.1.6:5555 --touchscreen /dev/input/event3 mytrace.trace
...
add device 8: /dev/input/event3
name: "VirtualBox USB Tablet"
...
Mouse click:
adb shell -l
/dev/input/event3: EV_ABS ABS_X 00007cff
/dev/input/event3: EV_ABS ABS_Y 00007a81
/dev/input/event3: EV_SYN SYN_REPORT 00000000
/dev/input/event3: EV_MSC MSC_SCAN 00090001
/dev/input/event3: EV_KEY BTN_LEFT DOWN
/dev/input/event3: EV_SYN SYN_REPORT 00000000
/dev/input/event3: EV_MSC MSC_SCAN 00090001
/dev/input/event3: EV_KEY BTN_LEFT UP
Will do in the next version. The detection part is kinda tricky, many OEM customizations. Some have dual device files to confuse... 16G should be enough for 3-5 emulators.
--touchscreen
option is added since 00efa1981daf19b4f0041e05f9e1fd85a66d93dc
Hi,
Getting the error on running the trace command.
OS: Windows 8.1 adb in C:\adb\platform-tools