Code Monkey home page Code Monkey logo

simulategps's Introduction

SimulateGps

语言:Java

工具:Eclipse

版本:1.0.0

手机定位方式目前有4种:基站定位,WIFI定位,GPS定位,AGPS定位。

目前比较稳定的思路就是使用hook,用它对app_process进行注入,找到定位的方法,然后进行修改,但此方法需要root权限。参考:http://www.jianshu.com/p/91e312faa6c3

我这里方法是利用手机自带的"模拟位置"功能实现运行时修改LocationManager结果,原理:使用android自带的调试api,模拟gps provider的结果。 LocationManager.setTestProviderLocation(Provider, Location); 此不稳定,特征明显,容易按特征嗅探到(有反作弊机制的游戏基本都能查出来),需要打开开发者的允许模拟位置选项。

重要说明

运行之前

  • 请先打开android手机-设置-开发者选项-允许模拟位置,打钩。
  • 修改定位方法成仅限GPS,三星设置:设置-位置-模式-仅限GPS。
  • 修改AndroidManifest.xml中的,使用你自己的百度地图key,申请地址:http://lbsyun.baidu.com/apiconsole/key

#问题反馈 在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

simulategps's People

Contributors

aslanchen avatar

Watchers

James Cloos avatar  avatar  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.