No description
Find a file
2025-09-04 16:39:58 +02:00
android_env add scritp 2025-03-28 09:43:21 +01:00
delate_emulators.sh add scritp 2025-03-28 09:43:21 +01:00
emulator_first_boot.sh add scritp 2025-03-28 09:43:21 +01:00
install_android.sh add scritp 2025-03-28 09:43:21 +01:00
kill_all_emulators.sh add doc 2025-03-28 09:52:51 +01:00
make_emulators.sh add scritp 2025-03-28 09:43:21 +01:00
README.md more cmd 2025-09-04 16:39:58 +02:00
start_emulators.sh add scritp 2025-03-28 09:43:21 +01:00

Android env scripts

Scripts to manage android stuff.

Setup

First make sure you have the right env variable set. Copy the variable of android_env in ~/.bashrc and edit to your liking. The first time, you need to refresh your environment with source ~/.bashrc.

Install

If you havent already installed Android sdkmanager and the basic packages, run install_android.sh

Create emulator

To create emulators, you can use make_emulators.sh. Edit the variables in the script to your liking.

Run emulators (headless)

The first time an emulator boot, it will make a snapshot post boot to accelerate futures boots. For some reason some time the first boot hang in an headless setup, ./emulator_first_boot.sh may help with the first boot.

To start the emulators normally, use start_emulators.sh

Stop emulators

To stop all emulators, run kill_all_emulators.sh

Delete emulators

To delete emulators, run delate_emulators.sh

Usefull

  • list devices: adb devices
  • select specific device: -s emulator-5554 (eg adb -s emulator-5554 shell)
  • make a snapshot: adb emu avd snapshot save snapshot-name
  • load snapshot: adb emu avd snapshot load snapshot-name
  • start from specific snapshot: adb @emulator-name -snapshot snapshot-name
  • emulator command: nc localhost 5554, interactif (almost) equivalent to adb emu <cmd>
  • set gps: adb emu geo fix 48.8531516685685 2.3691162476859464
  • set phone number: adb emu phonenumber 33639984266