n3mo
n3mo

Reputation: 761

Set no-touch option to Chrome OS emulator

Good morning. I need to test my application in Chrome OS, but without the "touch screen"

I used this guide to run a emulation of Chrome OS:

https://www.groovypost.com/howto/chrome-os-android-studio/

Ok, I succeeded to run it, I activated the debugging mode and I activated the adb debugging....finally everything is working and I can run my application on it.

The problem is, I want to test it without touchscreen.

I found the hw.screen property inside

~/.android/avd/<machine-name>.avd/hardware-qemu.ini

that was set to hw.screen = multi-touch.

WOW, exactly what I want, let's change it to no-touch. Inside ~/Android/Sdk/emulator/lib/hardware-properties.ini you can see

# Touch screen type
name        = hw.screen
type        = string
enum        = touch, multi-touch, no-touch
default     = multi-touch
abstract    = Touch screen type
description = Defines type of the screen.

so, no-touch is a valid option.

The problem is, even if I change it, every time I restart the emulator, it is set back to multi-touch. I also tried to change the option directly in ~/Android/Sdk/emulator/lib/hardware-properties.ini, that should contain the default option, but no luck...

Someone can tell me who is overwriting this property each time I start the emulation?

How can I remove the touch screen in the emulation?

Upvotes: 1

Views: 158

Answers (1)

Tim Kist
Tim Kist

Reputation: 1182

Launch the emulator from the command line and use the flag -screen no-touch. This is because the emulator overrides the config in the .ini file. That gives no touch screen but the mouse wasn't usable, at least on Windows.

See the docs for more details

Upvotes: 1

Related Questions