• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Running a pre-made script with adb shell commands

GRVTY

Lurker
Jan 12, 2023
1
0
3 yrs ago i wrote this code and i used to execute it easily on the android screen. Now I feel defeated since i cannot remember anything on how to run this SCRIPT using adb shell so that it creates a loop inside my Android Samsung's phone screen to make a certain loop. Can you please help this is the code

`#Enter your adb location
> cd /c/adb
array=( "Text" "test2" "test3" "test4" "test5"

)

for element in ${array[@]} do
echo
Add: $element ./adb shell input text $element sleep 2 ./adb shell input tap 112 402 sleep 2 ./adb shell input tap 388 546 sleep 2 done

echo "Finished"`

I tried so hard but in the end it didnt even matter
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones