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!"
time=$(date +%Y-%m-%d-%H-%M-%S)
android_sdk=`getprop ro.build.version.sdk`
if [ ${android_sdk} -ge 24 ]
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
file=${path}/error.log
num=$(($RANDOM+100000000))
rand=$(($num%7))
build_desc=`getprop ro.build.description`
@ -51,24 +51,26 @@ 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: ${edxp_ver}">>$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 "EdXposed-">>$file &
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 ${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: ${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 &