Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2f26a0e
Update magisk installer script to latest version
m0vie Jan 3, 2020
aa347b0
Use new Magisk installer method
m0vie Jan 3, 2020
188c8b6
Support Magisk 20.2 custom sepolicy.rule
m0vie Jan 4, 2020
4b706d6
Support Magisk v20.2 SEPolicy API
MlgmXyysd Jan 4, 2020
b91fccc
Fix can't create prop
MlgmXyysd Jan 4, 2020
ef8496d
Fix SEPolicy not work
MlgmXyysd Jan 4, 2020
7470f6d
Remove useless file
MlgmXyysd Jan 6, 2020
c0bd44c
Support old Magisk
MlgmXyysd Jan 6, 2020
ae02fa7
Fix typo
MlgmXyysd Jan 6, 2020
795affa
Format and bump version
MlgmXyysd Jan 6, 2020
20fd9de
Fix OPPO Android P from @wuxianlin
MlgmXyysd Jan 8, 2020
89275d3
Redirect to wiki
MlgmXyysd Jan 10, 2020
767c9bc
Fix system app crash on Android Q
MlgmXyysd Jan 10, 2020
461bf58
Add interface to disable modules log
MlgmXyysd Jan 10, 2020
68e0e28
Update description
MlgmXyysd Jan 10, 2020
d9c97cc
Add support for Magisk Alpha2
MlgmXyysd Jan 10, 2020
e0cd2a5
Fix bootloop caused by multiple reasons
MlgmXyysd Jan 10, 2020
3df8845
Fix log clear failed
MlgmXyysd Jan 10, 2020
519c28c
Fix log cannot read
MlgmXyysd Jan 11, 2020
7fedbe4
Optimize installer display
MlgmXyysd Jan 11, 2020
85be13a
Remove useless log method
MlgmXyysd Jan 11, 2020
4bcc4d4
Fix SandHook null pointer exception
MlgmXyysd Jan 11, 2020
69b14e5
Add stub from EdXposed Manager
MlgmXyysd Jan 29, 2020
03fd8d5
Add support for deprecated custom Magisk 20.1
MlgmXyysd Jan 29, 2020
35b8552
Fix stub not include
MlgmXyysd Jan 29, 2020
be0f92c
Fix stub not include
MlgmXyysd Jan 29, 2020
1898278
Add support for devices not have persist
MlgmXyysd Jan 29, 2020
03a148a
Use app instead priv-app
MlgmXyysd Jan 30, 2020
454c7f3
Leave mount info to log
MlgmXyysd Jan 30, 2020
b72968e
Optimize persist check
MlgmXyysd Jan 30, 2020
11a644d
Fix NPE in hookXposedInstaller()
aviraxp Feb 26, 2020
60951a1
Update stub Manager app
MlgmXyysd Feb 26, 2020
61d985a
New test persist detection
MlgmXyysd Feb 26, 2020
a397f44
YAHFA: Support for android 10
paulo-raca Feb 20, 2020
247f14a
Update stub prebuilt apk
MlgmXyysd Feb 28, 2020
5471a41
Merge branch 'sepolicy' of https://github.com/ElderDrivers/EdXposed i…
MlgmXyysd Feb 28, 2020
7ed6190
Optimize Riru-Core detection
MlgmXyysd Feb 28, 2020
8131458
Fix path context & Adapt to latest Riru
MlgmXyysd Feb 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and zip binaries can be downloaded from [here](http://gnuwin32.sourceforge.net/p

## Install

1. Install Magisk v19.0+ (for latest EdXposed or Huawei devices, use at least official Magisk v20.2+ or use our custom Magisk: Change Magisk update channel to [this](http://edxp.meowcat.org/repo/version.json)).
1. Install Magisk v20.2+
2. Install [Riru-Core](https://github.com/RikkaApps/Riru/releases) v19+ from Magisk repo.
3. [Download](#download) and install EdXposed in Magisk Manager or recovery mode.
4. Install [companion application](#companion-applications).
Expand All @@ -40,8 +40,8 @@ and zip binaries can be downloaded from [here](http://gnuwin32.sourceforge.net/p

Edxposed has three different builds

- Beta:Stable version after passing the test, suitable for general users, update slowly.
***Download Beta version in Magisk Manager's [Downloads] tab***
- Stable:Stable version after passing the test, suitable for general users, update slowly.
***Download Stable version in Magisk Manager's [Downloads] tab***

- Alpha: Test version with multiple commits.
***Download Alpha version in [[Github Releases](https://github.com/ElderDrivers/EdXposed/releases)]***
Expand All @@ -51,6 +51,8 @@ Edxposed has three different builds

## Companion Applications

> Both Xposed Installer and EdXposed Installer are deprecated. Support will be stopped for later versions. Please use [EdXposed Manager](https://github.com/ElderDrivers/EdXposedManager)

- For v0.2.9.5 and before: [Xposed Installer](https://github.com/DVDAndroid/XposedInstaller).
- For v0.2.9.6 and v0.2.9.7: [Xposed Installer](https://github.com/DVDAndroid/XposedInstaller) + [EdXp Manager](https://github.com/solohsu/EdXpManager)(optional).
- For v0.2.9.8 and later: [EdXposed Installer](https://github.com/solohsu/XposedInstaller) and [EdXposed Manager](https://github.com/ElderDrivers/EdXposedManager).
Expand All @@ -63,17 +65,17 @@ Edxposed has three different builds
## Known Issues

- [ ] May not be compatible with all ART devices.
- [ ] (Provisional solved, Use magiskpolicy to enable needed SELinux policies) File access services are not implemented yet.
- [ ] (Provisional solved, #384) Wait for Magisk sepolicy update.
- [ ] (Provisional solved, Use Magisk SEPolicy API to enable needed SELinux policies) File access services are not implemented yet.
- [x] (Fixed) ~~Wait for Magisk sepolicy update.~~
- [ ] (Provisional solved, #386) SafetyNet and some app tripped EdXposed.
- [ ] (Provisional solved, #401) Some module cannot hook app, such as WeXposed.
- [ ] (Provisional solved, WeXposed fixed in v2.7) Some module cannot hook app, such as WeXposed.
- [x] (Fixed, use EdXposed Manager v4.5.2 and newer) ~~Dynamic modules not work, caused by SELinux.~~

## Get Help

- GitHub issues: [Issues](https://github.com/ElderDrivers/EdXposed/issues/)

- Notice(for Chinese): In view of the low quality of issues submitted, please read the Chinese user report first[EdXposedIssuesReport_cn](http://edxp.meowcat.org/repo/EdXposedIssuesReport_cn.txt)(If you don't read the instructions, the submitted issue is likely to be closed)
- Notice(for Chinese): In view of the low quality of issues submitted, please read the Chinese user report first[EdXposedIssuesReport_cn](http://edxp.meowcat.org/assets/EdXposedIssuesReport_cn.txt)(If you don't read the instructions, the submitted issue is likely to be closed)

## For Developers

Expand Down
18 changes: 10 additions & 8 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ zip 可执行文件可以在 [这里](http://gnuwin32.sourceforge.net/packages/z

## 安装

1. 安装 Magisk v19.0+ (对于最新的 EdXposed 构建或华为/荣耀设备, 请使用我们自定义的 Magisk: 将 Magisk 更新通道更改为 [http://edxp.meowcat.org/repo/version.json](http://edxp.meowcat.org/repo/version.json)).
1. 安装 Magisk v20.2+
2. 在 Magisk 仓库中安装 [Riru-Core](https://github.com/RikkaApps/Riru/releases) v19 或更高版本.
3. [下载](#下载)并在恢复模式(Recovery)或经由 Magisk Manager 安装 EdXposed.
4. 安装 [框架管理应用](#框架管理应用).
Expand All @@ -40,8 +40,8 @@ zip 可执行文件可以在 [这里](http://gnuwin32.sourceforge.net/packages/z

Edxposed 拥有三个不同的版本

- Beta:经过测试的稳定版, 适合一般用户,更新缓慢.
***在 [Magisk Manager] 中的 [下载] 页中下载 Beta 版本***
- Stable:经过测试的稳定版, 适合一般用户,更新缓慢.
***在 [Magisk Manager] 中的 [下载] 页中下载 Stable 版本***

- Alpha: 多次提交更新的测试版.
***在 [[Github Releases](https://github.com/ElderDrivers/EdXposed/releases)] 中下载 Alpha 版本***
Expand All @@ -51,6 +51,8 @@ Edxposed 拥有三个不同的版本

## 框架管理应用

> Xposed Installer 和 EdXposed Installer 均已停更,后续版本将取消支持,请使用 [EdXposed Manager](https://github.com/ElderDrivers/EdXposedManager)

- 对于 v0.2.9.5 或更低版本: [Xposed Installer](https://github.com/DVDAndroid/XposedInstaller).
- 对于 v0.2.9.6 和 v0.2.9.7: [Xposed Installer](https://github.com/DVDAndroid/XposedInstaller) + [EdXp Manager](https://github.com/solohsu/EdXpManager)(optional).
- 对于 v0.2.9.8 或更高版本: [EdXposed Installer](https://github.com/solohsu/XposedInstaller) 或者 [EdXposed Manager](https://github.com/ElderDrivers/EdXposedManager).
Expand All @@ -64,16 +66,16 @@ Edxposed 拥有三个不同的版本

- [ ] 可能不兼容部分 ART 设备.
- [ ] (临时解决, 使用 magiskpolicy 来启用所需的 SELinux 策略)文件访问服务尚未实现.
- [ ] (临时解决, #384) 等待 Magisk 更新 SEPolicy.
- [x] (已修复) ~~等待 Magisk 更新 SEPolicy.~~
- [ ] (临时解决, #386) SafetyNet 和一些应用检测到了 EdXposed.
- [ ] (临时解决, #401) 一些模块无法工作,例如微X模块.
- [ ] (临时解决, 微X模块已在2.7版本修复) 一些模块无法工作,例如微X模块.
- [x] (已修复, 使用 EdXposed Manager v4.5.2 或更高版本) ~~受制于 SELinux 策略,即时列表功能无法使用.~~

## 获取帮助

- GitHub issues: [Issues](https://github.com/solohsu/EdXposed/issues/)
- GitHub issues: [Issues](https://github.com/ElderDrivers/EdXposed/issues/)

- 注意: 鉴于部分用户提交的Issues质量过低,对于中文用户反馈,请先阅读[EdXposed错误提交说明_cn](https://raw.githubusercontent.com/ElderDrivers/Repository-Website/gh-pages/repo/EdXposedIssuesReport_cn.txt)(不看说明提交的Issue会有很大可能被close)
- 注意: 鉴于部分用户提交的Issues质量过低,对于中文用户反馈,请先阅读[EdXposed错误提交说明_cn](http://edxp.meowcat.org/assets/EdXposedIssuesReport_cn.txt)(不看说明提交的Issue会有很大可能被close)

## 社区交流

Expand All @@ -87,7 +89,7 @@ Edxposed 拥有三个不同的版本
- 显然,框架还不够稳定,欢迎使用PR贡献代码. :)
- 如果你愿意,可以[请我喝杯咖啡](https://www.paypal.me/givin2u).

## 鸣谢
## 鸣谢

- [YAHFA](https://github.com/rk700/YAHFA): ART hook 核心框架
- [Magisk](https://github.com/topjohnwu/Magisk/): 让一切成为可能
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '0.4.6.0_beta({build})'
version: '0.4.6.1 ({build})'

environment:
ANDROID_HOME: C:\android-sdk-windows
Expand Down
2 changes: 1 addition & 1 deletion edxp-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.internal.os.OperatingSystem
apply plugin: 'com.android.library'

// Values set here will be overriden by AppVeyor, feel free to modify during development.
def buildVersionName = 'v0.4.6.0_beta'
def buildVersionName = 'v0.4.6.1'
def buildVersionCode = 10000

if (System.env.APPVEYOR_BUILD_VERSION != null) {
Expand Down
52 changes: 31 additions & 21 deletions edxp-core/template_override/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,59 @@ SKIPUNZIP=1

RIRU_PATH="/data/misc/riru"

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.2+! "
ui_print "*******************************"
abort
}

check_riru_version() {
[[ ! -f "$RIRU_PATH/api_version" ]] && abort "! Please Install Riru - Core v19 or above"
VERSION=$(cat "$RIRU_PATH/api_version")
ui_print "- Riru API version is $VERSION"
[[ "$VERSION" -ge 4 ]] || abort "! Please Install Riru - Core v19 or above"
[[ ! -f "${RIRU_PATH}/api_version" ]] && abort "! Please Install Riru - Core v19 or above"
VERSION=$(cat "${RIRU_PATH}/api_version")
ui_print "- Riru API version is ${VERSION}"
[[ "${VERSION}" -ge 4 ]] || abort "! Please Install Riru - Core v19 or above"
}

check_architecture() {
if [[ "$ARCH" != "arm" && "$ARCH" != "arm64" && "$ARCH" != "x86" && "$ARCH" != "x64" ]]; then
abort "! Unsupported platform: $ARCH"
if [[ "${ARCH}" != "arm" && "${ARCH}" != "arm64" && "${ARCH}" != "x86" && "${ARCH}" != "x64" ]]; then
abort "! Unsupported platform: ${ARCH}"
else
ui_print "- Device platform: $ARCH"
ui_print "- Device platform: ${ARCH}"
fi
}

[[ ${MAGISK_VER_CODE} -ge 20110 ]] || require_new_magisk

check_architecture
check_riru_version

unzip -o "$ZIPFILE" module.prop post-fs-data.sh sepolicy.rule system.prop util_functions.sh -d "$MODPATH" >&2
ui_print "- Extracting module files"
unzip -o "${ZIPFILE}" post-fs-data.sh sepolicy.rule system.prop util_functions.sh -d "${MODPATH}" >&2

if [[ "$ARCH" == "x86" || "$ARCH" == "x64" ]]; then
if [[ "${ARCH}" == "x86" || "${ARCH}" == "x64" ]]; then
ui_print "- Extracting x86/64 libraries"
unzip -o "$ZIPFILE" 'system_x86/*' -d "$MODPATH" >&2
mv "$MODPATH/system_x86/lib" "$MODPATH/system/lib"
mv "$MODPATH/system_x86/lib64" "$MODPATH/system/lib64"
unzip -o "${ZIPFILE}" 'system_x86/*' -d "${MODPATH}" >&2
mv "${MODPATH}/system_x86/lib" "${MODPATH}/system/lib"
mv "${MODPATH}/system_x86/lib64" "${MODPATH}/system/lib64"
else
ui_print "- Extracting arm/arm64 libraries"
unzip -o "$ZIPFILE" 'system/*' -d "$MODPATH" >&2
unzip -o "${ZIPFILE}" 'system/*' -d "${MODPATH}" >&2
fi

if [[ "$IS64BIT" = false ]]; then
if [[ "${IS64BIT}" = false ]]; then
ui_print "- Removing 64-bit libraries"
rm -rf "$MODPATH/system/lib64"
rm -rf "${MODPATH}/system/lib64"
fi

TARGET="$RIRU_PATH/modules"
ui_print "- Copying extra files"

TARGET="${RIRU_PATH}/modules/edxp"

ui_print "- Extracting extra files"
unzip -o "$ZIPFILE" 'data/*' -d "$TMPDIR" >&2
[[ -d "${TARGET}" ]] || mkdir -p "${TARGET}" || abort "! Can't mkdir -p ${TARGET}"

[[ -d "$TARGET" ]] || mkdir -p "$TARGET" || abort "! Can't mkdir -p $TARGET"
cp -af "$TMPDIR$TARGET/." "$TARGET" || abort "! Can't cp -af $TMPDIR$TARGET/. $TARGET"
cp "${MODPATH}/module.prop" "${TARGET}/module.prop" || abort "! Can't create ${TARGET}/module.prop"

ui_print "- Files copied"

set_perm_recursive "$MODPATH" 0 0 0755 0644
set_perm_recursive "${MODPATH}" 0 0 0755 0644
118 changes: 112 additions & 6 deletions edxp-core/template_override/post-fs-data.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,117 @@
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}

# This script will be executed in post-fs-data mode
# More info in the main Magisk thread
grep_prop() {
local REGEX="s/^$1=//p"
shift
local FILES=$@
[[ -z "$FILES" ]] && FILES='/system/build.prop'
sed -n "$REGEX" ${FILES} 2>/dev/null | head -n 1
}

. ${MODDIR}/util_functions.sh
EDXP_VERSION=`grep_prop version ${MODDIR}/module.prop`
ANDROID_SDK=`getprop ro.build.version.sdk`
BUILD_DESC=`getprop ro.build.description`
PRODUCT=`getprop ro.build.product`
MANUFACTURE=`getprop ro.product.manufacturer`
BRAND=`getprop ro.product.brand`
FINGERPRINT=`getprop ro.build.fingerprint`
ARCH=`getprop ro.product.cpu.abi`
DEVICE=`getprop ro.product.device`
ANDROID=`getprop ro.build.version.release`
BUILD=`getprop ro.build.id`
RIRU_VERSION=`grep_prop version ${MODDIR}/../riru-core/module.prop`
RIRU_VERCODE=`grep_prop versionCode ${MODDIR}/../riru-core/module.prop`
RIRU_APICODE=`cat /data/misc/riru/api_version`
MAGISK_VERSION=`su -v`
MAGISK_VERCODE=`su -V`
EDXP_INSTALLER=com.solohsu.android.edxp.manager
EDXP_MANAGER=org.meowcat.edxposed.manager
XP_INSTALLER=de.robv.android.xposed.installer
PATH_PREFIX_PROT=/data/user_de/0/
PATH_PREFIX_LEGACY=/data/user/0/

start_log_catchers
if [[ ${ANDROID_SDK} -ge 24 ]]
then
PATH_PREFIX=${PATH_PREFIX_PROT}
else
PATH_PREFIX=${PATH_PREFIX_LEGACY}
fi

DEFAULT_BASE_PATH=${PATH_PREFIX}${EDXP_INSTALLER}
BASE_PATH=${DEFAULT_BASE_PATH}

if [[ ! -d ${BASE_PATH} ]]
then
BASE_PATH=${PATH_PREFIX}${EDXP_MANAGER}
if [[ ! -d ${BASE_PATH} ]]
then
BASE_PATH=${PATH_PREFIX}${XP_INSTALLER}
if [[ ! -d ${BASE_PATH} ]]
then
BASE_PATH=${DEFAULT_BASE_PATH}
fi
fi
fi

LOG_PATH=${BASE_PATH}/log
CONF_PATH=${BASE_PATH}/conf
DISABLE_VERBOSE_LOG_FILE=${CONF_PATH}/disable_verbose_log
LOG_VERBOSE=true

if [[ -f ${DISABLE_VERBOSE_LOG_FILE} ]]
then
LOG_VERBOSE=false
fi

start_log_cather () {
LOG_FILE_NAME=$1
LOG_TAG_FILTERS=$2
CLEAN_OLD=$3
START_NEW=$4
LOG_FILE=${LOG_PATH}/${LOG_FILE_NAME}
mkdir -p ${LOG_PATH}
if [[ ${CLEAN_OLD} = true ]]
then
rm -rf ${LOG_FILE}
fi
if [[ ${START_NEW} = false ]]
then
return
fi
chmod
touch ${LOG_FILE}
chmod 777 ${LOG_FILE}
echo "--------- beginning of head">>${LOG_FILE}
echo "EdXposed Log">>${LOG_FILE}
echo "Powered by Log Catcher">>${LOG_FILE}
echo "QQ support group: 855219808">>${LOG_FILE}
echo "Telegram support group: @Code_Of_MeowCat">>${LOG_FILE}
echo "--------- beginning of information">>${LOG_FILE}
echo "Android version: ${ANDROID}">>${LOG_FILE}
echo "Android sdk: ${ANDROID_SDK}">>${LOG_FILE}
echo "Android build: ${BUILD}">>${LOG_FILE}
echo "Fingerprint: ${FINGERPRINT}">>${LOG_FILE}
echo "ROM build description: ${BUILD_DESC}">>${LOG_FILE}
echo "EdXposed Version: ${EDXP_VERSION} (api: 90.0)">>${LOG_FILE}
echo "Architecture: ${ARCH}">>${LOG_FILE}
echo "Device: ${DEVICE}">>${LOG_FILE}
echo "Manufacture: ${MANUFACTURE}">>${LOG_FILE}
echo "Brand: ${BRAND}">>${LOG_FILE}
echo "Product: ${PRODUCT}">>${LOG_FILE}
echo "Riru: ${RIRU_VERSION} (${RIRU_VERCODE}) (api: ${RIRU_APICODE})">>${LOG_FILE}
echo "Magisk: ${MAGISK_VERSION} (${MAGISK_VERCODE})">>${LOG_FILE}
logcat -f ${LOG_FILE} *:S ${LOG_TAG_FILTERS} &
}

start_verbose_log_catcher () {
start_log_cather all.log "EdXposed:V XSharedPreferences:V EdXposed-Bridge:V EdXposedManager:V XposedInstaller:V" true ${LOG_VERBOSE}
}

start_bridge_log_catcher () {
start_log_cather error.log "XSharedPreferences:V EdXposed-Bridge:V" true true
}

start_verbose_log_catcher

start_bridge_log_catcher
1 change: 1 addition & 0 deletions edxp-core/template_override/sepolicy.rule
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# necessary for using mmap in system_server process
Comment thread
MlgmXyysd marked this conversation as resolved.
Outdated
allow system_server system_server process {execmem}
allow system_server system_server memprotect {mmap_zero}

# for built-in apps // TODO maybe narrow down the target classes
allow coredomain coredomain process {execmem}
Expand Down
3 changes: 1 addition & 2 deletions edxp-core/template_override/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/sbin/sh

#rm -r -f /data/misc/riru/modules/edxposed/
#rm -r -f /data/misc/riru/modules/edxp/
rm -rf /data/misc/riru/modules/edxp
Loading