Closed 3 months ago
I’m trying to run linux shell script on adb shell. It’s giving errors!
Here is the whole story:
I wrote a simple bash script hello.sh :
echo "hello world!"
running it as ./hello.sh produces the o/p
Now I pushed the file to android device using
adb push hello.sh /data/folder_name
then ran following command to enter in adb shell
In adb shell fired following commands
chmod 755 hello.sh
This is what I get on adb shell :
# sh hello.sh
function: not found
hello: not found
What’s happening here!
Or is there some different way to write function for adb shell script
I searched but didn’t get proper solution