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. Generic ADT problem?

Hi all,
I'm using the 0.9 beta SDK with eclipse 3.4 in Linux, and I'm facing a
perplexing compilation error.

I started with creating an Android project using the wizard, and then
all I did was to add this png file to the drawable folder:

http://cache.gizmodo.com/assets/resources/2007/08/widget.png

And bam! I was flagged with the following error:

Description: "Error generating final archive: null"
Type: Generic ADT problem

Can anyone enlighten me as to what's going on? BTW, this did not
happen with the m5 SDK.

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

2. StackOverflowError when clearing and refocusing a ghosted text view

I am getting a StackOverflowError when I try to clear a ghosted text
view's focus - see below.  I have gotten this error in the past when
my UI layout hierarchy was very deep but in this case it's not
extremely deep.  Is there an alternate way I can clear focus from a
field and update the ghost text of the newly focused view without
incurring this large overhead?

On a side note, do you plan on exposing the ghost text functionality
that can be seen since m5 in the contact details screen?

Thanks,
Cheryl

08-28 15:25:34.502: WARN/dalvikvm(450): threadid=3: thread exiting
with uncaught exception (group=0x40010e28) 08-28 15:25:34.512: ERROR/
AndroidRuntime(450): Uncaught handler: thread main exiting due to
uncaught exception 08-28 15:25:34.562: ERROR/AndroidRuntime(450):
java.lang.StackOverflowError08-28 15:25:34.562: ERROR/
AndroidRuntime(450):     at
java.lang.NullPointerException.<init>(NullPointerException.java:34)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.os.MessageQueue.removeMessages(MessageQueue.java:279) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.os.Handler.removeCallbacks(Handler.java:299) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.widget.TextView.makeBlink(TextView.java:4261) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.widget.TextView.access$800(TextView.java:149) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at android.widget.TextView
$ChangeWatcher.spanChange(TextView.java:4202) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at android.widget.TextView
$ChangeWatcher.onSpanAdded(TextView.java:4241) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at
android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:
902) 08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:
607) 08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:
510) 08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.text.Selection.setSelection(Selection.java:76) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.text.Selection.setSelection(Selection.java:85) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.text.method.ArrowKeyMovementMethod.initialize(ArrowKeyMovementMethod.java:
228) 08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.widget.TextView.setText(TextView.java:2221) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.widget.TextView.setText(TextView.java:2117) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.widget.EditText.setText(EditText.java:72) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at
android.widget.TextView.setText(TextView.java:2093) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
com.frogdesign.common.ui.text.GhostedEditText
$OnFocusChangeListener.onFocusChange(GhostedEditText.java:230) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.View.onFocusChanged(View.java:2302) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at
android.widget.TextView.onFocusChanged(TextView.java:4323) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.View.handleFocusGainInternal(View.java:2144) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.View.requestFocus(View.java:3021) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at
android.widget.ScrollView.onRequestFocusInDescendants(ScrollView.java:
1064) 08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:937) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:978)
08-28 15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.requestFocus(ViewGroup.java:934) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.View.requestFocus(View.java:2972) 08-28 15:25:34.562:
ERROR/AndroidRuntime(450):     at
android.view.ViewRoot.clearChildFocus(ViewRoot.java:980) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.ViewGroup.clearChildFocus(ViewGroup.java:498) 08-28
15:25:34.562: ERROR/AndroidRuntime(450):     at
android.view.View.clearFocus(View.java:2212)
--~--~---------~--~----~------------~-------~--~----~

3. ListView issues in 0.9 beta

4. Android Maps source code

5. Android Resource Site

6. sd card

7. run time exceptional error