Git Product home page Git Product logo

azure_arm64_android_emulator_notes's Introduction

Running an ARM Emulator in Azure

Docker Install

Follow the Docker docs to install on Ubuntu: https://docs.docker.com/engine/install/ubuntu/

To use Docker without having to type "sudo" with each command:

sudo groupadd docker
sudo usermod -aG docker $USER

Then reboot to take effect.

Install the required kernel modules for running the container:

sudo apt install linux-modules-extra-`uname -r`
sudo modprobe binder_linux devices="binder,hwbinder,vndbinder"
sudo modprobe ashmem_linux

ADB

Install ADB to be able to connect to the device:

sudo apt-get install android-tools-adb

Example Helpful ADB Commands

If you need to run as root on the device. You may need to reconnect to the device after this:

adb root

List the emulators that are running:

adb devices

If the device isn’t appearing (assuming the device is running on localhost port 5555):

adb connect 127.0.0.1:5555

Running the Emulator

Redroid Docker for ARM Android: https://hub.docker.com/r/redroid/redroid

docker run -itd --privileged \
 --name androidemu \
 -v ~/data:/data \
 -p 5555:5555 \
 redroid/redroid:11.0.0-latest

If you did not make the modprobe commands persistent and the device is failing to start properly, you may need to run those previous commands one more time.

To kill and remove the emulator:

docker container rm -f androidemu

Local Screen Connect

To connect to the device screen, use SSH tunnelling to forward the ADB port on the Azure machine:

ssh -L 5555:127.0.0.1:5555 azureuser@AZURE_MACHINE_IP_ADDRESS

Now you can run ADB connect on your host machine and communicate with the remote device:

adb connect 127.0.0.1:5555
adb devices

Install scrcpy on your host: https://github.com/Genymobile/scrcpy. Then run scrcpy to connect the device connected to ADB:

scrcpy.exe -s emulator-5554 # replace this with the name of the emulator

azure_arm64_android_emulator_notes's People

Contributors

lauriewired avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.