forked from casualsnek/waydroid_script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
63 lines (60 loc) · 2.39 KB
/
main.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
55
56
57
58
59
60
61
62
63
import argparse
from logging import Logger
from stuffs.android_id import Android_id
from stuffs.gapps import Gapps
from stuffs.houdini import Houdini
from stuffs.magisk import Magisk
from stuffs.ndk import Ndk
from stuffs.widevine import Widevine
import tools.helper as helper
def main():
about = """
WayDroid Helper script v0.3
Does stuff like installing Gapps, Installing NDK Translation and getting Android ID for device registration.
Use -h flag for help !
"""
helper.check_root()
parser = argparse.ArgumentParser(description=about, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('-g', '--install-gapps',
dest='gapps',
help='Install OpenGapps to waydroid',
action='store_true')
parser.add_argument('-n', '--install-ndk-translation',
dest='ndk',
help='Install libndk translation for arm translation',
action='store_true')
parser.add_argument('-i', '--get-android-id', dest='getid',
help='Displays your android id for manual registration',
action='store_true')
parser.add_argument('-m', '--install-magisk', dest='magisk',
help='Attempts to install Magisk ( Bootless )',
action='store_true')
parser.add_argument('-l', '--install-libhoudini', dest='houdini',
help='Install libhoudini for arm translation',
action='store_true')
parser.add_argument('-w', '--install-windevine', dest='widevine',
help='Integrate Widevine DRM (L3)',
action='store_true')
args = parser.parse_args()
if args.getid:
Android_id().get_id()
if args.gapps:
Gapps().install()
if args.ndk and not args.houdini:
arch = helper.host()[0]
if arch == "x86_64":
Ndk().install()
else:
Logger.warn("libndk is not supported on your CPU")
if args.houdini and not args.ndk:
arch = helper.host()[0]
if arch == "x86_64":
Houdini().install()
else:
Logger.warn("libhoudini is not supported on your CPU")
if args.magisk:
Magisk().install()
if args.widevine:
Widevine().install()
if __name__ == "__main__":
main()