Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97a9b46fc0 |
17
Android.mk
17
Android.mk
@@ -1,10 +1,15 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# 仅把 magisk.apk 作为普通文件安装到 /system/etc/init/magisk/
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := magisk_apk_flat
|
||||
LOCAL_SRC_FILES := magisk.apk
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_STEM := magisk.apk
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/init/magisk
|
||||
|
||||
LOCAL_MODULE := magisk
|
||||
LOCAL_SRC_FILES := magisk.apk
|
||||
LOCAL_MODULE_CLASS := APPS
|
||||
LOCAL_CERTIFICATE := platform
|
||||
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/init/
|
||||
|
||||
LOCAL_ENFORCE_USES_LIBRARIES := false
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
55
README.md
55
README.md
@@ -1,55 +0,0 @@
|
||||
# Magisk Vendor 项目
|
||||
|
||||
这个项目为 Android 设备提供 Magisk 支持,适用于 vendor overlay 构建。
|
||||
|
||||
## 更新内容
|
||||
|
||||
- ✅ 更新到官方 Magisk v30.2 版本
|
||||
- ✅ 添加了自动下载功能,无需手动准备 APK 文件
|
||||
- ✅ 集成了 MD5 校验确保文件完整性
|
||||
- ✅ 改进了二进制文件提取逻辑
|
||||
- ✅ 更新了 init 服务配置
|
||||
- ✅ 优化了构建流程配置
|
||||
- ✅ 统一了路径结构,与 magisk.py 保持一致
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. **构建前准备**:运行提取脚本自动下载并提取 Magisk:
|
||||
```bash
|
||||
python3 magisk.py
|
||||
```
|
||||
|
||||
2. **进行 Android 构建**:在你的设备配置中包含此 vendor
|
||||
|
||||
脚本会自动:
|
||||
- 从 topjohnwu/Magisk 下载 Magisk v30.2 版本 APK
|
||||
- 验证文件 MD5 校验和 (834b0f063ea713bea48b92c7d5648ce9)
|
||||
- 提取二进制文件到 magisk 目录
|
||||
|
||||
**注意**:请确保在 Android 构建之前先运行 `magisk.py` 脚本来准备所需的文件。
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
vendor/magisk/
|
||||
├── magisk.py # Magisk 类模块(包含下载和复制逻辑)
|
||||
├── magisk.apk # Magisk APK 文件
|
||||
├── Android.mk # 构建配置
|
||||
├── device.mk # 设备配置
|
||||
└── magisk/
|
||||
└── system/
|
||||
└── etc/
|
||||
└── init/
|
||||
└── magisk/ # 提取的二进制文件目录
|
||||
```
|
||||
|
||||
## 支持的架构
|
||||
|
||||
- ARM64 (arm64-v8a)
|
||||
- ARM32 (armeabi-v7a)
|
||||
|
||||
## 兼容性
|
||||
|
||||
- 支持最新版本的 Magisk
|
||||
- 适用于 Redroid 环境
|
||||
- 兼容 Android vendor overlay 构建系统
|
||||
7
arm64/device.mk
Normal file
7
arm64/device.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
magisk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk.rc \
|
||||
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/magisk,$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk) \
|
||||
BIN
arm64/magisk/busybox
Executable file
BIN
arm64/magisk/busybox
Executable file
Binary file not shown.
BIN
arm64/magisk/magisk32
Normal file
BIN
arm64/magisk/magisk32
Normal file
Binary file not shown.
BIN
arm64/magisk/magisk64
Executable file
BIN
arm64/magisk/magisk64
Executable file
Binary file not shown.
BIN
arm64/magisk/magiskboot
Executable file
BIN
arm64/magisk/magiskboot
Executable file
Binary file not shown.
BIN
arm64/magisk/magiskinit
Executable file
BIN
arm64/magisk/magiskinit
Executable file
Binary file not shown.
BIN
arm64/magisk/magiskpolicy
Executable file
BIN
arm64/magisk/magiskpolicy
Executable file
Binary file not shown.
7
arm64_only/device.mk
Normal file
7
arm64_only/device.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
magisk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk.rc \
|
||||
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/magisk,$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk) \
|
||||
BIN
arm64_only/magisk/busybox
Executable file
BIN
arm64_only/magisk/busybox
Executable file
Binary file not shown.
BIN
arm64_only/magisk/magisk64
Executable file
BIN
arm64_only/magisk/magisk64
Executable file
Binary file not shown.
BIN
arm64_only/magisk/magiskboot
Executable file
BIN
arm64_only/magisk/magiskboot
Executable file
Binary file not shown.
BIN
arm64_only/magisk/magiskinit
Executable file
BIN
arm64_only/magisk/magiskinit
Executable file
Binary file not shown.
BIN
arm64_only/magisk/magiskpolicy
Executable file
BIN
arm64_only/magisk/magiskpolicy
Executable file
Binary file not shown.
12
device.mk
12
device.mk
@@ -1,11 +1,7 @@
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
magisk_apk_flat
|
||||
magisk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/magisk/magisk/magisk:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/magisk:0755 \
|
||||
vendor/magisk/magisk/magiskboot:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/magiskboot:0755 \
|
||||
vendor/magisk/magisk/magiskinit:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/magiskinit:0755 \
|
||||
vendor/magisk/magisk/magiskpolicy:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/magiskpolicy:0755 \
|
||||
vendor/magisk/magisk/busybox:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/busybox:0755 \
|
||||
vendor/magisk/magisk/init-ld:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk/init-ld:0755 \
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/magisk.rc:0644
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk.rc \
|
||||
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/magisk,$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk) \
|
||||
|
||||
95
extract.py
Normal file
95
extract.py
Normal file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env python3
|
||||
import atexit
|
||||
import os.path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import zipfile
|
||||
|
||||
|
||||
def main():
|
||||
current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
apk_path = os.path.join(current_path, "magisk.apk")
|
||||
unzip_path = os.path.join(current_path, "temp")
|
||||
|
||||
shutil.rmtree(unzip_path, ignore_errors=True)
|
||||
os.makedirs(unzip_path, exist_ok=True)
|
||||
atexit.register(shutil.rmtree, unzip_path, ignore_errors=True)
|
||||
|
||||
print("==> Extracting archive ...")
|
||||
with zipfile.ZipFile(apk_path) as z:
|
||||
z.extractall(unzip_path)
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
print("==> Installing magisk(arm64) now ...")
|
||||
overlay_path = os.path.join(current_path, "arm64", "magisk")
|
||||
shutil.rmtree(overlay_path, ignore_errors=True)
|
||||
os.makedirs(overlay_path, exist_ok=True)
|
||||
|
||||
lib64_path = os.path.join(unzip_path, "lib", "arm64-v8a")
|
||||
for parent, dirnames, filenames in os.walk(lib64_path):
|
||||
for filename in filenames:
|
||||
so_path = os.path.join(lib64_path, filename)
|
||||
so_name = re.search(r"lib(.*)\.so", filename)
|
||||
target_path = os.path.join(overlay_path, so_name.group(1))
|
||||
shutil.copyfile(so_path, target_path)
|
||||
subprocess.check_call(["chmod", "+x", target_path])
|
||||
|
||||
lib32_path = os.path.join(unzip_path, "lib", "armeabi-v7a")
|
||||
shutil.copyfile(os.path.join(lib32_path, "libmagisk32.so"), os.path.join(overlay_path, "magisk32"))
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
print("==> Installing magisk(arm64_only) now ...")
|
||||
overlay_path = os.path.join(current_path, "arm64_only", "magisk")
|
||||
shutil.rmtree(overlay_path, ignore_errors=True)
|
||||
os.makedirs(overlay_path, exist_ok=True)
|
||||
|
||||
lib64_path = os.path.join(unzip_path, "lib", "arm64-v8a")
|
||||
for parent, dirnames, filenames in os.walk(lib64_path):
|
||||
for filename in filenames:
|
||||
so_path = os.path.join(lib64_path, filename)
|
||||
so_name = re.search(r"lib(.*)\.so", filename)
|
||||
target_path = os.path.join(overlay_path, so_name.group(1))
|
||||
shutil.copyfile(so_path, target_path)
|
||||
subprocess.check_call(["chmod", "+x", target_path])
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
print("==> Installing magisk(x86_64) now ...")
|
||||
overlay_path = os.path.join(current_path, "x86_64", "magisk")
|
||||
shutil.rmtree(overlay_path, ignore_errors=True)
|
||||
os.makedirs(overlay_path, exist_ok=True)
|
||||
|
||||
lib64_path = os.path.join(unzip_path, "lib", "arm64-v8a")
|
||||
for parent, dirnames, filenames in os.walk(lib64_path):
|
||||
for filename in filenames:
|
||||
so_path = os.path.join(lib64_path, filename)
|
||||
so_name = re.search(r"lib(.*)\.so", filename)
|
||||
target_path = os.path.join(overlay_path, so_name.group(1))
|
||||
shutil.copyfile(so_path, target_path)
|
||||
subprocess.check_call(["chmod", "+x", target_path])
|
||||
|
||||
lib32_path = os.path.join(unzip_path, "lib", "x86")
|
||||
shutil.copyfile(os.path.join(lib32_path, "libmagisk32.so"), os.path.join(overlay_path, "magisk32"))
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
print("==> Installing magisk(x86_64_only) now ...")
|
||||
overlay_path = os.path.join(current_path, "x86_64_only", "magisk")
|
||||
shutil.rmtree(overlay_path, ignore_errors=True)
|
||||
os.makedirs(overlay_path, exist_ok=True)
|
||||
|
||||
lib64_path = os.path.join(unzip_path, "lib", "x86_64")
|
||||
for parent, dirnames, filenames in os.walk(lib64_path):
|
||||
for filename in filenames:
|
||||
so_path = os.path.join(lib64_path, filename)
|
||||
so_name = re.search(r"lib(.*)\.so", filename)
|
||||
target_path = os.path.join(overlay_path, so_name.group(1))
|
||||
shutil.copyfile(so_path, target_path)
|
||||
subprocess.check_call(["chmod", "+x", target_path])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
BIN
magisk.apk
Normal file
BIN
magisk.apk
Normal file
Binary file not shown.
185
magisk.py
185
magisk.py
@@ -1,185 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
|
||||
def calculate_md5(file_path):
|
||||
"""计算文件的 MD5 值"""
|
||||
hash_md5 = hashlib.md5()
|
||||
with open(file_path, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(4096), b""):
|
||||
hash_md5.update(chunk)
|
||||
return hash_md5.hexdigest()
|
||||
|
||||
|
||||
def download_file(url, file_path):
|
||||
"""下载文件"""
|
||||
print(f"==> Downloading from {url}")
|
||||
urllib.request.urlretrieve(url, file_path)
|
||||
|
||||
|
||||
def run_command(cmd):
|
||||
"""运行命令"""
|
||||
try:
|
||||
subprocess.run(cmd, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Command failed: {' '.join(cmd)}")
|
||||
raise e
|
||||
|
||||
|
||||
class Magisk:
|
||||
def __init__(self, target_arch):
|
||||
self.download_loc = os.path.join(os.path.dirname(os.path.abspath(__file__)), "downloads")
|
||||
self.dl_link = "https://git.coderkang.top/Android/Magisk/releases/download/debug-7be6d81-30200/Magisk-7be6d81-30200-debug.apk"
|
||||
self.dl_file_name = os.path.join(self.download_loc, "magisk.apk")
|
||||
self.act_md5 = "834b0f063ea713bea48b92c7d5648ce9"
|
||||
self.extract_to = os.path.join(os.path.dirname(os.path.abspath(__file__)), "temp")
|
||||
self.copy_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "magisk")
|
||||
self.target_arch = target_arch
|
||||
|
||||
# 架构映射
|
||||
self.arch_map = {
|
||||
"x86": "x86",
|
||||
"x86_64": "x86_64",
|
||||
"arm": "armeabi-v7a",
|
||||
"arm64": "arm64-v8a"
|
||||
}
|
||||
|
||||
def download(self):
|
||||
"""下载 Magisk APK"""
|
||||
print("==> Downloading latest Magisk now .....")
|
||||
|
||||
# 确保下载目录存在
|
||||
os.makedirs(self.download_loc, exist_ok=True)
|
||||
|
||||
# 检查并下载 Magisk APK
|
||||
need_download = True
|
||||
if os.path.exists(self.dl_file_name):
|
||||
print("==> Checking existing Magisk APK...")
|
||||
actual_md5 = calculate_md5(self.dl_file_name)
|
||||
if actual_md5 == self.act_md5:
|
||||
print("==> Magisk APK already exists and verified!")
|
||||
need_download = False
|
||||
else:
|
||||
print(f"==> MD5 mismatch. Expected: {self.act_md5}, Got: {actual_md5}")
|
||||
|
||||
if need_download:
|
||||
download_file(self.dl_link, self.dl_file_name)
|
||||
actual_md5 = calculate_md5(self.dl_file_name)
|
||||
if actual_md5 != self.act_md5:
|
||||
raise Exception(f"Downloaded file MD5 verification failed! Expected: {self.act_md5}, Got: {actual_md5}")
|
||||
print("==> Download completed and verified!")
|
||||
|
||||
def extract(self):
|
||||
"""解压 APK 文件"""
|
||||
print("==> Extracting Magisk APK...")
|
||||
|
||||
# 清理并创建解压目录
|
||||
shutil.rmtree(self.extract_to, ignore_errors=True)
|
||||
os.makedirs(self.extract_to, exist_ok=True)
|
||||
|
||||
# 解压 APK
|
||||
with zipfile.ZipFile(self.dl_file_name) as z:
|
||||
z.extractall(self.extract_to)
|
||||
|
||||
def copy(self):
|
||||
"""复制文件到目标目录"""
|
||||
print("==> Copying magisk files now ...")
|
||||
|
||||
# 清理并创建目标目录
|
||||
if os.path.exists(self.copy_dir):
|
||||
shutil.rmtree(self.copy_dir)
|
||||
os.makedirs(self.copy_dir, exist_ok=True)
|
||||
|
||||
# 复制主要架构的库文件
|
||||
lib_dir = os.path.join(self.extract_to, "lib", self.arch_map[self.target_arch])
|
||||
if os.path.exists(lib_dir):
|
||||
for parent, dirnames, filenames in os.walk(lib_dir):
|
||||
for filename in filenames:
|
||||
o_path = os.path.join(lib_dir, filename)
|
||||
so_name = re.search(r'lib(.*)\.so', filename)
|
||||
if so_name:
|
||||
n_path = os.path.join(self.copy_dir, so_name.group(1))
|
||||
shutil.copyfile(o_path, n_path)
|
||||
run_command(["chmod", "+x", n_path])
|
||||
|
||||
# 复制 arm32 的 magisk 二进制文件(如果存在)
|
||||
lib32_path = os.path.join(self.extract_to, "lib", "armeabi-v7a")
|
||||
magisk32_src = os.path.join(lib32_path, "libmagisk32.so")
|
||||
magisk32_dst = os.path.join(self.copy_dir, "magisk32")
|
||||
if os.path.exists(magisk32_src):
|
||||
shutil.copyfile(magisk32_src, magisk32_dst)
|
||||
run_command(["chmod", "+x", magisk32_dst])
|
||||
|
||||
# 复制 magisk.apk 到目标目录
|
||||
apk_dst = os.path.join(os.path.dirname(os.path.abspath(__file__)), "magisk.apk")
|
||||
if os.path.exists(self.dl_file_name):
|
||||
shutil.copyfile(self.dl_file_name, apk_dst)
|
||||
|
||||
print("==> Magisk installation completed!")
|
||||
|
||||
def cleanup(self):
|
||||
"""清理临时文件和目录"""
|
||||
print("==> Cleaning up temporary files...")
|
||||
|
||||
# 清理解压临时目录
|
||||
if os.path.exists(self.extract_to):
|
||||
shutil.rmtree(self.extract_to, ignore_errors=True)
|
||||
print(f"==> Removed temporary extraction directory: {self.extract_to}")
|
||||
|
||||
# 清理下载目录
|
||||
if os.path.exists(self.download_loc):
|
||||
shutil.rmtree(self.download_loc, ignore_errors=True)
|
||||
print(f"==> Removed download directory: {self.download_loc}")
|
||||
|
||||
def run(self):
|
||||
"""执行完整的构建流程"""
|
||||
try:
|
||||
self.download()
|
||||
self.extract()
|
||||
self.copy()
|
||||
success = True
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
success = False
|
||||
finally:
|
||||
self.cleanup()
|
||||
|
||||
return success
|
||||
|
||||
|
||||
def main():
|
||||
"""主函数"""
|
||||
parser = argparse.ArgumentParser(description='Magisk vendor package builder')
|
||||
|
||||
parser.add_argument('--arch',
|
||||
choices=['x86', 'x86_64', 'arm', 'arm64'],
|
||||
required=True,
|
||||
help='指定目标架构 (必需)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
print(f"==> Using target architecture: {args.arch}")
|
||||
|
||||
# 创建 Magisk 实例
|
||||
magisk = Magisk(target_arch=args.arch)
|
||||
|
||||
# 执行构建
|
||||
success = magisk.run()
|
||||
|
||||
if success:
|
||||
print("==> Magisk vendor package created successfully!")
|
||||
print("==> Temporary files cleaned up")
|
||||
else:
|
||||
print("==> Failed to create Magisk vendor package!")
|
||||
exit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
60
magisk.rc
60
magisk.rc
@@ -1,40 +1,38 @@
|
||||
service bootanim /system/bin/bootanimation
|
||||
class core animation
|
||||
user graphics
|
||||
group graphics audio
|
||||
disabled
|
||||
oneshot
|
||||
ioprio rt 0
|
||||
task_profiles MaxPerformance
|
||||
|
||||
on post-fs-data
|
||||
on post-fs-data && property:ro.boot.redroid_magisk=1
|
||||
start logd
|
||||
mkdir /sbin 755
|
||||
chmod 0755 /system/etc/init/magisk/magisk
|
||||
chmod 0755 /system/etc/init/magisk/magiskboot
|
||||
chmod 0755 /system/etc/init/magisk/magiskinit
|
||||
chmod 0755 /system/etc/init/magisk/magiskpolicy
|
||||
chmod 0755 /system/etc/init/magisk/busybox
|
||||
chmod 0755 /system/etc/init/magisk/init-ld
|
||||
exec u:r:su:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||
exec u:r:magisk:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||
exec u:r:update_engine:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk
|
||||
exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk --auto-selinux --setup-sbin /system/etc/init/magisk /sbin
|
||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --post-fs-data
|
||||
chmod 0755 /vendor/etc/init/magisk/magisk64
|
||||
chmod 0755 /vendor/etc/init/magisk/magiskpolicy
|
||||
exec u:r:su:s0 root root -- /vendor/etc/init/magisk/magisk64 --auto-selinux --setup-sbin /vendor/etc/init/magisk
|
||||
exec u:r:su:s0 root root -- /vendor/etc/init/magisk/magiskpolicy --live --magisk "allow * magisk_file lnk_file *"
|
||||
mkdir /sbin/.magisk 700
|
||||
mkdir /sbin/.magisk/mirror 700
|
||||
mkdir /sbin/.magisk/block 700
|
||||
rm /dev/.magisk_unblock
|
||||
start 7zKkuZ1ZhD
|
||||
wait /dev/.magisk_unblock 40
|
||||
rm /dev/.magisk_unblock
|
||||
start wHgGlkRCtMoIQw
|
||||
|
||||
on nonencrypted
|
||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --service
|
||||
service 7zKkuZ1ZhD /sbin/magisk --auto-selinux --post-fs-data
|
||||
user root
|
||||
seclabel u:r:su:s0
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --service
|
||||
service wHgGlkRCtMoIQw /sbin/magisk --auto-selinux --service
|
||||
user root
|
||||
seclabel u:r:su:s0
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
on property:sys.boot_completed=1 && property:ro.boot.redroid_magisk=1
|
||||
mkdir /data/adb/magisk 755
|
||||
exec u:r:su:s0 root root -- /sbin/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
|
||||
exec -- /system/bin/sh -c "if [ ! -e /data/data/io.github.huskydg.magisk ] ; then pm install /vendor/etc/init/magisk/magisk.apk ; fi"
|
||||
|
||||
on property:init.svc.zygote=restarting && property:ro.boot.redroid_magisk=1
|
||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart
|
||||
|
||||
on property:init.svc.zygote=stopped
|
||||
|
||||
on property:init.svc.zygote=stopped && property:ro.boot.redroid_magisk=1
|
||||
exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart
|
||||
|
||||
7
x86_64/device.mk
Normal file
7
x86_64/device.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
magisk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk.rc \
|
||||
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/magisk,$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk) \
|
||||
BIN
x86_64/magisk/busybox
Executable file
BIN
x86_64/magisk/busybox
Executable file
Binary file not shown.
BIN
x86_64/magisk/magisk32
Normal file
BIN
x86_64/magisk/magisk32
Normal file
Binary file not shown.
BIN
x86_64/magisk/magisk64
Executable file
BIN
x86_64/magisk/magisk64
Executable file
Binary file not shown.
BIN
x86_64/magisk/magiskboot
Executable file
BIN
x86_64/magisk/magiskboot
Executable file
Binary file not shown.
BIN
x86_64/magisk/magiskinit
Executable file
BIN
x86_64/magisk/magiskinit
Executable file
Binary file not shown.
BIN
x86_64/magisk/magiskpolicy
Executable file
BIN
x86_64/magisk/magiskpolicy
Executable file
Binary file not shown.
7
x86_64_only/device.mk
Normal file
7
x86_64_only/device.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
magisk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/magisk/magisk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk.rc \
|
||||
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/magisk,$(TARGET_COPY_OUT_VENDOR)/etc/init/magisk) \
|
||||
BIN
x86_64_only/magisk/busybox
Executable file
BIN
x86_64_only/magisk/busybox
Executable file
Binary file not shown.
BIN
x86_64_only/magisk/magisk64
Executable file
BIN
x86_64_only/magisk/magisk64
Executable file
Binary file not shown.
BIN
x86_64_only/magisk/magiskboot
Executable file
BIN
x86_64_only/magisk/magiskboot
Executable file
Binary file not shown.
BIN
x86_64_only/magisk/magiskinit
Executable file
BIN
x86_64_only/magisk/magiskinit
Executable file
Binary file not shown.
BIN
x86_64_only/magisk/magiskpolicy
Executable file
BIN
x86_64_only/magisk/magiskpolicy
Executable file
Binary file not shown.
Reference in New Issue
Block a user