can anyone tell me what the ADB shell command is for going up one directory. I can use "cd" to enter a directory, but always have to exit because cd.. doesn't work like in windows. Also tried cd home, to no effect.
Thanks,
Will
Code:
cd ..
Notice the space. Windows forgives leaving it out, Linux doesn't.
oh...you are the bomb. I was getting so tired of having to exit just to go up one directory.
Thank you.
Will
No problem. Another quick tip, cd / takes you all the way to the root of your file system. Just in case you get lost somewhere
pwd shows you where you are as well.
Related
ok... so, I've loaded my custom ROM and it contains busybox... I do like the extra functions that busybox offers over the stock Android "toolbox", so I don't really want to disable the commands like ls... I'd just like to turn the colors off.
Here's what I've found in my researches...
1) I can always
Code:
ls --color=never
but that is a lot of extra typing that I'm just not willing to do.
2) I can now SSH into my phone with putty and the colors are nice... but if I'm doing this over the cell modem (even EVDO), it's not too responsive (probably has some to do with currently running applications, syncs, and so forth)
3) I can use Droid Explorer and open a command shell from there, and the colors are nice... but Droid Explorer takes a lot longer to load than adb shell and the nice thing about being at my command prompt is if I need to push, pull, or remount (I understand I can always manually remount,rw and remount,ro from any shell, but adb makes it really easy to do with less typing) quickly... I can exit out of the shell, do the command, and go right back into the shell.
4) I can use Better Terminal Emulator on the phone... again... colors nice (I think you're seeing a theme here) but the typing is excruciating for long commands, and God forbid you make 1 typo... for quick things it's cool and to do a command while not at my computer, it's great.
5) If I were running Windows 95 (or maybe even XP), I could just use ansi.sys and do it. However, I've found that the only way ansi.sys works in a command prompt is to use COMMAND.COM and not CMD... plus you have to set CONFIG.NT to "dosonly" mode and include the driver in there... the biggest problem with all that is that adb will NOT run in DOS only mode. I even tried to adb shell from within a Cygwin command prompt (that already has colors enabled) but all the ansi color codes were lost.
So.... Here's my dilemma... I want colors when I'm not coming in through the Windows command prompt and adb shell. However, I want to disable the colors when I'm coming in through adb shell. I would probably settle for a different way to shell in from Windows 7 than the ones listed above.
I think I remember from my freshman year of college when they tried to teach me Unix, that you can set "default" command line switches for applications. For example, if you always wanted ls to do -l, then someplace you could set that as a default. I read on another post (possibly another forum) that somebody suggested editing .profile to do an alias of a command... something like
Code:
alias dir='ls --color=never'
but the problem with that is there's no .profile and there's no home directory for root or shell.
I even read that the standard ls uses an environment variable LS_OPTIONS, but I don't think that the stock Android ls uses it, and I can't get busybox to use it - plus, it'd be a pain to type that in every time I do an adb shell.
Does anybody have any suggestions or tips or any way to do this? If the alias will work, I'd be happy with that. I could then set dir to no color and keep ls with color. I could maybe even remap a command to do a ls -l all the time.
Thanks in advance.
This was what I ended up doing under Windows 7: http://softkube.com/blog/ansi-command-line-colors-under-windows/
This works for me:
Code:
export LS_COLORS=none
ls
Hey, I'm trying to push some stuff onto my mytouch using the included bridge tool, adb, and can't quite get it to work. AKA, I have no effing clue what I'm doing. I'm good with everything else, but when you sit me in front of Terminal I'm useless. Anyway, running Mac OS X, 10.5, I've got the SDK installed, exported, all that, but the internet has been no help with telling me what to do next. Please, someone help? D:
not sure on mac
but on pc i mostly put the files i want to push in to the sdk tools folder which gives you less to type
if you want to push stuff you need to know where to push on phone like
adb remount (makes drive read/write)
adb push xxxx.ogg /system/media/audio/ringtones/
if you want to install something
adb install twitter.apk
so my terminal looks like this (ignore errors phone not in usb)
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\SI>cd s\tools
C:\Users\SI\s\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
error: device not found
C:\Users\SI\s\tools>adb push xxxx.ogg /system/media/audio/ringtones/
error: device not found
C:\Users\SI\s\tools>
sitimber has given some good tips. On a Mac, you have to put "./" in front of adb to get it to execute.
For example, I have the Android SDK installed in /Developer/Android. In order for me to use adb, I open terminal and do the following:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
jsnyng said:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
Click to expand...
Click to collapse
worked perfectly! all the info i was getting was either for windows or linux and i was getting wicked confused. i have like nooo training with terminal so i was lost. that worked perfectly, thank you :]
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
This will make it a step easier. If you want to be able to "adb command" every time you open the shell without changing directories,
Open terminal.
Run:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Click to expand...
Click to collapse
How you will be able to see hidden files.
Download the OSX SDK http://developer.android.com/sdk/download.html?v=android-sdk_r3-mac.zip
Unzip it. Move the entire folder into your root directory "/"
rename it to "android".
Launch TextEdit.app
Hit "Format>Make Plain Text"
Now type (in the document)
export PATH=${PATH}:/android/tools
Click to expand...
Click to collapse
Save is as
.bash_profile
in YOUR HOME DIRECTORY.
Make sure you uncheck "If no extension, use .txt"
Say yes when it asks if you want to make this a system file.
now close terminal (all the way) and relaunch. Type "adb" and whatever you'd like and you're set!
jewishjawsh said:
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
Click to expand...
Click to collapse
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
softbanksucks said:
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
Click to expand...
Click to collapse
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
chordmasta said:
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
Click to expand...
Click to collapse
No prob - knew that you knew, just figured I'd point it out for those who don't
im on to the command prompt thingy and im a little confused......
do i put the whole command in? because when i do it says faild bla bla?
do i type it in just how it shows? cuz i wont work for me, but if i put in
JUST..."abd shell mount" it show alot of writing like it worked but im not putting in the WHOLE command???
can anyone tell me what it is supposed to say after each command??????????
omg i just want it to work. i got a new phone from verizon because i downloaded the leak, when all i wanted was a custom rom for wireless tether
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
you might want to hit up in the irc chat, you can get real time help there. irc.wastate.net i believe or irc.zifnab06.net chat room either erisroothelp or droideris
where is that? those links diddnt work
those werent links, they were the servers for the irc chats. you need a irc chat client to get on there. if you want to use a web based chat client, the direct link to there is chat.andirc.net
whooohoooo!
you dont remember how the command prompt works? im just wondering if you put the whole command in or just the first part....sorry if im coming off a little stupid and pushy
how about posting the error?
ok i get in to my tools directory(this is what i see)
*C:\AndroidSDK\AndroidSDK\tools>
i put in (adb shell mount -o rw,remount /dev/block/mtdblock3 /system)
this is what it says "mount: Operation not permitted"
Why not use this:
http://forum.xda-developers.com/showthread.php?t=661413
what does that do? is it an app to get around the command prompt?
Does your phone have root access? (did you flash the rooted PB00IMG.zip?)
yes i did all the steps leading up to this now im stuck on the command prompt
do i type in all of the command? when i do it says "mount: Operation not permitted" on the first command
*Sigh*
- Open up command prompt (either type in cmd in the windows search bar or dig deep into your computer to find that sexy thang.
- Direct it to the folder of your choosing. In this case, the tools subfolder of android sdk. There are several ways to do this, the easiest would be as follows:
Say you're trying to get to C:\AndroidSDK\tools
Type:
cd C:\AndroidSDK\tools
or
cd C:\
cd AndroidSDK
cd tools
- From here, you shouldn't have a problem with adb. Make sure your device is plugged in and type:
adb devices
and you should see your device. Copy and paste the commands and you should be good to go.
ok so i put in adb devices (wasnt in the walkthrough)
and it showed
"list of devices attached"
HT9CTHG01052 device
im assuming that this is my device! yay.....or so i thought
i copied and pasted the command...and i also tried to type it out
it said the same thing!?
"mount: operation not permitted"
im sure its something im doing wrong...i just need someone to take a couple minutes to help a brutha
i typed in "cmd" in front of each command and it showed
microsoft windows [version bla bla]
copyright bla bla
untill i got to the last command..... it said 'ecovery.img' is not recognized as an internal or external command, operable program or bach file (yes it did say " 'ecovery.img' ") i looked all over a i found no file mis labled as "ecovery.img"
when it says all that stuff about windows does that mean that it took the command?
Why are you typing in "cmd" infront of everything?
IDK im just trying to figure it all out? am i wrong?
thanks for helping btw
i wish someone knew what it is supposed to say after each command....or even a video showing someone doing these commands so you can see them typing them
Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
you type the adb commands in exactly like they are shown. you dont type anything in front of adb.
this light sensor is really pissing me off , is there any way to shut it off , i'v found a way that is telling me to chmod 777 the patch file after installing it manually but idon't know what chmod 777 is and how to do this please help me
Is stock eclair there isn't a GUI option to disable it.
About chmod 777, I haven't done it yet... but I guess you have to adb shell something.
To know how to use those commands, just have a click on the search button...
maveloth said:
Is stock eclair there isn't a GUI option to disable it.
About chmod 777, I haven't done it yet... but I guess you have to adb shell something.
To know how to use those commands, just have a click on the search button...
Click to expand...
Click to collapse
i searched and found nothing please help it's pissing me off for real !! se u suck i bought this phone because of it's design but their software update service sux !
I have found what you were looking for [just search in devs forum].
Here it is an explaining link:
http://forum.xda-developers.com/showthread.php?t=888232
maveloth said:
I have found what you were looking for [just search in devs forum].
Here it is an explaining link:
http://forum.xda-developers.com/showthread.php?t=888232
Click to expand...
Click to collapse
thanks i found this thread before but i can't apply this method because i don't know how to chmod777 the file so i can't get this to work ? can you try it and then tell me how to exactly do it please , thanks again m8
First thing, you have to learn how to adb shell.
But you have to make everything ok before using it.
So, let's see how it has to be done..
Download the .zip file posted on the other thread [linked above].
Using root explorer, just copy and paste the content of the .zip file under the /etc/ path of the phone.
After you have done this, let's adb shell.
1. Download this file: http://db.tt/cq44S4v
2. Extract the adb.zip file to C:\adb [there will be a folder named "adb" within the C:\ path, with 3 files within it].
3. On your phone, click Settings > Applications > Development, and make sure USB Debugging is on.
4. Plug your phone into your computer via USB cable [it needs to be on]. It should say installing drivers if your phone is plugged for the first time and you are using Windows.
4.1 You'd better install the drivers which comes with X8 software [PC Companion], or just google for them.
5. After it installs the drivers, go to the Start menu and type "cmd" into the search bar to open the command prompt.
6. Type the following into the command prompt window [hitting enter at the end of every line]:
Code:
cd\
cd adb
adb devices
You should see a serial number pop up, it’s the serial number of your phone. This means you are all set.
After all this procedure, you can finally "chmod" your files.
Always from the CMD, type this:
Code:
adb shell
You should see a "#" on the left. That's good.
Now enter the path with the file to chmod:
Code:
cd /etc
Then finally chmod it:
Code:
su chmod 777 hw_config.sh
You're done.
Hope this helps.
maveloth said:
First thing, you have to learn how to adb shell.
But you have to make everything ok before using it.
So, let's see how it has to be done..
Download the .zip file posted on the other thread [linked above].
Using root explorer, just copy and paste the content of the .zip file under the /etc/ path of the phone.
After you have done this, let's adb shell.
1. Download this file: http://db.tt/cq44S4v
2. Extract the adb.zip file to C:\adb [there will be a folder named "adb" within the C:\ path, with 3 files within it].
3. On your phone, click Settings > Applications > Development, and make sure USB Debugging is on.
4. Plug your phone into your computer via USB cable [it needs to be on]. It should say installing drivers if your phone is plugged for the first time and you are using Windows.
4.1 You'd better install the drivers which comes with X8 software [PC Companion], or just google for them.
5. After it installs the drivers, go to the Start menu and type "cmd" into the search bar to open the command prompt.
6. Type the following into the command prompt window [hitting enter at the end of every line]:
Code:
cd\
cd adb
adb devices
You should see a serial number pop up, it’s the serial number of your phone. This means you are all set.
After all this procedure, you can finally "chmod" your files.
Always from the CMD, type this:
Code:
adb shell
You should see a "#" on the left. That's good.
Now enter the path with the file to chmod:
Code:
cd /etc
Then finally chmod it:
Code:
su chmod 777 hw_config.sh
You're done.
Hope this helps.
Click to expand...
Click to collapse
lol it's freaking hard , thanks for your help m8 i appreciate it is there any easier way?
Have you tried installing Spare Parts from the market. I know it has light sensor tweak option plus has tons of other useful tweaks and monitors.
Sent from my I7500 using Tapatalk
Master Darko said:
Have you tried installing Spare Parts from the market. I know it has light sensor tweak option plus has tons of other useful tweaks and monitors.
Sent from my I7500 using Tapatalk
Click to expand...
Click to collapse
tried it still no use , the sensor is still working !!
hi.
so we now have android in windows phone.there's a tutorial on how to copy files from that android and to that android os but i think you're phone needs to be unlocked (interop).and if you're phone is locked you can do it (i've been away from these kind of things for a long time.correct me if i'm wrong)
i used adb before and knew there was some kind of command to check the folders and files in the phone.so i took my chances and i tried them.
here is the code:
1-
Code:
adb shell
2-result will be something like
Code:
/system/bin/sh: No controlling tty: open /dev/tty: No such file or directory
/system/bin/sh: warning: won't have full job control
[email protected]:/ $
3-type this
Code:
ls
it will gives you a list of all folders in the phone (in android os in windows phone in this case)
4-the main folder is "mnt" so type this code
Code:
cd mnt
5- you can still type
Code:
ls
but it'll take a lot of times to find folders so i'll just give it to you guys.these are the command you need to enter and press enter.(each line must be typed separately)
Code:
cd shell
Code:
cd emulated
Code:
cd 0
6-in here is you type
Code:
ls
you can see that you have Pictured,Music and things like this.so if you want to create a folder in your android just type
Code:
mkdir YourFolder
7-after you created your folder enter
Code:
exit
to exit the shell and now you can "push" and "pull" commands.here's how push command work
Code:
adb push Path\To\Your\File.txt mnt\shell\emulated\0\YourFolder
i like to put my files that i want to push in the same folder that i have adb.exe so i just need to type the file name and extension.
8-after that you can install an android file manager to manage your files.
i haven't tested "pull" command but it'll work.i just need to test it.
so sorry if you guys knew this method , i just wanted to share it with you.
this method is really good for phone like 920 and for apps and games that has .obb data files (like Fallout Shelter )
Really appreciate you for this tutorial and helping nature,but we had a ""shortcut ""way using file Explorer
http://forum.xda-developers.com/win...utorial-how-to-copy-files-android-to-t3178808