#!/bin/bash
#Declare an array of company names in the order in which they appear
declare -a arr=("test1" "test2" "test3" "test4")
#Launch our application
adb shell monkey -p www.ideas2it.com.arfurniture -c android.intent.category.LAUNCHER 1
#For every company in the above array
for i in "${arr[@]}"
do
#Start recording for 48 seconds
adb shell screenrecord /sdcard/$i.mp4 --time-limit 48
#Copy recorded videos from sdcard to laptop folder
adb pull /sdcard/$i.mp4 /home/rajaselvan/Videos/ar
#Remove video from sdcard
adb shell rm /sdcard/$i.mp4
#Optional sleep for syncing
#sleep 30
done