'Not able to copy+paste in Android emulator with Apple silicon m1

  • Android emulator API version: 32, arm64-v8a
  • Android studio bumblebee 2021.1.1 patch 3
  • Mac OS version: 12.3.1

I am trying to copy text from emulator and past that text to mac. It was working in intel + android emulator.

Looks like the emulator is not using the mac clipboard.



Solution 1:[1]

I had this same issue. It was perplexing. Only one thing worked... a cold restart of the emulator.

Diagnosing

Check if copying/pasting text works at all to/from host and emulator:

  1. Open a search box on the emulator (or any EditText)
  2. Type some text, select it and copy, then paste
  3. Try from your host machine to the emulator, from the emulator to your host machine, and just on the emulator itself

For me, pasting did not work from host -> device and it didn't work from device -> host it also did not work on device, itself!

Solution

The only solution was to close the emulator and re-open it using "Cold boot now" as pictured

enter image description here

Solution 2:[2]

Most likely, the emulator is copying the text to the Android Clipboard (usually set to Gboard by default). Another possibility is the android emulator doesn't recognize the cmd key on an apple keyboard the same way as a ctrl key on a normal keyboard.

Check this forum out to see if it has any solutions. In the case that it doesn't There are a few things I would try first - one of which is look for a third party app that will automatically sync clipboard between Mac and Android. Here is one that works for Windows (probably the best solution if it also works for Mac)

Alternatively, you could real quickly throw together an apk that grabs clipboard data, and sends it over. You could viably do this pretty quickly using react native. Have it detect clipboard text, and send it over localhost (probably tcp) using websockets. Most programming languages can connect and receive over tcp, so you could use your choice language to connect and read the data.

Solution 3:[3]

on mac you have to long press in the emulator than you can paste

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 gMale
Solution 2 alien_jedi
Solution 3 saro