Hi, I have question about testing or controlling Android app on a real cell phone. How would you test "user interaction" of Android app, that you didn't build and don't have access to code? Eg. Calculator app. As user, you would press on screen, 2 + 3 = and you get 5 on the screen. So, how would you duplicate this user interaction, without actually pressing the screen buttons? What *keywords* should I search online? On Windows, there is TeamViewer that you can click and type remotely. I did use it manually, but never via scripts or macros. On Linux, there is VNC macro which duplicates key press and mouse click. I did use it, long long ago.
For Linux, you might be able to use hidclient to emulate a Bluetooth keyboard and mouse, then pair it with your phone. If you wanted to automate things, there's a -f switch that will read data from a FIFO. Note: I found this using a web search for "linux bluetooth mouse emulator". I haven't tried it myself. Also the code is 5 years old. I don't know if it will compile and run properly on recent versions of Linux. https://github.com/4ndrej/hidclient -- Scott
I was looking for USB method, but Bluetooth may be another method. Bookmarked. Thanks. On my Samsung A16, if I plug in keyboard/mouse, they work automagically. I guess what I'm looking for is opposite of "KDE Connect". It has to be installed on both end. This allows your cell phone to be used as "remote control" for your computer. You type and slide on your phone screen, and typing and mouse moving will happen on your computer. Of course, it can do more, like moving files back and forth, etc. On 2025-10-17 07:03, Scott Allen wrote:
For Linux, you might be able to use hidclient to emulate a Bluetooth keyboard and mouse, then pair it with your phone. If you wanted to automate things, there's a -f switch that will read data from a FIFO.
Note: I found this using a web search for "linux bluetooth mouse emulator". I haven't tried it myself. Also the code is 5 years old. I don't know if it will compile and run properly on recent versions of Linux.
Not sure if it will help but I use scrcpy to interface with my phone from my computer. It has a bunch of features to manage the mouse and keyboard interfaces and some of them may do what you want. On 2025-10-17 17:08, William Park via Talk wrote:
I was looking for USB method, but Bluetooth may be another method. Bookmarked. Thanks.
On my Samsung A16, if I plug in keyboard/mouse, they work automagically.
I guess what I'm looking for is opposite of "KDE Connect". It has to be installed on both end. This allows your cell phone to be used as "remote control" for your computer. You type and slide on your phone screen, and typing and mouse moving will happen on your computer. Of course, it can do more, like moving files back and forth, etc.
On 2025-10-17 07:03, Scott Allen wrote:
For Linux, you might be able to use hidclient to emulate a Bluetooth keyboard and mouse, then pair it with your phone. If you wanted to automate things, there's a -f switch that will read data from a FIFO.
Note: I found this using a web search for "linux bluetooth mouse emulator". I haven't tried it myself. Also the code is 5 years old. I don't know if it will compile and run properly on recent versions of Linux.
------------------------------------ Description: GTALUG Talk Unsubscribe via Talk-unsubscribe@lists.gtalug.org Start a new thread: talk@lists.gtalug.org This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/6IYCJR4...
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || home: (905)513-7688 alvin@netvel.net ||
Yes, I got the link from KWLUG. It works via USB for manual key/mouse. For scripting, I need to read more on ADB. ScrCpy seems to be GUI front-end, sitting on top of ADB engine. On 2025-10-17 17:24, Alvin Starr via Talk wrote:
Not sure if it will help but I use scrcpy to interface with my phone from my computer. It has a bunch of features to manage the mouse and keyboard interfaces and some of them may do what you want.
On 2025-10-17 17:08, William Park via Talk wrote:
I was looking for USB method, but Bluetooth may be another method. Bookmarked. Thanks.
On my Samsung A16, if I plug in keyboard/mouse, they work automagically.
I guess what I'm looking for is opposite of "KDE Connect". It has to be installed on both end. This allows your cell phone to be used as "remote control" for your computer. You type and slide on your phone screen, and typing and mouse moving will happen on your computer. Of course, it can do more, like moving files back and forth, etc.
On 2025-10-17 07:03, Scott Allen wrote:
For Linux, you might be able to use hidclient to emulate a Bluetooth keyboard and mouse, then pair it with your phone. If you wanted to automate things, there's a -f switch that will read data from a FIFO.
Note: I found this using a web search for "linux bluetooth mouse emulator". I haven't tried it myself. Also the code is 5 years old. I don't know if it will compile and run properly on recent versions of Linux.
------------------------------------ Description: GTALUG Talk Unsubscribe via Talk-unsubscribe@lists.gtalug.org Start a new thread: talk@lists.gtalug.org This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/6IYCJR4...
On Fri, 17 Oct 2025 at 17:08, William Park via Talk <talk@lists.gtalug.org> wrote:
I was looking for USB method
A Raspberry Pi Zero (and likely other RPis) can emulate a USB keyboard and mouse. Once created, you could control them via their device "files". Here's a starting point: https://stackoverflow.com/questions/70637114/cannot-get-a-rpi-zero-to-emulat... -- Scott
Bookmarked. Thanks. If ADB allows me to send key press (maybe mouse), then I can reduce clutter on my desk. On 2025-10-17 18:01, Scott Allen wrote:
On Fri, 17 Oct 2025 at 17:08, William Park via Talk <talk@lists.gtalug.org> wrote:
I was looking for USB method A Raspberry Pi Zero (and likely other RPis) can emulate a USB keyboard and mouse. Once created, you could control them via their device "files".
Here's a starting point: https://stackoverflow.com/questions/70637114/cannot-get-a-rpi-zero-to-emulat...
Finally, I can now fully automate testing of Android app, using *ADB* and *scrcpy* over network. I think this is better solution than keyboard/mouse emulation over USB or Bluetooth, at least for Android. See https://opengeometry.github.io/NOTES/android/ Feedbacks are welcome. -- William Park On 2025-10-17 18:31, William Park via Talk wrote:
Bookmarked. Thanks. If ADB allows me to send key press (maybe mouse), then I can reduce clutter on my desk.
On 2025-10-17 18:01, Scott Allen wrote:
On Fri, 17 Oct 2025 at 17:08, William Park via Talk <talk@lists.gtalug.org> wrote:
I was looking for USB method A Raspberry Pi Zero (and likely other RPis) can emulate a USB keyboard and mouse. Once created, you could control them via their device "files".
Here's a starting point: https://stackoverflow.com/questions/70637114/cannot-get-a-rpi-zero-to-emulat...
------------------------------------ Description: GTALUG Talk Unsubscribe via Talk-unsubscribe@lists.gtalug.org Start a new thread: talk@lists.gtalug.org This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/WMGZI5O...
participants (3)
-
Alvin Starr -
Scott Allen -
William Park