From 66814e6cae6925b82337778c46153fca24315653 Mon Sep 17 00:00:00 2001 From: solohsu Date: Tue, 12 Mar 2019 20:16:07 +0800 Subject: [PATCH 1/4] Rename Riru module id --- Core/build-module.sh | 2 +- Core/build.gradle | 2 +- Core/jni/main/Android.mk | 2 +- Core/template_override/common/post-fs-data.sh | 2 +- Core/template_override/config.sh | 2 +- Core/template_override/module.prop | 4 ++-- Core/template_override/riru_module.prop | 4 ++-- Core/template_override/system/framework/edconfig.dex | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Core/build-module.sh b/Core/build-module.sh index 00b01f87..1c9c8bf2 100644 --- a/Core/build-module.sh +++ b/Core/build-module.sh @@ -2,7 +2,7 @@ function copy_files { # /data/misc/riru/modules/template exists -> libriru_template.so will be loaded # Change "template" to your module name # You can also use this folder as your config folder - NAME="edxposed" + NAME="edxp" mkdir -p $TMP_DIR_MAGISK/data/misc/riru/modules/$NAME cp $MODULE_NAME/template_override/riru_module.prop $TMP_DIR_MAGISK/data/misc/riru/modules/$NAME/module.prop diff --git a/Core/build.gradle b/Core/build.gradle index 0fa1f792..c8c4cd5a 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'com.android.library' -version "v0.3.1.0_beta-SNAPSHOT" +version "v0.3.1.1_beta-SNAPSHOT" extensions["module_name"] = "EdXposed" android { compileSdkVersion 28 diff --git a/Core/jni/main/Android.mk b/Core/jni/main/Android.mk index 0abc2c81..c7f12670 100644 --- a/Core/jni/main/Android.mk +++ b/Core/jni/main/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := libriru_edxposed +LOCAL_MODULE := libriru_edxp LOCAL_C_INCLUDES := \ $(LOCAL_PATH) \ jni/external/include diff --git a/Core/template_override/common/post-fs-data.sh b/Core/template_override/common/post-fs-data.sh index ec05cc91..395bd2d8 100644 --- a/Core/template_override/common/post-fs-data.sh +++ b/Core/template_override/common/post-fs-data.sh @@ -7,7 +7,7 @@ MODDIR=${0%/*} # More info in the main Magisk thread # EdXposed Version -edxp_ver="0.3.1.0_beta-SNAPSHOT (3100)" +edxp_ver="0.3.1.1_beta-SNAPSHOT (3110)" # necessary for using mmap in system_server process supolicy --live "allow system_server system_server process {execmem}" diff --git a/Core/template_override/config.sh b/Core/template_override/config.sh index dc435961..818125b8 100644 --- a/Core/template_override/config.sh +++ b/Core/template_override/config.sh @@ -41,7 +41,7 @@ LATESTARTSERVICE=false print_modname() { ui_print "************************************" - ui_print " Riru - Ed Xposed v0.3.1.0 " + ui_print " Riru - Ed Xposed v0.3.1.1 " ui_print "************************************" } diff --git a/Core/template_override/module.prop b/Core/template_override/module.prop index 9e27bb9e..d8d3eda3 100644 --- a/Core/template_override/module.prop +++ b/Core/template_override/module.prop @@ -1,7 +1,7 @@ id=riru_edxposed name=Riru - Ed Xposed -version=v0.3.1.0_beta-SNAPSHOT -versionCode=3100 +version=v0.3.1.1_beta-SNAPSHOT +versionCode=3110 author=solohsu & MlgmXyysd description=Magisk version of Xposed. Require Riru - Core installed. minMagisk=17000 diff --git a/Core/template_override/riru_module.prop b/Core/template_override/riru_module.prop index 99078bcc..564f8b6b 100644 --- a/Core/template_override/riru_module.prop +++ b/Core/template_override/riru_module.prop @@ -1,5 +1,5 @@ name=Ed Xposed -version=v0.3.1.0_beta-SNAPSHOT -versionCode=3100 +version=v0.3.1.1_beta-SNAPSHOT +versionCode=3110 author=solohsu & MlgmXyysd description=Magisk version of Xposed. Require Riru - Core installed. diff --git a/Core/template_override/system/framework/edconfig.dex b/Core/template_override/system/framework/edconfig.dex index ff433ea6..8890e0b9 100644 --- a/Core/template_override/system/framework/edconfig.dex +++ b/Core/template_override/system/framework/edconfig.dex @@ -1,4 +1,4 @@ -version=90.0-0.3.1.0-beta-SNAPSHOT +version=90.0-0.3.1.1-beta-SNAPSHOT arch=arm64 minsdk=23 maxsdk=28 From de1247cb92ad08d6e250d585f5549f66a7d7c0e4 Mon Sep 17 00:00:00 2001 From: solohsu Date: Tue, 12 Mar 2019 20:18:35 +0800 Subject: [PATCH 2/4] Update README.md --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1e0a6e52..972b7a4a 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,15 @@ and zip binaries can be downloaded from [here](http://gnuwin32.sourceforge.net/p 5. have fun :) ## Companion applications + - 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) and [EdXp Manager](https://github.com/solohsu/EdXpManager)(optional) - for v0.2.9.8 and later: [EdXposed Installer](https://github.com/solohsu/XposedInstaller) ## Get help -Forum (recommend): [Android Forum](http://af.meowcat.org/) +- GitHub issues (recommended): [Issues](https://github.com/solohsu/EdXposed/issues/) -GitHub issues (recommend): [Issues](https://github.com/solohsu/EdXposed/issues/) - -QQ Group: [855219808](http://shang.qq.com/wpa/qunwpa?idkey=fae42a3dba9dc758caf63e971be2564e67bf7edd751a2ff1c750478b0ad1ca3f) - -Telegream: [Code_of_MeowCat](http://t.me/Code_of_MeowCat) - -Discord: [Code_of_MeowCat](https://discord.gg/Hag6gNh) +- QQ Group: [855219808](http://shang.qq.com/wpa/qunwpa?idkey=fae42a3dba9dc758caf63e971be2564e67bf7edd751a2ff1c750478b0ad1ca3f) ## Contribute From ac4d5059d1eabb417699fcaa398607ddf05f5363 Mon Sep 17 00:00:00 2001 From: solohsu Date: Wed, 13 Mar 2019 00:27:06 +0800 Subject: [PATCH 3/4] Add log support for other installer apps --- Core/build.gradle | 2 +- Core/template_override/common/post-fs-data.sh | 44 +---------- .../common/util_functions.sh | 77 +++++++++++++++++++ Core/template_override/config.sh | 12 +-- Core/template_override/module.prop | 4 +- Core/template_override/riru_module.prop | 4 +- .../system/framework/edconfig.dex | 2 +- 7 files changed, 91 insertions(+), 54 deletions(-) create mode 100644 Core/template_override/common/util_functions.sh diff --git a/Core/build.gradle b/Core/build.gradle index c8c4cd5a..bdb1faaf 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'com.android.library' -version "v0.3.1.1_beta-SNAPSHOT" +version "v0.3.1.2_beta" extensions["module_name"] = "EdXposed" android { compileSdkVersion 28 diff --git a/Core/template_override/common/post-fs-data.sh b/Core/template_override/common/post-fs-data.sh index 395bd2d8..513beb64 100644 --- a/Core/template_override/common/post-fs-data.sh +++ b/Core/template_override/common/post-fs-data.sh @@ -6,9 +6,6 @@ MODDIR=${0%/*} # This script will be executed in post-fs-data mode # More info in the main Magisk thread -# EdXposed Version -edxp_ver="0.3.1.1_beta-SNAPSHOT (3110)" - # necessary for using mmap in system_server process supolicy --live "allow system_server system_server process {execmem}" # supolicy --live "allow system_server system_server memprotect {mmap_zero}" @@ -23,43 +20,6 @@ supolicy --live "attradd {system_app platform_app} mlstrustedsubject" # read module apk file in zygote supolicy --live "allow zygote apk_data_file * *" -# beginning of Log Catcher -android_sdk=`getprop ro.build.version.sdk` -if [[ ${android_sdk} -ge 24 ]] -then - path=/data/user_de/0/com.solohsu.android.edxp.manager/log -else - path=/data/data/com.solohsu.android.edxp.manager/log -fi -file=${path}/error.log -build_desc=`getprop ro.build.description` -product=`getprop ro.build.product` -manufacturer=`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` -mkdir -p ${path} -rm -rf ${file} -touch ${file} -chmod 755 ${file} -echo "--------- beginning of head">>${file} -echo "EdXposed Log">>${file} -echo "Powered by Log Catcher">>${file} -echo "QQ chat group 855219808">>${file} -echo "--------- beginning of system info">>${file} -echo "Android version: ${android}">>${file} -echo "Android sdk: ${android_sdk}">>${file} -echo "Android build: ${build}">>${file} -echo "Fingerprint: ${fingerprint}">>${file} -echo "ROM build description: ${build_desc}">>${file} -echo "EdXposed Version: ${edxp_ver}">>${file} -echo "Architecture: ${arch}">>${file} -echo "Device: ${device}">>${file} -echo "Manufacturer: ${manufacturer}">>${file} -echo "Brand: ${brand}">>${file} -echo "Product: ${product}">>${file} -logcat -f ${file} *:S logcatcher-xposed-mlgmxyysd:S EdXposed-Fwk:V EdXposed-dexmaker:V XSharedPreferences:V EdXposed-Bridge:V EdXposed-YAHFA:V EdXposed-Core-Native:V xhook:V EdXposed-Manager:V Riru:V RiruManager:V XposedInstaller:V & +. ${MODDIR}/util_functions.sh +start_verbose_log_catcher diff --git a/Core/template_override/common/util_functions.sh b/Core/template_override/common/util_functions.sh new file mode 100644 index 00000000..7c479901 --- /dev/null +++ b/Core/template_override/common/util_functions.sh @@ -0,0 +1,77 @@ +#!/system/bin/sh + +EDXP_VERSION="0.3.1.2_beta (3120)" +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` + +setup_log_path () { + 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/ + if [[ ${ANDROID_SDK} -ge 24 ]]; then + PATH_PREFIX=${PATH_PREFIX_PROT} + else + PATH_PREFIX=${PATH_PREFIX_LEGACY} + fi + BASE_PATH=${PATH_PREFIX}${EDXP_INSTALLER} + if [[ -d ${BASE_PATH} ]] + then + LOG_PATH=${BASE_PATH}/log + else + BASE_PATH=${PATH_PREFIX}${EDXP_MANAGER} + if [[ -d ${BASE_PATH} ]] + then + LOG_PATH=${BASE_PATH}/log + else + BASE_PATH=${PATH_PREFIX}${XP_INSTALLER} + if [[ -d ${BASE_PATH} ]] + then + LOG_PATH=${BASE_PATH}/log + else + LOG_PATH=${BASE_PATH}/log + fi + fi + fi +} + +start_log_cather () { + LOG_FILE_NAME=$1 + LOG_FILE=${LOG_PATH}/${LOG_FILE_NAME} + mkdir -p ${LOG_PATH} + rm -rf ${LOG_FILE} + 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 chat group 855219808">>${LOG_FILE} + echo "--------- beginning of system info">>${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}">>${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} + logcat -f ${LOG_FILE} *:S logcatcher-xposed-mlgmxyysd:S EdXposed-Fwk:V EdXposed-dexmaker:V XSharedPreferences:V EdXposed-Bridge:V EdXposed-YAHFA:V EdXposed-Core-Native:V xhook:V Riru:V RiruManager:V EdXposed-Manager:V XposedInstaller:V & +} + +start_verbose_log_catcher () { + start_log_cather error.log +} + +setup_log_path diff --git a/Core/template_override/config.sh b/Core/template_override/config.sh index 818125b8..a40195e6 100644 --- a/Core/template_override/config.sh +++ b/Core/template_override/config.sh @@ -41,7 +41,7 @@ LATESTARTSERVICE=false print_modname() { ui_print "************************************" - ui_print " Riru - Ed Xposed v0.3.1.1 " + ui_print " Riru - Ed Xposed v0.3.1.2 " ui_print "************************************" } @@ -111,16 +111,16 @@ check_architecture() { } copy_files() { - if [[ "$ARCH" == "x86" || "$ARCH" == "x64" ]]; then - ui_print "- Removing arm/arm64 libraries" + cp -af $INSTALLER/common/util_functions.sh $MODPATH/util_functions.sh + if [[ "$ARCH" == "x86" || "$ARCH" == "x64" ]]; then + ui_print "- Removing arm/arm64 libraries" rm -rf "$MODPATH/system/lib" rm -rf "$MODPATH/system/lib64" + ui_print "- Extracting x86/64 libraries" + unzip -o "$ZIP" 'system_x86/*' -d $MODPATH >&2 mv "$MODPATH/system_x86/lib" "$MODPATH/system/lib" mv "$MODPATH/system_x86/lib64" "$MODPATH/system/lib64" - else - ui_print "- Removing x86/x64 libraries" fi - rm -rf "$MODPATH/system_x86" if [[ "$IS64BIT" = false ]]; then ui_print "- Removing 64-bit libraries" diff --git a/Core/template_override/module.prop b/Core/template_override/module.prop index d8d3eda3..01b6b215 100644 --- a/Core/template_override/module.prop +++ b/Core/template_override/module.prop @@ -1,7 +1,7 @@ id=riru_edxposed name=Riru - Ed Xposed -version=v0.3.1.1_beta-SNAPSHOT -versionCode=3110 +version=v0.3.1.2_beta +versionCode=3120 author=solohsu & MlgmXyysd description=Magisk version of Xposed. Require Riru - Core installed. minMagisk=17000 diff --git a/Core/template_override/riru_module.prop b/Core/template_override/riru_module.prop index 564f8b6b..7e166e69 100644 --- a/Core/template_override/riru_module.prop +++ b/Core/template_override/riru_module.prop @@ -1,5 +1,5 @@ name=Ed Xposed -version=v0.3.1.1_beta-SNAPSHOT -versionCode=3110 +version=v0.3.1.2_beta +versionCode=3120 author=solohsu & MlgmXyysd description=Magisk version of Xposed. Require Riru - Core installed. diff --git a/Core/template_override/system/framework/edconfig.dex b/Core/template_override/system/framework/edconfig.dex index 8890e0b9..55c27bee 100644 --- a/Core/template_override/system/framework/edconfig.dex +++ b/Core/template_override/system/framework/edconfig.dex @@ -1,4 +1,4 @@ -version=90.0-0.3.1.1-beta-SNAPSHOT +version=90.0-0.3.1.2-beta arch=arm64 minsdk=23 maxsdk=28 From 65212e29e2595beae716047391372090a56d2520 Mon Sep 17 00:00:00 2001 From: solohsu Date: Wed, 13 Mar 2019 01:41:26 +0800 Subject: [PATCH 4/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 972b7a4a..6f3ff0b5 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ A Riru module trying to provide a ART hooking framework (mainly for Android Pie) ## Credits - [YAHFA](https://github.com/rk700/YAHFA): the core java hooking framework +- [Magisk](https://github.com/topjohnwu/Magisk/): makes all these possible - [Riru](https://github.com/RikkaApps/Riru): provides a way to inject codes into zygote process - [XposedBridge](https://github.com/rovo89/XposedBridge): the OG xposed framework APIs - [dexmaker](https://github.com/linkedin/dexmaker) and [dalvikdx](https://github.com/JakeWharton/dalvik-dx): dynamiclly generate YAHFA hooker classes