So, you'll have to bear with me because I've only had about 30 minutes worth of exposure with adb and all that goes along with it, but I'm having some trouble with a simple command. I'm trying to change the directory to /sbin/ but the command isn't working. It's keeps telling me "permission denied" Any ideas?
Just to give a liitle background information, I screwed up the partition in my phone and am trying to fix them via http://forum.cyanogenmod.com/topic/6...ernal-storage/ . My phone doesn't boot, but I can get in to recovery.
Thanks ahead of time.
This should be in the Q&A section....
Sent from my ADR6300 using XDA App
The link to the article doesn't work, so I can't see what it is that you're trying to do.
shell game
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
jermaine151 said:
The link to the article doesn't work, so I can't see what it is that you're trying to do.
Click to expand...
Click to collapse
http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/
smtom said:
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
Click to expand...
Click to collapse
Thanks! I appreciate any help I can get. I really would like to salvage my phone. I'm going to give it another go here shortly.
Related
ok so i tried to follow the instructions to get my phone rooted!
but im running into a snag....
im here roughly
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
except when i type adb shell i get a "$" instead of a "#" in the next line
im not sure if i did something wrong/installed drivers wrong or what??!! any help would be appreciated!
to get your phone rooted, read the rooting tutorial in the development section.
but, in answer to your question, you are getting the '$' instead of the '#' because you do not have root access in your shell.
to have root access in shell, you need to have installed the rooted img, which will then allow for temporary installation of a custom recovery, which must be pushed while the phone is in recovery mode already. then, you can adb shell to the root prompt
ok im very very new too all this! so i apologize up front for not knowing exactly what your talking about! i have been following this guide to root my phone-
forum.xda-developers(DOT)com/showthread.php?t=532719
(take out the (DOT) and make it .com
some1 on this site refereed it to me because i needed to know how to do EVERYTHING from start to finish!
so i am still stuck any help(detailed very detailed help) would be appreciated!
I'm trying the rage root method after reading up on all the stuff. I managed to get adb installed and connected, but i can't use adb actions.
I type in c\androidsdk\tools\adb shell
$ su
$ SUermission denied
even without su, if i try to type "adb push su /sdcard/su" it says adb permission denied.
I have kept my phone screen on as per another thread, but i do not get a prompt that asks for adb permissions. Am i missing an app or something? I do have debugging and screen awke both on.
I have placed the g2 root folder in the androidsdk\tools\ folder, both just the files and the entire folder just to be sure.
Obviously I'm new to adb, so If i'm doing something completely wrong just let me know.
as long as you're not rooted (temp or perma) you can't use "su" in adb-commands... If you tell a little more about what you're trying to push, then I can help some more
Im just trying to root the phone with rage since visionary seems unreliable.
Im trying to adb push the su/ sdcard/su as per the first line of instruction in the rage temp root guide
hehe... I used the visionary root, and it have worked good for me btw, I think you should've posted in the rage-thread instead of opening a new topic, but now it's already opened so here it goes
firstly... are you sure you're in the right folder, and have the folder "su" in there?
If so, don't go into "adb shell"... use the lines exactly as stated in the OP. adb inside an adb shell won't give the results you want... Post back if it doesn't work
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
Click to expand...
Click to collapse
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Ok, my adb stuff is in c:\tools .. so when I first open command prompt, I have to type this:
cd c:\tools
That puts me into the correct folder. If yours is in C, then you'd probably have to do this:
cd c:\androidsdk\tools
Then type:
adb devices
It should at least give you SOME sort of output, either with your device number (if it's connected, and adb is working properly), or just say devices, with no numbers (incorrectly)
dwang93 said:
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Click to expand...
Click to collapse
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
FYI you will not see the $ symbol. that just indicated the next line you have to enter in commnad prompt. Each time you see $ just mean you type that line then press enter. Wait to see a result of transfer from prompt then enter next line and so on.
rsxtypes72 said:
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
Click to expand...
Click to collapse
This!! I'll be kind though.
Make your life easy. Unzip the contents of g2TempRoot, to your tools folder, in sdk. So, unzip the g2temproot to your desktop. Go into that folder. Copy all, and move them to c:\androidsdk\tools. Now, once that's done, go into command prompt. cd c:\androidsdk\tools. Then, do as follows, as per that link
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
(Sorry I couldn't be of more help, as I used VisionaryR12 and it worked fine for me.)
One more word of advise...
I would recommend you try temp root first.
Become used to using adb then try to get full root.
When you use temp root everything you do is temporary only.
Rebooting will reset everything back to stock so its good practice.
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
any tips on going onto the perm root?
Click to expand...
Click to collapse
Read .. research .. double check .. triple check .. and right before you do it .. check again. As you're doing it, go over every letter, space, and character to make sure it's as it should be.
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Daughain said:
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Click to expand...
Click to collapse
Upload a screen shot of your command window
with the error
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
Click to expand...
Click to collapse
dude..I think I am doing something like you...could you please post what you did....I think is an issue of directories..but I'm not that familiar with adb and i have not been able to figure this out.....
Thanks!!!
ADB is not friendly to me. I was able to root my g1 with pure ease. I cant get started with adb, I dont know why I cant get $, I've read several guides and I'm just about to give up. I'm running 2.2 on my g2.
I do have a couple of questions:
Are rooting with rage or visionary 14 the only way to root?
Are there any root guides out there that dont require ADB?
ADB is a ****ing pain in the ass to me, especially since I've tried everything and cant get it to work. Also, the drivers that go on Win7 64bit just dont work.
Also when I do have root, can I get android updates?
Any help would be thankfully appreciated. Sorry if I'm a pain in the ass, but I'd like to know if there is an easier way.
I think you need the q&a section
Sent from my HTC Vision using XDA App
This will help u get adb working...
http://forum.xda-developers.com/showthread.php?t=865685
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
dictionary said:
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
Click to expand...
Click to collapse
while my knowledge of adb isnt stellar, I have run into problems using it. I'm going to try this new link to the guide and see if it works.
Still if anyone knows other solutions, chime in.
Try the guide linked above. The drivers in the HTC Sync package (see the guide) definitely do work on Win 7 64-bit.
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
sorry about the ****ty pics
cwis said:
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
Click to expand...
Click to collapse
Did you definitely add it to your path as it is suggesting in that window ? If so, I think you may need to reboot to pick that change up.
I did that just in case.
Actually, that path field was empty. So, I added it as is.
look up droid explorer
I made some leeway:
C:\Program Files (x86)\android-sdk-windows\tools>adb shell
$
$ adb push su /sdcard/su
$ adb push su /sdcard/su
$ adb: permission denied
good grief!!!!!!!
I've completely removed visionary before starting this procedure. Did I need temproot before attempting this?
Downloading and installing Droid Explorer. Thanks!
Also, I'm using this guide: http://forum.xda-developers.com/showthread.php?t=834228
No matter what I've done, permission denied.
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
ianmcquinn said:
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
Click to expand...
Click to collapse
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
steviewevie said:
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
Click to expand...
Click to collapse
I did run the commands from my pc. But still permission denied.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
"permission denied" is a message from your phone, not your PC.
The $ prompt that you copied and pasted up shows that you were running the commands on your phone. As soon as you do "adb shell", then any commands you are entering after that are going on your phone, even though they're physically being typed on your PC - because your PC has started a command prompt on your phone, as shown by the $ prompt.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
Basically, don't start by typing adb shell. The instructions you are trying to follow don't even say to do that anywhere. I highly recommend you reread the instructions very carefully and follow them exactly. Rooting this phone is actually pretty simple if you just do exactly as the guide states. If you don't know what you are doing and mistype something in some of the later steps though, you can seriously screw up your phone...
I think part of the confusion is that the commands listed on the guide all have "$" at the beginning of them, probably because whoever wrote that was using a Linux PC or maybe a Mac. You are actually executing these commands from your Windows command shell so they will look more like:
D:\Android SDK\platform-tools>adb push su /sdcard/su
Click to expand...
Click to collapse
(depending on where you have the SDK installed)
instead of:
$ adb push su /sdcard/su
Click to expand...
Click to collapse
but of course you only need to type:
adb push su /sdcard/su
Click to expand...
Click to collapse
Again these are typed from your windows command shell.
So I 'm getting brave and decided I want to learn more about modding so that means I need to know at least the most basic of ADB commands.
Well I set up the Android SDK several weeks ago and to my best knowledge it was/is working i.e. from the command window (I'm using Win 7 so I use Shift-Right click to access in the Android sdk tools folder) I can type
adb devices
and my phone shows up.
From there I can type
adb shell
Now here is where it gets wonky
I can't use any adb commands or else I'll get an
"adb: not found" error
I can use the -ls command and a2sdcheck commands without any issues. I can even use the reboot and reboot recovery commands ONCE I don't use ADB in front of it.
So simple commands such as adb push/pull is off limits.
I have also tried in recovery mode but the same thing happens.
I'm sure I'm just missing something small but this is turning out to be really frustrating
And yes I do connect with Charge Only and USB debugging is checked.
Thanks in advance for any help
Sent from my PC36100 using XDA App
I could be wrong, but once you type adb shell I think you have to grant it Super user permission from the phone.
I just read the the SU log and didn't see a request resembling anything from adb or my computer. I also didn't notice a prompt to do so but wasn't really paying attention. I need to check on that but if someone else can clarify or tell me how to grant access that would be great. Thx for the response
Sent from my PC36100 using XDA App
Reconnected my phone and typed adb shell and there was no prompt for SU permissions. I'm thinking this may not be applicable or else you wouldn't be able to connect adb in recovery mode right?
Sent from my PC36100 using XDA App
Here is a tut on using adb. ADB Basics
I clicked on your link and it's taking me to a scanning app. Is that correct?
Nvm got it now
Sent from my PC36100 using XDA App
No it should take you to a thread here in XDA about ADB basics. That's where it takes me. Here try this: http://forum.xda-developers.com/showthread.php?t=694250
I found it in the development section in one of the stickies called
HTC EVO helpful/popular threads (Look here First!)
Babysitting my daughter right now so can't really read that link. I'm pretty sure I've read it before though.
Sent from my PC36100 using XDA App
Ok sorry I couldn't be more help. I am sure you are missing something very small because it sounds to me like it should be working. Make sure you have the right adb driver installed.
Moved to Q&A. This isn't development
Thx pulsar for the move. Sorry about that.
Housry thx for all your input.
I did read that link before and there was a link that confirmed that my ADB is set up correctly.
At the very first cmd prompt I can do adb devices and see my phone.
Then I can type adb shell and I get the # prompt
From there I can't issue anymore adb commands or else I get "adb: not found" error
I can issue reboot or reboot recovery commands BUT without adb in front of it and my phone will respond accordingly.
I can use the ls commands and search the subdirectories. Pushboot even works when I need to change my bootanimations. All this leads me to believe that adb is indeed set up correctly including the drivers so why doesn't the other adb commands work?!
This is really frustrating because I can't even begin to experiment with ADB if I can't get the most basic commands to function.
I know it's probably something small I'm missing and I hope someone will be able to point me in the right directions. Thanks again
Who knows, maybe this is a good thing. I might be able to get in all kind of trouble with my phone otherwise.
Wow on a whim I switched out the USB cable and now everything is working great. Geez.
Sent from my PC36100 using XDA App
ok, you are making a simple yet solvable mistake:
once you type adb shell, you are inside the phone's linux terminal. of course, your phone doesnt have adb in it. a shell is a great tool, and is used very, very often to diagnose problems, make stuff, incorperate stuff, test stuff. if you are in a shell, just type
exit
to get back out. then your adb commands should work.
I rooted my KFHD 8.9, installed the Play Market, Go Launcher HD, and a few other things. Everything went smoothly...until I decided to install TSF Shell 3d. I moved it to system/app, changed permissions, and rebooted. Now, TSF is stuck in a loop and I can't access ES File Explorer long enough to delete it from the device. When I try using Android Commander, it shows "No Root" and I'm not very experienced at ADB. Is there some way to get this off my device so it's usable again?
When I boot up, it boots normally, then before I can unlock the lockscreen, I get "TSF Shell has Stopped" with a button below it to ok the message. When I tap it, it goes away for a split second, then comes right back...over and over.
Any tips or advice would be greatly appreciated. Thanks.
(I posted this here because I did not see a Q and A or Help section that was KFHD 8.9 specific. If it needs to be moved, feel free and I apologize.)
couple of things to try. if you can access the pull down menu go to more settings, applications then find tsf shell and clear defaults. reboot.
if that doesn't work reboot to recovery and do a factory reset.
adb reboot recovery.
I will try the adb reboot recovery option. I can't get into anything on the device itself long enough to do anything. Also, I didn't even set TSF as default home. I'm thinking (the way adb is acting), that I don't have full root privileges. When I try to delete the file using adb, I get a permission denied error.
slim6596 said:
I will try the adb reboot recovery option. I can't get into anything on the device itself long enough to do anything. Also, I didn't even set TSF as default home. I'm thinking (the way adb is acting), that I don't have full root privileges. When I try to delete the file using adb, I get a permission denied error.
Click to expand...
Click to collapse
Have you tried:
Code:
adb shell su -c "rm /path/to/TSF.apk"
...replacing "/path/to/TSF.apk" with the actual path to the actual name of the TSF app you want deleted? Just be sure to leave the quotes around the command or it may not work.
soupmagnet said:
Have you tried:
Code:
adb shell su -c "rm /path/to/TSF.apk"
...replacing "/path/to/TSF.apk" with the actual path to the actual name of the TSF app you want deleted? Just be sure to leave the quotes around the command or it may not work.
Click to expand...
Click to collapse
I tried adb shell su -c rm/system/app/TSF Shell 3D
"permission denied" and then "device not found" when I tried editing the pathname. What am I missing? The path to the Kindle?
slim6596 said:
I tried adb shell su -c rm/system/app/TSF Shell 3D
"permission denied" and then "device not found" when I tried editing the pathname. What am I missing? The path to the Kindle?
Click to expand...
Click to collapse
There is a space between the 'rm' command and the path. Also you need to get the exact name of the file you want removed...
Code:
adb shell su -c "ls /system/app"
And again, don't forget the quotes...meaning leave them there.
"Is" or "rm"?
........and thanks for trying to help me out. I really appreciate it.
slim6596 said:
"Is" or "rm"?
........and thanks for trying to help me out. I really appreciate it.
Click to expand...
Click to collapse
'ls' is the list command. Use it to list the contents of either the '/system/app' directory or the '/data/app' directory to find the exact name of the 'apk' that is causing problems, then use the 'rm' (remove) command to get rid of it.
I got it to work. TSF is gone (yahoo!). So now I get to start over. What I finally did was to do a total restore using KFFirstAide. Thanks you guys for pitching in and helping a newb. I appreciate it to no end.