Simulate keypress on Android


I could'nt find anything on Google about simulating keypress on Android while it is booting up. Arduino should enter the Android Recovery Menu, go to Wipe Factory Reset and than reboot. Has anybody an idea how to do that?


Try plugging in a USB-keyboard/mouse using a USB-host cable on the device.

If you can control the device that way, you can use an Arduino Leonardo or similar using the Atmega32U4-chip which is capable of emulating keyboard and mouse for you.

// Per.

You mean I should connect a Keyboard on an Android Device? But to go into the Recovery Menu on an Android Device you have to hold a Key combination like Volume Down + Home Button + Power Button during the Device is switched off. A Keyboard / Mouse couldn't do that.

Oh. Well then you have two options:

3D-print or otherwise make a "cradle" for the device to sit in. Use hobby-servo's or similar to press the keys on the device.

Take apart the device and solder teeny, tiny wires across the connectors for the switches, using optocouplers to trigger the circuit.

I would do the first one. soldering in a device like that requires a microscope and a very small soldering iron.

// Per.