Created
January 9, 2020 11:54
-
-
Save davidkathoh/a87901ecbbfcc01ab5e23b9e378c9c22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
start=$SECONDS #for duration | |
echo " installing apk ...." | |
log=log.txt | |
printf "" > $log | |
result=$(adb -d install -r livinggoods.apk) #installing apk on one device | |
imei=$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ') #IMEI | |
battery=$(adb shell dumpsys battery | grep level) #battery level | |
signal=$(adb shell dumpsys telephony.registry | grep -i signalstrength) # signal Strength | |
echo " generating log File ...." | |
echo installation result: $result >>$log | |
echo imei : $imei >> $log | |
echo battery: $battery % >> $log | |
echo signal : $signal >> $log | |
end=$SECONDS | |
time=$((end-start)) #duration time | |
echo duration: $time seconds >> $log | |
echo "Process complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment