Usage: add usage with ADB
This commit is contained in:
80
USAGE.md
80
USAGE.md
@@ -224,6 +224,86 @@ This rule applies to **all commands except `reboot`**, since `reboot` only takes
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Using `pmt-static` via ADB
|
||||||
|
|
||||||
|
This guide will show you how to use the **static** version of Partition Manager Tool (`pmt-static`) on your Android device through **ADB**.
|
||||||
|
It’s written for beginners — no advanced knowledge needed.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📦 Why Static Version?
|
||||||
|
The **static** build of PMT contains everything it needs inside one single file.
|
||||||
|
This means you can run it directly on your Android device **without** installing extra libraries.
|
||||||
|
Perfect for quick tasks via ADB.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 Requirements
|
||||||
|
- **ADB installed** on your computer
|
||||||
|
(Part of the Android SDK Platform Tools — [Download here](https://developer.android.com/studio/releases/platform-tools))
|
||||||
|
- **USB Debugging enabled** on your phone
|
||||||
|
(Settings → Developer options → Enable USB debugging)
|
||||||
|
- Your **phone connected via USB** and recognized by ADB
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Step-by-Step Usage
|
||||||
|
|
||||||
|
### 1️⃣ Get the Correct Binary
|
||||||
|
Download the **`pmt-static`** file that matches your device’s architecture:
|
||||||
|
- **`pmt-static-arm64-v8a`** → For 64-bit devices
|
||||||
|
- **`pmt-static-armeabi-v7a`** → For 32-bit devices
|
||||||
|
|
||||||
|
Unzip the downloaded `.zip` file — you should now have a `pmt` binary.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 2️⃣ Push the Binary to Your Device
|
||||||
|
Use ADB to copy the `pmt` file to your phone’s temporary folder:
|
||||||
|
```bash
|
||||||
|
adb push pmt /data/local/tmp/pmt
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3️⃣ Open an ADB Shell
|
||||||
|
Access your device shell:
|
||||||
|
```bash
|
||||||
|
adb shell
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4️⃣ Change to the Directory
|
||||||
|
Move into the temporary directory where pmt is stored:
|
||||||
|
```bash
|
||||||
|
cd /data/local/tmp
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5️⃣ Give Execute Permission
|
||||||
|
Allow the binary to be executed:
|
||||||
|
```bash
|
||||||
|
chmod 755 pmt_static
|
||||||
|
|
||||||
|
# Rename for more easily
|
||||||
|
mv pmt_static pmt
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6️⃣ Run PMT
|
||||||
|
You can now run PMT directly from this directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./pmt --help
|
||||||
|
```
|
||||||
|
Example — Back up the boot partition:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./pmt backup boot
|
||||||
|
```
|
||||||
|
|
||||||
|
### 💡 Tips
|
||||||
|
Commands must be run from /data/local/tmp unless you move pmt elsewhere.\
|
||||||
|
The /data/local/tmp folder is cleared when you reboot your device.\
|
||||||
|
Static builds are completely standalone — no missing library issues.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Partition Manager Tool is licensed under the **Apache 2.0 License**.
|
Partition Manager Tool is licensed under the **Apache 2.0 License**.
|
||||||
Copyright © YZBruh.
|
Copyright © YZBruh.
|
||||||
|
|||||||
Reference in New Issue
Block a user