Giter Site home page Giter Site logo

littlerich / virtuallocation Goto Github PK

View Code? Open in Web Editor NEW
924.0 37.0 261.0 10.46 MB

利用Hook技术对APP进行虚拟定位,可修改微信、QQ、以及一些打卡APP等软件,随意切换手机所处位置!

Home Page: http://www.littlerich.top

License: Apache License 2.0

Java 100.00%
hook android-location location-tracker virtual-location wechat

virtuallocation's Introduction

VirtualLocation(UI仿共享单车OFO)

博客主页

对Android程序进行虚拟定位,可修改微信、QQ、陌陌以及一些打卡APP等软件,随意切换手机所处位置!(喜欢的给一个star, 有帮助的给一个fork, 欢迎Star和Fork ^_^)

下载 话不多说,试玩应用先。

效果预览

主页


微信虚拟定位演示

1、打开本程序,选择好要穿越的地点,确认穿越即可!
Alt textAlt text

2、再打开微信,这里演示在朋友圈发位置状态,如下:
Alt text


钉钉虚拟定位打卡演示


原理

本程序有两种方式可以实现虚拟定位:

  1. 通过ADB模拟定位功能
  2. 通过Hook修改获取经纬度API的值 (必需安装Xposed以及ROOT)

程序代码设计流程图如下:
Alt text

第一种方式主要是是通过ADB模拟定位功能,再开启线程,不断的更新LocationManager的经纬度值,即可是实现定位模拟定位

	mMockThread = new Thread(new Runnable() {
                @Override
                public void run() {
                    while (true) {
                        try {
                            Thread.sleep(500);
                            if (!hasAddTestProvider) {
                                Log.d("xqf", "针对Android6.0+系统,需要单独把程序调加到ADB模拟定位服务中");
                                continue;
                            }
                            setLocation(LocationUtil.mLatitude, LocationUtil.mLongitude);
                            Log.d("xqf", "setLocation240=latitude:" + mLatitude + "?longitude:" + mLongitude);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                 }
                }
            });
            mMockThread.start();

第二种方式主要是采用Hook修改系统API。目前很多程序都调用了isFromMockProvider方法来检测用户是否打开了ADB模拟定位功能,所以我又采用了Hook方式,就不怕不能虚拟定位了,具体如何Hook,可以看我的一篇博客:基于Xposed框架Hook定位功能来破解QQ的LBS红包


测试

在Android测试机 分别是 魅蓝2、华为、SCL-TL00、Vivo xs1、红米note运行正常

版本

v1.0

完成了通过ADB模拟定位功能来虚拟定位,但是新版的一些程序都做了ADB模拟定位检测,所以现在很多新版本程序都不行了

v1.1

完善了通过Hook修改虚拟定位API,提高程序的兼容性和可行性,但同时也必须Android设备要ROOT

issue

如果程序运行有什么问题,可以先查看Issues中的问题回答,这样我就不用重复回答大家的问题了,之前太多人加QQ问问题,工作有点忙实在是来不及一一回复(注:Issues在本网页顶部菜单栏上)

Email:[email protected]

License

Copyright 2016 xuqingfu

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

virtuallocation's People

Contributors

littlerich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

virtuallocation's Issues

立即穿越后很快又回去了

我虚拟定位到另一个地方成功了,但是大概1s钟后它又回到了原来的地方,打开筋斗云一看位置又回去了,而且穿越成功按钮重新变回了立即穿越,这是为什么呀?

关于loadClass类名和方法名的问题

楼主是不是只对高德地图做了hook,我想问的是就是你怎么知道高德地图是通过com.amap.api.location.AMapLocation这个类以及类下面的方法获取的经纬度呢?如何知道这个具体的类名以及方法名,希望能请教一下~
比如我需要hook百度地图或者腾讯地图应该怎么去找这个类名和方法名呢,我之前看了网上的好多hook gps的例子(比如这个),就是对很多locationmanager类进行hook,但是我实测都不起作用,是不是高德的应用做了什么特殊处理?
刚学习xposed小白,希望可以得到您的回答,谢谢!

/**
     * 修改高德地图的经纬度值
     * @param
     * @throws ClassNotFoundException
     */
    public static void findMethodAmapLongitudeAndLatitude(ClassLoader classLoader) {
        try {
            Class aMapLocationClazz = classLoader.loadClass("com.amap.api.location.AMapLocation");
            XposedHelpers.findAndHookMethod(aMapLocationClazz, "getLongitude", new Object[]{new XC_MethodHook() {
                protected void beforeHookedMethod(MethodHookParam arg3) throws Throwable {
                    arg3.setResult(Double.valueOf(AppApplication.mMockGps.mLongitude));
                    Log.d(TAG, "修改高德地图的经纬度值:" + AppApplication.mMockGps.mLongitude + ":" + AppApplication.mMockGps.mLatitude);
                }
            }});

华为9p

安装之后怎么一片空白,没有地图

Sent from PPHub

可以虚拟定位但地图无法显示

感谢大佬,最近一直用这个虚拟定位打卡,比较麻烦的是地图无法显示,需要反复好几次移动定位,一步步接近才能定位到打卡地,请问怎么才能正常显示地图呢?
1、国产手机已经打开允许模拟定位。
2、没有安装XPOSED.apk

安卓模拟器测试

不知道作者有没有在安卓模拟器上测试过,我尝试在安卓模拟器上hook修改高德地图,百度地图这一类地图的坐标,没有起作用,不知道是不是受安卓模拟器本身自带虚拟定位功能的影响,这种情况你遇到过吗?
ps 我用的是夜神模拟器
谢谢!

来自调试成功的极客爱好者

使用方式:
1、确保Android手机已经ROOT,并且安装配置好Xposed工具(仓库中已提供)
2、安装精斗云插件,在Xposed激活该插件;
3、如果前两步没问题,就可以肆意遨游起来了,在精斗云APP里选定想要定位的位置,实现虚拟定位。
升级玩法:
1、上述方式可以使用的情况下,如果想要使用钉钉打卡,为了防止被阿里和谐,我并没有做成随意修改的虚拟打卡的功能,而是硬编码,可以通过修改源代码中的经纬度参数,打包运行就可以把钉钉APP的定位参数修改了

Android5 找不到类

XposedHelpers.findAndHookMethod("com.android.server.LocationManagerService"...)报错
java.lang.ClassNotFoundException: Didn't find class "android.location.LocationManagerService

请问是什么原因呢

iOS支持吗?

看到演示全部使用的是android,请问支持iOS吗?

钉钉异地打卡使用方式

首先确保可以虚拟定位,就是把Android手机ROOT,然后配置好Xposed;
然后测试微信是否可以被随意修改定位,如果可以,说明精斗云配置成功。
在此基础上,修改源代码中的经纬度参数,重新打包程序,这样钉钉就定位到你修改的经纬度上了,目前打卡还不会有什么异样,可以放心使用。

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.