Coder Social home page Coder Social logo

liyanxi / checkemulatorbynative Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scavenges/checkemulatorbynative

1.0 0.0 0.0 154 KB

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

License: Other

C 58.73% Java 25.22% CMake 16.06%

checkemulatorbynative's Introduction

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.)

checkemulatorbynative's People

Contributors

brucewind avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.