Android :: Tab Completion In Adb Shell
Feb 17, 2010The only thing I found is to cross compile bash. Is there another way to have tab completion in the Android shell?
View 2 RepliesThe only thing I found is to cross compile bash. Is there another way to have tab completion in the Android shell?
View 2 RepliesI cobbled all of this together from various places on the web, but I think the credit for the binaries goes to Paul @ MoDaCo.
Nandroid before going any further!
Files you'll need:
QuickSSHD (Download this from the Market. $1.50). I'm just going to assume if you're still reading, you know what this is for and how to use it. It's braindead simple. I think dropbear can be installed and configured manually, but for the $1.50...meh.
The rest are zipped up here: terminfo.zip, nano, bash, profile**
Unzip bashnano.zip onto your SDCard.
From adb shell:
CODE:.................
I'm not sure if this setup will have any impact on sh scripts being used in the various ROMs, so use this at your own risk.
This will give you full bash over adb, but I haven't figured out where profile goes to add terminal/color et al. for adb.
Unix shell users might find this useful. It's a bash script that adds intelligent tab-completion for "adb" commands and options: http://github.com/mbrubeck/android-completion
If you've written any other shell completion scripts for the Android SDK, let me know. I'd be happy to add them to this repository.
My application has an IntentService which runs periodically to download data from a remote server. The download task is run inside an AsyncTask which has reference to Application context only. The data downloaded is for entire application and is displayed across four different activities. When the download completes(AsyncTask completes) the service is notified of the same. Now, the service needs to notify appropriate activity to update its view. The service is not aware of which Activity of what application is in foreground.
How do I make that connection? How does the service pass a message to the activity in foreground that new data is available and it should update its views?
I have 2 problems with the MultiAutoCompleteTextView.
First and the main one:
How can i get rid of the comma at the end of the completet word when i use the CommaTokenizer. do i have to implement it on my own?
Second problem:
Is it possible to complete in a way that i don't need to press the down button and then enter. i want to type just enter without the down key first like in office applikations or safari.
For some reason my onPostExecute() is not called after my AsyncTask finishes.
My class decleration:
CODE:.......
Everything works fine, my doInBackground() completes successfully and returns a Boolean but then it just finishes.
How do you stop the Android softkeyboard from displaying completed text in a TextView. It is very important for my application that the spelling is not shown. In 1.6 SDK I made the InputType = VisiblePassword and that seemed to stop it, however this does not appear to work in the 2.1 SDK.
My application has an IntentService which runs periodically to download data from a remote server. The download task is run inside an AsyncTask which has reference to Application context only.
The data downloaded is for entire application and is displayed across four different activities. When the download completes(AsyncTask completes) the service is notified of the same. Now, the service needs to notify appropriate activity to update its view. The service is not aware of which Activity of what application is in foreground.
How do I make that connection? How does the service pass a message to the activity in foreground that new data is available and it should update its views?
Is it possible for an application to run automatically after completion of download/install from android market (Similar to First Run Run after installation in Symbian OS).
View 2 Replies View RelatedMy application is basically a image viewer. It is opened from both camera and as a separate application.
I open the image viewer to view and edit the picture. Each edit operation is implemented using thread. If my application closes due to pressing the home button, the next time I open it with camera. It throws anr.
This doesn't always happen. Only when large edit operations or edit operations on large image files are done.
I get out of memory error, sometimes timeout.
I guess it s because the thread doesn't complete the edit operation when home is clicked. and it s still running on the background. so when i open it s unable to process it.
m I right?
If so what is the way to stop a thread before the completion?
I just got the Galaxy S3 today and I noticed that my word completions and autocorrects aren't working. What I'm talking about is if I type in "tezting" it won't correct to "texting" when I press space. I have to manually select it. Also, the substitutions like "dont" to "don't" aren't working either. I have word completion (to 5 letters), spell correction, and auto-substitution checked.
View 11 Replies View RelatedI've got an update on my Samsung Galaxy S3 today and after that i cannot find my wordlist (personal dictionary) or the possibility to adjust the "word completion point" The whole menu are now only about how to use other social media to "learn" the phone how you're typing.....
Where to find the dictionary and where to adjust the "word completion point" from 2-3-4 or 5 letters?
I had my physical keyboard open and I started to get word prediction at the bottom of the screen again. But I cant figure out how to get it every time the physical keyboard is open. Most of the time I get nothing but this is the second time I have seen this at the bottom. Anyone know what going on with this. There isn't a setting for it for built in keyboard settings page. I wish it would work all the time because it is a nice feature.
View 9 Replies View RelatedI want to use command like "ls","mkdir","cd","./"..etc, in the app, somebody says use Runtime class,
Runtime.getRuntime().exec("ls");
but there is nothing happen.. I also use logcat to observe, but have the same result.
so could app use (linux) command?
I have a rooted device, I type "su" in adb shell, then I try to traceroute. It says "traceroute: not found". I can't find traceroute in any bin folders.
View 1 Replies View RelatedI would like to be able to send an actual SMS message from a shell using just the command line and not relying on any apk to do so. I am interested in sending this message between phones, not from the emulator to the phone. For example, by running the command: service call phone 2 s16 "1234567890"
I can place a call from phone to phone using the command line. The 'service list' command shows an isms service, which I can't seem to provide the correct arguments for. I would assume that one of the args should be a PDU string but haven't had any luck so far.
I find that when I am running 2 android devices connected to 1 linux machine, I find I can get ADB shell to exit abnormally. If I start a shell on Device 1, then on Device 2 start a shell and type reboot. Device 2 resets like expected, but the shell on device 1 will exit. I find that functionality of running controlling multiple devices with ADB very useful for testing. My question is can anyone reproduce this? Has this been fixed upstream? Is ADB planning on first class support for multiple devices, or was this an after thought feature? Any help debugging this, or possible just a little information in the right direction so I can make a patch myself.
View 5 Replies View RelatedCan't find information on how to print out documentation on android shell commands while in the shell. Something along the lines of.
View 4 Replies View RelatedI am trying to run an ADB shell command from inside an android app using the JAVA's Runtime.getRunTime.exec API. I am getting an error "ERROR/ProcessManager(1041): Error running adb: Permission denied". Wanted to check if there is any permission that I need to request to get it working or that running the adb shell command would not be allowed from with in the Android app.
I am able to execute other linux commands like 'ls' from the android app though.
I am trying to execute a command from within my code, the command is "echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell
I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness");
However I get a permissions error since I am not supposed to access the sys directory. I have also tried to place the command in a String[] just in case spaces caused a problem but it didn't make much differense.
I have copied a file named hello(compiled form hello.c) in android data folder and using command like "adb shell datahello" in android machine terminal. and it give fine output.
Actual Question is that is there is any way that in button click listener, i initiate the same command like "adb shell datahello" (or any other appropriate way to execute adb shell commands) and gets its output in TextView.
Can an Update.zip be installed through ADB Shell?
View 3 Replies View RelatedNow that we can Examining sqlite3 Databases from a Remote Shell, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine and manipulate SharedPreferences from command line when debugging. Or put in another way, in what files SharedPreferences are saved, and how to view and modify these files?
View 1 Replies View Relatedi would like to add some commands to be executed every time I run "adb shell" (for example "alias ls="ls -l""). is there a .bashrc or a .sh that i could add that to?
View 3 Replies View RelatedI took some photos with my G1. How can I pull all the photos from a G1 via 'adb shell'?
View 6 Replies View RelatedI need to execute following command in my app.
command: echo "1" > /sys/manager0/enable
I tried this with following code in my app.
Process p = Runtime.getRuntime().exec("su");
DataOutputStream stdin = new DataOutputStream(p.getOutputStream());
String cmd = "echo "1" /sys/manager0/enable";
stdin.writeBytes(cmd+"
");
There is no error and app executed perfectly but there is no change in the /sys/manager0/enable
I have an Amazon Kindle and the SGS2 which I take out and about with me.
I want to be able to transfer documents to and from the phone and Kindle (already got SSH access to the Kindle over WiFi) while out and about.
My phone is rooted and I've installed dropbear SSH. I can use connectbot to SSH into the phone locally but the shell I'm presented with doesn't see `scp`. I believe this is supposed to be included with dropbear? How do I get scp from this shell?
The reason I'm looking to do it all from a root shell on the phone is becuase I believe this is the only way to get access to the clients connected to the virtual access point. Hence I'll be able to:
be in the middle of the desert, create a WiFi tethering hotspot with the phone (though it has no signal), connect the Kindle to the phone via this access point, get a root shell on the phone and scp documents from the phone to the Kindle.
I believe I am as far as this final step but need an extra kick to get me there. Perhaps I need to install another shell?
My program creates a sqlite3 database. With the emulator I have been able to use adb shell and get to the file in /data/data/<package>/ databases/<database> to inspect data. But with a real phone, I just cant seem to find that file. I get some permission even doing an ls on the data directory. Any idea what I need to set up to navigate the filesystem?
$ Mac-202: adb shell $ cd data $ ls opendir failed, Permission denied $
I keep getting
ADB rejected shell command (ls -l /data):
And the command prompt when running adb shell tells me error: device not found although the emulator is open.
I am trying to write an android app for root users that runs a series of shell commands, or a shell script if that is preferable, and displays the output... can anyone point me in the right direction?
View 1 Replies View Related