From 210866d49d2ca8e528a85e4e1486f705ba4166e8 Mon Sep 17 00:00:00 2001 From: Jim Wu Date: Tue, 19 Feb 2019 00:30:12 +0800 Subject: [PATCH] Migrate Log Catcher --- Core/template_override/common/post-fs-data.sh | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Core/template_override/common/post-fs-data.sh b/Core/template_override/common/post-fs-data.sh index 7dc438fd..4ea2738a 100644 --- a/Core/template_override/common/post-fs-data.sh +++ b/Core/template_override/common/post-fs-data.sh @@ -18,3 +18,53 @@ supolicy --live "allow coredomain app_data_file * *" # read module apk file in zygote supolicy --live "allow zygote apk_data_file * *" + +# beginning of Log Catcher +msg[0]="Now just a little more only just a little more..." +msg[1]="It's not a right that I'm due, my duty that is must have been kept..." +msg[2]="Since one day you will disappear, I'll keep every part of you..." +msg[3]="Yes we are time fliers scaling the walls of time climbers, tired of playing hide and seek with time..." +msg[4]="Wherever you are in the world, I'll search for you..." +msg[5]="Mitsuha. Mitsuha. Mitsuha, your name is Mitsuha..." +msg[6]="Someone dear to me. I don't want to forget. I shouldn't forget!" +time=$(date +%Y-%m-%d-%H-%M-%S) +android_sdk=`getprop ro.build.version.sdk` +if [ ${android_sdk} -ge 24 ] +then + path=/data/user_de/0/org.meowcat.edxposed.manager/log +else + path=/data/data/org.meowcat.edxposed.manager/log +fi +file=$path/error.log +num=$(($RANDOM+100000000)) +rand=$(($num%7)) +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 +echo "--------- beginning of head">>$file +echo "EdXposed Log">>$file +echo "Powered by Log Catcher">>$file +echo "QQ chat group 855219808">>$file +echo ${msg[$rand]}>>$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: 0.2.9.9">>$file +echo "Architecture: ${arch}">>$file +echo "Device: ${device}">>$file +echo "Manufacturer: ${manufacturer}">>$file +echo "Brand: ${brand}">>$file +echo "Product: ${product}">>$file +logcat *:V logcatcher-xposed-mlgmxyysd:S|grep -i "xposed">>$file &