forked from crimera/twitter-apk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_variants.py
54 lines (47 loc) · 1.32 KB
/
build_variants.py
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
from apkmirror import Version
from utils import move_merged_apk, patch_revanced_apk, patch_xposed_apk
def build_apks(latest_version: Version):
# patch
apk = "big_file_merged.apk"
integrations = "bins/integrations.apk"
patches = "bins/patches.jar"
cli = "bins/cli.jar"
xposed = "bins/xposed.apk"
lspatch = "bins/lspatch.jar"
version = latest_version.version.replace(" ","").replace("-",".").lower()
output_list = []
patch_revanced_apk(
cli,
integrations,
patches,
apk,
includes=["Bring back twitter"],
excludes=[],
riparch=["armeabi-v7a", "x86", "x86_64"],
out=f"twitter-piko-v{version}-arm64-v8a.apk",
files=output_list
)
patch_revanced_apk(
cli,
integrations,
patches,
apk,
includes=["Bring back twitter"],
exclusive=True,
riparch=["armeabi-v7a", "x86", "x86_64"],
out="bring-back-twitter.apk"
)
patch_xposed_apk(
lspatch,
xposed,
apk="bring-back-twitter.apk",
out_dir="twitter-hachidori",
out=f"twitter-hachidori-v{version}-arm64-v8a.apk",
files=output_list
)
move_merged_apk(
apk,
out=f"twitter-merged-v{version}.apk",
files=output_list
)
return output_list