Scavenges / CheckEmulatorByNative

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.{检查当运行的设备是否是模拟器.}

License:Other


Languages

Language:C 58.7%Language:Java 25.2%Language:CMake 16.1%