Can an emulator have a unique device ID? And can you use that ID?

12,073

You can set uuid for a emulator.

You need to start the emulator like this

emulator -avd jbx86 -prop emu.uuid=5ec33f90-a471-11e2-9e96-0800200c9a66

Basically emulator uuID always returns null. They are hard coded. So you can set at startup.

Answers are taken from here

See this for more example, in the 'Detecting correct emulator' section.

Share:
12,073
rmutalik
Author by

rmutalik

I graduated from the University of North Carolina at Charlotte with a M.S. in Data Science and from the University of Oklahoma with a B.S. in Computer Engineering. I enjoy programming for fun, doing engineering projects, learning new things at my local Makerspace, and building things.

Updated on June 04, 2022

Comments

  • rmutalik
    rmutalik almost 2 years

    I am making a web app using HTML5 and PhoneGap, and I am using the uuid as a one-time login instead of the standard username/password combination. Instead of having the client manually type in the uuid, I want to automatically grab the uuid from the device and login using that information. There is a PhoneGap plugin called Device, which allows you to access your device's uuid.

    When I try to test the uuid retrieval on Genymotion, my emulator, I get an error. I think the error is because I am using an emulator and not a device.

    EDIT: I found the identifiers on Genymotion, but it is not free. I am still wondering whether I can actually use the ID information.

  • rmutalik
    rmutalik almost 10 years
    Can you explain that format? I tried it and it didn't know what "jbx86" was.
  • AtanuCSE
    AtanuCSE almost 10 years
    I didn't try them, I've found them from those above links. There is another way described in the 2nd link, you can try them
  • Kirill
    Kirill almost 8 years
    Should this solution still work? Doesn't work for me.