Add gps support
This commit is contained in:
@@ -18,6 +18,7 @@ from stuff.nodataperm import Nodataperm
|
||||
from stuff.smartdock import Smartdock
|
||||
from stuff.widevine import Widevine
|
||||
from stuff.fdroidpriv import FDroidPriv
|
||||
from stuff.gps import GPS
|
||||
import tools.helper as helper
|
||||
from tools import container
|
||||
from tools import images
|
||||
@@ -89,6 +90,8 @@ def install_app(args):
|
||||
install_list.append(Mitm(args.ca_cert_file))
|
||||
if "fdroidpriv" in app:
|
||||
install_list.append(FDroidPriv(args.android_version))
|
||||
if "gps" in app:
|
||||
install_list.append(GPS(args.android_version, args.gps_host, args.baud_rate))
|
||||
|
||||
if not container.use_overlayfs():
|
||||
copy_dir = "/tmp/waydroid"
|
||||
@@ -115,8 +118,7 @@ def install_app(args):
|
||||
if not container.use_overlayfs():
|
||||
umount("vendor", copy_dir)
|
||||
umount("system", copy_dir)
|
||||
|
||||
container.upgrade()
|
||||
container.upgrade()
|
||||
|
||||
|
||||
def remove_app(args):
|
||||
@@ -144,6 +146,8 @@ def remove_app(args):
|
||||
remove_list.append(Nodataperm(args.android_version))
|
||||
if "hidestatusbar" in app:
|
||||
remove_list.append(HideStatusBar())
|
||||
if "gps" in app:
|
||||
remove_list.append(GPS())
|
||||
|
||||
if not container.use_overlayfs():
|
||||
copy_dir = "/tmp/waydroid"
|
||||
@@ -169,6 +173,7 @@ def hack_option(args):
|
||||
hack_list.append(Nodataperm())
|
||||
if "hidestatusbar" in options:
|
||||
hack_list.append(HideStatusBar())
|
||||
|
||||
|
||||
if not container.use_overlayfs():
|
||||
copy_dir = "/tmp/waydroid"
|
||||
@@ -229,10 +234,11 @@ def interact():
|
||||
if not action:
|
||||
exit()
|
||||
|
||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv",]
|
||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv","gps"]
|
||||
baud_rate_choices = ["9600", "19200", "38400", "57600", "115200"]
|
||||
hack_choices = []
|
||||
if android_version=="11":
|
||||
install_choices.extend(["widevine"])
|
||||
install_choices.extend(["widevine", ])
|
||||
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
||||
|
||||
if action == "Install":
|
||||
@@ -252,6 +258,20 @@ def interact():
|
||||
default="Standard",
|
||||
).execute()
|
||||
args.microg_variant = microg_variant
|
||||
if "gps" in apps:
|
||||
gps_host = inquirer.text(
|
||||
message="Enter GPS host (default: /dev/ttyGPSD)",
|
||||
default="/dev/ttyGPSD",
|
||||
).execute()
|
||||
args.gps_host = gps_host
|
||||
baud_rate = inquirer.select(
|
||||
message="Enter baud rate (default: 9600)",
|
||||
instruction="([\u2191\u2193]: [Enter]: Confirm",
|
||||
default="9600",
|
||||
choices=baud_rate_choices
|
||||
).execute()
|
||||
args.baud_rate = baud_rate
|
||||
|
||||
args.app = apps
|
||||
install_app(args)
|
||||
elif action == "Remove":
|
||||
@@ -270,7 +290,7 @@ def interact():
|
||||
message="Select hack options",
|
||||
instruction="([\u2191\u2193]: Select Item. [Space]: Toggle Choice), [Enter]: Confirm",
|
||||
validate=lambda result: len(result) >= 1,
|
||||
invalid_message="should be at least 1 selection",
|
||||
invalid_message="should be at leinstall_appast 1 selection",
|
||||
choices=hack_choices
|
||||
).execute()
|
||||
args.option_name = apps
|
||||
@@ -345,6 +365,8 @@ widevine: Add support for widevine DRM L3
|
||||
|
||||
args = parser.parse_args()
|
||||
args.microg_variant = "Standard"
|
||||
args.gps_host = "/dev/ttyGPSD"
|
||||
args.baud_rate = "9600"
|
||||
if hasattr(args, 'func'):
|
||||
args_dict = vars(args)
|
||||
helper.check_root()
|
||||
|
||||
Reference in New Issue
Block a user