re1sid-lib 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- re1sid_lib-0.1.2/PKG-INFO +125 -0
- re1sid_lib-0.1.2/README.md +109 -0
- {re1sid_lib-0.1.0 → re1sid_lib-0.1.2}/pyproject.toml +3 -1
- re1sid_lib-0.1.0/PKG-INFO +0 -12
- re1sid_lib-0.1.0/README.md +0 -0
- {re1sid_lib-0.1.0 → re1sid_lib-0.1.2}/src/re1sid_lib/__init__.py +0 -0
- {re1sid_lib-0.1.0 → re1sid_lib-0.1.2}/src/re1sid_lib/common.py +0 -0
- {re1sid_lib-0.1.0 → re1sid_lib-0.1.2}/src/re1sid_lib/downloader.py +0 -0
- {re1sid_lib-0.1.0 → re1sid_lib-0.1.2}/src/re1sid_lib/patcher.py +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: re1sid-lib
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Author: 09u2h4n
|
|
6
|
+
Author-email: 09u2h4n <09u2h4n.y1lm42@gmail.com>
|
|
7
|
+
License: Apache-2.0 license
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: lxml>=6.1.1
|
|
10
|
+
Requires-Dist: pyaxmlparser>=0.3.31
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Project-URL: homepage, https://github.com/09u2h4n/re1sid-lib
|
|
13
|
+
Project-URL: repository, https://github.com/09u2h4n/re1sid-lib
|
|
14
|
+
Project-URL: documentation, https://github.com/09u2h4n/re1sid-lib#readme
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# re1sid-lib
|
|
18
|
+
|
|
19
|
+
A small Python library for working with ReVanced CLI and patch bundles. It provides helpers to download required ReVanced assets and to patch APK files programmatically.
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- Download the latest ReVanced CLI jar and patches.rvp bundle.
|
|
24
|
+
- List available patches and options using ReVanced CLI output parsing.
|
|
25
|
+
- Patch APK files with enabled/disabled patches and patch options.
|
|
26
|
+
- Preserve multi-line descriptions and compatibility metadata.
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
- Python 3.9+
|
|
31
|
+
- Java runtime installed and available in `PATH`
|
|
32
|
+
- Python packages:
|
|
33
|
+
- `httpx`
|
|
34
|
+
- `lxml`
|
|
35
|
+
- `pyaxmlparser`
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
1. Clone the repository.
|
|
40
|
+
2. Install Python dependencies:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install httpx lxml pyaxmlparser
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. Configure paths in `src/re1sid_lib/common.py`:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
PATCHES_PATH = ".revanced_res/patches.rvp"
|
|
50
|
+
CLI_PATH = ".revanced_res/revanced-cli.jar"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
### Download ReVanced assets
|
|
56
|
+
|
|
57
|
+
Use the downloader helper to fetch the latest CLI jar and patches bundle.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from re1sid_lib.downloader import Downloader
|
|
61
|
+
|
|
62
|
+
downloader = Downloader()
|
|
63
|
+
downloader.download_all()
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or download individual assets:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from re1sid_lib.downloader import Downloader
|
|
70
|
+
|
|
71
|
+
downloader = Downloader()
|
|
72
|
+
downloader.download_cli()
|
|
73
|
+
downloader.download_patches_rvp()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### List patches
|
|
77
|
+
|
|
78
|
+
Use the patcher helper to parse the patch list and inspect options.
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from re1sid_lib.patcher import Patcher
|
|
82
|
+
|
|
83
|
+
patcher = Patcher()
|
|
84
|
+
patches = patcher.list_patches(package_name="com.spotify.music")
|
|
85
|
+
for patch in patches:
|
|
86
|
+
print(patch["Name"], patch["Enabled"])
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Patch an APK
|
|
90
|
+
|
|
91
|
+
Patch an APK file with specific enabled/disabled patches and options.
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from re1sid_lib.patcher import Patcher
|
|
95
|
+
|
|
96
|
+
patcher = Patcher()
|
|
97
|
+
output = patcher.patch_apk(
|
|
98
|
+
apk_path="input.apk",
|
|
99
|
+
output_path="patched.apk",
|
|
100
|
+
enabled_patches=["remove-ads", 12],
|
|
101
|
+
disabled_patches=["log-timestamp"],
|
|
102
|
+
options={"theme": "dark", "ads": False},
|
|
103
|
+
exclusive=False,
|
|
104
|
+
force=True,
|
|
105
|
+
bypass_verification=True,
|
|
106
|
+
purge=True,
|
|
107
|
+
)
|
|
108
|
+
print(output)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Notes
|
|
112
|
+
|
|
113
|
+
- `Downloader.download_all()` removes the `.revanced_res` directory before downloading fresh assets.
|
|
114
|
+
- `Patcher.list_patches()` can also accept an APK path and will read its package name automatically.
|
|
115
|
+
- The library expects the ReVanced CLI jar and patches bundle to exist at the configured paths.
|
|
116
|
+
|
|
117
|
+
## Project structure
|
|
118
|
+
|
|
119
|
+
- `src/re1sid_lib/downloader.py` - Download helper for ReVanced CLI and patches.
|
|
120
|
+
- `src/re1sid_lib/patcher.py` - Patch helper and CLI output parser.
|
|
121
|
+
- `src/re1sid_lib/common.py` - Common path configuration.
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
Use this project according to the appropriate license terms for ReVanced and its dependencies.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# re1sid-lib
|
|
2
|
+
|
|
3
|
+
A small Python library for working with ReVanced CLI and patch bundles. It provides helpers to download required ReVanced assets and to patch APK files programmatically.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Download the latest ReVanced CLI jar and patches.rvp bundle.
|
|
8
|
+
- List available patches and options using ReVanced CLI output parsing.
|
|
9
|
+
- Patch APK files with enabled/disabled patches and patch options.
|
|
10
|
+
- Preserve multi-line descriptions and compatibility metadata.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- Python 3.9+
|
|
15
|
+
- Java runtime installed and available in `PATH`
|
|
16
|
+
- Python packages:
|
|
17
|
+
- `httpx`
|
|
18
|
+
- `lxml`
|
|
19
|
+
- `pyaxmlparser`
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
1. Clone the repository.
|
|
24
|
+
2. Install Python dependencies:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install httpx lxml pyaxmlparser
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. Configure paths in `src/re1sid_lib/common.py`:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
PATCHES_PATH = ".revanced_res/patches.rvp"
|
|
34
|
+
CLI_PATH = ".revanced_res/revanced-cli.jar"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### Download ReVanced assets
|
|
40
|
+
|
|
41
|
+
Use the downloader helper to fetch the latest CLI jar and patches bundle.
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from re1sid_lib.downloader import Downloader
|
|
45
|
+
|
|
46
|
+
downloader = Downloader()
|
|
47
|
+
downloader.download_all()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or download individual assets:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from re1sid_lib.downloader import Downloader
|
|
54
|
+
|
|
55
|
+
downloader = Downloader()
|
|
56
|
+
downloader.download_cli()
|
|
57
|
+
downloader.download_patches_rvp()
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### List patches
|
|
61
|
+
|
|
62
|
+
Use the patcher helper to parse the patch list and inspect options.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from re1sid_lib.patcher import Patcher
|
|
66
|
+
|
|
67
|
+
patcher = Patcher()
|
|
68
|
+
patches = patcher.list_patches(package_name="com.spotify.music")
|
|
69
|
+
for patch in patches:
|
|
70
|
+
print(patch["Name"], patch["Enabled"])
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Patch an APK
|
|
74
|
+
|
|
75
|
+
Patch an APK file with specific enabled/disabled patches and options.
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from re1sid_lib.patcher import Patcher
|
|
79
|
+
|
|
80
|
+
patcher = Patcher()
|
|
81
|
+
output = patcher.patch_apk(
|
|
82
|
+
apk_path="input.apk",
|
|
83
|
+
output_path="patched.apk",
|
|
84
|
+
enabled_patches=["remove-ads", 12],
|
|
85
|
+
disabled_patches=["log-timestamp"],
|
|
86
|
+
options={"theme": "dark", "ads": False},
|
|
87
|
+
exclusive=False,
|
|
88
|
+
force=True,
|
|
89
|
+
bypass_verification=True,
|
|
90
|
+
purge=True,
|
|
91
|
+
)
|
|
92
|
+
print(output)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Notes
|
|
96
|
+
|
|
97
|
+
- `Downloader.download_all()` removes the `.revanced_res` directory before downloading fresh assets.
|
|
98
|
+
- `Patcher.list_patches()` can also accept an APK path and will read its package name automatically.
|
|
99
|
+
- The library expects the ReVanced CLI jar and patches bundle to exist at the configured paths.
|
|
100
|
+
|
|
101
|
+
## Project structure
|
|
102
|
+
|
|
103
|
+
- `src/re1sid_lib/downloader.py` - Download helper for ReVanced CLI and patches.
|
|
104
|
+
- `src/re1sid_lib/patcher.py` - Patch helper and CLI output parser.
|
|
105
|
+
- `src/re1sid_lib/common.py` - Common path configuration.
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
Use this project according to the appropriate license terms for ReVanced and its dependencies.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "re1sid-lib"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
|
+
license = { text = "Apache-2.0 license" }
|
|
6
7
|
authors = [
|
|
7
8
|
{ name = "09u2h4n", email = "09u2h4n.y1lm42@gmail.com" }
|
|
8
9
|
]
|
|
@@ -12,6 +13,7 @@ dependencies = [
|
|
|
12
13
|
"lxml>=6.1.1",
|
|
13
14
|
"pyaxmlparser>=0.3.31",
|
|
14
15
|
]
|
|
16
|
+
urls = { homepage = "https://github.com/09u2h4n/re1sid-lib", repository = "https://github.com/09u2h4n/re1sid-lib", documentation = "https://github.com/09u2h4n/re1sid-lib#readme" }
|
|
15
17
|
|
|
16
18
|
[project.scripts]
|
|
17
19
|
re1sid-lib = "re1sid_lib:main"
|
re1sid_lib-0.1.0/PKG-INFO
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: re1sid-lib
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Add your description here
|
|
5
|
-
Author: 09u2h4n
|
|
6
|
-
Author-email: 09u2h4n <09u2h4n.y1lm42@gmail.com>
|
|
7
|
-
Requires-Dist: httpx>=0.28.1
|
|
8
|
-
Requires-Dist: lxml>=6.1.1
|
|
9
|
-
Requires-Dist: pyaxmlparser>=0.3.31
|
|
10
|
-
Requires-Python: >=3.12
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
|
re1sid_lib-0.1.0/README.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|