aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: ba8617e04ca8ae23f591faa83f5861f9e7a60221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# RedirectStorage

[![](https://jitpack.io/v/Trumeet/RedirectStorage.svg)](https://jitpack.io/#Trumeet/RedirectStorage)

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

# 依賴

* Add it in your root build.gradle at the end of repositories:
```
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
```

* 查詢最新版本

最新版本:[![](https://jitpack.io/v/Trumeet/RedirectStorage.svg)](https://jitpack.io/#Trumeet/RedirectStorage)

* 添加依賴

```
    dependencies {
	        compile 'com.github.Trumeet:RedirectStorage:<最新版本號>'
	}
```

# Usage

只有一个类,非常简单:

```java

// 启用
enable(String pathSuffix) // pathSuffix 是 加在原目录后面的后缀,详情见 JavaDoc

// 禁用
disable()

// 是否已启用
isEnable()

// 是否已安装
isInstall()

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

```

**尚未严格兼容性测试,目前 Android O 模拟器测试通过,有问题请提交 issues**

# Licenses
使用本項目請確保您遵守 `Apache License 2.0`,本项目使用 [android-hidden-api](https://github.com/anggrayudi/android-hidden-api) 项目。

**特别感谢 [@heruoxin](https://github.com/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.
```