Skip to content

Commit

Permalink
update doc, add English wiki for
Browse files Browse the repository at this point in the history
1. OUTPUT.md
2. CHANGELOG.md
3. CONTRIBUTOR.md
4. COMMAND.md
  • Loading branch information
JingYeoh committed Oct 17, 2019
1 parent af8995a commit abf16fb
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 26 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Path bundlePath = aabResGuardPlugin.getObfuscatedBundlePath()
```

## [#Command line](wiki/en/COMMAND.md)
**AabResGuard** provides a `jar` file that can be executed directly from the command line. More details, please go to **[Command Line](COMMAND.md)**.
**AabResGuard** provides a `jar` file that can be executed directly from the command line. More details, please go to **[Command Line](wiki/en/COMMAND.md)**.

## [# Output](wiki/en/OUTPUT.md)
After the packaging is completed, the obfuscated file and the log files will be output. More details, please go to **[Output File](OUTPUT.md)**.
After the packaging is completed, the obfuscated file and the log files will be output. More details, please go to **[Output File](wiki/en/OUTPUT.md)**.
- **resources-mapping.txt:** Resource obfuscation mapping, which can be used as the next obfuscation input to achieve incremental obfuscate.
- **aab:** Optimized aab file.
- **-duplicated.txt:** duplicated file logging.
Expand Down
11 changes: 10 additions & 1 deletion wiki/en/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
[English]()
**[English](CHANGELOG.md)** | [简体中文](../zh-cn/CHANGELOG.md)

# Change log

## 0.1.0(2019/10/16)
- Add support for resources obfuscation
- Add support for merge duplicated resources
- Add support for files filtering
- Added support for `gradle plugin`
- Add support for `command line`
30 changes: 16 additions & 14 deletions wiki/en/COMMAND.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
**[English](COMMAND.md)** | [简体中文](../zh-cn/COMMAND.md)

# 命令行支持
# Command line

> **AabResGuard** 提供了 jar 包,可以直接通过命令行来运行资源混淆。
> **AabResGuard** provides a jar file that can run resource obfuscation by command line.
## #资源去重
根据文件 `md5` 值对重复的文件进行合并,只保留一份,然后重定向原本的资源路径索引表中的值,以达到缩减包体积的目的。
## #Merge duplicated resources
The duplicate files will be merged according to the file `md5` value, only one file will be retained, and then the values in the original resource path index table will be redirected to reduce the volume of the package.
```cmd
aabresguard merge-duplicated-res --bundle=app.aab --output=merged.aab
--storeFile=debug.store
--storePassword=android
--keyAlias=android
--keyPassword=android
```
签名信息为可选参数,如果不指定签名信息,则会使用机器中 `Android` 默认的签名文件进行签名。
The signature information is optional. If you do not specify the signature information, it will be signed using the `Android` default signature file on the PC.

## #文件过滤
支持指定特定的文件进行过滤,目前只支持 `META-INF/` `lib/` 文件夹下的过滤。
## #File filtering
Support for specifying specific files for filtering. Currently only filtering under the `META-INF/` and `lib/` folders is supported.
```cmd
aabresguard filter-file --bundle=app.aab --output=filtered.aab --config=config.xml
--storeFile=debug.store
--storePassword=android
--keyAlias=android
--keyPassword=android
```
配置文件 `config.xml`,过滤规则支持`正则表达式`

Configuration file `config.xml`, filtering rules support `regular expressions`
```xml
<?xml version="1.0" encoding="UTF-8"?>
<resproguard>
Expand All @@ -34,10 +35,10 @@ aabresguard filter-file --bundle=app.aab --output=filtered.aab --config=config.x
</filter>
</resproguard>
```
**适用场景:** 由于业务的需要,部分渠道需要打全量包,但是全量包会包括所有的 `so`,使用该根据可以过滤某一个纬度的 `abi`,并且不会影响 `bundletool` 的解析过程。
**Applicable scenarios: ** Due to the needs of the business, some channels need to make a full package, but the full package will include all `so` files, `files filter` can be used to filter the `abi` of a certain latitude and will not affect `bundletool` process.

## #资源混淆
对输入的 `aab` 文件进行资源混淆,并输出混淆后的 `aab` 文件,支持 `资源去重``文件过滤`
## #Resources obfuscation
Resource aliasing of the input `aab` file, and outputting the obfuscated `aab` file, supporting `Merge duplicated resources` and `file filtering`.
```cmd
aabresguard obfuscate-bundle --bundle=app.aab --output=obfuscated.aab --config=config.xml --mapping=mapping.txt
--merge-duplicated-res=true
Expand All @@ -46,7 +47,8 @@ aabresguard obfuscate-bundle --bundle=app.aab --output=obfuscated.aab --config=c
--keyAlias=android
--keyPassword=android
```
配置文件 `config.xml`,白名单支持`正则表达式`

Configuration file `config.xml`, whitelist support `regular expressions`
```xml
<?xml version="1.0" encoding="UTF-8"?>
<resproguard>
Expand All @@ -60,8 +62,8 @@ aabresguard obfuscate-bundle --bundle=app.aab --output=obfuscated.aab --config=c
</resproguard>
```

## #参数说明
参数的说明请执行以下命令来进行查看:
## #Parameter Description
For the description of the parameters, please execute the following command:

```cmd
aabresguard help
Expand Down
40 changes: 40 additions & 0 deletions wiki/en/CONTRIBUTOR.md
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
**[English](CONTRIBUTOR.md)** | [简体中文](../zh-cn/CONTRIBUTOR.md)

# Contribute guide

This guide will show you how to contribute to **AabResGuard**. Please ask for an issue or pull request.
Take a few minutes to read this guide before.

## #Contributing
We are always very happy to have contributions, whether for typo fix, bug fix or big new features. Please do not ever hesitate to ask a question or send a pull request.

## [#Code of Conduct](CODE_OF_CONDUCT.md)
Please make sure to read and observe our **[Code of Conduct](CODE_OF_CONDUCT.md)** .

## #GitHub workflow
All work on **AabResGuard** happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.

We use the `develop` branch as our development branch, and this code is an unstable branch. Each version will create a `release` branch (such as `release/0.1.1`) as a stable release branch.
Each time a new version is released, it will be merged into the corresponding branch and the corresponding `tag` will be applied.

Here are the workflow for contributors:

- Fork to your own.
- Clone fork to local repository.
- Create a new branch and work on it.
- Keep your branch in sync.
- Commit your changes (make sure your commit message concise).
- Push your commits to your forked repository.
- Create a pull request.

Please follow the pull request template. Please make sure the PR has a corresponding issue.

After creating a PR, one or more reviewers will be assigned to the pull request. The reviewers will review the code.

Before merging a PR, squash any fix review feedback, typo, merged, and rebased sorts of commits. The final commit message should be clear and concise.

## #Open an issue / PR
### ##Where to Find Known Issues
We will be using GitHub Issues for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist.

### ##Reporting New Issues
The best way to get your bug fixed is to provide a reduced test case. Please provide a public repository with a runnable example.
16 changes: 8 additions & 8 deletions wiki/en/OUTPUT.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
**[English](OUTPUT.md)** | [简体中文](../zh-cn/OUTPUT.md)
# 输出文件
# Output file

>混淆后的文件输出目录和 bundle 打包后输出的文件目录一致,均在 `build/outputs/bundle/{flavor}/` 目录下。
>The obfuscated file output directory is identical to the file directory output by the bundle package, both under the `build/outputs/bundle/{flavor}/` directory.
混淆后的输出文件如下图所示:
The obfuscated output file is shown below:

![output](../images/output.png)

## resources-mapping
用于记录资源混淆规则的日志文件,示例如下:
A log file for recording resource obfuscation rules, the example is shown below:

```txt
res dir mapping:
Expand All @@ -27,12 +27,12 @@ res entries path mapping:
0x7f060022 : base/res/drawable-xxxhdpi-v4/abc_ic_star_half_black_16dp.png -> res/k/o.png
```

- **res dir mapping:** 存储资源文件目录的混淆规则。格式:dir -> dir`res/` 根目录不可以被混淆)
- **res id mapping:** 存储资源名称的混淆规则。格式:resourceId : resourceName -> resourceName(增量混淆时,resourceId 不会被读入)
- **res entries path mapping:** 存储资源文件路径的混淆规则。格式:resourceId : path -> path(增量混淆时,resourceId 不会被读入)
- **res dir mapping:** The obfuscated rules for storing resource file directories. Format: dir -> dir (`res/` root directory can not be obfuscated)
- **res id mapping:** The obfuscated rules for storing resource names. Format: resourceId : resourceName -> resourceName (resourceId will not be read in increment obfuscating)
- **res entries path mapping:** The obfuscated rules for storing resource file paths. Format: resourceId : path -> path (resourceId will not be read in obfuscating)

## -duplicated.txt
用于记录被去重的资源文件,示例如下:
Used to record the deduplicated resource files, the example is shown below:

```txt
res filter path mapping:
Expand Down
3 changes: 2 additions & 1 deletion wiki/zh-cn/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
- 添加资源混淆功能
- 添加资源去重功能
- 添加文件过滤功能
- 添加 `gradle plugin` 的支持
- 添加 `gradle plugin` 的支持
- 添加命令行支持

0 comments on commit abf16fb

Please sign in to comment.