Code Monkey home page Code Monkey logo

redirectstorage's Introduction

RedirectStorage

针对第三方 SDK 乱改存储卡和读取用户数据等行为,利用反射方式重定向 SD 卡目录。

依賴

  • Add it in your root build.gradle at the end of repositories:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  • 查詢最新版本

最新版本:

  • 添加依賴
dependencies {
        compile 'com.github.Trumeet:RedirectStorage:<最新版本號>'
}

Usage

只有一个类,非常简单:

// 启用
enable(PathCallback callback) // 当需要 Hack 路径的时候的 Callback

// 禁用
disable()

// 是否已启用
isEnable()

// 是否已安装
isInstall()

// 获取真实路径,比如需要保存图片
getRealPath()

尚未严格兼容性测试,目前 Android O 模拟器测试通过,理论上支持 KitKat 至 Oreo。有问题请提交 issues

不支持 KitKat 以下 ROM。(哪位大佬能帮忙想出办法兼容,个人认为主要是 `getDirectory`` 方法,感激不尽。)

Licenses

使用本項目請確保您遵守 Apache License 2.0

特别感谢 @heruoxin (冰箱作者)提供核心代码 ,我只是做了个简单封装和提供了几个接口 逃跑

Copyright (C) 2017 Trumeet

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.

redirectstorage's People

Contributors

trumeet avatar

Watchers

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