PDA

View Full Version : Android ADB Shell no working



muiz
04-20-2011, 12:45 AM
Dear all,

I want to run a simple shell in ADB, but it doesn't work, can you help me?

[muiz@hp platform-tools]$ cat c.sh
x="hello"
if [ -n "$X" ]; then
echo "hi"
fi
[muiz@hp platform-tools]$ adb shell /data/local/c.sh
1 KB/s (48 bytes in 0.045s)
[muiz@muiz platform-tools]$ adb shell /data/local/c.sh
[: not found
[muiz@muiz platform-tools]$

Any suggestions ?

Note:
1. If I upload the bash file to android, then run this script use command adb shell /data/local/bash /data/local/c.sh works fine, but I don't want to do this.
2. Same problem with while key



Thanks in advanced!

muiz
04-21-2011, 08:20 AM
who can help me ? :(