I have a Nexus One rooted running the latest Cyanogenmods (5.0.8), I installed QuickSSHd and started the SSH deamon. I am able to ssh into the Nexus One over WiFi using Putty from my PC (Windows 7) using "root" as the user and the password set in QuickSSHd.
When logged into the phone, I can do a "su" command and "id" returns "uid=0 (root) gid=0(root)".
But... when I try to do "ls" nothing happens, just nothing is returned, not even a "not found" message (which I get if I type a random command string).
vi works tho
Any hint what I am doing wrong?
Do you have busybox installed?
Please read the rules on posting in the development section.
If you type "ls" and hit return and nothing but a blank line appears, chances are it's dropped you into an empty directory.
Where does "pwd" say you are? What happens if you type "ls -al"?
If you type "ls" and hit return and nothing but a blank line appears, chances are it's dropped you into an empty directory.
Where does "pwd" say you are? What happens if you type "ls -al"?
Click to expand...
Click to collapse
Exactly what i thought:
Pwd
-------------------------------------
Sent via the XDA Tapatalk App
Related
Now the thing is when I am at the home screen on my G1 i push "Enter" on the keyboard and then type "telnetd" and then push enter again it doesnt do anything. When I open up telnet client on my PC it wont connect with wifi on.
So I go to Terminal Emulator on G1 and plug in"
cd system
cd bin
telnetd
And then try and connect to telnet on PC and nothing happens.
So I then go to Telnet client on my G1 and go to connect to "localhost:23" and it says "Error while connecting to server: localhost/127.0.0.1:23 - Connection refused" the thing is that my local host for my wifi is not 127.0.0.1:23
And when I "netstat" from inside Terminal Emulator there is no address with port "23"
Any help would be greatly appreciated.
Download the app called Terminal Emulator from the market and use that instead of pterminal.
use the "su" command before trying to start telnetd.
Also make sure your wifi is up before your start telned.
mrboyd said:
Download the app called Terminal Emulator from the market and use that instead of pterminal.
use the "su" command before trying to start telnetd.
Also make sure your wifi is up before your start telned.
Click to expand...
Click to collapse
Thats what I have been using is Terminal Emulator but I dont think I can install Debian through Terminal Emulator. I would rather do it through the PC anyways.
I geta syntax error when using "su" in Term. Emu. because I believe I have installed the "su" mod to always allow.
adb shell
Presuming you're already running the proper modded RC30, you should be able to run 'adb shell' with USB debugging enabled on the phone and it connected to your machine. This should just drop you to a root shell.
SplasPood said:
Presuming you're already running the proper modded RC30, you should be able to run 'adb shell' with USB debugging enabled on the phone and it connected to your machine. This should just drop you to a root shell.
Click to expand...
Click to collapse
adb being a utility included in the android sdk (in tools/)
SplasPood said:
Presuming you're already running the proper modded RC30, you should be able to run 'adb shell' with USB debugging enabled on the phone and it connected to your machine. This should just drop you to a root shell.
Click to expand...
Click to collapse
SplasPood said:
adb being a utility included in the android sdk (in tools/)
Click to expand...
Click to collapse
I got all that but how do I actually use it (adb)? Every time I click on it a command window pops up and then goes away.
Ok I got adb shell to work now thanks guys
Can someone help me out ?
I need to send 150 SMS to our group but the Android limit is 100 per hour.
I found a solution here
http://www.mail-archive.com/[email protected]/msg63883.html
but really don't know how to work with sqlite. Can anyone give me a step by step manual to remove the period check and increase the number of SMS messages allowed per period ?
Thanks in advance
Why did the mods move this? This is more android development than the live wallpaper request. This at least modifys things at the OS level. Sorry ass mods.
Have you tried multiple programs? I dont even have 100 contacts to test this.
I'm no dev. but I do believe if your phone is rooted, you should be able to simply do adb pull, make the changes, then push the file back?
Leme' know if that works, just a thought
Well, I have the answer from Christopher
Like I mentioned, needing to remove the check is probably indicative that there's a better way to do things, but that answer pretty much covered the steps:
1. Obtain a device that has root access
2. Enter the device shell (the "adb shell" command) 3. Use the command line tools to alter the settings database 4. Reboot
For more details, check Google or try asking on StackOverflow.com as it's an official Android support channel.
Click to expand...
Click to collapse
Trying now
lol if you dont like the mods here...try androidoverdrive.com. they are pretty helpful there. I'm also interested in seeing if you get this to work.
I got it to work! Heres how(taken from link above):
Open Command Terminal and enter the following:
adb shell
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
Then you'll see: sqlite>
Then enter the following to alter the limit
INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_max_count', 101);
(change 101 to your new limit)
I didnt try altering the limit so I hope it works for you guys.. but I can confirm this next one works. It completely turns off the limit altogether.
To turn off the limit enter:
INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_interval_ms', 0);
It worked right away for me.. (SMS Bomber >)) Id reboot to be safe.
could anyone help me out? i get "sqlite3 permission denied" when i try to access the db i'm positive i'm doing something wrong because i am new at this.... i plug the phone in, open cmd prompt, cd to the tools on my hd... typed in what was listed and that error came up let me know...! thx
skanndelus said:
could anyone help me out? i get "sqlite3 permission denied" when i try to access the db i'm positive i'm doing something wrong because i am new at this.... i plug the phone in, open cmd prompt, cd to the tools on my hd... typed in what was listed and that error came up let me know...! thx
Click to expand...
Click to collapse
type
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
then sqite3 and so on...
Ok, I"m having trouble doing this on my EVO.
Here's what I've done so far:
1. Rooted with UnrEVOked
2. Installed SDK,
3. Added to path,
4. turned on usb debugging
5. connected with usb, drives did install
6. tested with adb devices, serial showed up
7. adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
8. sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3: permission denied
DancinDirk said:
Ok, I"m having trouble doing this on my EVO.
Here's what I've done so far:
1. Rooted with UnrEVOked
2. Installed SDK,
3. Added to path,
4. turned on usb debugging
5. connected with usb, drives did install
6. tested with adb devices, serial showed up
7. adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
8. sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3: permission denied
Click to expand...
Click to collapse
Are you sure you have superuser access then? Go into terminal and type in "su" and tell me what you get.
Had a long day... how do I get into terminal?
DancinDirk said:
Had a long day... how do I get into terminal?
Click to expand...
Click to collapse
Your going to need to download it from market=p. Since the evo doesn't have a keyboard though you might need to use something like better terminal which lets you use a virtual keyboard.
When I try:
INSERT INTO gservices('sms_outgoing_check_interval_ms', 0);
SQL error: near "0": syntax error
I am using a rooted HTC (Sprint) Hero running the Aolysuis 2.1 rom.
Disregard everyone. Apperently you have to enter that whole command as written. I thought maybe he was giving a general syntax structure and then provoding us with specific values....that is what it looked like to me but no
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
is the whole command...kind of silly looking if you ask me.
dsMA said:
Disregard everyone. Apperently you have to enter that whole command as written. I thought maybe he was giving a general syntax structure and then provoding us with specific values....that is what it looked like to me but no
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
is the whole command...kind of silly looking if you ask me.
Click to expand...
Click to collapse
May look silly, but that's how Structured Query Language is written. Don't be intimidated or embarrassed by the mistake, no worries!
Also, I have added this how-to guide on my website, located in my signature. OP, excellent find and great guide.
any idea why I'm having to repeat this process every couple of days?
mejorguille said:
Are you sure you have superuser access then? Go into terminal and type in "su" and tell me what you get.
Click to expand...
Click to collapse
I have tried everything from the steps above to just typing
C:\Users\Israel David>cde C:\android-sdk-windows\tools
'cde' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Israel David>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db sqlite3 /data/data/com.android.providers.settings/databases
/settings.db
sqlite3: Error: too many options: "/data/data/com.android.providers.settings/dat
abases/settings.db"
Use -help for a list of options.
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> INSERT INTO gservices (name, Value)
...> VALUES('sms_outgoing_check_interval_ms',0);
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
SECOND WAY ......
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_interval_
ms',0);
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
IN BOTH WAY THEY SAY UNABLE TO OPEN DATABASE FILE AND I DO HAVE ROOT ACCESS I HAVE CHECKED
I am using a Sprint Hero! Flash 2.1 ROM I need to find a way to erase the LIMIT because I have 4 groups with over 200 people that receive daily txts and I have tried using Command Prompt and Terminal and on Command Prompt it says that sqlite3: not found and on Terminal adb: not found or permission denied
I have su permission
Just tried to do this on my newly updated 2.2 evo (OMJ build) and I got
SQL Error: no such table: gservices
Has this hack/fix changed in 2.2 or did they remove the limit?
I cant get SQLite3 to work at all:
sh-3.2# sqlite3
sh: sqlite3: command not found
Ok so this all started 7 hours ago.
I did a factory reset and I couldn't get passed the gmail account login. I tried multiple times, and tried resetting. Didn't work.
So I looked online to see if I can use wifi, and I could.
http://modmygphone.com/forums/showth...1891#post51891
I updated my drivers, downloaded Android SDK.
I got up to the part where I type " adb shell "
It says no devices found. Please help. Thanks in advance :]
Currently I am in stock ROM RC29.
I am trying to do this on the site above:
"6. Now type this on your G1 keyboard..
<enter>setprop persist.service.adb.enable 1<enter>
7. Now.. Open the command prompt on your PC ( Start > Programs > Accessories > Command Prompt )
8. Type "adb shell" without the quotes.
(Just in case typing that doesn't do anything.. Navigate to the folder you've unzipped the ADB Files and type there instead)
9. Then when the '$' comes out .. type this:
am start -a android.intent.action.MAIN -n com.android.settings/.Settings
9. Take a look at your G1 and now it'll be in the WiFi settings section. Configure it.. Connect to your network.. And done!"
I find this guide:http://forum.xda-developers.com/showthread.php?t=532719 much easier to follow
the code
cd C:\android-sdk-windows\tools needs to be typed in the cmd before typing in adb shell.
thanks for the guide, but I followed what you said/the guide said, still the same result =/
TmobileDash12 said:
thanks for the guide, but I followed what you said/the guide said, still the same result =/
Click to expand...
Click to collapse
Do you have the android-sdk-windows file on the root of your C drive?
Debugging
Did you make sure to add a path for adb in the environmental variables tab on the pc, and also make sure that usb debugging is checked off in the settings>applications>development tab.
It is in my C drive or root folder.
I can't access settings because my phone's stuck on the login screen.
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
dc41 said:
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
Click to expand...
Click to collapse
ugh, this isn't garbage information or a mistake. this is windows command prompt (which isn't a proper terminal emulator) not being able to deciper the color coding techniques used in *NIX shells.
all these odd numbers are are simply color coding to "prettify" the shell if you're using a *NIX shell
Kaik541 said:
ugh, this isn't garbage information or a mistake. this is windows command prompt (which isn't a proper terminal emulator) not being able to deciper the color coding techniques used in *NIX shells.
all these odd numbers are are simply color coding to "prettify" the shell if you're using a *NIX shell
Click to expand...
Click to collapse
Thanks for the info! Now that I know what's going on, I should be able to find solution on the web.
Thanks!
dc41 said:
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
Click to expand...
Click to collapse
I've never had this happen when I use the adb shell on my Win7 machine. Which distro are you using? I have Home Premium x64.
miztaken1312 said:
I've never had this happen when I use the adb shell on my Win7 machine. Which distro are you using? I have Home Premium x64.
Click to expand...
Click to collapse
Ultimate 64, but like I said, it wasn't always like this. Some point in the lady week I must have changed a setting or something. Now I just have to figure out what I did and how to undo it.
I am guessing you switched ROMs? Seems to be the color setting in some of the ROMs on the LS command. It is not a windows bug, any terminal/shell that doesn't support colored directory/file names will give you this behavior.
See this thread for a fix:
http://forum.xda-developers.com/showthread.php?p=7714491
I have been having this issue since I upgraded to JH3 and SRE 1.2.1a (which included a new busybox 1.17.1 and proper symbolic links). SRE 1.2.1a also remove the stock ls command. I did not start looking into fixing it until tonight. Setting an alias for every adb shell session is annoying. Android does not include any of the profile start scripts like linux does or we would be able to stick an alias in some place like a .bashrc or /etc/bashrc.
Here is a permanent solution. I normally have a permanent alias setup on my linux machines with the switches below, you can modify the switches to your liking.
create a file in notepad with the following:
"ls -alh --color=never [email protected]" do not include the quotes.
Note the switches I am using:
a = show all files including hidden (the ones that start with a "." as a prefix on the name)
l = show files in long listing format/layout
h = show file size in human readable format eg and 1k instead of 1000.
Save the file as "ll" without an extension. You can use another name if you wish.
Use adb to push the file into /sdcard then adb shell to copy it to /system/xbin or copy via root explorer.
#assuming ll is in your SDK tools folder - move to sdcard
adb push ll /sdcard
#move to xbin folder
adb shell
su
mv /sdcard/ll /system/xbin/ll
I didn't touch the permissions (its working with -rw-rwxr-x) but just in case you can set permissions on the file.
chmod 755 ll
I rebooted my phone and I was still good to go using "ll" from adb shell.
adb shell ll
or adb shell
$ll
enjoy.
Mine does the same, looks nice when I am using on Ubuntu. I had flashed JH3 + SRE 1.2.1a also.
Did you try using the "dir" command? I think it comes with busybox 1.7.1. That one outputs fine for me when I am using the cmd prompt. Only little quirk is that I have to remember not to use ls when logged on Win7.
color codes were removed in SRE 1.2.2a: http://forum.xda-developers.com/showthread.php?t=751934
tikidroid said:
I have been having this issue since I upgraded to JH3 and SRE 1.2.1a (which included a new busybox 1.17.1 and proper symbolic links). SRE
Click to expand...
Click to collapse
Your fix worked perfectly for me!
Thanks!
tikidroid said:
Here is a permanent solution. I normally have a permanent alias setup on my linux machines with the switches below, you can modify the switches to your liking.
create a file in notepad with the following:
"ls -alh --color=never [email protected]" do not include the quotes.
Click to expand...
Click to collapse
Ahhh.... thank you so much for this post. This has been driving me crazy for a few hours, and I almost considered putting an alias to ll in init.rc (but I much prefer this less invasive method)
Useful workaround, thanks. Still needed, some two years later!
for about 4 days now I've been trying to get ADB to work on my phone following these instructions;
http://forum.xda-developers.com/showthread.php?t=858118&highlight=adb
I've tried everything and so far I can't get past "adb devices" when I do so I get the message "adb is not recognized as an internal or external command"
what exactly am I doing wrong and how do I fix it? I've installed JDK & downloaded the android SDK package, in device manager the phone is recognize as "Android ADB interface"
I'm ready to chuck this phone against the wall at this point
oceanisbleu said:
for about 4 days now I've been trying to get ADB to work on my phone following these instructions;
http://forum.xda-developers.com/showthread.php?t=858118&highlight=adb
I've tried everything and so far I can't get past "adb devices" when I do so I get the message "adb is not recognized as an internal or external command"
what exactly am I doing wrong and how do I fix it? I've installed JDK & downloaded the android SDK package, in device manager the phone is recognize as "Android ADB interface"
I'm ready to chuck this phone against the wall at this point
Click to expand...
Click to collapse
Double check your path...
"Now type cd\AndroidSDK\tools\"
My path is c:\android-sdk-windows\tools\
I've renamed the file to AndroidSDK & placed it directly in C:/ so for me it's C:/ AndroidSDK/tools/
doesn't work...
-I plug the phone in and it's recognized as "Android ADB Interface" in device manager
-I open easy tether on the phone then right click on the pc & click connect then it says connection established via Android ADB.....
-I open CMD
-I type cd\
-then cd\AndroidSDK\tools\
-then adb devices & this is where I want to break everything because I can never get past this part and all I see is 'adb' is not recognized as an internal or external command.......
I hate this phone lol & wish I had the money to get the evo so I can put this thing in the trash, I just want to setup firerat's and that's the main reason why I want to establish ADB, is there any way it can be done without ADB????
thanks for trying to help, I hope someone can still figure this out for me
If you downloaded the newest SDK, then the problem might be that you are looking for adb in the wrong directory. It is no longer located in \tools. It was moved to the \platform-tools directory
Sent from my HERO CDMA using xda premium
In the morning I'll give a more detailed instructions, but you need to add the platform-tools folder to your PATH.
Sent from my HTC Hero making C.R.E.A.M.
dastin1015 said:
In the morning I'll give a more detailed instructions, but you need to add the platform-tools folder to your PATH.
Sent from my HTC Hero making C.R.E.A.M.
Click to expand...
Click to collapse
I have just added this exact directory to the end of my PATH
;C:\AndroidSDK\platform-tools\
rebooted, opened cmd, typed adb devices and still I get ADB is not a recognized command.
I went to HTC's site & downloaded the latest hero sync software (new version just came out 2 days ago) when I plugged my phone in it re-installed the drivers, tried it again and nothing!!
I did notice that after the HTC Sync installation in device manager the phone is no longer Android ADB Device, now it says MY HTC, did Sync ruin my ADB drivers?
Ok. So were you at with this???
Shoot me a pm if you still need assistance.
Edit: From reading your post I think your not changing the directory first.
So open up the cmd window. And type cd\ "then hit enter"
Thenn type.
cd\AndroidSDK\platform-tools\
And hit enter.
Then type. "adb devices" without the quotes. And see if that will show your serial number.
If that yeilds no results then try
cd\android\SDK\tools\
And hit enter.
Then type "adb devices" without the quotes. And hit enter and see if that will return your serial number.
Locked & Loaded
" Shooter on Deck"
Thanks guys for all the help you have provided, I have finally figured it out using this guide;
http://forum.xda-developers.com/showthread.php?t=532719
slightly different than the first guide I followed, instead of editing the PATH a new Environment Variable was created also a slightly different CMD code to get to ADB;
cd C:\android-sdk-windows\platform-tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
I hope this helps anyone else who might have the same issue.