mirror of
https://github.com/ayasa520/redroid-script.git
synced 2026-11-25 06:14:32 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b1a3478dd | ||
|
|
5d575d4e43 | ||
|
|
a4951b782f | ||
|
|
1004fc4062 | ||
|
|
c84c3758c8 | ||
|
|
881f7f00d6 | ||
|
|
e7da0097c6 | ||
|
|
34594ff9bd | ||
|
|
bfb07a1405 | ||
|
|
97acfaec0a | ||
|
|
ae3434afd9 | ||
|
|
9b310aa4de | ||
|
|
0734324216 |
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
Copyright © 2023 <copyright holders>
|
Copyright © 2023 Rikka
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -147,6 +147,6 @@ docker run -itd --rm --privileged \
|
|||||||
## Credits
|
## Credits
|
||||||
1. [remote-android](https://github.com/remote-android)
|
1. [remote-android](https://github.com/remote-android)
|
||||||
2. [waydroid_script](https://github.com/casualsnek/waydroid_script)
|
2. [waydroid_script](https://github.com/casualsnek/waydroid_script)
|
||||||
3. [Magisk Delta](https://huskydg.github.io/magisk-files/)
|
3. ~~[Magisk Delta](https://huskydg.github.io/magisk-files/)~~
|
||||||
4. [vendor_intel_proprietary_houdini](https://github.com/supremegamers/vendor_intel_proprietary_houdini)
|
4. [vendor_intel_proprietary_houdini](https://github.com/supremegamers/vendor_intel_proprietary_houdini)
|
||||||
|
5. [Magisk](https://github.com/topjohnwu/Magisk)
|
||||||
+2
-2
@@ -22,7 +22,7 @@ def main():
|
|||||||
dest='android',
|
dest='android',
|
||||||
help='Specify the Android version to build',
|
help='Specify the Android version to build',
|
||||||
default='11.0.0',
|
default='11.0.0',
|
||||||
choices=['13.0.0', '12.0.0', '12.0.0_64only', '11.0.0', '10.0.0', '9.0.0', '8.1.0'])
|
choices=['14.0.0', '13.0.0', '12.0.0', '12.0.0_64only', '11.0.0', '10.0.0', '9.0.0', '8.1.0'])
|
||||||
parser.add_argument('-g', '--install-gapps',
|
parser.add_argument('-g', '--install-gapps',
|
||||||
dest='gapps',
|
dest='gapps',
|
||||||
help='Install OpenGapps to ReDroid',
|
help='Install OpenGapps to ReDroid',
|
||||||
@@ -73,7 +73,7 @@ def main():
|
|||||||
tags.append("litegapps")
|
tags.append("litegapps")
|
||||||
if args.mindthegapps:
|
if args.mindthegapps:
|
||||||
MindTheGapps(args.android).install()
|
MindTheGapps(args.android).install()
|
||||||
dockerfile = dockerfile + "COPY mindthegapps /\n"
|
dockerfile = dockerfile + "COPY mindthegapps /\nENTRYPOINT [\"/init\", \"androidboot.hardware=redroid\", \"ro.setupwizard.mode=DISABLED\"]\n"
|
||||||
tags.append("mindthegapps")
|
tags.append("mindthegapps")
|
||||||
if args.ndk:
|
if args.ndk:
|
||||||
if args.android in ["11.0.0", "12.0.0", "12.0.0_64only"]:
|
if args.android in ["11.0.0", "12.0.0", "12.0.0_64only"]:
|
||||||
|
|||||||
+10
-14
@@ -38,24 +38,20 @@ on property:sys.boot_completed=1
|
|||||||
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/46682f423b8497db3f96222f2669d770eff764c3.zip",
|
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/46682f423b8497db3f96222f2669d770eff764c3.zip",
|
||||||
"cd4dd2891aa18e7699d33dcc3fe3ffd4"],
|
"cd4dd2891aa18e7699d33dcc3fe3ffd4"],
|
||||||
"11.0.0": [
|
"11.0.0": [
|
||||||
"https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip",
|
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/0c149b1e14d7bfd4b2af261afc6f2e80517dbd98.zip",
|
||||||
"fbff756612b4144797fbc99eadcb6653"],
|
"d9703a9b1e674bb41c34e40823774e9f"],
|
||||||
"12.0.0": [
|
"12.0.0": [
|
||||||
"https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/0e0164611d5fe5595229854759c30a9b5c1199a5.zip",
|
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/0c149b1e14d7bfd4b2af261afc6f2e80517dbd98.zip",
|
||||||
"9709701b44b6ab7fc311c7dc95945bd0"],
|
"d9703a9b1e674bb41c34e40823774e9f"],
|
||||||
# 13.0.0 from wsa-13 not working
|
|
||||||
# "13.0.0": [
|
|
||||||
# "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/5460519aa63a23201ba0f3d45cfc382b2e9b30a0.zip",
|
|
||||||
# "08d8d8ed9c4b00eba3fa21ecd527eb87"],
|
|
||||||
"13.0.0": [
|
"13.0.0": [
|
||||||
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip",
|
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/0c149b1e14d7bfd4b2af261afc6f2e80517dbd98.zip",
|
||||||
"d4824c0c00e8fa9611e1db5124ec61f9"],
|
"d9703a9b1e674bb41c34e40823774e9f"],
|
||||||
"14.0.0": [
|
"14.0.0": [
|
||||||
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip",
|
"https://github.com/rote66/vendor_intel_proprietary_houdini/archive/0c149b1e14d7bfd4b2af261afc6f2e80517dbd98.zip",
|
||||||
"d4824c0c00e8fa9611e1db5124ec61f9"]
|
"d9703a9b1e674bb41c34e40823774e9f"],
|
||||||
# "15.0.0": [
|
# "15.0.0": [
|
||||||
# "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip",
|
# "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/0c149b1e14d7bfd4b2af261afc6f2e80517dbd98.zip",
|
||||||
# "d4824c0c00e8fa9611e1db5124ec61f9"]
|
# "d9703a9b1e674bb41c34e40823774e9f"]
|
||||||
}
|
}
|
||||||
dl_file_name = os.path.join(download_loc, "libhoudini.zip")
|
dl_file_name = os.path.join(download_loc, "libhoudini.zip")
|
||||||
extract_to = "/tmp/houdiniunpack"
|
extract_to = "/tmp/houdiniunpack"
|
||||||
|
|||||||
+4
-3
@@ -36,8 +36,8 @@ class LiteGapps(General):
|
|||||||
},
|
},
|
||||||
"14.0.0": {
|
"14.0.0": {
|
||||||
"x86_64": [
|
"x86_64": [
|
||||||
"https://sourceforge.net/projects/litegapps/files/litegapps/x86_64/34/lite/v3.0/AUTO_LiteGapps_x86_64_14.0_v3.0_official.zip",
|
"https://sourceforge.net/projects/litegapps/files/litegapps/x86_64/34/lite/2024-10-29/LiteGapps-x86_64-14.0-20241029-official.zip",
|
||||||
"51cbdb561f9c9162e4fdcbffe691c4bc",
|
"c897c8fe8a37474ed386e1bd73a7995b",
|
||||||
],
|
],
|
||||||
"x86": [
|
"x86": [
|
||||||
"https://sourceforge.net/projects/litegapps/files/litegapps/x86/35/lite/2024-10-27/LiteGapps-x86-15.0-20241027-official.zip",
|
"https://sourceforge.net/projects/litegapps/files/litegapps/x86/35/lite/2024-10-27/LiteGapps-x86-15.0-20241027-official.zip",
|
||||||
@@ -212,4 +212,5 @@ class LiteGapps(General):
|
|||||||
|
|
||||||
# extract extract_to/files/files.tar.xz file to extract_to/appunpack
|
# extract extract_to/files/files.tar.xz file to extract_to/appunpack
|
||||||
run( [ "tar", "-xvf", os.path.join(self.extract_to, "files", "files.tar.xz"), "-C", os.path.join(self.extract_to, "appunpack"), ])
|
run( [ "tar", "-xvf", os.path.join(self.extract_to, "files", "files.tar.xz"), "-C", os.path.join(self.extract_to, "appunpack"), ])
|
||||||
shutil.copytree( os.path.join( self.extract_to, "appunpack", self.arch[0], self.api_level_map[self.version], "system",), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True,)
|
base_version = self.version.replace("_64only", "").replace("__64only", "")
|
||||||
|
shutil.copytree( os.path.join( self.extract_to, "appunpack", self.arch[0], self.api_level_map[base_version], "system",), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True,)
|
||||||
+44
-28
@@ -2,15 +2,15 @@ import gzip
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import re
|
import re
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
from stuff.general import General
|
from stuff.general import General
|
||||||
from tools.helper import bcolors, download_file, host, print_color, run, get_download_dir
|
from tools.helper import bcolors, host, print_color, run, get_download_dir
|
||||||
|
|
||||||
class Magisk(General):
|
class Magisk(General):
|
||||||
download_loc = get_download_dir()
|
download_loc = get_download_dir()
|
||||||
dl_link = "https://web.archive.org/web/20230718224206if_/https://objects.githubusercontent.com/github-production-release-asset-2e65be/514574759/50ec2f91-174b-4918-8587-04e847458bfd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230718%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230718T224206Z&X-Amz-Expires=300&X-Amz-Signature=ee54e872b4d3c1388601941e85b2fcf84d5e06968618271ea2f5e3ea5947d4e1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=514574759&response-content-disposition=attachment%3B%20filename%3Dapp-debug.apk&response-content-type=application%2Fvnd.android.package-archive"
|
dl_link = "https://github.com/ayasa520/Magisk/releases/download/v31.1/Magisk-v31.1.apk"
|
||||||
dl_file_name = os.path.join(download_loc, "magisk.apk")
|
dl_file_name = os.path.join(download_loc, "magisk-v31.1.apk")
|
||||||
act_md5 = "ec98dcee84a47785dc551eb7c465b25f"
|
act_md5 = "10304bbeddb6e1bbc7040fc7ec133178"
|
||||||
extract_to = "/tmp/magisk_unpack"
|
|
||||||
copy_dir = "./magisk"
|
copy_dir = "./magisk"
|
||||||
magisk_dir = os.path.join(copy_dir, "system", "etc", "init", "magisk")
|
magisk_dir = os.path.join(copy_dir, "system", "etc", "init", "magisk")
|
||||||
machine = host()
|
machine = host()
|
||||||
@@ -28,36 +28,42 @@ service bootanim /system/bin/bootanimation
|
|||||||
bootanim_component = """
|
bootanim_component = """
|
||||||
on post-fs-data
|
on post-fs-data
|
||||||
start logd
|
start logd
|
||||||
exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk{arch} --auto-selinux --setup-sbin /system/etc/init/magisk
|
exec u:r:su:s0 root root -- {MAGISKSYSTEMDIR}/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 -- {MAGISKSYSTEMDIR}/magiskpolicy --live --magisk
|
||||||
mkdir /sbin/.magisk 700
|
exec u:r:update_engine:s0 root root -- {MAGISKSYSTEMDIR}/magiskpolicy --live --magisk
|
||||||
mkdir /sbin/.magisk/mirror 700
|
exec u:r:su:s0 root root -- {MAGISKSYSTEMDIR}/{magisk_name} --auto-selinux --setup-sbin {MAGISKSYSTEMDIR} {MAGISKTMP}
|
||||||
mkdir /sbin/.magisk/block 700
|
# The daemon loads BusyBox from /data/adb/magisk at post-fs-data, and
|
||||||
copy /system/etc/init/magisk/config /sbin/.magisk/config
|
# the manager checks the tools and script versions in that same directory.
|
||||||
rm /dev/.magisk_unblock
|
mkdir /data/adb 0700 root root
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --post-fs-data
|
mkdir /data/adb/magisk 0755 root root
|
||||||
wait /dev/.magisk_unblock 40
|
exec -- /system/bin/sh -c "cd {MAGISKSYSTEMDIR} && cp -p busybox magisk magiskboot magiskinit magiskpolicy *.sh /data/adb/magisk/"
|
||||||
rm /dev/.magisk_unblock
|
exec u:r:su:s0 root root -- {MAGISKTMP}/magisk --auto-selinux --post-fs-data
|
||||||
|
on nonencrypted
|
||||||
on zygote-start
|
exec u:r:su:s0 root root -- {MAGISKTMP}/magisk --auto-selinux --service
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --service
|
on property:vold.decrypt=trigger_restart_framework
|
||||||
|
exec u:r:su:s0 root root -- {MAGISKTMP}/magisk --auto-selinux --service
|
||||||
on property:sys.boot_completed=1
|
on property:sys.boot_completed=1
|
||||||
mkdir /data/adb/magisk 755
|
exec u:r:su:s0 root root -- {MAGISKTMP}/magisk --auto-selinux --boot-complete
|
||||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --boot-complete
|
exec -- /system/bin/sh -c "if ! pm path --user 0 com.topjohnwu.magisk >/dev/null; then pm install {MAGISKSYSTEMDIR}/magisk.apk; fi"
|
||||||
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 -- {MAGISKTMP}/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 -- {MAGISKTMP}/magisk --auto-selinux --zygote-restart
|
||||||
""".format(arch=machine[1])
|
""".format(MAGISKSYSTEMDIR="/system/etc/init/magisk", MAGISKTMP="/sbin", magisk_name="magisk")
|
||||||
|
|
||||||
def download(self):
|
def download(self):
|
||||||
print_color("Downloading latest Magisk-Delta now .....", bcolors.GREEN)
|
print_color("Preparing Magisk 31.1 ...", bcolors.GREEN)
|
||||||
super().download()
|
super().download()
|
||||||
|
|
||||||
|
def install(self):
|
||||||
|
# Extract each APK into an empty directory so removed or renamed
|
||||||
|
# entries from an earlier release cannot leak into the image.
|
||||||
|
with TemporaryDirectory(prefix="redroid-magisk-") as extract_to:
|
||||||
|
self.extract_to = extract_to
|
||||||
|
super().install()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
if os.path.exists(self.copy_dir):
|
if os.path.exists(self.copy_dir):
|
||||||
shutil.rmtree(self.copy_dir)
|
shutil.rmtree(self.copy_dir)
|
||||||
@@ -79,11 +85,21 @@ on property:init.svc.zygote=stopped
|
|||||||
for parent, dirnames, filenames in os.walk(lib_dir):
|
for parent, dirnames, filenames in os.walk(lib_dir):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
o_path = os.path.join(lib_dir, filename)
|
o_path = os.path.join(lib_dir, filename)
|
||||||
filename = re.search('lib(.*)\.so', filename)
|
filename = re.search(r'lib(.*)\.so', filename)
|
||||||
n_path = os.path.join(self.magisk_dir, filename.group(1))
|
n_path = os.path.join(self.magisk_dir, filename.group(1))
|
||||||
shutil.copyfile(o_path, n_path)
|
shutil.copyfile(o_path, n_path)
|
||||||
run(["chmod", "+x", n_path])
|
run(["chmod", "+x", n_path])
|
||||||
shutil.copyfile(self.dl_file_name, os.path.join(self.magisk_dir,"magisk.apk") )
|
|
||||||
|
# Seed the runtime directory with the release's companion scripts.
|
||||||
|
# util_functions.sh carries the version checked by the manager.
|
||||||
|
assets_dir = os.path.join(self.extract_to, "assets")
|
||||||
|
for filename in os.listdir(assets_dir):
|
||||||
|
if filename.endswith(".sh"):
|
||||||
|
shutil.copyfile(os.path.join(assets_dir, filename), os.path.join(self.magisk_dir, filename))
|
||||||
|
|
||||||
|
# Magisk 31.1 verifies the installed manager APK directly. Ship the
|
||||||
|
# full APK alongside its own native binaries for boot-time installation.
|
||||||
|
shutil.copyfile(self.dl_file_name, os.path.join(self.magisk_dir, "magisk.apk"))
|
||||||
|
|
||||||
# Updating Magisk from Magisk manager will modify bootanim.rc,
|
# Updating Magisk from Magisk manager will modify bootanim.rc,
|
||||||
# So it is necessary to backup the original bootanim.rc.
|
# So it is necessary to backup the original bootanim.rc.
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ from tools.helper import get_download_dir, host, print_color, run, bcolors
|
|||||||
|
|
||||||
class MindTheGapps(General):
|
class MindTheGapps(General):
|
||||||
dl_links = {
|
dl_links = {
|
||||||
|
"15.0.0": {
|
||||||
|
"x86_64": [
|
||||||
|
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20250330/MindTheGapps-15.0.0-x86_64-20250330.zip",
|
||||||
|
"e54694828bd74e9066b2534a9675c31e",
|
||||||
|
],
|
||||||
|
"arm64": [
|
||||||
|
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20250330/MindTheGapps-15.0.0-arm64-20250330.zip",
|
||||||
|
"79acb62f0f7c66b0f0bcadae5624f3d1",
|
||||||
|
],
|
||||||
|
"arm": [
|
||||||
|
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20250330/MindTheGapps-15.0.0-arm-20250330.zip",
|
||||||
|
"4ced6a404a714e61831e16068c3642b3",
|
||||||
|
],
|
||||||
|
},
|
||||||
"14.0.0": {
|
"14.0.0": {
|
||||||
"x86_64": [
|
"x86_64": [
|
||||||
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-x86_64-20240226.zip",
|
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-x86_64-20240226.zip",
|
||||||
|
|||||||
Reference in new issue
Block a user