Computer Science, asked by Anonymous, 6 months ago

what is Emulator?...Identifier?​

Answers

Answered by abhayverma1488
1

Answer:

please inbox me please

Explanation:

If I run several emulators with -no-window option in one machine. The command "adb devices" shows:

List of devices attached

emulator-5554 device

emulator-5556 device

emulator-5558 device

...

However, according to this output, I can't tell the difference between each emulator device at all. I need to know which emulator runs on what AVD, then I can install APKs or send commands to the emulator.

then, the serial number will be emulator-X and your avd_X will always be on ports X,Y, so you can run your commands with this serial number, like for example

$ adb -s emulator-X shell cmd

To kill the emulator run

$ adb -s emulator-X emu kill

Answered by vaiahnavisp1929
1

Answer:

Tracking the whole emulator lifecycle

Launch the emulator with a UUID property.

Then kick off a loop that checks each device to be online and/or having the matching UUID.

Once you get a match call adb -s ${SERIAL_NUMBER} wait-for-device so you know when you can talk to the emulator.

Similar questions