Why ADB Shell no working ?

by Muiz » Fri, 22 Apr 2011 03:40:18 GMT


Sponsored Links
 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!

-- 
Regards,
*Muiz*

-- 



Re: Why ADB Shell no working ?

by Marcin Orlowski » Fri, 22 Apr 2011 03:58:59 GMT


 execution bit set on script? Does not look so.

PS: do not abuse colors.

Regards,
Marcin Orlowski

*Tray Agenda < http://bit.ly/trayagenda> ;* - keep you daily schedule handy...
*Date In Tray* < http://bit.ly/dateintraypro> ; - current date at glance...
WebnetMobile on *Facebook < http://webnetmobile.com/fb/> ;* and
*Twitter< http://webnetmobile.com/twitter/> ;
*

-- 


Sponsored Links


Other Threads

1. Why can "Maps" find a location on demand but not my app

In my activities onCreate method I start listening for location
updates as follows:

locationManager.requestLocationUpdates(bestProvider, 5000, 0,
myLocationListener);

Previously I used 60,000 ms instead of 5,000 ms.

The problem is that I have trouble getting the first update.

public void onLocationChanged(Location location){
if (location != null){
lastlocation = location;
}
}

onLocationChanged doesn't get called.

Now, if I switch to Maps and find the current location there, then
switch back to
my app, I finally get the onLocatinoChanged method to fire.

This whole location changed stuff seems rinky in Android. Is there a
way to
more directly insist that the Location hardware do it's thing?

Any help would be very much appreciated.

Best,

pawpaw17

--~--~---------~--~----~------------~-------~--~----~

2. Light theme doen't work properly in 1.5 SDK

Hmm wait, that wouldn't explain the background colors.  Are you
setting the theme from the android:theme attribute in your manifest,
or in onCreate() somewhere?

j












-- 
Jeff Sharkey
jshar...@google.com

--~--~---------~--~----~------------~-------~--~----~

3. Don't understand how to use SurfaceView for my game, have it working with nomrla View.

4. How to add Google Maps library, Maps to the Android 1.5 version device?

5. no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

6. no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

7. Don't understand how to use SurfaceView for my game, have it working with nomrla View.