[Q] Help Running Command with ABD - One (M8) Q&A, Help & Troubleshooting

I have a problem. I'm running ViperOne and I've been told I need to run this command
adb shell su restorecon -FR /data/media/0
Here is the issue, I don't know how. This is because 1) I'm inexpierenced and 2) I think there is an issue.
When I open up my android folder with my htc plugged in and run that command I keep getting the "error:closed"
I'm told I need to update adb, but I thought I did. I can't get this to work. Someone help?

Hey there, to update ADB through the console, go to the tools folder, its on the same level as platform-tools, run a command prompt from there, by shift-right clicking and hitting open command window here, then type;
android update adb
after that it should tell you to restart the server, and you should be good.
Good Luck!

Related

I'm lost. Need rooting help.

I'm lost as hell. I found this thread:
http://www.androidpolice.com/2010/06...credible-next/
I did the unrevoked thing and I see this icon called SuperUser Permissions in my app list.
Am I able to proceed and fully root or do I have to re-do the root with the Toast method? This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
gqstatus0685 said:
This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
Click to expand...
Click to collapse
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
CentroniX said:
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
Click to expand...
Click to collapse
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
gqstatus0685 said:
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
Click to expand...
Click to collapse
~ in most flavors of Unix/Linux is short for your home directory. In MacOS, ~ is /Users/<username>. *nix pro-tip:
Code:
cents-macbook-pro:~ $ echo ~
/Users/cent
So in my case, ~ is short for /Users/cent.
If it's on your desktop, open a terminal and type:
Code:
cd ~/Desktop/android-sdk-mac_86/tools
-OR-
Code:
cd /Users/cent/Desktop/android-sdk-mac_86/tools
And then you can proceed to issue your adb commands. Just remember to prefix it with "./", which tells MacOS to look in the current directory for the adb command.
Code:
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb devices
List of devices attached
HT05RHL1XXXX device
Ok. I think I'm just going to pay someone to do this for me. I'm getting a migraine.
So I'm basically typing the below:
~/android-sdk-mac_86/tools $ ./adb devices (Do I type this in one line)
List of devices attached
HT05RHL1XXXX device
I ran the thing and it doesn't show my phone listed.
I've got the time, if you have the money!
1. Make sure USB debugging is enabled. On your phone, go to Settings -> Applications -> Development, and make sure "USB debugging" is checked.
2. Make sure your USB cable is connected to your phone and computer.
3. Open a terminal
4. Type "cd ~/Desktop/android-sdk-mac_86/tools" and press enter.
5. Type "./adb devices" and press enter.
If it lists your device, you're then good to go to start following the rooting instructions!
You're the best dude. It was the USB debugging that was giving me the problem.
Good deal man, glad you got that part worked out! Have fun getting your root on!
this is the easiest way to do it....it worked for me
http://forum.xda-developers.com/showthread.php?t=701152
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
gqstatus0685 said:
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
Click to expand...
Click to collapse
Debugging mode needs to stay on if you want to use adb. You can turn it off once you root, but it won't hurt to leave it on.
The push command should tell you the number of bytes transfered. You need to make sure that the file you are pushing is in the current directory you're in (tools), or manually enter the path, like "./adb push ~/Downloads/PC36IMG.zip /sdcard"
But yes, you can mount the card as a disk drive and copy the file there in Finder.

[Q] Cant get ADB to work!!!

Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
chingy51o said:
Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
Click to expand...
Click to collapse
What exactly are you doing? You're not in the shell are you? If so, exit the shell and do it at the dos command prompt.
chingy51o said:
Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
Click to expand...
Click to collapse
wrong section. did you cd to the tools folder inside sdk folder
Make sure you have the SDK installed and when you open up Command Prompt type in "cd C:\Program Files (x86)\android-sdk-windows\tools" Obviously programs folder would be wherever you have your SDK located. After you type that in, type ADB Shell and you should be in.
Blindlabel said:
Make sure you have the SDK installed and when you open up Command Prompt type in "cd C:\Program Files (x86)\android-sdk-windows\tools" Obviously programs folder would be wherever you have your SDK located. After you type that in, type ADB Shell and you should be in.
Click to expand...
Click to collapse
it sounds like he's already in shell which he souldn't be. he needs to just be in a command prompt. you can't use the adb push command when in shell
This result from the command "adb" not being found.
Two ways to fix, either go to the folder with the adb executable in it, right-click, "Open terminal here." And then "adb" will work.
Second way is to copy the adb executable to /usr/bin. (I think xD) (One of the */bins.)
Good luck!
so im not supposed to run the whole cd\ cd sdk cd tools... all that stuff?
chingy51o said:
so im not supposed to run the whole cd\ cd sdk cd tools... all that stuff?
Click to expand...
Click to collapse
Oops, that's my bad. I assumed you were in Linux. If you are windows, then follow that other guy's instruction. (cd to blah blah) but if Linux thenfollow mine.
Moved to Q&A. Please do not post questions in the Development thread.

[Q] Help with setting up adb shell

I must be stupid or something cause I'm stuck on getting this to work. Can someone help me finalize setting up adb shell?
This is where I am so far:
I have installed phone driver and Android SDK. In SDK have installed packages API 2 through 8, usb driver package 3, etc.
What do I need to do when opening SDK manager? My phone is in tether mode but it just sits there. What am I not doing?
Thanks.
No love from the community on this one??
I'm a little confused.
When you set the evo to usb debugging and open a command prompt, cd to your sdk/tools dir, enter "adb devices" does your evo show up? It should be listed as a serial #.
Yes.....an HT### serial comes up which I am assuming is the phone. Guessing I can now just run the commands I need and it will communicate with the phone?
My confusion was that I was running the SDK Manager.exe and expecting it to find my phone and produce the adb shell.
Ok! You should be good to go. Just enter "adb shell" and you are set.
Good deal....thx.
Ok....thought I had this working. However, when in adb shell any commands I put in tells me "adb: not found".
What do I need to do from this point?
Let me clarify this.....
When I list devices it does find my phone. But, when issuing the adb shell command and trying to enter anything from the "#" prompt it always says "adb: not found".
I must be missing a step or something.
I'm kind of confused, mostly because I don't know what it is you're doing in a shell, but once you're in the shell and you get the # sign, there's no need to type in adb before your commands, for example, from the command line you would navigate to your tools folder. For me it would be
cd AndroidSDK/tools
./adb shell
Some jibber jabber about daemon starting
#
From then on I could run whatever command I planned on running in the shell like
echo 1 > /sys/class/leds/flashlight/brightness
And not
./adb echo 1 > /sys/class/leds/flashlight/brightness
CCallahan said:
Let me clarify this.....
When I list devices it does find my phone. But, when issuing the adb shell command and trying to enter anything from the "#" prompt it always says "adb: not found".
I must be missing a step or something.
Click to expand...
Click to collapse
What exactly are you trying to accomplish? Then we can determine what's going on.
I'm running Myn's RLS4 and am trying to change the power bar in the notifications.
Trying to follow the instructions in this link: http://forum.xda-developers.com/showthread.php?t=836721
OK. What part are you getting stuck at?
Edit: for this code, you do not need to be in the ADB shell:
Code:
adb remount
adb push widget.txt /system/customize/
adb reboot
You just need to cd to your tools folder of the SDK in your command prompt.
CCallahan said:
I'm running Myn's RLS4 and am trying to change the power bar in the notifications.
Trying to follow the instructions in this link: http://forum.xda-developers.com/showthread.php?t=836721
Click to expand...
Click to collapse
The commands he has given here
Code:
adb remount adb push widget.txt /system/customize/ adb reboot
do not require you to be in an adb shell, you just open up the command window do an adb remount then type in his commands one by one and male sure you have the .txt file that specifies what widgets you're going to use is in the tools folder of your AndroidSDK folder so that adb can locate and push it to its respective directory.
Ok...that worked.
Knew I was doing something wrong. Was trying to run those commands from the adb shell....makes sense that it could not find adb.
Thanks.
i have no adb shell at all can anyone help?

Having problems rooting

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.

Rooting with Gfree HELP!

Okay, I'm a complete noob and I'm following these instructions (http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2) using Gfree I believe.
I finished downloading the SDK File Manager and all the .zip folders that were mentioned on the site. However, I am stuck at the first temp root step. It says I can either enter in the command via cmd window or a different terminal. I chose a cmd window because I already have that and know how to use.
I run Windows 7, so I simply type cmd in the search bar to pull up a cmd window. I then "cd desktop" and then "cd gfree_temp-root" because it says to navigate to that folder. However, when I enter in the first command, my cmd window tells me this "adb is not recognized as an internal or external command, operable program or batch file". Does anyone know what I have to do?
Also, do I have to install Eclipse and an ADT plug-in to root my phone? And is anyone available right now to chat and walk this complete noob through this????
You're fine, just make sure your android sdk with adb is in your system path, in Win7 find it in ctrl panel/sys and security/system -> advanced system settings on the left, then advanced tab, environment variables at the bottom. In there in the bottom text window, find Path, edit it, go to the end of the path line and if there isnt already add a ; to the end of the line then paste in the full path to your android sdk where adb is - for me someandroidsdkpath\platform-tools
Alright, bumping into a new problem. I found an alternative way to run adb through another guide on the forum. Downloaded adb.exe and this is what I do.
Pull up a cmd window and then cd to the folder that contains the adb.exe, and then I copied all the files that needed to be push on the wiki page that needed to be push into that same folder. Howeverr, I am getting permission denied.
I got adb to recognize my device and all, but don't understand why permission is being denied.
EDIT: While I am waiting for a reply, I went ahead and did what the previous user told me to do. Now I can use adb through my cmd window. I navigate to the window of the file but I still get permission denied. What's going on?
LGS1231 said:
Alright, bumping into a new problem. I found an alternative way to run adb through another guide on the forum. Downloaded adb.exe and this is what I do.
Pull up a cmd window and then cd to the folder that contains the adb.exe, and then I copied all the files that needed to be push on the wiki page that needed to be push into that same folder. Howeverr, I am getting permission denied.
I got adb to recognize my device and all, but don't understand why permission is being denied.
EDIT: While I am waiting for a reply, I went ahead and did what the previous user told me to do. Now I can use adb through my cmd window. I navigate to the window of the file but I still get permission denied. What's going on?
Click to expand...
Click to collapse
Hmmm, are you in adb shell running the commands? ie a $ prompt?
the prompt at the point you send the push command would look like (for Windows): c:\myrootfileshere> adb push somefiles /sdcard/wherever
No, I am in a cmd window.
This what is looks like:
C:\User\XXXX\Desktop\gfree_temp-root> adb push su /sdcard/su ... I would then get "failed to copy 'su' to '/sdcard/su': Permission denied
Even if I wanted to use adb shell, I would get this:
C:\User\XXXX\Desktop\gfree_temp-root>adb shell
$ adb push su /sdcard/su
adb: permission denied
LGS1231 said:
No, I am in a cmd window.
This what is looks like:
C:\User\XXXX\Desktop\gfree_temp-root> adb push su /sdcard/su ... I would then get "failed to copy 'su' to '/sdcard/su': Permission denied
Even if I wanted to use adb shell, I would get this:
C:\User\XXXX\Desktop\gfree_temp-root>adb shell
$ adb push su /sdcard/su
adb: permission denied
Click to expand...
Click to collapse
Alrighty then try adb devices (not in the shell) and just verify it actually shows your phone, it won't show 'PHONE' but it's either going to show something or not.
Next, make sure the sdcard is mounted for the phone and not usb disk mode for the pc
Another thought, make sure there isnt a loose 'adb.exe' in the folder, we want to use the one ref'd from androidsdk\platform-tools
All of that failing, mount the SD card.. copy/paste the file(s) to to SD card.. unmount SD card.. continue as if you pushed it to the SD card
WHOOHOOO! I am rooted! I had to turn off the USB transfer thing and it all worked!!!! THANKS SO MUCH!
Nice bro! If I helped at all and if you wouldn't mind, hit the thanks
No problem!
thanks and happy flashing!

Categories

Resources