|
--判断当前xposed是否有集成,或者版本信息:
- if [ ! -f "system/xposed.prop" ]; then
- echo "! Failed: Extracted file system/xposed.prop not found!"
- exit 1
- fi
复制代码
--挂载系统分区,以便后续进行文件写入:
- echo "- Mounting /system and /vendor read-write"
- mount /system >/dev/null 2>&1
- mount /vendor >/dev/nulif [ ! -f "system/xposed.prop" ]; then
- echo "! Failed: Extracted file system/xposed.prop not found!"
- exit 1
- fil 2>&1
- mount -o remount,rw /system
- mount -o remount,rw /vendor >/dev/null 2>&1
- if [ ! -f '/system/build.prop' ]; then
- echo "! Failed: /system could not be mounted!"
- exit 1
- fi
复制代码
arm架构以及SDK环境判断:
- echo "- Checking environment"
- API=$(grep_prop ro.build.version.sdk)
- APINAME=$(android_version $API)
- ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
- ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
- ABILONG=$(grep_prop ro.product.cpu.abi)
- XVERSION=$(grep_prop version system/xposed.prop)
- XARCH=$(grep_prop arch system/xposed.prop)
- XMINSDK=$(grep_prop minsdk system/xposed.prop)
- XMAXSDK=$(grep_prop maxsdk system/xposed.prop)
- XEXPECTEDSDK=$(android_version $XMINSDK)
- if [ "$XMINSDK" != "$XMAXSDK" ]; then
- XEXPECTEDSDK=$XEXPECTEDSDK' - '$(android_version $XMAXSDK)
- fi
- ARCH=arm
- IS64BIT=
- if [ "$ABI" = "x86" ]; then ARCH=x86; fi;
- if [ "$ABI2" = "x86" ]; then ARCH=x86; fi;
- if [ "$API" -ge "21" ]; then
- if [ "$ABILONG" = "arm64-v8a" ]; then ARCH=arm64; IS64BIT=1; fi;
- if [ "$ABILONG" = "x86_64" ]; then ARCH=x64; IS64BIT=1; fi;
- fi
- # echo "DBG [$API] [$ABI] [$ABI2] [$ABILONG] [$ARCH] [$XARCH] [$XMINSDK] [$XMAXSDK] [$XVERSION]"
- echo " Xposed version: $XVERSION"
- XVALID=
- if [ "$ARCH" = "$XARCH" ]; then
- if [ "$API" -ge "$XMINSDK" ]; then
- if [ "$API" -le "$XMAXSDK" ]; then
- XVALID=1
- else
- echo "! Wrong Android version: $APINAME"
- echo "! This file is for: $XEXPECTEDSDK"
- fi
- else
- echo "! Wrong Android version: $APINAME"
- echo "! This file is for: $XEXPECTEDSDK"
- fi
- else
- echo "! Wrong platform: $ARCH"
- echo "! This file is for: $XARCH"
- fi
- if [ -z $XVALID ]; then
- echo "! Please download the correct package"
- echo "! for your platform/ROM!"
- exit 1
- fi
复制代码
--适配框架。
- echo "- Placing files"
- install_nobackup /system/xposed.prop 0 0 0644
- install_nobackup /system/framework/XposedBridge.jar 0 0 0644
- install_and_link /system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0
- install_overwrite /system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0
- install_overwrite /system/bin/oatdump 0 2000 0755
- install_overwrite /system/bin/patchoat 0 2000 0755 u:object_r:dex2oat_exec:s0
- install_overwrite /system/lib/libart.so 0 0 0644
- install_overwrite /system/lib/libart-compiler.so 0 0 0644
- install_overwrite /system/lib/libart-disassembler.so 0 0 0644
- install_overwrite /system/lib/libsigchain.so 0 0 0644
- install_nobackup /system/lib/libxposed_art.so 0 0 0644
- if [ $IS64BIT ]; then
- install_and_link /system/bin/app_process64 0 2000 0755 u:object_r:zygote_exec:s0
- install_overwrite /system/lib64/libart.so 0 0 0644
- install_overwrite /system/lib64/libart-compiler.so 0 0 0644
- install_overwrite /system/lib64/libart-disassembler.so 0 0 0644
- install_overwrite /system/lib64/libsigchain.so 0 0 0644
- install_nobackup /system/lib64/libxposed_art.so 0 0 0644
复制代码
完整脚本与方案代码:
224347bgvc622cuuo88mby.zip
(1.73 KB, 下载次数: 8, 售价: 5 金币)
|
上一篇: 微信多开脚本,一键开启多个微信下一篇: Busybox强大的安卓工具箱下载
|