Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated grammar, punctuation, and formatting for some pages and updated the dependencies #3448

Merged
merged 14 commits into from
Nov 29, 2023
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
}
},
"settings": {
"mdx/code-blocks": false
"mdx/code-blocks": true
}
}
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
"printWidth": 80,
"endOfLine": "auto"
}
},
{
"files": "*.mdx",
"options": {
"endOfLine": "auto"
}
},
{
"files": "*.yml",
"options": {
"endOfLine": "auto"
}
}
]
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

> This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation
## Installation

```
$ npm install
```bash
npm install
```

### Local Development

```
$ npm run start
```bash
npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
48 changes: 31 additions & 17 deletions docs/build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,43 @@ sidebar_position: 1

# Build Apktool

Apktool is a collection of 1 project, containing subprojects and a few dependencies.
Apktool is a project that contains a collection of subprojects and dependencies.

- **brut.apktool.lib** - (Main, all the Library code)
- **brut.apktool.cli** - The cli interface of the program
- **brut.j.dir** - Utility project
- **brut.j.util** - Utility project
- **brut.j.common** - Utility project
- **brut.apktool.lib** - Main Library
- **brut.apktool.cli** - CLI Interface
- **brut.j.dir** - Utility
- **brut.j.util** - Utility
- **brut.j.common** - Utility

### Requirements

- JDK > 8
- git
- [JDK](https://www.oracle.com/java/technologies/downloads/) > 8
- [git](https://git-scm.com/downloads)
- [Gradle](https://gradle.org/)

### Build Steps

We use gradle to build. First clone the repository using either
First clone the repository using either:
[SSH](ssh://[email protected]:iBotPeaches/Apktool.git) or [HTTPS](https://github.com/iBotPeaches/Apktool.git).

1. Navigate to the Apktool folder: `cd Apktool`
2. For remaining steps use `./gradlew` for unix based systems or `gradlew.bat` for windows.
3. You can build the project in two ways:
1. Without proguard `[./gradlew][gradlew.bat] build shadowJar`
- This will build the project and create a jar file: `brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar`
2. With proguard: `[./gradlew][gradlew.bat] build shadowJar proguard`
- This will build the project and create a jar file: `brut.apktool/apktool-cli/build/libs/apktool-vXXX.jar`
1. Navigate to the Apktool folder and for the remaining steps use `./gradlew` for Unix based systems or `gradlew.bat` for Windows.
2. You can build the project in two ways:

- Without ProGuard:

```bash
[./gradlew][gradlew.bat] build shadowJar
```

- Creating a jar file: `brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar`.

- With ProGuard:

```bash
[./gradlew][gradlew.bat] build shadowJar proguard
```

- Creating a jar file: `brut.apktool/apktool-cli/build/libs/apktool-vXXX.jar`.

#### Windows Requirements

Expand All @@ -42,7 +54,9 @@ which means due to the limitation of max 255 characters on Windows we need to en

This leaves 37 characters total to clone the project on Windows. For example, I can clone this project to the location

C:/Users/Connor/Desktop/Apktool
```text
C:/Users/Connor/Desktop/Apktool
```

This is 31 characters, which allows Apktool to be cloned properly. Cloning the project into a directory longer than 37
characters will not work.
74 changes: 42 additions & 32 deletions docs/cli-parameters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _Options used for utility commands (`apktool {options}`)_
-version, --version
```

- Outputs current version. (Ex: 1.5.2)
- Outputs the current software version. (Ex: 1.5.2)

### Decoding Options

Expand All @@ -27,77 +27,82 @@ _Options used for decoding commands (`apktool d file.apk {options}`)_
-api, --api-level <API>
```

- The numeric api-level of the smali files to generate (defaults to targetSdkVersion)
- Sets the API-level used in the generated smali files.
- Defaults to `targetSdkVersion`

```
-b, --no-debug-info
```

- Prevents baksmali from writing out debug info (.local, .param, .line, etc).
- Prevents baksmali from writing out debug info. (`.local`, `.param`, `.line`, etc.).

```
-f, --force
```

- Force delete destination directory.
- Forces the deletion of the destination directory.

```
--force-manifest
```

- Forces decode of `AndroidManifest.xml` regardless of decoding of resources parameter.
- Forces Apktool to decode `AndroidManifest.xml` regardless of your decoding options.

```
--keep-broken-res
```

- Use if there was an error and some resources were dropped, e.g. "Invalid config flags detected. Dropping resources", but you want to decode them anyway, even with errors.
- You will have to fix them manually before building.
- Use if an error was thrown and some resources were dropped and you want to decode them anyway.
- E.g. `Invalid config flags detected. Dropping resources`.
- You will have to fix them manually before building.

```
-m, --match-original
```

- Matches files closest as possible to original at cost of preventing rebuild.
- Matches the generated files as close as possible to the originals.
- Comes at the cost of preventing you from rebuilding.

```
--no-assets
```

- Prevents decoding/copying of unknown asset files.
- Prevents decoding/copying unknown asset files.

```
--only-main-classes
```

- Only disassemble dex classes in root of application.
- Only disassembles dex classes that are in the root of the application.

```
-p, --frame-path <DIR>
```

- The folder location where framework files should be stored/read from.
- Sets the folder framework files are stored/read from.

```
-r, --no-res
```

- This will prevent the decompile of resources. This keeps the `resources.arsc`
- Prevents decompiling resources.
- Keeps `resources.arsc` intact.

```
-resm,--resource-mode <mode>
```

- The mode to use when resolving resources. Presently supported options are:
- `remove` (default) - Remove resources that cannot be resolved.
- `dummy` - Add a dummy resource for resources that cannot be resolved.
- `keep` - Keep unresolved resources using `APKTOOL_MISSING_{resId}` nomenclature.
- Sets the mode used when resolving resources.
- `remove` (default) - Removes resources that cannot be resolved.
- `dummy` - Adds a dummy resource for resources that cannot be resolved.
- `keep` - Keeps unresolved resources using `APKTOOL_MISSING_{resId}` nomenclature.

```
-s, --no-src
```

- This will prevent the disassembly of the dex file(s). This keeps the apk dex file(s) and simply moves it during build.
- Prevents disassembling dex files.
- Leaves the dex files untouched and moves them upon build.

```
-t, --frame-tag <TAG>
Expand All @@ -113,19 +118,21 @@ _Options used for building commands (`apktool b folder {options}`)_
-a, --aapt <FILE>
```

- Loads aapt/aapt2 binary from the specified location, instead of relying on internal version.
- Loads aapt/aapt2 binaries from the specified location.
- These are used instead of the internal version.

```
-api, --api-level <API>
```

- The numeric api-level of the smali files to build against (defaults to `minSdkVersion`)
- Sets the API-level of the smali files to build against.
- Defaults to `minSdkVersion`.

```
-c, --copy-original
```

- Copies original `AndroidManifest.xml` and `META-INF`.
- Copies the original `AndroidManifest.xml` and `META-INF`.

```
-d, --debug
Expand All @@ -137,7 +144,8 @@ _Options used for building commands (`apktool b folder {options}`)_
-f, --force-all
```

- Overwrites existing files during build, including resources and sources.
- Overwrites existing files during build.
- Includes resources and sources.

```
-n, --net-sec-conf
Expand All @@ -149,33 +157,34 @@ _Options used for building commands (`apktool b folder {options}`)_
-nc, --no-crunch
```

- Disables crunching of resource files during the build.
- Disables crunching resource files during build.

```
-o, --output <FILE>
```

- The name of apk that gets written. Default is `dist/{apkname}.apk`.
- Sets the name of the output apk.
- The Default is `dist/{apkname}.apk`.

```
-p, --frame-path <DIR>
```

- The location where framework files are stored/read from.
- Sets the folder framework files are stored/read from.

```
--use-aapt1
```

- Use aapt instead of aapt2.
- aapt2 became default in Apktool v2.9.0
- Use `aapt` instead of `aapt2`.
- `aapt2` is used by default in Apktool v2.9.0 and above.

```
--use-aapt2
```

- Use aapt2 instead of aapt.
- aapt is default in Apktool v2.8.2 or less.
- Use `aapt2` instead of `aapt`.
- `aapt` is used by default in Apktool v2.8.2 and below.

### Empty Framework Directory Options

Expand All @@ -185,13 +194,13 @@ _Options used for empty-framework-dir commands (`apktool empty-framework-dir {op
-f, --force
```

- Force delete destination directory.
- Forces the deletion of the destination directory.

```
-p, --frame-path <DIR>
```

- The folder location where framework files should be stored/read from.
- Sets the folder framework files are stored/read from.

### List Framework Directory Options

Expand All @@ -201,7 +210,7 @@ _Options used for list-frameworks commands (`apktool list-frameworks {options}`)
-p, --frame-path <DIR>
```

- The folder location where framework files should be stored/read from.
- Sets the folder framework files are stored/read from.

### Common Options

Expand All @@ -211,7 +220,8 @@ _Options that can be used with any command_
-v, --verbose
```

- Verbose output. Includes any message tagged `FINE` in the logger.
- Verbose output.
- Includes any log messages tagged with `FINE`.

```
-q, --quiet
Expand Down
Loading