I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using 10.0.2.2 instead of a
Don't know if there are better ways to detect the emu, but the emulator will have the file init.goldfish.rc in the root-directory.
init.goldfish.rc
It's the emulator specific startup-script, and it shouldn't be there on a non-emulator build.