Use logcat -f to save logs

This commit is contained in:
solohsu 2019-03-11 00:07:41 +08:00
parent 47c500b96d
commit 2c49377ba2
1 changed files with 25 additions and 23 deletions

View File

@ -33,13 +33,13 @@ 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!" msg[6]="Someone dear to me. I don't want to forget. I shouldn't forget!"
time=$(date +%Y-%m-%d-%H-%M-%S) time=$(date +%Y-%m-%d-%H-%M-%S)
android_sdk=`getprop ro.build.version.sdk` android_sdk=`getprop ro.build.version.sdk`
if [ ${android_sdk} -ge 24 ] if [[ ${android_sdk} -ge 24 ]]
then then
path=/data/user_de/0/com.solohsu.android.edxp.manager/log path=/data/user_de/0/com.solohsu.android.edxp.manager/log
else else
path=/data/data/com.solohsu.android.edxp.manager/log path=/data/data/com.solohsu.android.edxp.manager/log
fi fi
file=$path/error.log file=${path}/error.log
num=$(($RANDOM+100000000)) num=$(($RANDOM+100000000))
rand=$(($num%7)) rand=$(($num%7))
build_desc=`getprop ro.build.description` build_desc=`getprop ro.build.description`
@ -51,24 +51,26 @@ arch=`getprop ro.product.cpu.abi`
device=`getprop ro.product.device` device=`getprop ro.product.device`
android=`getprop ro.build.version.release` android=`getprop ro.build.version.release`
build=`getprop ro.build.id` build=`getprop ro.build.id`
mkdir -p $path mkdir -p ${path}
rm -rf $file rm -rf ${file}
touch $file touch ${file}
echo "--------- beginning of head">>$file chmod 755 ${file}
echo "EdXposed Log">>$file echo "--------- beginning of head">>${file}
echo "Powered by Log Catcher">>$file echo "EdXposed Log">>${file}
echo "QQ chat group 855219808">>$file echo "Powered by Log Catcher">>${file}
echo ${msg[$rand]}>>$file echo "QQ chat group 855219808">>${file}
echo "--------- beginning of system info">>$file echo ${msg[$rand]}>>${file}
echo "Android version: ${android}">>$file echo "--------- beginning of system info">>${file}
echo "Android sdk: ${android_sdk}">>$file echo "Android version: ${android}">>${file}
echo "Android build: ${build}">>$file echo "Android sdk: ${android_sdk}">>${file}
echo "Fingerprint: ${fingerprint}">>$file echo "Android build: ${build}">>${file}
echo "ROM build description: ${build_desc}">>$file echo "Fingerprint: ${fingerprint}">>${file}
echo "EdXposed Version: ${edxp_ver}">>$file echo "ROM build description: ${build_desc}">>${file}
echo "Architecture: ${arch}">>$file echo "EdXposed Version: ${edxp_ver}">>${file}
echo "Device: ${device}">>$file echo "Architecture: ${arch}">>${file}
echo "Manufacturer: ${manufacturer}">>$file echo "Device: ${device}">>${file}
echo "Brand: ${brand}">>$file echo "Manufacturer: ${manufacturer}">>${file}
echo "Product: ${product}">>$file echo "Brand: ${brand}">>${file}
logcat *:V logcatcher-xposed-mlgmxyysd:S|grep -i "EdXposed-">>$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 &