yashsingh1/xdaforums huggingface dataset:
[Android Software Development] platapussy:
try ./fastboot oem unlock
[Android Software Development] balu1191:
thanku very much buddy, for the guide. I followed as per ur instructions, worked perfectly. this is what i need. and i have a question. in normal mode the list of the attached devices showing when entering commands, so that we can run commands like reboot to recvovery etc. But in fastboot mode when i use adb devices it shows nothing under the list of the devices attached line. this was happening with windows7 too any idea?? any way to get the devices recognised in fastboot mode too?? by the way i can see the devices when i use fastboot devices in both mac and windows. Also when i try to use "reboot bootloader" i got thee error saying that "reboot to bootloader is disabled"
[Android Software Development] headray:


---------- Post added at 07:13 AM ---------- Previous post was at 07:12 AM ----------

---------- Post added at 07:13 AM ---------- Previous post was at 07:13 AM ----------

---------- Post added at 07:14 AM ---------- Previous post was at 07:13 AM ----------

---------- Post added at 07:15 AM ---------- Previous post was at 07:14 AM ----------
[Android Software Development] mrthomson:
Thank you, i successfull
[Android Software Development] naijo7:
not working for me

Hello:

1. I downloaded Android Studio "android-studio-ide-143.3101438-mac" and looking into it's contents, I didn't find "tools" folder with "adb" & "fastboot" files. So I downloaded the file at the bottom of the thread.

On my mac, I got it working by going to "/Users/apple/Library/Android/sdk/platform-tools" and copy the "abd" & "fastboot" files from there.
[Android Software Development] PeterBennink:
Since this is a pretty old thread, but people still need to use adb & fastboot:

Wouldn't it be easier to just install homebrew and then do 'brew install android-platform-tools'?
[Android Software Development] dirgekv2:
I set up ADB/Fastboot successfully on my Mac, and am able to sideload OTA updates on my Nexus 6, however, when it comes to flashing a factory image it doesn't work.

Wouldn't it be the same procedure as on windows? Unzip the zip file, copy the 6 files to platform-tools, then initiate the flash-all script in the command prompt?
[Android Software Development] sn0warmy:
2016 Macbook Pro Users - Read This

I purchased a new Macbook Pro (Late 2016) which only has Thunderbolt (USB-C) ports and no standard USB ports.

I followed the instructions in the OP of this thread to setup ADB/Fastboot on the new mac, like I did on my previous macs. However, I could not get the computer to recognize my phone with the USB-C to USB-C cable that came with my Google Pixel. I also tried using the USB-C to USB-C cable that came with my Nexus 6P that didn't solve the problem.

So I went and bought a Thunderbolt to standard USB adapter and plugged it into the USB to USB-C cable that came with my Pixel and Voila! the computer recognizes the phone perfectly now with ADB and Fastboot commands.

I just wanted to share this so others can save themselves the time of pulling their hair out trying to figure out trying to get it to work with their new mac.
[Android Software Development] Nexicovx:
This fixed my problem for me. Thanks!
[Android Software Development] Snüber:
struggled so much with adb and fastboot installtion but your guide finally solved it! THANK YOU SO MUCH
[Android Software Development] sfino89:
Hey thanks for this info it really helped. Do you by anychance know where to place the twrp file or the commands to flash twrp so it can find it
[Android Software Development] Aksell:
Why am I getting this Error I'm trying to flash stock rom on my phone I got I Mac late 2012:crying:HALP
[Android Software Development] Lacynicole04:
terminal problems please help

okay so every time i do this process i keep getting "command not found"

so heres what my terminal window look like when i open it

Last login: Fri Jun 2 15:08:29 on ttys000

-bash: touch: command not found

Process name

Lacynicole:~ lindy_hamilton$ Process name

-bash: Process: command not found

Lacynicole:~ lindy_hamilton$

no matter what i delete or re do or try to fix i get this screen

and any command i try i get command not found or can not open pseudo tty

what is wrong and how do i fix it?
[Android Software Development] Fafa980:
Hey Guys,

I think mine is not working....it shows offline device...

Sorry I have no knowledge in this stuff...can anyone help?

Thanks :)
[Android Software Development] WortownBC:
Im having an issue. when i type in "./adb devices" it shows my serial number but it is followed by offline. i thought i couldignore it but its creating problems when i go to root my phone. none of the adb commands are working such as " adb reboot bootload"
[Android Software Development] Chaplan:
You need to enable adb debugging under developer options, run the command.

Android will ask for that particular computer to be or not approved.

Say yes and you are good to go.

If the problem persists try to revoke USB debugging authorizations and it should ask again.

It's pretty straight forward on a Mac.
[Android Software Development] admirysolutions:
Tiger? Whats that mean bro
[Android Software Development] Aksell:
he means software OSX tiger

I guess it's released before Mountain Lion
[Android Software Development] kashifnazir:
Hi,

I am on Nexus 6P Oreo and want to downgrade back to nougat. Unfortunately my bootloader is locked. When following the instructions, typing './adb devices' in terminal shows my device, as does typing in './fastboot devices'. However, the next line when I put in './fastboot flashing unlock' to unlock the bootloader, i get the below;

Kashifs-MacBook-Air-2:Mac Kashif$ ./fastboot flashing unlock

usage: fastboot [ <option> ] <command>

commands:

update <filename> reflash device from update.zip

flashall flash boot + recovery + system

flash <partition> [ <filename> ] write a file to a flash partition

erase <partition> erase a flash partition

format <partition> format a flash partition

getvar <variable> display a bootloader variable

boot <kernel> [ <ramdisk> ] download and boot kernel

flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it

devices list all connected devices

continue continue with autoboot

reboot reboot device normally

reboot-bootloader reboot device into bootloader

help show this help message

options:

-w erase userdata and cache (and format if supported by partition type)

-u do not first erase partition before formatting

-s <specific device> specify device serial number or path to device port

-l with "devices", lists device paths

-p <product> specify product name

-c <cmdline> override kernel commandline

-i <vendor id> specify a custom USB vendor id

-b <base_addr> specify a custom kernel base address

-n <page size> specify the nand page size. default: 2048

-S <size>[K|M|G] automatically sparse files greater than size. 0 to disable

This appears to be a generic help menu and I'm not sure if the commands have changed with Oreo but i really need to go back to nougat (hate oreo!lol) Any help with this would be much appreciated!
[Android Software Development] Outfield303:
here is simple script for installing adb and fastboot without this annoying steps

just enter this command in terminal

bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
[Android Software Development] RoverChr0me:
Thanks
[Android Software Development] naigangliu06:
Check the part that started with export.
[Android Software Development] snek_one:
I think there's an easier way to install

I had a look at the tutorial to see how to install adb and it seemed a bit too complicated and I really didn't feel like reading at the moment hehehe.. I had this suspicion adb might be available through brew cask. Turns out I was right, although not as a standalone package. The SDK Platform Tools are available and the only packages that are installed then are:

/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/adb (Binary)
/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/dmtracedump (Binary)
/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/etc1tool (Binary)
/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/fastboot (Binary)
/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/hprof-conv (Binary)
/usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/sqlite3 (Binary)

It's downloaded as a zip and in total it's only 5MB.

So in theory the guide to installing ADB and Fastboot can be brought back to this:

# Install brew if not installed yet (really?)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Give it an update to be on the safe side, cask requires brew > 0.9.5
brew update
# Enable brew cask (this basically pulls a copy of the repo from https://github.com/caskroom/homebrew-cask)
brew tap caskroom/cask
# Install the package
brew cask install android-platform-tools

It creates symlinks in /usr/local/bin so as long as you have that path in your $PATH the tools should work from anywhere.

Oh btw you don't need to use ${PATH} in .bash_profile you can just use $PATH.

The one thing that's important to remember about using the export command in the .bash_profile is that directories are searched in the order set in the variable. So lets say you have 2x adb installed:

- /usr/local/bin/adb

- /Users/your-home/bin/adb

If you want the one in your-home/bin dir to load first you would export like so:

export PATH=$HOME/bin:/usr/local/bin:$PATH

I think that's the generally accepted loading order, that way you can override packages from /usr/bin, /sbin etc by placing a similarly named package in /usr/local/bin and even override that one by place it in $HOME/bin.

Have a look at cask some more if you're not familiar with it, you can install a LOT of software with it that's not available through brew normally. Just do a "brew cask search" without an actual search parameter and it will return all packages available..
[Android Software Development] sebfar:
Hello

I have a galaxy s9. When i use ./adb devices, it is ok. But when i use ./fastboot devices, nothing happend.
[Android Software Development] kairi033:
are you in fastboot mode?

adb is for adb mode..

fastboot is for fastboot mode..:D:D
[Android Software Development] sebfar:
Of course ;)

In fact fastboot doesn't work with samsung

Envoyé de mon SM-G960F en utilisant Tapatalk
[Android Software Development] EgorijR:
" adb devices" can not see my Yota 2.

I installed "android.zip " on my iMac OS High Sierra and " adb devices" can not see my Yota 2 (YD206 ,Ver.4.4.3) ,just leaves empty line. But sees serial numbers of my HTCM9 (ver.6.0.0) and my Blue AIR (Ver.5.0.1).

Any help?
[Android Software Development] metropical:
useful info even today with new (to me) U11. thanks to OP.
[Android Software Development] Platum:
Thanks for your work
[Android Software Development] +0-:
They don't work together adb devices works during normal boot, fastboot works when you are boot the bootloader.

So, did you execute adb reboot bootloader before ./fastboot deves?
[Android Software Development] wantonamo:
Update the docs!

This guide is great, but it's now pretty dated. The best way to connect to adb / fastboot is to grab the latest libraries direct from developer.android.com/studio/releases/platform-tools (unable to post proper link)

Then just unzip and run, boom! Tested this on 2018 Macbook Pro running OS X 10.14.2 Mojave. I was concerned earlier on that there may be some issue using ADB through my USB-C adapter, but this is fine.
[Android Software Development] madheswaransilks:
I think there's an easier way to install

Well since this guide is primarily aimed towards users who only want to root their phone, rather than developers, adb/fastboot is really all you need.

So it would save time to just use an adb/fastboot combo.
[Android Software Development] fogas75:
thanks!!!!!!!!
[Android Software Development] lordaker:
Any version for Infinix Smart 2 X5515?
[Android Software Development] asmar271164:
thank you
[Android Software Development] pdsingh:
Mac says "bad CPU type in executable: ./adb"
[Android Software Development] Mæaster:
I'm trying to help out someone stuck in fastboot mode. I don't even know if the phone has the Android on it. I've tried this & a few variations of this, but can't install ADB or fasttboot to run it &I can't even get the mac to recognize it though it shows on the USB bus. Any tips or should I give up?
[Android Software Development] droidcol:
I've not been able to set up adb on macOS Catalina 10.15.4 and I can't find anything related on any web, it worked fine on Mojave and I just updated to Catalina via preferences, have anyone faced this issue as well? Thanks in advance
[Android Software Development] HainESO:
Great guide! Followed the instructions and comments, and it worked exactly as advertised. Thanks.:good:
[Android Software Development] lasharor:
Nobody seems to have mentioned it in this topic. It is much easier to install ADB using homebrew. Do the following:

1. open terminal

2. install homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

3. install adb: brew cask install android-platform-tools
[Android Software Development] johnkarimi:
Set up ADB on Mac

thank you it was a great way to do that
[Android Software Development] wlmeng11:
What does it say for "adb devices"?

Sent from my HTC Rezound
[Android Software Development] Pithism:
its blank. it states no devices are listed.But when i connect storage it connects and list the name of the evo 4g lte
[Android Software Development] AshtonTS:
Do you have root access set to apps and adb in developer settings?

Sent from my HTC Sensation
[Android Software Development] Pithism:
i currently have it at apps only. What setting should i try next, apps and adb?
[Android Software Development] wlmeng11:
Yes, "apps and adb".

Sent from my HTC Rezound
[Android Software Development] Pithism:
ok i changed it and will try it out when i get home from work.
[Android Software Development] Pithism:
works like a charm.
[Android Software Development] AshtonTS:
Awesome :)
[Android Software Development] fraul:
I followed the thread to the best of my ability, but in the end when i type "adb devices" it reactsm but my device doesn't show up!

it worked before we did the ~nano thing. any help is appreciated.
[Android Software Development] AshtonTS:
Try rebooting? Also, double check the nano editor to make sure you entered the text right, and make sure adb is set to allow root access on your phone
[Android Software Development] fraul:
Worked instantly after i rebooted my computer, thanks a bunch! another quick question? how do i get a logcat? what's the code? i keep getting waiting for device, i don't know what to do after that!
[Android Software Development] wcypierre:
Try "adb logcat -d -v long > logcat.txt". The filename is called logcat.txt and it is saved at the place where your adb is. If the logcat.txt is empty, try to do this "adb devices" and see if there's any device found
[Android Software Development] fraul:
I got around it using logcat on my phone, thanks for the help I really appreciate it
[Android Software Development] AshtonTS:
Thanks, I'v enever actually used logcat before so I couldn't have answered that myself. I'll be sure to thank you whenever I get my 8 Thanks back (or go on tapatalk) ;)
[Android Software Development] wcypierre:
haha you're welcome :). Creating logs can be sometimes overwhelming for newbies so I have just made a tool(look at my thread) which can create logs easily but you have to compile it manually for mac(as I don't have a mac so I can't do it myself, I can teach you how to compile my code if you want to, so you can make a tutorial on creating logs on mac or something similar to that in the future ;))

---------- Post added at 10:45 PM ---------- Previous post was at 10:43 PM ----------

you're welcome :). alogcat or catlog are two good tools to get logcat with your phone. do drop by my thread for an easier logging or drop me a pm when you want to make other sorts of logs :D
[Android Software Development] wlmeng11:
Done for you. ;)

Sent from my HTC Rezound
[Android Software Development] AshtonTS:
Thanks bud :good:
[Android Software Development] fraul:
Now my computer doesn't detect my phone at all, even when it says android debugging enabled on the phone, the computer doesn't list it entirely!
[Android Software Development] wcypierre:
which step are you at?
[Android Software Development] AshtonTS:
Try rebooting both of your devices

Sent from my HTC Sensation
[Android Software Development] Techwolf12:
WOW... fastboot on a mac! woot!
[Android Software Development] wlmeng11:
Intel Macs have been officially supported for a long time.

Sent from my HTC Rezound
[Android Software Development] AshtonTS:
Yeah, but not everyone makes awesome tutorials like me :D

Sent from my Galaxy Nexus
[Android Software Development] wlmeng11:
Wasn't trying to discredit you or anything, just letting him that its its been available for a long time.

(BTW when did you get another gnex?)

Sent from my HTC Rezound
[Android Software Development] AshtonTS:
Lol I know.

I didn't get another gnex, I had to mod the build prop to the GNex to get the 4.2 camera working fully. I forgot to change my tapatalk signature back lol

Sent from my HTC Sensation
[Android Software Development] samurai_vara:
Thanks a lot.

I did everything as you said and it is working.

But now to the silly question.

What should I do to flash kernel (.img)? I have Xperia Arc.
[Android Software Development] fitti28:
I have the completed sdk also but i have a question for you. I had all this done back sometime ago. Great guide with the screen shots which is great for people to use.

My question is on the last part, i am able to ./adb devices and that works great but when i try to add the PATH following your directions it get message permissions denied and i am not sure why. I have adb and fastboot in the platform-tools folder which i know is different then your but either way i should be able to set the PATH.

Any Ideas on this
[Android Software Development] AshtonTS:
The command is

fastboot flash boot boot.img

The boot.img is replaced by whatever the name.img of your kernel is. Also, make sure you're booted into fastboot mode

You might have to be the administrator account (or know the admin password) try

sudo nano ~/.bash_profile

if you know the admin password (or are in the admin account but it still doesn't work)
[Android Software Development] wlmeng11:
When you use "sudo" and "~/" in the same command, at least on Linux, that will refer to the root account's home directory.

Your home directory is supposed to have r/w permissions for the user, so running as superuser would be pointless even if you specified the directory expressly.

I would say that his issue is probably because of a typo.

Sent from my HTC Rezound

---------- Post added at 07:01 PM ---------- Previous post was at 06:59 PM ----------

Can you give more details please?

Sent from my HTC Rezound
[Android Software Development] fitti28:
Thank you, it didnt work as i wasnt using sudo. now all is great
[Android Software Development] twister99403:
thank you for this noob friendly (with mac anyway) guide to getting this working, really appreciate it and didn't have one issue!!!
[Android Software Development] FatalityBoyZahy:
Exactly what I was looking for! Thanks man.
[Android Software Development] :
Didn't realize this thread went to the 23rd till I looked thru it. Thought it was an old one. Since not, thank you very much for the Guide. I had set up sdk long time ago on my N1. But, my laptop is dying and my daughter-in-law gave me her iMac, older one. Not familiar with Apple's, so sent this link to my son and he easily set up sdk/adb on it for me. Brought it to Dayton from Cleveland for Christmas. Am now using my HTC S One with a "new" iMac. Does this mean I am in danger of converting to Apple--lol

Again, appreciate your sharing this info. Made my transitition to the iMac more enjoyable. :)

Ken
[Android Software Development] apatal:
Hi guys, much appreciate OP's work here as it allows me to have fastboot on my wife's macbook air. I've successfully manage to do the first part of the guide, i.e. i can already see my device serial number when I type:

./adb devices

while inside the folder containing the adb. However, I can't seem to do the second step, i.e. removing the need to navigate to the adb folder and type ./ at the beginning of commands. When I type

nano ~/.bash_profile

it opens up the nano editor but it looks blank. I add the recommended line of code though, for setting path, press control X and then Y, but the editor doesn't exit. and when I try typing the adb command without the ./, it stil says file not found. What could I be doing wrong?
[Android Software Development] wlmeng11:
You can edit your ~/.bash_profile file with any text editor of your choice (I prefer vim).

Note that if you want to edit with a GUI editor, you may have to show hidden files in Finder, since it is a hidden file.

PS: Try using the command key in nano since you have a mac. Nano was written primarily for GNU/Linux systems, so it says control of course.
[Android Software Development] :
recheck your paths, maybe a typo

control x then Y works fine for me. editor exits back to command wind

my problem was not getting the path correct to begin with

coming from windows was a little confused

my path is now just Users/ken/bin

bin is where the adb and fastboot are

what rom are you on, sense 4+ have this issue, maybe even earlier versions
[Android Software Development] AshtonTS:
No control is definitely right. Lol n00b :p

Sent from my Nexus 4
[Android Software Development] Jonathan_A:
My HTC One XL (ATT version) isn't showing up when I do adb devices. It's in fastboot mode... Any tips?
[Android Software Development] wlmeng11:
Use "fastboot devices"
[Android Software Development] reposedhysteria:
Thanks for this!

Here's a tip: It's common to use the /usr/local/bin directory for storing shell commands, and the user's home directory ~ for associated folders.

I extracted the android.zip to ~/.android (note the period prefix). Then I created symlinks for the shell commands with:

ln -s ~/.android/adb /usr/local/bin/adb
ln -s ~/.android/fastboot /usr/local/bin/fastboot

This way the ~/.android directory is amongst my other terminal config folders like the ones for ssh, oh-my-zsh, etc. The command will also be accessible across your shells by using the centralized folder instead of including the separate folders in your shell config files. If you're like me who uses the terminal frequently, it's always best to keep things centralized and DRY or those files can get really cluttered. :good:

Also, you do not need to move files to the same directory you are working in to flash them, you should be able to just drag the file into your terminal and it will place the POSIX path (or you can type it). e.g.

fastboot flash boot /Users/reposedhysteria/Downloads/rom_update/boot.img
[Android Software Development] wlmeng11:
Symlinking works, but IMO it's can be potentially dangerous (if you accidentally remove the original and end up with a broken symlink).

I prefer to just add the path to my ~/.bashrc, although the only downside of that is that bashrc isn't loaded in a login shell (unless you either put it in your bash_profile as well or load your bashrc from bash_profile), or if you are using other users (including root) and you want adb/fastboot to be available to be available for all users.

In that case, then symlinking would be the easier way.

They say there are a million ways to do any task in Linux (or any POSIX-complient system, for that matter, such as OSX).
[Android Software Development] reposedhysteria:
Indeed there are! Much of it is simply a matter of preference.
[Android Software Development] gleggie:
Thank you so much for this guide; Bookmarked it for future reference ;)