Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Detect if device is an emulator by native code.{检查当运行的设备是否是模拟器.}

License

Notifications You must be signed in to change notification settings

Scavenges/CheckEmulatorByNative

Repository files navigation

CheckEmulatorInNDK

中文

This repo is supposed to check whether you are running in an emulator.

  • I would call java from native code to check whether current device is emulator.

  • check if is debug mode with CMAKE_BUILD_TYPE and NDK_DEBUG of macro-definition,if here is debug mode I don't do anything.

CMAKE_BUILD_TYPE 	from	cmake_build_command.txt
NDK_DEBUG 		from	ndkBuild_build_command.txt

Build

1.android studio 3.0.

2.add a line code to local.properties

ndk.dir=/xxx/xxx/xx

You can run directly without modifying any code, I thought that it is no error. But I don't think there is no bugs when you run code in some devices. If you get the wrong result value, it is that you are running on the phone but you get the true value.

journal:

1.result of MiBox is an emulator。(author of this issue no more reply,if you got the same problem,please to debug native code.)

About

Detect if device is an emulator by native code.{检查当运行的设备是否是模拟器.}

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published