• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Command prompt

Jfalls63

Android Expert
I'm borderline computer illiterate and have been flashing files in Fastboot the hard way. I can't figure out how to open a command prompt in the file containing the firmware / image I need to flash.
Need someone that could instruct a three year old.
 
There is supposed to be a easy way to point or open a command prompt in the file where you have the image .
Example- I create a file in My Documents(XP) or Documents(Win10) . Name it Moto XPE Stock , download the stock firmware and unzip it there.
Shouldn't I be able to open that file, then a command prompt and have fastboot grab the correct .img from that file when I type the fastboot command to flash something in that file?
Remember, explain it as you would to a three year old.
 
My work around has been to copy contents of the file to the Minimal ADB and Fastboot folder, flash what's needed, then delete everything I copied. Got to be a easier way.
 
I think I know what you might mean...:p

Do you mean a script like where you can drag a file to it (i.e., to the script's icon) and have the script take the file that was dragged (drug?) to it and operate upon it (i.e., flash it for example)?
 
I haven't used a script yet. Been flashing manually trying to get the commands down pat.
I have looked over a few guides lately and guess that I may have been doing it correctly( by accident), copying the files I want to flash to the same folder as fastboot then deleting them when finished.
 
Ah, so maybe it's just having your PATH environment variable set so that your fastboot / fastboot.exe command (for example) is available from wherever your .img file exists (i.e., so you don't have to place (and later remove) the .img file where your fastboot utility lives)?

Sound right / make sense? If so, that's an easy thing to fix/set...
 
Exactly. I would like to be able to leave everything for the specific device I'm working on in its own folder, Motorola, Nexus, and not have to copy it over to the fastboot folder each time but have a way for fastboot to go to that specific folder and grab the img
Hopefully I'm making sense.
I borked one of my Motorola's a few times over the past three days trying out new roms and have been using fastboot a lot.
Computers are a new trick to this old dog.
 
Okay, let's say you have all of your tools (like fastboot.exe, adb.exe, or whatever) in the c:\jfalls63utils folder.

Windows 7
  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables button
  5. In the System Variables section, scroll down to and select the PATH environment variable.
  6. Click Edit... button
  7. Move your cursor to the end of the line of text (that's where we'll put the new directory name)
  8. Add/paste ";c:\jfalls63utils" (without the quote marks, of course) to the end of the line and click the OK button
  9. Now, when you launch a Windows Command Prompt (DOS window), you'll have that directory path added to your list where Windows will search for utilities that you have there (like fastboot.exe, etc.)
If you launch a Windows Command Prompt (i.e., old DOS window) and type the "PATH" command, it will show you the directories that it searches.


upload_2016-8-6_17-6-43.png


upload_2016-8-6_17-6-55.png


upload_2016-8-6_17-7-19.png


upload_2016-8-6_17-8-19.png
 
Sorry, went out to mow the lawn :p.

Jfalls, you must have a different version of Windows from me, but the concept is the same...

You're looking to just change the "PATH" (or "path") variable, so I think you want to select the bottom/second section in the previous screen to what you posted (can you post that?--it's the window named "Environment Variables" instead of the "Edit Environment Variables").

And happy for any help, @James L :).
 
Yep, Windows 10.
Managed to use your pictures and instructions to navigate through my version.
When I select/ highlight Path and select Edit
It takes me to Edit environmental variable

If I highlight Path and select new, it takes me to the last picture in your first group but called
New System Variable
 
Okay, if you highlighted "Path" and then did the Edit, then you were indeed on the right screen.

Win10 must be showing you a nicer format/version for editing the individual paths...so, I think if you did what you posted in the images above and hit "OK" on the last few screens (i.e., you'll want to get back to the "System Properties" window).

Then, you should be able to launch a Windows Command Prompt and see the fruits of your efforts--i.e., typing "PATH" (without quotes) should show you that your PATH environment variable now has your new c:\jfalls63utils directory on it.

You can change that name to be whatever you want, of course. Also, you'll place/host your utilities in that folder and you should be able to reference "fastboot.exe" (or just "fastboot") without having to copy your files into the folder like you did before or giving a full-blown pathname (i.e., you can just type "fastboot.exe" instead of the full "c:\jfalls63utils\fastboot.exe" path).
 
Got it! Now if I can make it do what I want I'll be a happy camper.

Not sure if this is the proper place for this thread, so move it if needed.
Thanks for the help!
I'll let you know if I can make it work.
 
You don't have to drag .img files, roms etc to the adb/fastboot folder.
Go to the adb folder or whatever you named it hover over it with the mouse pointer hold shift and right click.
Also the folder in use can be anywhere i keep them on the desktop instead of C:

Then you can have the .img file on the desktop or wherever. Then drag the .img to cmd.
for example you renamed it to recovery.img then you would type fastboot flash recovery then drag the .img file into cmd. Then press enter. I will make a video or post pictures but am very busy atm.
 
Back
Top Bottom