Rooting Nexus on a Mac

peter grimes

...
Retired Moderator
Joined
Jul 18, 2005
Messages
13,318
Location
Queens, New York
So I'm having a hard time unlocking my phone. I can't figure out what the problem is, but I can't even get the shell commands to run in the terminal window.

Method I'm using:
http://wiki.cyanogenmod.org/w/Doc:_fastboot_intro

My first problem:
Edit the "hidden" (starting with a period) file ~/.bashrc -- If your version of Linux supports the gedit editor, simply type gedit ~/.bashrc
Next, add this line to the bottom: export PATH=${PATH}:<sdk>/tools:<sdk>/platform-tools (Change <sdk> to the actual path to the SDK's /platform-tools directory. For example: export PATH=${PATH}:/home/user/android-sdk-linux/platform-tools/)
Save the file. Then open a new Terminal. The adb command should now be available.

Well, my terminal doesn't support that GEDIT command. So I thought I could work around that by using CD. I think it's working, since my command prompt is:

peter grimes:platform-tools petergrimes$

~platform-tools is the directory that contains the binaries "adb" and "fast boot"

But when I type in adb I still get the "command not found" error.

Any suggestions?
 
gedit is a text editor, do you have another text editor on your terminal?
I personally like nano.

PATH contains the directories where your OS will look for executables. export PATH means that this is updated.

.bashrc is a file that contains commands that will be performed every time you start a new terminal (basically, to load your settings into this new session).

You *could* try just doing
~/platform-tools/adb
but it is possible that the process requires (internally) more binaries that are found in the same path.
 
Okay, your idea helped!

First I had to back out of ~/platform-tools/ and get to the root ~/petergrimes/ directory (I messed this up a few times, but finally worked it out).

Then I typed
/Users/petergrimes/Documents/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb

And now my terminal window is awash in a help menu explaining commands :D

Thanks! I'm sure I'll be posting again here shortly ....
 
Ok, once I understood that I must write the entire path to the binary before the command things worked well. I now understand why they were reassigning the default path! I didn't try nano because I don't want to mess things up if I do something wrong. Copy/paste these long paths worked fine for me.

I got clockworkmod flashed over the stock recovery, but I must have done something wrong on exiting. It's not there anymore.

Lastly, the instructions for getting CM10 onto the SD card weren't helpful. It's like the files in the download package didn't match the text of the instructions at all. So I'll have to read up some more before proceeding.
 
Back
Top Bottom