yashsingh1/xdaforums huggingface dataset:
[Android Software Development] cazper210:
Thanks a million

My windows pc had messed up so i bought a mbp so i was afraid i will lose the ability to gain root access through console and stuff so this guide helped alot and i learned a lil something while at it so thank you again.
[Android Software Development] android4temo:
When I put in the command, "./adb devices", I see the List of Devices, but there is no serial number listed.

Please advise.

I am using a Rooted, S-Off, Droid DNA.
[Android Software Development] AshtonTS:
Your device is plugged in?

Make sure USB debugging is enabled on your DNA. The problem lies with your phone, I can't really help too much with that

Sent from my Nexus 4
[Android Software Development] android4temo:
Yeah device is plugged in.

And USB Debugging is enabled on my DNA.

I am running a custom ROM, with S-Off right now.
[Android Software Development] :
don't think rom or s-off matters

do you have correct drivers installed and did you set your environmental path to your fastboot folder
[Android Software Development] AshtonTS:
On a Mac you don't need drivers, and ADB is working, its just not detecting his device

Sent from my Nexus 4
[Android Software Development] :
mmm, didn't realize or forgot that on drivers. guess i don't need to worry about reinstalling them when i have connection issues then. i think my only problems came when i had sdcard speed boost app unintentionally still installed. with it uninstalled all ok.

bad cable/connection maybe?
[Android Software Development] android4temo:
I got it to work by doing two things.

1. Changed the cable. After doing that, it recognized the device immediately.

2. I still had to go to my Windows 7 Machine because when I got to the "./fastboot flash boot boot.img", after completing the CD Commands, I kept getting, cannot find the file or invalid file. Tried re-downloading a new boot.img but still no bueno.

Any ideas on why that was happening? Perhaps I was using wrong commands for a mac??
[Android Software Development] :
glad you got it. not an expert on this stuff, but maybe the path is wrong. the command is correct as long as your boot image in fastboot folder is named boot.img and not something else.

i set up mine per op in the bash to where all i type after i open command window is "cd /Users/ken/bin"

that puts me to bin folder where fastboot/adb is

then adb devices

then fastboot flash boot boot.img

when i open command window screen is already at [ken@Kens-iMac ~] $

then that's where i type the cd /Users/ken/bin

if you are doing this on Windows you need to set that path too

i forget where to do that--maybe google setting environmental path in windows
[Android Software Development] :
windows path help

http://xdaforums.com/showthread.php?t=1161776
[Android Software Development] AshtonTS:
The boot.IMG has to be in the same folder as fast boot or else you have to specify, but there are no Mac commands, they are the same as PC

Sent from my Nexus 4
[Android Software Development] sgs22012:
Would someone please pm me how to do this with a windows PC for a T999 (I warn everyone I understand code but its not a strong point of mine)
[Android Software Development] :
You made me think AshtonTS, that can be dangerous lol

If we don't need drivers, can I uninstall HTC Sync and have no issues in mounting phone with Sense or AOSP roms. Or, any other issues at all. The HTC Sync keeps popping up all the time--annoying

Thanks
[Android Software Development] AshtonTS:
On a mac? I didn't even know they had a version of HTC Sync for OS X. Either way, I've never used HTC Sync or any drivers in OS X and I've never had issues mounting any phone I've owned (including a couple HTC's) ;)

Sent from my Nexus 4
[Android Software Development] :
They do. But I will delete it.
[Android Software Development] yudi7:
Great Guide

Thanks for the guide. I clicked Thanks button but had to leave a post for this wonderful guide. I dont think without this I would have installed CWM recovery on my Xperia Z. :good::good:
[Android Software Development] dape16:
Great tutorial! Thanks!

I didn't get the PATH in bash_profile to work until after a reboot, maybe you should mention in the guide that a reboot will be needed (for some?). :)
[Android Software Development] wlmeng11:
Use:

source ~/.bash_profile

That reloads that file.
[Android Software Development] _dannyboy:
So, after trying this multiple times, I cant get past the Nano window part. I type in the code, press control+X and it asks me to save. I hit Y and nothing happens....then when I tried moving to the next step, it said command not found....help?
[Android Software Development] wlmeng11:
You can use any text editor you want to edit the file (I personally recommend vim).

Alternatively, you can echo the line you want to add and append it to the file to avoid using an interactive text editor.

echo 'export PATH=${PATH}:/path/to/your/android/folder' >> ~/.bash_profile

Or if you have tee installed...

echo 'export PATH=${PATH}:/path/to/your/android/folder' | tee -a ~/.bash_profile
[Android Software Development] AshtonTS:
In order to text edit the file you have to enable hidden files in finder with a command, so you'll probably want to just Google around for the command if you decide to go that route.
[Android Software Development] wlmeng11:
What about "textedit" from the command line?
[Android Software Development] AshtonTS:
Oh I though you meant like a GUI editor
[Android Software Development] wlmeng11:
I mean would running "textedit" from the command line open up TextEdit in a GUI, or does OSX not do that?
[Android Software Development] AshtonTS:
I don't know honestly
[Android Software Development] _dannyboy:
I feel so so stupid. This is my first time rooting a phone with a locked bootloader, annnnd my first time using Mac. So, honestly, im still lost. :( would this be easier on windows?
[Android Software Development] wlmeng11:
Not really.
[Android Software Development] _dannyboy:
Lmao well this is terrible. Not to say the way you explained it wasn't good enough but is there anyway you can explain a little simpler?
[Android Software Development] wlmeng11:
Easiest way would be to use echo to display what you want, then write it to a file.

echo 'export PATH=${PATH}:/path/to/your/android/folder' >> ~/.bash_profile

"echo" sends whatever is in the following quotes to the standard output, and then the ">>" appends the contents of the standard output to the file you specify.

Using ">" instead of ">>" will overwrite the existing file instead of appending to it, so be careful with that.
[Android Software Development] _dannyboy:
After that I just continue with the rest of the steps? When do I perform this part? ^^
[Android Software Development] wlmeng11:
The command I listed is an alternative to editing the ~/.bash_profile file with an interactive editor such as nano.

Then reload the file in your current terminal session.

source ~/.bash_profile

Then you should be able to run adb and fastboot without specifying their absolute path.
[Android Software Development] underlines:
Another (faster) way to do it:

Change Developer settings in your phone to USB Debug

Download and unzip adb-fastboot-install from http://code.google.com/p/adb-fastboot-install/downloads/list

Open Terminal, drag & drop the file ADB-Install-Mac.sh to install adb

Close and open a new terminal

Connect phone with USB

In terminal execute the command:

adb logcat *:I | tee -a ~/Desktop/logcat.txt

Where | tee makes it possible to display the live output in the console while logging to a textfile at the same time. Where -a appends logcat.txt if it already exists. And where *:I is the error level:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
Ctrl+C in terminal to stop logging

Your logcat.txt is on your desktop
[Android Software Development] Juliet72:
---------- Post added at 01:05 AM ---------- Previous post was at 12:41 AM ----------

---------- Post added at 01:18 AM ---------- Previous post was at 01:05 AM ----------

I have been having real issues with this. Could someone help me..
[Android Software Development] Buddy3927:
Device Offline

I used fastboot to install 4.3 on my Nexus 4 without problems. Now, however, every time I run adb devices, it returns my phones serial number then offline . How can I get the offline removed? Everything worked great on 4.2.2 but on 4.3 it doesn't. Do I need an adb update for the new android update?

Edit - Downloaded another copy of adb and fastboot, turned adb debugging off and on a couple of dozen times, now it works.
[Android Software Development] fattire:
Derp will do this for you.

Even faster way to do it.

1. Get Derp for Mac (released yesterday).

2. Run it.

3. Hit Continue twice.

Done. You can enter specific commands from the Console (in the View menu). No Terminal needed. If you care, the software is in /Library/Application Support/DERP/tools/*

The only warning is-- it is considered "alpha"-level software, still testing. See the post for more, etc. But I've used it on my mac for months.

Cheers.
[Android Software Development] Techno Droid:
well im lost after the part nano ~/.bash_profile part bc after i hit ctrl+x and hit y to confirm... it does nothing. and i have tried all the suggestions here and cant figure it out. this is my first mac to begin with and im happy to see a guide like listed. greatly appreciated. but can anyone help? maybe team viewer?
[Android Software Development] fattire:
See my post above yours.
[Android Software Development] Techno Droid:
I see what your saying but u do t want to sit back and enjoy the ride.. I want hands on. Ideas?
[Android Software Development] wlmeng11:
You can use any text editor you like to edit ~/.bash_profile

In nano, it might be Command-X on a Mac (being a GNU program, nano was primarily written for PC-type Unix-like systems, like Linux).
[Android Software Development] Techno Droid:
I'll give this a try tmrw as I'm on my way to work.
[Android Software Development] AshtonTS:
Its not command, its control.

Sent from my Nexus 4
[Android Software Development] wlmeng11:
Just checked; you're right.

[MENTION=4207621]Techno Droid[/MENTION]

After hitting "y" to save the file, it will show a prompt to ask which file to save it to.

Just hit enter to save it to the current file, and then nano will close.

However, it's better practice to send the write command before trying to exit, so Control-O to write, hit enter to choose the filename, then Control-X.

If you want to avoid nano, you can use any other text editor, or just echo to the file (see my post on the previous page).
[Android Software Development] Techno Droid:
so i finally got it to work.. i had my macbook off for a day now. after i powered it on and ran nano ~/.bash_profile it was already saved in the editor. i just reentered to be sure and hit ctrl+x then y and enter to saved and it worked. but now when i typed adb devices this shows without serial info. what went wrong?
[Android Software Development] Techno Droid:
i just checked again and now i have this error.
[Android Software Development] fattire:
it's ~/.bash_profile, not ~./bash_profile

BTW, the ~ is a shortcut meaning "your home directory". In this case, ~ means /Users/AbeVilla.

Which means that ~/.bash_profile translates to /Users/AbeVilla/.bash_profile. (If a different user named Bob runs this file, it would translate to /Users/Bob/.bash_profile)

The .bash_profile file is where you put instructions to be run by bash, the shell that runs when you start the Terminal.app program. Put a line that says something like:

echo "Hi there!"

and when you start the terminal, you should see the message appear on the screen before you get a prompt.
[Android Software Development] Techno Droid:
lol didn't notice the typo. so i got that and with a simple reboot and correct command placement. i got it.
[Android Software Development] fattire:
While I'm at it, I should mention that any filename starting with a period (.) is considered "invisible"-- it won't show up in a regular ls (list files) command. It will show up if you do ls -a (list all)

This period is not to be confused with .., which means "the directory above this one". So:

cd ..

will take you up a directory, (closer to the root directory).

Similarly, a single period in a path (. by itself, not at the beggining of a filename) means "this directory", as in the one you're currently in. So if you wanted to move a file from the previous directory to the one you're in now, you could do this:

mv ../somefile.txt .

meaning "move the file called "somefile.txt" that's in the previous directory to the current directory that I'm in now."

If you wanted to rename it to be a hidden file, you could do it like tihs:

mv ../somefile.txt ./.aNewHiddenName.txt

That moves it from the previous file to the current directory, but also changes the name.
[Android Software Development] Techno Droid:
Oh Kay. So with that in mind and of course with adb set up. Would I have to do anything different from windows version in my cmd? Would my command line be the same compared to windows? Just want to make sure I'm not missing anything.
[Android Software Development] wlmeng11:
Microsoft decided to be rebellious, so their command line interface is a bit different from *nix systems; for example, they use backslashes instead of regular slashes and they changed the names of some commands.

But the syntax for adb itself should be the same.
[Android Software Development] Techno Droid:
Yea I noticed that right off the back that's why I asked. But you guys have been really helpful. Big thanks to OP , wlmeng11, and fattire for the help. Now hopefully I get to show off some of my work in the HTC One for sprint section.
[Android Software Development] Looklearner:
It works fine on my iMac 11.2 w/ OS X 10.9 6th build as i follow your nice tuto. - Now my galaxy tab 2 7" p3100 identified by ADB :good:
[Android Software Development] caleris:
I think I need some help....

I was able to get as far as entering the ./adb devices command. The serial number of my phone does not show up. I do get the "List of Devices is attached" statement. I did turn usb debugging on. The phone is a Droid MAXX. Thanks for any help.

Cary
[Android Software Development] AshtonTS:
Try rebooting your Mac then running the adb command.

Sent from my iPhone
[Android Software Development] caleris:
Okay I will give that a try later and let you know what happens. Thanks.
[Android Software Development] caleris:
That worked! You are a genius. Thanks for the assistance.

Cary

---------- Post added at 08:32 PM ---------- Previous post was at 08:25 PM ----------

Thanks so much for putting this together.

Cary
[Android Software Development] vishalsheth:
nice guide. This means that all adb commands of windows now can be given through mac. This would be for reboot in recovery, etc.
[Android Software Development] NuckFuggets:
im trying to install twrp but in the adb devices command it says device is offline.. i cant for the life of me fix it, does anyone know what to do? Thanks!
[Android Software Development] :
Long time since I set my iMac up for adb. I know you don't need drivers.

But, is usb debugging selected on phone under developer options and do not have kies installed

did you get the bash stuff set up for your path. and adb/fatsboot in the right folder and did you cd to that path

Also, you are NOT on MF3 build are you. I believe you need MDL.

And if you root with Adam Outler's method for Mac it will install TWRP also. Not sure which version. But, you can get the best one, 2.5.0.2, flashed after you get a recovery on phone.
[Android Software Development] NuckFuggets:
I have nexus 4, debugging is enabled, custom rom carbon, version 4.3.1, i revoked allthe permissions and plugged in my phone again but the rsa number confirmation box didnt come up still. like i had twrp before, i wanted to try the 4.4 rom but i read you need cwm to flash, so i set up cwm with rom manager, then i went back after and want to set it to twrp, it said its now setup to use twrp, but keeps booting into cwm recovery and not twrp
[Android Software Development] :
ok, not sure what else to suggest

sorry about S4 suggestions. on so many threads, forgot this is not an s4 only thread

Op will probably give some good tips soon
[Android Software Development] AshtonTS:
Sorry for taking so long to reply, I haven't been on XDA much lately.

Anyways have you tried rebooting both the phone and the Mac? Make sure USB debugging is on etc. also, on my retina MacBook Pro using a different USB port helped me solve a similar problem. Let me know if you solve it

Sent from my iPhone
[Android Software Development] NuckFuggets:
Yeah no Problem! But anyway yeah I literally tried everything I could think of, rebooting the phone, computer, different usb ports, disabling and reenabling USB debugging, pressing the revoke USB authorizations thing a bunch of times, disabling mtp and reenabling it, etc etc.. Still nothing. Like I got he job done on my dads windows laptop but it would be nice if I can use the Mac whenever I need to. And weird thing is that my nexus 4 had no problems at all, its this nexus 5 that seems to not want to work :(
[Android Software Development] bo0gietrain:
Hey, I had this problem. I had to download the full SDK and use the adb and fastboot files from there, the ones in the attached zip gave me the "offline" status too. I simply extracted the entire adt-bundle-mac-x86_64-20131030.zip and cd'ed into the platform-tools folder and did "./adb devices" and it was online, then i did "./adb reboot recovery" then "./fastboot flash boot /path/to/mykernel.img" then hit reboot on my phone and I had my new kernel.

Hope this helps.
[Android Software Development] wund3rground:
Okay, I have followed this tutorial to the letter. ADB commands work just fine. And if I type fastboot devices it shoes my device. However, I cannot flash anything via fastboot without cd'ing into the platform-tools folder (then fastboot works fine), which seems odd to me since the platform-tools folder is in my PATH. Am I missing something?
[Android Software Development] AshtonTS:
Try rebooting your Mac. I think it sometimes doesn't set the paths correctly until you reboot

Sent from my iPhone
[Android Software Development] wund3rground:
Nope, its been rebooted many times. Thanks for the attempt though.
[Android Software Development] chivamex10:
I softbricked my htc one. My windows 8.1 won't recognize it. So I decided to go this route (with my mac). Still no dice.

I can put my htc on in fastboot. When I plug it into my mac it changes to fastboot usb.

I don't know what more I can do?:crying:
[Android Software Development] spiderio:
anyone has latest adb binary for mac??

I always get Device offline with the old version adb
[Android Software Development] mssam:
Just followed these instructions and everything works perfectly! I've been playing around with the adb-mac by itself for a while and it never did the trick. This setup is much better, thanks!

Sent from my Nexus 7
[Android Software Development] penfold:
These are the latest extracted from the SDK, tested, seem to work
[Android Software Development] penfold:
-delete-
[Android Software Development] TynanV:
Hello, no idea if anybody uses this thread still but I can't seem to get this working. I'm on the ./adb devices part and when I press enter this comes up * daemon not running. starting it now on port 5037 *

* daemon started successfully *

List of devices attached

I've rebooted my Mac and my Phone and it still didn't work. I can't get into my phone to change it to "usb debugging" or whatever it's called because when I tried rooting my phone it only takes me to the "recovery" page or the "twrp flashing page". Anyone know how much a new HTC One costs if I already have a plan?... This sucks.
[Android Software Development] :
Well, you are going to have to have "USB Debugging" turned on.

Normally you need to install drivers, I think Keis does that. Then delete Keis, as it doesn't play well with the Mac and adb. At least for me.

You need to root--

First check your build. If you are MF3 or MK2, you need to read ALOT on SafeStrap. You probably didn't root correctly for your build.

Good Luck--:good:
[Android Software Development] TynanV:
Keis will make my Mac recognize my phone? Is that what it's for? Really new at this, sorry.
[Android Software Development] :
I stumbled thru this myself as new to Mac's. Op and others helped. But, once you get drivers on Mac, you don't need Keis. But, you need USB Deb turned on-on phone.

I needed help with getting the paths set with Bash? etc stuff.

But, you need to as I said, get properly rooted. And, sorry just assumed you had my phone the s4 not an HTC One. Too many subscribed threads ;)
[Android Software Development] TynanV:
Okay I got the thing to give me a code like it says in the guide, except I typed in "./fastboot" devices instead of "./adb devices"

I have this line of code now -

Tynans-MacBook-Pro:Android tynan$ ./fastboot devices

HT35FW904763	fastboot

Did I successfully install the drivers?
[Android Software Development] :
Your fastboot files are on PC. Try adb devices.
[Android Software Development] natedogg20050:
Great Tutorial Saved me and My Phone From Windows 8.1

(HTC One S 4.4.2 Cyanogenmod)
[Android Software Development] LibertyMarine:
[MENTION=4086419]AshtonTS[/MENTION]

I just wanna mention that the images don't show up anymore... just trying to help ;)

edit:

awesome, fixed :)
[Android Software Development] bdorr1105:
Awesome Tutorial and it makes my life much easier using this on MAC
[Android Software Development] ANTHONY81L:
i am about to throw my phone ... ive been at this for 2 straight days .. about 10 hrs total ..... i followed everything and got to the nano ~/.bash_profile part a few times . so now when i get there the following command is already in there without me typing it in. so i type control x and it goes back to the terminal . i close that out , open a new one and type adb devices and it says nothing found ... would someone ... anyone please be kind enough to help me out . i will seriously pay someone thru paypal if i have to to take remote access to my mac and do it for me.. im not kidding. somebody please help me .. i really dont want to return this phone but if i cant get this down im afraid i might have to
[Android Software Development] :
I had no problem following OP. So, not sure. What phone do you have. I could not get adb to work while running KEIS--
[Android Software Development] ANTHONY81L:
hey i PMed you can you please check it out???
[Android Software Development] captaincanada84:
Definitely one of the easiest guides I've seen on here!
[Android Software Development] Chaplan:
Fastboot and ADB you posted as a separate download on the end of the post is outdated.

Doesn't work with nexus 5.

Could you please attach the newer versions so people don't get erroneous responses from the command prompt...

Thanks for the tutorial, it's great...

Well done.
[Android Software Development] Giridharbavana:
ERROR

Last login: Wed Apr 23 15:19:59 on ttys000

giridhar:~ VINU$ ~/.bash_profile

-bash: /Users/VINU/.bash_profile: No such file or directory

giridhar:~ VINU$

Can someone solve this ?
[Android Software Development] deepak.s829:
Thank you very much for the guide. Helped me recover my bricked Nexus 7.
[Android Software Development] chivamex10:
yes I love the shortcut path tweak!

Freaking windows 8.1 nightmare. I'm exclusively doing everything on my mac from here on out.
[Android Software Development] :
OPs not on xda much anymore--I googled this

http://www.androidbeat.com/2013/12/...-4-4-2-kitkat-update-nexus-4-nexus-5-nexus-7/

hope it helps--:good:
[Android Software Development] DroidBurgundy:
Thank you, this was very helpful for me, I had never thought of just using fastboot and adb separately like this, I have been seriously dragging my feet with setting up java and eclipse or Android Studio since I purchased my first Mac, and having to boot into a VM to do anything android has been frustrating at times, this enable dme to push something over adb quickly and easily!