[HOW-TO] using fastboot on mac os X - Android Q&A, Help & Troubleshooting

Hi,
It take me a bit of time to find how to flash a kernel using fastboot on os X. Therefore I've decided to add a new post about that on XDA for those who want/need to use fastboot on mac os X.
Example given for a Sony Xperia ARC LT15i. This should work for any SE device but will need different vendor ID value for another Brand.
Installation
- Download and extract Android SDK (let's say on the Desktop for the rest of the explanation…)
- Add "Android SDK Platform-Tools" with android SDK Manager
- Download fastboot for mac here http://www.mediafire.com/?0nwuina1ydi
- extract it in android-sdk/platform-tools/
Configuration
Next you need to update the PATH for tools/ and platform-tools/ folder.
- Open Terminal app and type
Code:
nano ~/.bash_profile
- Add the following two lines and change the (username) with the name of your mac os X account name :
Code:
export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/tools
export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/platform-tools
- Save by typing Control+X and then Y
From now you can use fastboot command on your mac os X
The only thing to know is that you will need to use the "i" argument to specify the vendor id of the phone
Code:
./fastboot-mac -i 0xfce flash boot boot.img
Here is the official vendor IDs list http://developer.android.com/guide/developing/device.html#VendorIds but the SE one is not exactly the same and I don't know why
This help have been made using the following sources:
- http://blog.wapnet.nl/2011/05/setup-adb-and-fastboot-with-android-sdk-on-mac-osx/
- http://forum.xda-developers.com/showthread.php?t=1280516
Feel free to add specific vendor IDs

I've followed these instructions and entered the following command:
Code:
fastboot-mac -i 04E8 oem unlock
But I'm still met with the error...
Code:
-bash: fastboot-mac: command not found
What am I STILL doing wrong?? Any help is greatly appreciated!

as said you have not st the path correctly.. try that.. or try with running the command from the folder where you have the file fastboot-mac..
Sent from my HTC One V using Tapatalk 2

I tried the above and I got:
./fastboot-mac -i 0xfce flash boot boot.img
error: cannot load 'boot.img'
Any suggestions?

it doesnt work, waste of time...

It does work. If it isn't working for you its a user error or bad downloads. Instead of posting something like this where no one can help you since we don't know what the problem is, try posting what the results are when you type the commands and include the commands that you enter. THEN we could possibly help you.
Sent from my Inspire 4G
JellyTime R_29
@randomblame
Don't hesitate to say thanks

chmod
theandroidguy2012 said:
It does work. If it isn't working for you its a user error or bad downloads. Instead of posting something like this where no one can help you since we don't know what the problem is, try posting what the results are when you type the commands and include the commands that you enter. THEN we could possibly help you.
Sent from my Inspire 4G
JellyTime R_29
@randomblame
Don't hesitate to say thanks
Click to expand...
Click to collapse
i just tried this and it's worked:
Code:
chmod 777 fastboot-mac
./fastboot-mac command
make sure you are on current directory where fastboot-mac is located

it worked, thanks!

was doing fastboot reboot for like 5 mins.
You saved my day. SILLY MAC

Hi I am having nothing but troubles I don't suppose anyone could help? I just cannot seem to get fastboot working on my mac I tried installing andoir studio and the separate platform-tools folder. Nothing works. I tried your instructions and whenever I try any commands I always get command not found.

Tried this but my device is still not recognized in fastboot mode just says waiting for device even if I give vendor id also. I have kenzo

Related

[Q] cr--rw---- error, can not get past it

So as the title suggests whenever I run the crackin.bat file in order to prepare my legend to be downgraded, it always displays the
cr--rw---- 1 1001 2002 90 line instead of the needed crwxrwxrwx 1 1001 2002 90 line.
I have looked everywhere to find a solution to this problem yet no matter where I look, everybody seems to be able to fix this by just either turning off and on their phone or wiping it. But I have tried all of those and, I have also tried doing this step on a different computer and reinstalling the needed files yet to no avail.
So if anybody has a possible workaround please do share it so I can finally root my phone after many tedious hours.
Sorry for the noob question and many thanks in advanced to anyone who can help me.
Azaruc said:
- Get visionary+
- Temproot your legend with it
- Use commandline with adb on your pc to flash misc1-2.img.
type the following commands from the folder where you have adb;
Code:
adb shell
su
accept the notification on your phone if one comes up
and then in the command line type this;
Code:
/data/local/flash_image misc /data/local/misc1-2.img
That should be enough to make it possible to run the 1.31 RUU.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=11863394&postcount=2
Ahh, thank you. I had come across that before but i just didn't think that it would help! Silly me.
Ok, is there an IRC chat for the legend somewhere, im STILL getting this error. I can't find visionary+ anywhere where im sure enough its not going to mess up my phone, and i aparently am missing the files needed however none of the guides have downloads of everything i need.
PLEASE can someone help me? im so confused nothing is making sense. I get to copying files from DxDrx but that is nonexistant, what am i missing?
Ok, i got passed this step by doing these steps
1: download visonary here
http://forum.xda-developers.com/atta...3&d=1290501865
or here
http://content.modaco.net/dropzone/com.modaco.visionaryplus.r13.apk
or you can get it off the market
Then download hack4legend here http://www.multiupload.com/I3ZALKWB6A and unzip it somewhere (this is adb and the rooting tools)
2: install and open up visonary on your phone and do a temp root on your phone.
3: open up cmd and type in the following
cd "your hack4legend path here but with out the "" "
adb shell
su
4: after you do that on your computer you should see a notification on your phone come up, it might take a little. Accept it.
5: type this into the command promt
/data/local/flash_image misc /data/local/misc1-2.img
6: run the 1.31 RUU and your good.
Hope this helps
Unreal_628 said:
Ok, i got passed this step by doing these steps
5: type this into the command promt
/data/local/flash_image misc /data/local/misc1-2.img
Click to expand...
Click to collapse
/data/local/flash_image: not found
what am i doing wrong? i had to copy the contents of hack4legend to my adb folder so i have adb, is that it? do i have to change the drectory somewhere?
Mmm, if their is a platform tools sub folder in the android sdk try putting the hack 4 legend in there and re trying. It will either have to go in there or the tools sub folder in the android sdk.
And also make sure that when you use the cd command make sure to not just go to the android ask folder but into the platform - tools/tools depending on where you put your hack, try putting it in both and using different paths. Also you might wanna try updating the adb module "android sdk platform - tools revision 3" through the sdk manager.
And as allways make sure you have usb debugging on and have your phone connected to the computer through charge mode only.

[Q] sbf_flash on mac

below is a short preface and introduction before the main point of this thread. you can skip the preface if you want.
PREFACE/INTRODUCTION
i am relatively new here. i owned a nexus one a year ago and sold it for an iPhone 4. left the iOS world and jumped over to the "fastest phone in the world" (GS2 doesn't count yet). had my device for 3 days and i love it. jailbreaking iOS was very easy for me and i am *somewhat* comfortable rooting and unlocking bootloaders on android. Nexus One was very easy from what I can remember. fastboot oem unlock i believe it was? CWM, flashing *.zips, etc. So I would like to think I am not a complete n00b, but when it comes to motorolas, i have no experience. i currently own a macbook pro as my main computer, however, i do have limited access to a notebook running vista. now to get to my point of this thread.
***************************************
MAIN POINT OF THREAD: sbf_flash tool
SBF_FLASH (Mac and Linux) executable for flashing *.sbf files to motorola android phones in lieu of RSDlite. **ATRIX is said to be supported
link: http: //blog.opticaldelusion.org/2011_04_01_archive.html (wouldn't let me post real link, sorry)
*note: originally the developer wrote separate scripts for linux and mac as mac uses mach-o executables while linux uses ELF, however, the updated version works on both linux and mac platforms.
i searched the forums and only found 4 posts related to the tool sbf_flash and none of them were related to the motorola atrix. therefore i felt compelled to write this post and see if anyone has used this tool. if you read my preface it stated that I have a mac and only limited access to a windows computer therefore . my main question is. has anyone used this tool to flash *.sbf files to their atrix? if so, were there any issues whatsoever?
**if no one has used this tool before, I will hold my breathe and take the plunge. I will gladly be the guinea pig for all you mac/linux users out there (mainly mac users as if I am not mistaken, linux users have someway of flashing *.sbf files?)
thank you for reading this post. if I do not receive any input in terms of user's experiences with this tool by July 12th 9:00PM (EST), I will attempt to use it and see what happens. very anxious to get the bootloader on my device unlocked and flash CWM and flash 2.3.4. but i will wait.
**EDIT: i am aware of the fact that I can use bootcamp, VMware, Parallels or essentially any Virtual Box to run Windows on my mac and use RSDlite, however, I feel that if a simple executable such as sbf_flash worked, if would save a ****load of time/frustration/hassles.
I have used it
I use sbf_flash daily for script making purposes and it works flawlessly with the Atrix. Make sure to make the script executable by typing the follwing command in the directory where u have it.
sudo chmod +x sbf_flash.sh
For example if u have the script in the downloads folder type this into the the terminal:
sudo sudo chmod +x /Users/username/Downloads/sbf_flash.sh
Then to flash an SBF type ./Users/username/Downloads/sbf_flash.sh name-of-sbf.sbf
Hope this helps. I have made a script for myself that automates this and would be happy to share it with you. However this is rather basic and I don't think you need a script. If you have any questions let me know.
ionstorm3 said:
I use sbf_flash daily for script making purposes and it works flawlessly with the Atrix. Make sure to make the script executable by typing the follwing command in the directory where u have it.
sudo chmod +x sbf_flash.sh
For example if u have the script in the downloads folder type this into the the terminal:
sudo sudo chmod +x /Users/username/Downloads/sbf_flash.sh
Then to flash an SBF type ./Users/username/Downloads/sbf_flash.sh name-of-sbf.sbf
Hope this helps. I have made a script for myself that automates this and would be happy to share it with you. However this is rather basic and I don't think you need a script. If you have any questions let me know.
Click to expand...
Click to collapse
I run windows 7 on ny mac so... yea
Sent from my MB860 using XDA Premium App
thanks for all the input (from both of you). im assuming if i cd into the directory where the sbf_flash file resides I don't need to include the path every time? i have some knowledge of C and limited C++ or object oriented programming knowledge as well. i would love to use your script that automates the entire procedure if you don't mind giving it to me. once again thanks for the advice.
correct me if i am wrong, but chmod -x essentially gives the file permission to execute? trying to remember all the different unix commands. sudo, cd, and ls are only ones i use on a consistent basis
I have realized that it is not necessary to chmod +x the script file. All you have to do is include a ./ in front of it. For example ./sbf_flash filename.sbf. Btw saw your guide on how to sbf flash under *nix, so not sure if this information is still useful to you.
oh and yes cd, sudo and ls are the commands to use on a constant basis.
hey guys, kinda new to linux and the atrix. running 10.04 im not sure if i have the sbf_flash.sh. i have a file that shows as a shell script, i hope thats right. anyway. i have followed the direction above and cant seem to get it to run. this is what i have.
sudo chmod +x /home/serooted/Desktop/sbf_flash.sh
I in return get.No such file or directory. any ideas that would get me rolling? really want to get rid of the "unlocked" from my moto splash screen
type the following in at the terminal. ls /home/serooted/Desktop/ and see if the sbf_flash file appears in the output.
ionstorm3 said:
type the following in at the terminal. ls /home/serooted/Desktop/ and see if the sbf_flash file appears in the output.
Click to expand...
Click to collapse
Yes the sbf_flash does show up in the output. so my question would be, how now do i get it to flash the file?
is there any way that someone can post a step-by-step guide to unlocking the bootloader for the mb860 running 4.5.91 on a mac as i don't have access to a pc and am un able to find a clear method to doing so. sorry I'm new to this :/

Terminal Commands for Mac Users (Noob edition)

Just wanted to create a quick thread for my fellow noobs. This is my first time using terminal and this is my first nexus device and I was able to unlock the bootloader, flash a recovery, flash the necessary files and flash a custom rom without any issues.. For the more experience guys, please take it easy on me if I put something incorrect Please make sure you have the Android SDK and adb/fastboot otherwise all of this is irrelevant. Also want to thank the community for all the help and giving me all this information as I was learning on the fly. Made the experience super easy and a lot of fun.
You can download the adb and fastboot here... Thanks @corbin052198 : http://forum.xda-developers.com/nexu...d-xda-t3226767
Disclaimer: I am not responsible for any damaged devices. These are simple commands and pretty hard to screw up so if you do I'm not responsible.
Here are the commands and what they do:
adb devices - shows adb devices (this is important, if it doesn't see your device then don't do anything else until is does)
adb reboot bootloader - reboots into bootloader
fastboot reboot-bootloader - reboots bootloader
fastboot flashing unlock - unlocks bootloader
fastboot flash recovery <filename>.img - flashes recovery (TWRP)
fastboot flash vendor vendor.img - use command to flash vendor image
fastboot flash boot boot.img - use command to flash boot image
fastboot flash system system.img- use command to flash system image
Note: If you are having issues with the commands try using "./" I didn't have to but you might. Ex: ./fastboot flash vendor vendor.img
PSA: 1) Make sure your terminal is pointed in the fastboot folder so you can type cd desktop then cd fastboot if that's where the folder is then you can type ls which will show what's in that folder to make sure you are in the right folder.
PSA: 2) If flashing Vendor, Boot and System files, I'd recommend doing it one by one and rebooting the bootloader after each one to be safe..
PSA: 3) A lot of PSA's, I know.. When flashing anything, instead of typing out vendor.img for example, you can just drag it from the folder and drop it into terminal.. Ex: fastboot flash vendor then drag the vendor.img from the fastboot folder..
Hope this helps..
dont all the commands need to be preceded with "./" (without quotes)
ie to flash vendor image w filename vendor.img
./fastboot flash vendor vendor.img
Sent from my Nexus 6P using Tapatalk
Nope not anymore. I actually got an error when typing the "./"
johnandbodhi said:
dont all the commands need to be preceded with "./" (without quotes)
ie to flash vendor image w filename vendor.img
./fastboot flash vendor vendor.img
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
this also helps
http://forum.xda-developers.com/nexus-6p/development/tool-nexus-tools-2-8-featured-xda-t3226767
Will add to thread. Thank you.. This is where I added adb
dwertz said:
this also helps
http://forum.xda-developers.com/nexus-6p/development/tool-nexus-tools-2-8-featured-xda-t3226767
Click to expand...
Click to collapse
Very simple to install to where you can use the commands ANYWHERE instead of having to CD to the folder..
Open a terminal
Make sure Java is installed "java -version" (Should say Java version "x.x.x")
Download the SDK from Google. (Don't worry about Android Studio, just the SDK)
Extract the folder and move it to ~/.android-sdk
In the terminal type "cd ~/.android-sdk/tools
In the terminal type "./android"
Install the Android SDK Tools, Android SDK Platform-Tools, Android SDK Build-tools, Android Support Library
Modify your shell (.bash_profile, .bashrc, .zshrc, ect...) to include (below the PATH variable): export PATH="/users/<username>/.android-sdk/platform-tools:$PATH"
Close your terminal and reopen it. Upon doing so, you should be able to use fastboot and adb in any folder you'd like.
Following these steps make it quite a bit easier to install factory images or sideload ROMs since you can use the fastboot/adb commands directly within the ROM or factory image folders. Let me know if you have any questions
Just FYI, the commands are the same across all platforms. The "./" would be if you are accessing the in the current directory, if you were using a portable version or didn't install things properly so they are in the path.
Dupe thread, we have all this info pinned in general.
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
So you don't really need to put the "./"? I didn't use it at any point and had no trouble at all.
designgears said:
Just FYI, the commands are the same across all platforms. The "./" would be if you are accessing the in the current directory, if you were using a portable version or didn't install things properly so they are in the path.
Dupe thread, we have all this info pinned in general.
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
Click to expand...
Click to collapse
XavierD8188 said:
So you don't really need to put the "./"? I didn't use it at any point and had no trouble at all.
Click to expand...
Click to collapse
I had to use ./ when typing commands to unlock my bootloader. The regular commands without ./ gave me errors.
Sent from my Nexus 6P using Tapatalk
It was the opposite for me. "./" gave me errors but when I just typed the commands without it, worked perfectly fine. Weird..
wwevoxnj said:
I had to use ./ when typing commands to unlock my bootloader. The regular commands without ./ gave me errors.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
There are at least 2 other threads with this same information, therefore, I'm closing this one.

[GUIDE][Linux] Flashing Xiaomi .tgz

Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Either way, I booted into Windows and flashed it. I had a look at the logs later and apparently their flash tool is just a front-end to fastboot, and looking at their firmware archives I noticed there were some .sh files in there, and guess what, they're scripts which do the exact same things their Windows scripts do! So I decided to try to use them to flash the firmware on Linux and, sure enough, after ~10 minutes the device was successfully flashed.
Here's what I did, as always I don't take responsibility for bricked devices, try this at your own risk:
1. unpack the archive
Code:
tar -xf <archive_name>.tgz
2. cd to the archive directory
3. grant run permissions
Code:
chmod +x flash_all.sh
(in my case I was interested in flash_all.sh, I think you can follow the exact same procedure with whichever script you want, though I haven't tested it)
4. get your device id
Code:
fastboot devices
you'll get something like this
Code:
List of devices attached
d82c2d3 fastboot
you're interested in the first column, so in my case d82c2d3
5. run the script
Code:
./flash_all -s <device_id>
at this point the flashing process should start and if everything went good your phone should reboot in a few minutes.
You might need to prepend the commands in point 4 and 5 with sudo.
Also, I don't know if every firmware archive has these .sh files, but it would seem logical. By the way, let me know if this is common knowledge and my googling just sucks as I couldn't find anything related to it...
Just tried it on my Mi 10 Pro and it doesnt work says device is locked just like it does if I try and flash using fastboot.
guglicap said:
Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Click to expand...
Click to collapse
Thank you, it worked...

Please Help! stuck on fastboot loop, cant flash rom???

So I've been messing around, i rooted my poco f1, i insalled twrp etc... i was add Viper4 FX module in Magisk and when i removed it then hit reboot, my phone has been in a loop going to fastboot all the time. I want to just flash a fresh copy of miui to it and start from scratch again but im getting the error on MiFlash tool "error:fastboot: error: cannot load *insert directory location here*: No such file or directory" see attached image.
I have installed all the drivers listed below:
Qualcomm_USB_Driver_v1.0
Universal ADB Driver v6.0
android_winusb.inf
Please someone help. I've tried everything i can think of, including trying command: fastboot format:ext4 userdata (this helped me once before but it is still stuck in fastboot loop.
Please ask me for anything else you may require i.e. screenshots etc...
If you wish to communicate directly and guide me through fixing the issue quicker, I am available on Discord, DM me for my username.
irnbru95 said:
So I've been messing around, i rooted my poco f1, i insalled twrp etc... i was add Viper4 FX module in Magisk and when i removed it then hit reboot, my phone has been in a loop going to fastboot all the time. I want to just flash a fresh copy of miui to it and start from scratch again but im getting the error on MiFlash tool "error:fastboot: error: cannot load *insert directory location here*: No such file or directory" see attached image.
I have installed all the drivers listed below:
Qualcomm_USB_Driver_v1.0
Universal ADB Driver v6.0
android_winusb.inf
Please someone help. I've tried everything i can think of, including trying command: fastboot format:ext4 userdata (this helped me once before but it is still stuck in fastboot loop.
Please ask me for anything else you may require i.e. screenshots etc...
If you wish to communicate directly and guide me through fixing the issue quicker, I am available on Discord, DM me for my username.
Click to expand...
Click to collapse
Rename Folders and remember don't use spaces in any of the Folder Name. Path I'm looking at screenshot you have a Folder "Poco Stuff" it has a space in it. Remove spaces in Folders and Flash it.

Categories

Resources