adb shell grep command code example
Example: adb shell grep command
while true; do adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ScreenCap.`date +%Y`.`date +%m`.`date +%d`-`date +%H`.`date +%M`.`date +%S`.png; sleep 270; done
while true; do adb logcat -v time > logging`date +%Y`.`date +%m`.`date +%d`-`date +%H`.`date +%M`.`date +%S`.txt; done
adb shell ps | grep <packagename>
adb shell dumpsys battery | grep level
while true; do adb shell dumpsys cpuinfo | grep <packagename>;adb shell dumpsys battery | grep level; sleep 2; done
adb shell
su
pm grant <packagename> android.permission.READ_LOGS