Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11207a08d9 |
@@ -166,7 +166,7 @@ chmod 777 -R /mnt/*/*/*/*/Android/obb
|
|||||||

|

|
||||||
|
|
||||||
```
|
```
|
||||||
sudo venv/bin/python3 main.py install microg
|
sudo python main.py install microg
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hide Status Bar
|
## Hide Status Bar
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
{ lib, stdenv, python3 }:
|
with (import <nixpkgs> {});
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "waydroid_script";
|
name = "waydroid_script";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(python3.withPackages (ps: with ps; [ tqdm requests inquirerpy ]))
|
(python3.withPackages(ps: with ps; [ tqdm requests inquirerpy ]))
|
||||||
];
|
];
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|||||||
@@ -21,45 +21,29 @@ from stuff.fdroidpriv import FDroidPriv
|
|||||||
import tools.helper as helper
|
import tools.helper as helper
|
||||||
from tools import container
|
from tools import container
|
||||||
from tools import images
|
from tools import images
|
||||||
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
from tools.logger import Logger
|
from tools.logger import Logger
|
||||||
|
|
||||||
|
def get_certified():
|
||||||
def get_certified(args):
|
|
||||||
AndroidId().get_id()
|
AndroidId().get_id()
|
||||||
|
|
||||||
|
|
||||||
def mount(partition, copy_dir):
|
def mount(partition, copy_dir):
|
||||||
img = os.path.join(images.get_image_dir(), partition+".img")
|
img = os.path.join(images.get_image_dir(), f"{partition}.img")
|
||||||
mount_point = ""
|
mount_point = os.path.join(copy_dir) if partition == "system" else os.path.join(copy_dir, partition)
|
||||||
if partition == "system":
|
Logger.info(f"Mounting {img} to {mount_point}")
|
||||||
mount_point = os.path.join(copy_dir)
|
|
||||||
else:
|
|
||||||
mount_point = os.path.join(copy_dir, partition)
|
|
||||||
Logger.info("Mounting {} to {}".format(img, mount_point))
|
|
||||||
images.mount(img, mount_point)
|
images.mount(img, mount_point)
|
||||||
|
|
||||||
|
|
||||||
def resize(partition):
|
def resize(partition):
|
||||||
img = os.path.join(images.get_image_dir(), partition+".img")
|
img = os.path.join(images.get_image_dir(), f"{partition}.img")
|
||||||
img_size = int(os.path.getsize(img)/(1024*1024))
|
img_size = int(os.path.getsize(img) / (1024 * 1024))
|
||||||
new_size = "{}M".format(img_size+500)
|
new_size = f"{img_size + 500}M"
|
||||||
Logger.info("Resizing {} to {}".format(img, new_size))
|
Logger.info(f"Resizing {img} to {new_size}")
|
||||||
images.resize(img, new_size)
|
images.resize(img, new_size)
|
||||||
|
|
||||||
|
|
||||||
def umount(partition, copy_dir):
|
def umount(partition, copy_dir):
|
||||||
mount_point = ""
|
mount_point = os.path.join(copy_dir) if partition == "system" else os.path.join(copy_dir, partition)
|
||||||
if partition == "system":
|
Logger.info(f"Unmounting {mount_point}")
|
||||||
mount_point = os.path.join(copy_dir)
|
|
||||||
else:
|
|
||||||
mount_point = os.path.join(copy_dir, partition)
|
|
||||||
Logger.info("Umounting {}".format(mount_point))
|
|
||||||
images.umount(mount_point)
|
images.umount(mount_point)
|
||||||
|
|
||||||
|
|
||||||
def install_app(args):
|
def install_app(args):
|
||||||
install_list: List[General] = []
|
install_list: List[General] = []
|
||||||
app = args.app
|
app = args.app
|
||||||
@@ -118,7 +102,6 @@ def install_app(args):
|
|||||||
|
|
||||||
container.upgrade()
|
container.upgrade()
|
||||||
|
|
||||||
|
|
||||||
def remove_app(args):
|
def remove_app(args):
|
||||||
remove_list: List[General] = []
|
remove_list: List[General] = []
|
||||||
app = args.app
|
app = args.app
|
||||||
@@ -158,10 +141,8 @@ def remove_app(args):
|
|||||||
|
|
||||||
container.upgrade()
|
container.upgrade()
|
||||||
|
|
||||||
|
|
||||||
def hack_option(args):
|
def hack_option(args):
|
||||||
Logger.warning(
|
Logger.warning("If these hacks cause any problems, run `sudo python main.py remove <hack_option>` to remove")
|
||||||
"If these hacks cause any problems, run `sudo python main.py remove <hack_option>` to remove")
|
|
||||||
|
|
||||||
hack_list: List[General] = []
|
hack_list: List[General] = []
|
||||||
options = args.option_name
|
options = args.option_name
|
||||||
@@ -198,10 +179,8 @@ def hack_option(args):
|
|||||||
|
|
||||||
container.upgrade()
|
container.upgrade()
|
||||||
|
|
||||||
|
|
||||||
def interact():
|
def interact():
|
||||||
os.system("clear")
|
os.system("clear")
|
||||||
args = argparse.Namespace()
|
|
||||||
android_version = inquirer.select(
|
android_version = inquirer.select(
|
||||||
message="Select Android version",
|
message="Select Android version",
|
||||||
instruction="(\u2191\u2193 Select Item)",
|
instruction="(\u2191\u2193 Select Item)",
|
||||||
@@ -214,25 +193,22 @@ def interact():
|
|||||||
).execute()
|
).execute()
|
||||||
if not android_version:
|
if not android_version:
|
||||||
exit()
|
exit()
|
||||||
args.android_version = android_version
|
|
||||||
|
args = argparse.Namespace(android_version=android_version, microg_variant="Standard")
|
||||||
|
|
||||||
action = inquirer.select(
|
action = inquirer.select(
|
||||||
message="Please select an action",
|
message="Please select an action",
|
||||||
choices=[
|
choices=["Install", "Remove", "Hack", "Get Google Device ID to Get Certified"],
|
||||||
"Install",
|
|
||||||
"Remove",
|
|
||||||
"Hack",
|
|
||||||
"Get Google Device ID to Get Certified"
|
|
||||||
],
|
|
||||||
instruction="([↑↓]: Select Item)",
|
instruction="([↑↓]: Select Item)",
|
||||||
default=None,
|
default=None,
|
||||||
).execute()
|
).execute()
|
||||||
if not action:
|
if not action:
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv",]
|
install_choices = ["gapps", "microg", "libndk", "magisk", "smartdock", "fdroidpriv",]
|
||||||
hack_choices = []
|
hack_choices = []
|
||||||
if android_version=="11":
|
if android_version == "11":
|
||||||
install_choices.extend(["widevine"])
|
install_choices.extend(["libhoudini", "widevine"])
|
||||||
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
||||||
|
|
||||||
if action == "Install":
|
if action == "Install":
|
||||||
@@ -243,8 +219,7 @@ def interact():
|
|||||||
invalid_message="should be at least 1 selection",
|
invalid_message="should be at least 1 selection",
|
||||||
choices=install_choices
|
choices=install_choices
|
||||||
).execute()
|
).execute()
|
||||||
microg_variants = ["Standard", "NoGoolag",
|
microg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
||||||
"UNLP", "Minimal", "MinimalIAP"]
|
|
||||||
if "microg" in apps:
|
if "microg" in apps:
|
||||||
microg_variant = inquirer.select(
|
microg_variant = inquirer.select(
|
||||||
message="Select MicroG variant",
|
message="Select MicroG variant",
|
||||||
@@ -263,7 +238,7 @@ def interact():
|
|||||||
choices=[*install_choices, *hack_choices]
|
choices=[*install_choices, *hack_choices]
|
||||||
).execute()
|
).execute()
|
||||||
args.app = apps
|
args.app = apps
|
||||||
args.microg_variant="Standard"
|
args.microg_variant = "Standard"
|
||||||
remove_app(args)
|
remove_app(args)
|
||||||
elif action == "Hack":
|
elif action == "Hack":
|
||||||
apps = inquirer.checkbox(
|
apps = inquirer.checkbox(
|
||||||
@@ -276,15 +251,14 @@ def interact():
|
|||||||
args.option_name = apps
|
args.option_name = apps
|
||||||
hack_option(args)
|
hack_option(args)
|
||||||
elif action == "Get Google Device ID to Get Certified":
|
elif action == "Get Google Device ID to Get Certified":
|
||||||
AndroidId().get_id()
|
get_certified()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description='''
|
parser = argparse.ArgumentParser(description='''
|
||||||
Does stuff like installing Gapps, installing Magisk, installing NDK Translation and getting Android ID for device registration.
|
Does stuff like installing Gapps, installing Magisk, installing NDK Translation and getting Android ID for device registration.
|
||||||
Use -h flag for help!''')
|
Use -h flag for help!''')
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(title="coomand", dest='command')
|
subparsers = parser.add_subparsers(title="command", dest='command')
|
||||||
parser.add_argument('-a', '--android-version',
|
parser.add_argument('-a', '--android-version',
|
||||||
dest='android_version',
|
dest='android_version',
|
||||||
help='Specify the Android version',
|
help='Specify the Android version',
|
||||||
@@ -296,8 +270,7 @@ def main():
|
|||||||
'certified', help='Get device ID to obtain Play Store certification')
|
'certified', help='Get device ID to obtain Play Store certification')
|
||||||
certified.set_defaults(func=get_certified)
|
certified.set_defaults(func=get_certified)
|
||||||
|
|
||||||
install_choices = ["gapps", "microg", "libndk", "libhoudini",
|
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "mitm", "smartdock", "widevine"]
|
||||||
"magisk", "mitm", "smartdock", "widevine"]
|
|
||||||
hack_choices = ["nodataperm", "hidestatusbar"]
|
hack_choices = ["nodataperm", "hidestatusbar"]
|
||||||
micrg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
micrg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
||||||
remove_choices = install_choices
|
remove_choices = install_choices
|
||||||
@@ -306,7 +279,6 @@ def main():
|
|||||||
"dest": "app",
|
"dest": "app",
|
||||||
"type": str,
|
"type": str,
|
||||||
"nargs": '+',
|
"nargs": '+',
|
||||||
# "metavar":"",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_help = """
|
install_help = """
|
||||||
@@ -344,15 +316,12 @@ widevine: Add support for widevine DRM L3
|
|||||||
hack_parser.set_defaults(func=hack_option)
|
hack_parser.set_defaults(func=hack_option)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
args.microg_variant = "Standard"
|
|
||||||
if hasattr(args, 'func'):
|
if hasattr(args, 'func'):
|
||||||
args_dict = vars(args)
|
|
||||||
helper.check_root()
|
helper.check_root()
|
||||||
args.func(args)
|
args.func(args)
|
||||||
else:
|
else:
|
||||||
helper.check_root()
|
helper.check_root()
|
||||||
interact()
|
interact()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ from stuff.general import General
|
|||||||
class FDroidPriv(General):
|
class FDroidPriv(General):
|
||||||
id = "fdroid priv"
|
id = "fdroid priv"
|
||||||
dl_links = {"11": ["https://f-droid.org/repo/org.fdroid.fdroid.privileged.ota_2130.zip",
|
dl_links = {"11": ["https://f-droid.org/repo/org.fdroid.fdroid.privileged.ota_2130.zip",
|
||||||
"6242cab56d197d80c598593a46da62e4"],
|
|
||||||
"13": ["https://f-droid.org/repo/org.fdroid.fdroid.privileged.ota_2130.zip",
|
|
||||||
"6242cab56d197d80c598593a46da62e4"]}
|
"6242cab56d197d80c598593a46da62e4"]}
|
||||||
partition = "system"
|
partition = "system"
|
||||||
dl_file_name = "org.fdroid.fdroid.privileged.ota_2130.zip"
|
dl_file_name = "org.fdroid.fdroid.privileged.ota_2130.zip"
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ class Houdini(General):
|
|||||||
partition = "system"
|
partition = "system"
|
||||||
dl_links = {
|
dl_links = {
|
||||||
"11": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"],
|
"11": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"],
|
||||||
"13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/7e21ea3f63bd89e9e8af54e32da41bd8b65c93a1.zip", "f8cf5db10e5fdb9b77e98e515a9b08c9"]
|
# "13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/978d8cba061a08837b7e520cd03b635af643ba08.zip", "1e139054c05034648fae58a1810573b4"]
|
||||||
}
|
}
|
||||||
act_md5 = ...
|
act_md5 = ...
|
||||||
dl_link = ...
|
dl_link = ...
|
||||||
|
|||||||
+3
-3
@@ -9,12 +9,12 @@ class Ndk(General):
|
|||||||
partition = "system"
|
partition = "system"
|
||||||
dl_links = {
|
dl_links = {
|
||||||
"11": ["https://github.com/supremegamers/vendor_google_proprietary_ndk_translation-prebuilt/archive/9324a8914b649b885dad6f2bfd14a67e5d1520bf.zip", "c9572672d1045594448068079b34c350"],
|
"11": ["https://github.com/supremegamers/vendor_google_proprietary_ndk_translation-prebuilt/archive/9324a8914b649b885dad6f2bfd14a67e5d1520bf.zip", "c9572672d1045594448068079b34c350"],
|
||||||
"13": ["https://github.com/supremegamers/vendor_google_proprietary_ndk_translation-prebuilt/archive/68734c52556d3d7a6db34c603dd9276915c29f2f.zip", "0b2207c490fcb400aa5c87fcf0d52d38"]
|
"13": ["https://github.com/supremegamers/vendor_google_proprietary_ndk_translation-prebuilt/archive/a090003c60df53a9eadb2df09bd4fd2fa86ea629.zip", "e6f0d9fc28ebc427b59a3942a9a4ffc0"]
|
||||||
}
|
}
|
||||||
dl_file_name = "libndktranslation.zip"
|
dl_file_name = "libndktranslation.zip"
|
||||||
extract_to = "/tmp/libndkunpack"
|
extract_to = "/tmp/libndkunpack"
|
||||||
apply_props = {
|
apply_props = {
|
||||||
"ro.product.cpu.abilist": "x86_64,x86,arm64-v8a,armeabi-v7a,armeabi",
|
"ro.product.cpu.abilist": "x86_64,x86,armeabi-v7a,armeabi,arm64-v8a",
|
||||||
"ro.product.cpu.abilist32": "x86,armeabi-v7a,armeabi",
|
"ro.product.cpu.abilist32": "x86,armeabi-v7a,armeabi",
|
||||||
"ro.product.cpu.abilist64": "x86_64,arm64-v8a",
|
"ro.product.cpu.abilist64": "x86_64,arm64-v8a",
|
||||||
"ro.dalvik.vm.native.bridge": "libndk_translation.so",
|
"ro.dalvik.vm.native.bridge": "libndk_translation.so",
|
||||||
@@ -49,4 +49,4 @@ class Ndk(General):
|
|||||||
Logger.info("Copying libndk library files ...")
|
Logger.info("Copying libndk library files ...")
|
||||||
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
||||||
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_ndk_translation-prebuilt-" + name,
|
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_ndk_translation-prebuilt-" + name,
|
||||||
"prebuilts"), os.path.join(self.copy_dir, self.partition), dirs_exist_ok=True)
|
"prebuilts"), os.path.join(self.copy_dir, self.partition), dirs_exist_ok=True)
|
||||||
Reference in New Issue
Block a user