Comments (4)
我目前的解决方案是:
- 在应用里生成好对应的 json 配置文件
- 使用 root 将配置文拷贝到 android 框架有权读取的地方(例如 /data/system)
- Xposed 层代码读取配置文件的副本
from fucklocation.
感谢大佬解答,但是我还是不是很理解以下两个问题:
- 为什么LocationManagerService::getLastLocation()这个方法可以访问/data/system的数据,而其他的一些地方比如(ActivityThread::handleResumeActivity())就无法访问/data/system的数据?
- 为什么可以hook到LocationManagerService,同样是com.android.server包下面的ActivityManagerService就无法hook,提示ClassNotFound?
不过根据大佬的思路,我发现把配置文件放在modulePath的同级目录(也就是插件app的apk文件的同级目录),其他app的任何一个方法都可以访问到。
from fucklocation.
感谢大佬解答,但是我还是不是很理解以下两个问题:
- 为什么 LocationManagerService::getLastLocation () 这个方法可以访问 /data/system 的数据,而其他的一些地方比如(ActivityThread::handleResumeActivity ())就无法访问 /data/system 的数据?
- 为什么可以 hook 到 LocationManagerService,同样是 com.android.server 包下面的 ActivityManagerService 就无法 hook,提示 ClassNotFound?
不过根据大佬的思路,我发现把配置文件放在 modulePath 的同级目录(也就是插件 app 的 apk 文件的同级目录),其他 app 的任何一个方法都可以访问到。
- 没有仔细研究过,不过应该和 SELinux 上下文有关...
- 我自己的研究结论是,从 Android 10 开始,部分系统组件可以以 APEX 模块的方式放在其它位置,此时它们的源代码是不位于原本位置的。我自己的解决方案是 Hook 进 SystemService,在服务加载时拿到目标服务的 classLoader,从而 hook 指定类。
from fucklocation.
好的,我大概明白了,多谢大佬。
from fucklocation.
Related Issues (20)
- 发现一个有意思的事,希望能对解决MIUI13定位失效提供帮助 HOT 1
- 只有第一次修改有效果
- CI最新版以及最新代码构建,百度地图生效、高德地图无效
- Report Issue / 反馈问题 HOT 1
- 设置时闪退 HOT 1
- 小米6模拟定位不生效 HOT 2
- 不可以软件分别应用不同的地点嘛
- 你出一个教程吗?我看了一下纬度经度,还有ECI、NCI对一般人来说不知道是啥东西。 HOT 3
- Report Issue / 反馈问题 HOT 1
- MIUI13状态栏隐私图标常驻问题 HOT 1
- [Report Issue / 反馈问题] Fuck不生效 HOT 1
- BUG反馈
- 使用说明 HOT 1
- Report Issue / 反馈问题 HOT 1
- 不应该在android消息loop中直接调用xposed api HOT 5
- 经纬度填写格式是啥
- Report Issue / 反馈问题 HOT 1
- 5G NCI 36bit过长,导致parseInt异常闪退
- K30S 国行版 miui13.0.7 无法定位 HOT 1
- 闪退报错的解决办法
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fucklocation.