Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bc2b310a3 | ||
|
|
d5289cfd89 | ||
|
|
ddaa6b190f | ||
|
|
15020ec20a |
+4
-22
@@ -1,22 +1,4 @@
|
||||
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
|
||||
'';
|
||||
}
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
pkgs.callPackage ./package.nix { }
|
||||
|
||||
Generated
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1707650010,
|
||||
"narHash": "sha256-dOhphIA4MGrH4ElNCy/OlwmN24MsnEqFjRR6+RY7jZw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
description = "Waydroid Extras Script";
|
||||
inputs = {
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
outputs = { self, nixpkgs, systems }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
mkApp = program: { type = "app"; inherit program; };
|
||||
in {
|
||||
packages = eachSystem (system: rec {
|
||||
waydroid_script = nixpkgs.legacyPackages."${system}".callPackage ./package.nix { };
|
||||
default = waydroid_script;
|
||||
});
|
||||
apps = eachSystem (system: rec {
|
||||
waydroid_script = mkApp "${self.outputs.packages.${system}.waydroid_script}/bin/waydroid_script";
|
||||
default = waydroid_script;
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -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.device_spoof import DeviceSpoof, PROFILES
|
||||
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 "device_spoof" in app:
|
||||
DeviceSpoof(getattr(args, "spoof_profile", "pixel6")).install()
|
||||
|
||||
if not container.use_overlayfs():
|
||||
copy_dir = "/tmp/waydroid"
|
||||
@@ -140,6 +143,8 @@ def remove_app(args):
|
||||
remove_list.append(Mitm())
|
||||
if "fdroidpriv" in app:
|
||||
remove_list.append(FDroidPriv(args.android_version))
|
||||
if "device_spoof" in app:
|
||||
DeviceSpoof().uninstall()
|
||||
if "nodataperm" in app:
|
||||
remove_list.append(Nodataperm(args.android_version))
|
||||
if "hidestatusbar" in app:
|
||||
@@ -229,7 +234,7 @@ def interact():
|
||||
if not action:
|
||||
exit()
|
||||
|
||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv", "widevine",]
|
||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv", "widevine", "device_spoof"]
|
||||
hack_choices = []
|
||||
if android_version=="11":
|
||||
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
||||
@@ -251,6 +256,13 @@ def interact():
|
||||
default="Standard",
|
||||
).execute()
|
||||
args.microg_variant = microg_variant
|
||||
if "device_spoof" in apps:
|
||||
spoof_profile = inquirer.select(
|
||||
message="Select device profile to spoof",
|
||||
choices=list(PROFILES.keys()),
|
||||
default="pixel6",
|
||||
).execute()
|
||||
args.spoof_profile = spoof_profile
|
||||
args.app = apps
|
||||
install_app(args)
|
||||
elif action == "Remove":
|
||||
@@ -296,7 +308,7 @@ def main():
|
||||
certified.set_defaults(func=get_certified)
|
||||
|
||||
install_choices = ["gapps", "microg", "libndk", "libhoudini",
|
||||
"magisk", "mitm", "smartdock", "widevine"]
|
||||
"magisk", "mitm", "smartdock", "widevine", "device_spoof"]
|
||||
hack_choices = ["nodataperm", "hidestatusbar"]
|
||||
micrg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
||||
remove_choices = install_choices
|
||||
@@ -327,6 +339,11 @@ widevine: Add support for widevine DRM L3
|
||||
dest='ca_cert_file',
|
||||
help='[for mitm only] The CA certificate file (*.pem) to install',
|
||||
default=None)
|
||||
install_parser.add_argument('-p', '--spoof-profile',
|
||||
dest='spoof_profile',
|
||||
help='[for device_spoof only] Device profile to spoof',
|
||||
choices=list(PROFILES.keys()),
|
||||
default="pixel6")
|
||||
install_parser.set_defaults(func=install_app)
|
||||
|
||||
# remove and its aliases
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
{ lib,
|
||||
stdenvNoCC,
|
||||
lzip,
|
||||
python3,
|
||||
makeWrapper }:
|
||||
let
|
||||
wrappedPath = lib.makeBinPath [ lzip ];
|
||||
in stdenvNoCC.mkDerivation {
|
||||
name = "waydroid_script";
|
||||
|
||||
buildInputs = [
|
||||
(python3.withPackages(ps: with ps; [ tqdm requests inquirerpy ]))
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
src = ./.;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs main.py
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/libexec
|
||||
cp -r . $out/libexec/waydroid_script
|
||||
mkdir -p $out/bin
|
||||
makeShellWrapper $out/libexec/waydroid_script/main.py $out/bin/waydroid_script \
|
||||
--prefix PATH : "${wrappedPath}"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import configparser
|
||||
from tools.logger import Logger
|
||||
|
||||
|
||||
PROFILES = {
|
||||
"pixel6": {
|
||||
"ro.product.brand": "google",
|
||||
"ro.product.manufacturer": "Google",
|
||||
"ro.product.model": "Pixel 6",
|
||||
"ro.product.name": "oriole",
|
||||
"ro.product.device": "oriole",
|
||||
"ro.product.board": "oriole",
|
||||
"ro.build.product": "oriole",
|
||||
"ro.build.fingerprint": "google/oriole/oriole:13/TQ3A.230901.001/10750268:user/release-keys",
|
||||
"ro.build.description": "oriole-user 13 TQ3A.230901.001 10750268 release-keys",
|
||||
"ro.build.version.release": "13",
|
||||
"ro.build.version.sdk": "33",
|
||||
"ro.build.type": "user",
|
||||
"ro.build.tags": "release-keys",
|
||||
},
|
||||
"samsung_s21": {
|
||||
"ro.product.brand": "samsung",
|
||||
"ro.product.manufacturer": "samsung",
|
||||
"ro.product.model": "SM-G991B",
|
||||
"ro.product.name": "o1sxeea",
|
||||
"ro.product.device": "o1s",
|
||||
"ro.product.board": "lahaina",
|
||||
"ro.build.product": "o1s",
|
||||
"ro.build.fingerprint": "samsung/o1sxeea/o1s:13/TP1A.220624.014/G991BXXU5EWCA:user/release-keys",
|
||||
"ro.build.description": "o1sxeea-user 13 TP1A.220624.014 G991BXXU5EWCA release-keys",
|
||||
"ro.build.version.release": "13",
|
||||
"ro.build.version.sdk": "33",
|
||||
"ro.build.type": "user",
|
||||
"ro.build.tags": "release-keys",
|
||||
},
|
||||
}
|
||||
|
||||
PROP_KEYS = list(next(iter(PROFILES.values())).keys())
|
||||
|
||||
|
||||
class DeviceSpoof:
|
||||
id = "device_spoof"
|
||||
|
||||
def __init__(self, profile_name="pixel6") -> None:
|
||||
if profile_name not in PROFILES:
|
||||
raise ValueError(f"Unknown profile '{profile_name}'. Choose from: {list(PROFILES.keys())}")
|
||||
self.profile_name = profile_name
|
||||
self.apply_props = PROFILES[profile_name]
|
||||
|
||||
def _read_cfg(self):
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.read("/var/lib/waydroid/waydroid.cfg")
|
||||
if not cfg.has_section("properties"):
|
||||
cfg.add_section("properties")
|
||||
return cfg
|
||||
|
||||
def install(self):
|
||||
cfg = self._read_cfg()
|
||||
for key, value in self.apply_props.items():
|
||||
cfg.set("properties", key, value)
|
||||
with open("/var/lib/waydroid/waydroid.cfg", "w") as f:
|
||||
cfg.write(f)
|
||||
Logger.info(f"Device spoofed as '{self.profile_name}'. Restart Waydroid to apply.")
|
||||
|
||||
def uninstall(self):
|
||||
cfg = self._read_cfg()
|
||||
for key in PROP_KEYS:
|
||||
cfg.remove_option("properties", key)
|
||||
with open("/var/lib/waydroid/waydroid.cfg", "w") as f:
|
||||
cfg.write(f)
|
||||
Logger.info("Device spoof properties removed. Restart Waydroid to apply.")
|
||||
+1
-1
@@ -10,7 +10,7 @@ class Houdini(General):
|
||||
partition = "system"
|
||||
dl_links = {
|
||||
"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/9e77896350caccd228b36b2e1b4a994aa4bd48da.zip", "3807fe029559db3037efe245d9e74270"]
|
||||
}
|
||||
act_md5 = ...
|
||||
dl_link = ...
|
||||
|
||||
+14
-6
@@ -10,19 +10,23 @@ from tools import container
|
||||
class Nodataperm(General):
|
||||
id = "nodataperm"
|
||||
dl_links = {
|
||||
"11":
|
||||
{
|
||||
"11": {
|
||||
"x86_64": [
|
||||
"https://github.com/ayasa520/hack_full_data_permission/archive/d4beab7780eb792059d33e77d865579c9ee41546.zip",
|
||||
"b0e3908ffcf5df8ea62f4929aa680f1a"
|
||||
],
|
||||
},
|
||||
"13": {
|
||||
"x86_64": [
|
||||
"https://github.com/ayasa520/hack_full_data_permission/archive/d4beab7780eb792059d33e77d865579c9ee41546.zip",
|
||||
"b0e3908ffcf5df8ea62f4929aa680f1a"
|
||||
],
|
||||
},
|
||||
"13": {}
|
||||
}
|
||||
dl_file_name = "nodataperm.zip"
|
||||
extract_to = "/tmp/nodataperm"
|
||||
dl_link = ...
|
||||
act_md5 = ...
|
||||
dl_link = None
|
||||
act_md5 = None
|
||||
partition = "system"
|
||||
files = [
|
||||
"etc/nodataperm.sh",
|
||||
@@ -36,11 +40,15 @@ class Nodataperm(General):
|
||||
super().__init__()
|
||||
print("ok")
|
||||
arch = self.arch[0]
|
||||
if android_version not in self.dl_links:
|
||||
raise KeyError(f"No download links for Android version '{android_version}'")
|
||||
if arch not in self.dl_links[android_version]:
|
||||
raise KeyError(f"No download links for architecture '{arch}' in Android version '{android_version}'")
|
||||
self.dl_link = self.dl_links[android_version][arch][0]
|
||||
self.act_md5 = self.dl_links[android_version][arch][1]
|
||||
|
||||
def copy(self):
|
||||
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
||||
name = re.findall(r"([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
||||
extract_path = os.path.join(
|
||||
self.extract_to, f"hack_full_data_permission-{name}")
|
||||
if not container.use_overlayfs():
|
||||
|
||||
Reference in New Issue
Block a user