Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07c1a36957 | ||
|
|
1a2d3ad643 | ||
|
|
7cccf2b56d | ||
|
|
d31988a829 | ||
|
|
b12c06568c | ||
|
|
e0de64c047 | ||
|
|
bc3efd48c2 | ||
|
|
cd6239737a | ||
|
|
97293f3cc1 | ||
|
|
76caf7e1d7 | ||
|
|
3527282950 | ||
|
|
d2502086ed | ||
|
|
c5110830f7 | ||
|
|
d81b72fed7 | ||
|
|
bd8d53906a |
@@ -105,4 +105,7 @@ venv.bak/
|
|||||||
# mypy
|
# mypy
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
|
||||||
|
# nix
|
||||||
|
result*
|
||||||
|
|
||||||
test.py
|
test.py
|
||||||
@@ -4,20 +4,6 @@ Script to add GApps and other stuff to Waydroid!
|
|||||||
|
|
||||||
# Installation/Usage
|
# Installation/Usage
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
"lzip" is required for this script to work, install it using your distribution's package manager:
|
|
||||||
### Arch, Manjaro and EndeavourOS based distributions:
|
|
||||||
sudo pacman -S lzip
|
|
||||||
### Debian and Ubuntu based distributions:
|
|
||||||
sudo apt install lzip
|
|
||||||
### RHEL, Fedora and Rocky based distributions:
|
|
||||||
sudo dnf install lzip
|
|
||||||
### openSUSE based distributions:
|
|
||||||
sudo zypper install lzip
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Interactive terminal interface
|
## Interactive terminal interface
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -53,6 +39,18 @@ sudo venv/bin/python3 main.py certified
|
|||||||
sudo venv/bin/python3 main.py hack {nodataperm, hidestatusbar}
|
sudo venv/bin/python3 main.py hack {nodataperm, hidestatusbar}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
"lzip" is required for this script to work, install it using your distribution's package manager:
|
||||||
|
### Arch, Manjaro and EndeavourOS based distributions:
|
||||||
|
sudo pacman -S lzip
|
||||||
|
### Debian and Ubuntu based distributions:
|
||||||
|
sudo apt install lzip
|
||||||
|
### RHEL, Fedora and Rocky based distributions:
|
||||||
|
sudo dnf install lzip
|
||||||
|
### openSUSE based distributions:
|
||||||
|
sudo zypper install lzip
|
||||||
|
|
||||||
## Install OpenGapps
|
## Install OpenGapps
|
||||||
|
|
||||||

|

|
||||||
@@ -67,7 +65,7 @@ Then launch waydroid with:
|
|||||||
|
|
||||||
After waydroid has finished booting, open terminal and switch to directory where "main.py" is located then run:
|
After waydroid has finished booting, open terminal and switch to directory where "main.py" is located then run:
|
||||||
|
|
||||||
sudo python3 main.py google
|
sudo venv/bin/python3 main.py certified
|
||||||
Copy the returned numeric ID, then open ["https://google.com/android/uncertified/?pli=1"](https://google.com/android/uncertified/?pli=1). Enter the ID and register it. Wait 10-20 minutes for device to get registered. Then clear Google Play Service's cache and try logging in!
|
Copy the returned numeric ID, then open ["https://google.com/android/uncertified/?pli=1"](https://google.com/android/uncertified/?pli=1). Enter the ID and register it. Wait 10-20 minutes for device to get registered. Then clear Google Play Service's cache and try logging in!
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
with (import <nixpkgs> {});
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "waydroid_script";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
(python3.withPackages(ps: with ps; [ tqdm requests inquirerpy ]))
|
||||||
|
];
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs main.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/libexec
|
||||||
|
cp -r . $out/libexec/waydroid_script
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s $out/libexec/waydroid_script/main.py $out/bin/waydroid_script
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -17,6 +17,7 @@ from stuff.ndk import Ndk
|
|||||||
from stuff.nodataperm import Nodataperm
|
from stuff.nodataperm import Nodataperm
|
||||||
from stuff.smartdock import Smartdock
|
from stuff.smartdock import Smartdock
|
||||||
from stuff.widevine import Widevine
|
from stuff.widevine import Widevine
|
||||||
|
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
|
||||||
@@ -86,6 +87,8 @@ def install_app(args):
|
|||||||
install_list.append(MicroG(args.android_version, args.microg_variant))
|
install_list.append(MicroG(args.android_version, args.microg_variant))
|
||||||
if "mitm" in app:
|
if "mitm" in app:
|
||||||
install_list.append(Mitm(args.ca_cert_file))
|
install_list.append(Mitm(args.ca_cert_file))
|
||||||
|
if "fdroidpriv" in app:
|
||||||
|
install_list.append(FDroidPriv(args.android_version))
|
||||||
|
|
||||||
if not container.use_overlayfs():
|
if not container.use_overlayfs():
|
||||||
copy_dir = "/tmp/waydroid"
|
copy_dir = "/tmp/waydroid"
|
||||||
@@ -135,6 +138,8 @@ def remove_app(args):
|
|||||||
remove_list.append(MicroG(args.android_version, args.microg_variant))
|
remove_list.append(MicroG(args.android_version, args.microg_variant))
|
||||||
if "mitm" in app:
|
if "mitm" in app:
|
||||||
remove_list.append(Mitm())
|
remove_list.append(Mitm())
|
||||||
|
if "fdroidpriv" in app:
|
||||||
|
remove_list.append(FDroidPriv(args.android_version))
|
||||||
if "nodataperm" in app:
|
if "nodataperm" in app:
|
||||||
remove_list.append(Nodataperm(args.android_version))
|
remove_list.append(Nodataperm(args.android_version))
|
||||||
if "hidestatusbar" in app:
|
if "hidestatusbar" in app:
|
||||||
@@ -224,7 +229,7 @@ def interact():
|
|||||||
if not action:
|
if not action:
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
install_choices = ["gapps", "microg", "libndk", "magisk", "smartdock",]
|
install_choices = ["gapps", "microg", "libndk", "magisk", "smartdock", "fdroidpriv",]
|
||||||
hack_choices = []
|
hack_choices = []
|
||||||
if android_version=="11":
|
if android_version=="11":
|
||||||
install_choices.extend(["libhoudini", "widevine"])
|
install_choices.extend(["libhoudini", "widevine"])
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
from stuff.general import General
|
||||||
|
|
||||||
|
|
||||||
|
class FDroidPriv(General):
|
||||||
|
id = "fdroid priv"
|
||||||
|
dl_links = {"11": ["https://f-droid.org/repo/org.fdroid.fdroid.privileged.ota_2130.zip",
|
||||||
|
"6242cab56d197d80c598593a46da62e4"]}
|
||||||
|
partition = "system"
|
||||||
|
dl_file_name = "org.fdroid.fdroid.privileged.ota_2130.zip"
|
||||||
|
dl_link = ...
|
||||||
|
act_md5 = ...
|
||||||
|
extract_to = "/tmp/fdroid_ota_2130"
|
||||||
|
files = [
|
||||||
|
"app/F-Droid.apk"
|
||||||
|
"app/F-Droid/F-Droid.apk"
|
||||||
|
"etc/permissions/permissions_org.fdroid.fdroid.privileged.xml"
|
||||||
|
"priv-app/F-DroidPrivilegedExtension.apk"
|
||||||
|
"priv-app/F-DroidPrivilegedExtension/F-DroidPrivilegedExtension.apk"
|
||||||
|
]
|
||||||
|
file_map = {
|
||||||
|
"permissions_org.fdroid.fdroid.privileged.xml": "etc/permissions/permissions_org.fdroid.fdroid.privileged.xml",
|
||||||
|
"F-Droid.apk": "app/F-Droid/F-Droid.apk",
|
||||||
|
"F-DroidPrivilegedExtension.apk": "priv-app/F-DroidPrivilegedExtension/F-DroidPrivilegedExtension.apk",
|
||||||
|
}
|
||||||
|
def __init__(self, android_version="11") -> None:
|
||||||
|
super().__init__()
|
||||||
|
self.dl_link = self.dl_links[android_version][0]
|
||||||
|
self.act_md5 = self.dl_links[android_version][1]
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
for f, d in self.file_map.items():
|
||||||
|
rro_file = os.path.join(
|
||||||
|
self.copy_dir, self.partition, d)
|
||||||
|
rro_dir = os.path.dirname(rro_file)
|
||||||
|
if not os.path.exists(rro_dir):
|
||||||
|
os.makedirs(rro_dir)
|
||||||
|
shutil.copyfile(os.path.join(self.extract_to, f), rro_file)
|
||||||
|
|
||||||
+4
-4
@@ -15,10 +15,10 @@ class Gapps(General):
|
|||||||
"armeabi-v7a": ["https://sourceforge.net/projects/opengapps/files/arm/20220215/open_gapps-arm-11.0-pico-20220215.zip", "8719519fa32ae83a62621c6056d32814"]
|
"armeabi-v7a": ["https://sourceforge.net/projects/opengapps/files/arm/20220215/open_gapps-arm-11.0-pico-20220215.zip", "8719519fa32ae83a62621c6056d32814"]
|
||||||
},
|
},
|
||||||
"13": {
|
"13": {
|
||||||
"x86_64": ["https://github.com/Howard20181/MindTheGappsBuilder/releases/download/20230323/MindTheGapps-13.0.0-x86_64-20230323.zip", "aba427be1ddd0963121c87a4eda80299"],
|
"x86_64": ["https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20231028/MindTheGapps-13.0.0-x86_64-20231028.zip", "63ccebbf93d45c384f58d7c40049d398"],
|
||||||
"x86": ["https://github.com/Howard20181/MindTheGappsBuilder/releases/download/20230323/MindTheGapps-13.0.0-x86-20230323.zip", "f02d2f1a3f0a084f13ab4c1b58ad7554"],
|
"x86": ["https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20231028/MindTheGapps-13.0.0-x86-20231028.zip", "f12b6a8ed14eedbb4b5b3c932a865956"],
|
||||||
"arm64-v8a": ["https://github.com/Howard20181/MindTheGappsBuilder/releases/download/20230323/MindTheGapps-13.0.0-arm64-20230323.zip", "18484a5622eeccffcea2b43205655d8a"],
|
"arm64-v8a": ["https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20231028/MindTheGapps-13.0.0-arm64-20231028.zip", "11180da0a5d9f2ed2863882c30a8d556"],
|
||||||
"armeabi-v7a": ["https://github.com/Howard20181/MindTheGappsBuilder/releases/download/20230323/MindTheGapps-13.0.0-arm-20230323.zip", "e4c00a7eb1e4dfca0fc6a3e447710264"]
|
"armeabi-v7a": ["https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20231028/MindTheGapps-13.0.0-arm-20231028.zip", "d525c980bac427844aa4cb01628f8a8f"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
android_version = ...
|
android_version = ...
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ class Houdini(General):
|
|||||||
extract_to = "/tmp/houdiniunpack"
|
extract_to = "/tmp/houdiniunpack"
|
||||||
init_rc_component = """
|
init_rc_component = """
|
||||||
on early-init
|
on early-init
|
||||||
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
|
mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
|
||||||
|
|
||||||
on property:ro.enable.native.bridge.exec=1
|
on property:ro.enable.native.bridge.exec=1
|
||||||
exec -- /system/bin/sh -c "echo ':arm_exe:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x01\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x02\\\\x00\\\\x28::/system/bin/houdini:P' > /proc/sys/fs/binfmt_misc/register"
|
exec -- /system/bin/sh -c "echo ':arm_exe:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x01\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x02\\\\x00\\\\x28::/system/bin/houdini:P' > /proc/sys/fs/binfmt_misc/register"
|
||||||
|
|||||||
+15
-17
@@ -10,7 +10,7 @@ from tools import container
|
|||||||
class Magisk(General):
|
class Magisk(General):
|
||||||
id = "magisk delta"
|
id = "magisk delta"
|
||||||
partition = "system"
|
partition = "system"
|
||||||
dl_link = "https://huskydg.github.io/magisk-files/app-debug.apk"
|
dl_link = "https://github.com/mistrmochov/magiskdeltaorig/raw/main/app-release.apk"
|
||||||
dl_file_name = "magisk.apk"
|
dl_file_name = "magisk.apk"
|
||||||
extract_to = "/tmp/magisk_unpack"
|
extract_to = "/tmp/magisk_unpack"
|
||||||
magisk_dir = os.path.join(partition, "etc", "init", "magisk")
|
magisk_dir = os.path.join(partition, "etc", "init", "magisk")
|
||||||
@@ -29,30 +29,28 @@ service bootanim /system/bin/bootanimation
|
|||||||
bootanim_component = f"""
|
bootanim_component = f"""
|
||||||
on post-fs-data
|
on post-fs-data
|
||||||
start logd
|
start logd
|
||||||
exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk{host()[1]} --auto-selinux --setup-sbin /system/etc/init/magisk
|
exec u:r:su:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||||
exec u:r:su:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk "allow * magisk_file lnk_file *"
|
exec u:r:magisk:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||||
mkdir /sbin/.magisk 700
|
exec u:r:update_engine:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||||
mkdir /sbin/.magisk/mirror 700
|
mkdir /dev/magisk_iqeoVo2mDrO 700
|
||||||
mkdir /sbin/.magisk/block 700
|
exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk64 --auto-selinux --setup-sbin /system/etc/init/magisk /dev/magisk_iqeoVo2mDrO
|
||||||
copy /system/etc/init/magisk/config /sbin/.magisk/config
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --post-fs-data
|
||||||
rm /dev/.magisk_unblock
|
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --post-fs-data
|
|
||||||
wait /dev/.magisk_unblock 40
|
|
||||||
rm /dev/.magisk_unblock
|
|
||||||
|
|
||||||
on zygote-start
|
on nonencrypted
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --service
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --service
|
||||||
|
|
||||||
|
on property:vold.decrypt=trigger_restart_framework
|
||||||
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --service
|
||||||
|
|
||||||
on property:sys.boot_completed=1
|
on property:sys.boot_completed=1
|
||||||
mkdir /data/adb/magisk 755
|
mkdir /data/adb/magisk 755
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --boot-complete
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --boot-complete
|
||||||
exec -- /system/bin/sh -c "if [ ! -e /data/data/io.github.huskydg.magisk ] ; then pm install /system/etc/init/magisk/magisk.apk ; fi"
|
|
||||||
|
|
||||||
on property:init.svc.zygote=restarting
|
on property:init.svc.zygote=restarting
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --zygote-restart
|
||||||
|
|
||||||
on property:init.svc.zygote=stopped
|
on property:init.svc.zygote=stopped
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart
|
exec u:r:su:s0 root root -- /dev/magisk_iqeoVo2mDrO/magisk --auto-selinux --zygote-restart
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def download(self):
|
def download(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user