yashsingh1/xdaforums huggingface dataset:
[Moto G40 / G60] reejuu:
Suggestion [3,General]: The command adb was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\adb". See "get-help about_Command_Precedence" for more details.

PS C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)\platform-tools> ".\adb reboot bootloader

>> ".\fastboot boot twrp.img

At line:2 char:3

+ ".\fastboot boot twrp.img

+ ~

Missing property name after reference operator.

At line:2 char:13

+ ".\fastboot boot twrp.img

+ ~~~~

Unexpected token 'boot' in expression or statement.

+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException

+ FullyQualifiedErrorId : MissingPropertyName

PS C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)\platform-tools>
[Moto G40 / G60] reejuu:
this was showing
[Moto G40 / G60] reejuu:
u there?
[Moto G40 / G60] arsradu:
That looks like an issue with Power Shell misinterpreting what you type. Can you try cmd prompt instead?

You can try this:https://thegeekpage.com/command-prompt-opens-specific-folder-location-windows/
[Moto G40 / G60] reejuu:
wait pls trying now
[Moto G40 / G60] reejuu:
C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)>adb devices

'adb' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)>fastboot devices

'fastboot' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)>adb reboot boot loader

'adb' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)>fastboot boot twrp.img

'fastboot' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju\Downloads\platform-tools_r33.0.3-windows (3)>

same problem...tried your method
[Moto G40 / G60] reejuu:
lets try tomorrow bro..its 3 am night here in india..i am office in the morning have to sleeo..tomorrow i will contac you...8276815423(91 is my country code)) whatsapp available
[Moto G40 / G60] arsradu:
It's not the same problem.

This time, the problem is PATH.

I would recommend renaming "platform-tools_r33.0.3-windows (3)" to just "platform-tools" to make it easier to work with.

Use this to add the folder to your PATH (from your Downloads folder):

set PATH=%PATH%;C:\Users\reeju\Downloads\platform-tools

However, unless you want to keep the platform tools in Downloads, I would recommend moving it somewhere where it's not too easy to get removed by mistake.

So, for example, if you move it under your C: drive, it should look like this:

C:\platform-tools\

Which means that, when you set the new PATH, it should be:

set PATH=%PATH%;C:\platform-tools

Also, to check the new path, type:

echo %PATH%

More info here: https://stackoverflow.com/questions...ernal-or-external-command-operable-program-or

Also, please don't post your phone number or any other personal information in open forums.
[Moto G40 / G60] reejuu:
Ok will try now and will get to you later...pls reply me when i get back to you....i will be very grateful
[Moto G40 / G60] arsradu:
I'll try to. But you have to keep in mind I also have a job. And it's not answering people on xda forums. :)

I'm trying to help. But I'm doing it on my own time.

Also, please, take another look at my post above. There are a few changes.
[Moto G40 / G60] reejuu:
Ok i noticed...i will do what u told...and lets hope all will be fine this time
[Moto G40 / G60] reejuu:
PS C:\platform tools> ".\

>>

>> set PATH=%PATH%;C:\platform-tools

>> echo %path%

now its showing this..i moved platform tools to drive c and renamed it
[Moto G40 / G60] arsradu:
Ok, did you try the fasboot commands? I think you might not need to add .\ this time.
[Moto G40 / G60] reejuu:
Suggestion [3,General]: The command fastboot was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\fastboot". See "get-help about_Command_Precedence" for more details.

PS C:\platform tools\platform-tools>

fastboot devices showing this
[Moto G40 / G60] arsradu:
Please, don't use Power Shell anymore.
[Moto G40 / G60] reejuu:
ok...how to set path to platform tools in cmd?..because its by default C:\Users\reeju>
[Moto G40 / G60] arsradu:
You have all the instructions above.

This part needs to be done from cmd prompt:

set PATH=%PATH%;C:\platform-tools

> this will set the path for platform-tools, when platform-tools folder resides under the C: drive.

Also, to check the new path, type:

echo %PATH%

More info here: https://stackoverflow.com/questions...ernal-or-external-command-operable-program-or
[Moto G40 / G60] reejuu:
C:\Users\reeju>set path=%path%;C:\platform tools

C:\Users\reeju>set PATH=%PATH%;C:\platform tools

C:\Users\reeju>echo %PATH%

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\reeju\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\android-sdk-windows\platform-tools;C:\platform tools;C:\platform tools

C:\Users\reeju>

IS THE PATH CHANGED?
[Moto G40 / G60] arsradu:
Yes, it seems like it is. You can see C:\platform-tools at the end.
[Moto G40 / G60] reejuu:
now next step? fastboot command still didnt working/
[Moto G40 / G60] arsradu:
Do you get the exact same error? From CMD Prompt?

Try to reboot your machine. Maybe it needs to update the tools or something.
[Moto G40 / G60] reejuu:
yes same error...after typing fastboot devices its showing nothing....or typing adb reboot boot loader..nothing happening..ok i will restart and will try later after taking my lunch break....will get you after taking my lunch.i am using win11 home insider preview evaluation copy single language build 25201.rs pre release
[Moto G40 / G60] arsradu:
Unless there's a bug somewhere, it shouldn't make a difference.

If I'm not mistaken, alternatively, what you can do, is install LMSA (Lenovo Motorola Smart Assistant). Should also come with adb and fastboot. But let's see with cmd prompt first.

By the way, please, make sure there's no other "platform-tools" folder underneath your platform-tools folder.

Basically, it should be:

C:\platform-tools\adb

not

C:\platform-tools\platform-tools\adb.

I just tested this on my computer, and it works fine.

Also, for ADB, USB Debugging needs to be allowed in Developer Options. And also, the pop-up with the fingerprinting needs to be always allowed (on the phone).

By the way, the easiest way to get Cmd Prompt open in the platform tools folder, is to just type "cmd" in the path field (while inside the platform-tools folder).

By the way, I just noticed you typed "platform tools" instead of "platform-tools". Please make sure you type it exactly the same way otherwise it's not gonna work.
[Moto G40 / G60] reejuu:
this is the current scenario of platform tools folder. how to make it okay?
[Moto G40 / G60] arsradu:
Move the platform-tools folder (with the - between platform and tools) to C:/ drive. Then delete the platform tools folder (the one without the - ).

After that, set the path again, but this time for the platform-tools folder (the one with the - sign).

In my test, I didn't have to reboot the computer. Maybe just close the cmd window and reopen.

Then try fastboot or adb or any command from the platform-tools folder

Also, why is there a meta-inf folder in your platform-tools...?
[Moto G40 / G60] reejuu:
ok done and path changed and checked
[Moto G40 / G60] arsradu:
Yeah, looks good.

Now you just need to set the path again but this time fo "platform-tools" (with the - ).

And after that, try the commands.

Update: alright, let's try the commands again.
[Moto G40 / G60] reejuu:
done...path changed by cmd and checked
[Moto G40 / G60] arsradu:
Try to do some commands to test adb and fastboot. The commands need to be done from the platform-tools folder. And of course, the device needs to be connected via USB cable.

I attached a screenshot before with how you can open a cmd prompt instance targeted to a specific folder (in this case platform-tools).

We can try for example:

adb devices

should display the device in the list (you can attach a screenshot to make sure it's ok).

then

adb reboot bootloader

this should reboot your device into bootloader

and

fastboot devices

this should check if the device is recognised by fastboot
[Moto G40 / G60] reejuu:
ok trying now
[Moto G40 / G60] reejuu:
Microsoft Windows [Version 10.0.25201.1000]

(c) Microsoft Corporation. All rights reserved.

C:\Users\reeju>adb devices

'adb' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju>adb reboot bootloader

'adb' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju>fastboot devices

'fastboot' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\reeju>

no nothing happens. i did all these commans by putting my phone is fastboot mode.
[Moto G40 / G60] arsradu:
Man, where did I tell you to run the commands? In which folder? Your user folder, or the platform-tools folder?

Of course it's not gonna work from your user folder. There is no adb and fastboot there!

Your Cmd prompt needs to be pointed to your platform-tools folder.

Meaning, it should say:

C:\platform-tools>

NOT

C:\Users\reeju>

ONLY when you're in C:\platform-tools> you can start typing adb and fastboot commands.
[Moto G40 / G60] reejuu:
Path is not changing to platform-tools after several trying after using ur commands for changing path....pls guide me to change path at first...cos if i change path i think i can do the rest peacefully
[Moto G40 / G60] arsradu:
Navigate to your platform-tools folder just like you normally would, from File Explorer. Then, on top of the window, where it says "This PC > Acer (C:) > platform-tools", click that area and type "cmd", then press Enter.

This should open a new Cmd Prompt window, to that specific location (in this case C:\platform-tools>)

Re-attaching the screenshot I posted before, in case it helps.
[Moto G40 / G60] reejuu:
done finally

C:\platform-tools>
[Moto G40 / G60] arsradu:
Ok, now you can start with the adb/fastboot commands.
[Moto G40 / G60] reejuu:
C:\platform-tools>adb devices

* daemon not running; starting now at tcp:5037

* daemon started successfully

List of devices attached

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>
[Moto G40 / G60] reejuu:
Microsoft Windows [Version 10.0.25201.1000]

(c) Microsoft Corporation. All rights reserved.

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>adb devices

List of devices attached

C:\platform-tools>adb reboot bootloader

error: no devices/emulators found

C:\platform-tools>

why this is showing after typing adb reboot bootloader
[Moto G40 / G60] arsradu:
Perfect! That's what you're supposed to see when everything is properly set up.

The error occurs because you haven't enabled USB Debugging in Developer Options, on your phone. If you remember, I did mention that too, in one of my previous posts. So...do that, and it should be ok.

Make sure you also accept the Fingerprinting pop-up (check the box to Always Allow).
[Moto G40 / G60] reejuu:
Microsoft Windows [Version 10.0.25201.1000]

(c) Microsoft Corporation. All rights reserved.

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>adb devices

List of devices attached

C:\platform-tools>adb reboot bootloader

error: no devices/emulators found

C:\platform-tools>fastboot boot twrp.img

fastboot: error: cannot load 'twrp.img': No such file or directory

C:\platform-tools>adb devices

List of devices attached

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>fastboot -w

Erasing 'userdata' OKAY [ 0.668s]

Erase successful, but not automatically formatting.

File system type raw not supported.

Erasing 'metadata' OKAY [ 0.002s]

Erase successful, but not automatically formatting.

File system type raw not supported.

Finished. Total time: 0.688s

C:\platform-tools>fastboot erase userdata

Erasing 'userdata' OKAY [ 0.355s]

Finished. Total time: 0.361s

C:\platform-tools>fastboot boot twrp.img

fastboot: error: cannot load 'twrp.img': No such file or directory

C:\platform-tools>fastboot boot twrp-3.6.2_12.1-0-hanoip-20220808-0701

fastboot: error: cannot load 'twrp-3.6.2_12.1-0-hanoip-20220808-0701': No such file or directory

C:\platform-tools>fastboot boot twrp twrp-3.6.2_12.1-0-hanoip-20220808-0701

fastboot: error: cannot load 'twrp': No such file or directory

C:\platform-tools>fastboot boot twrp-3.6.2_12.1-0-hanoip-20220808-0701.img

fastboot: error: cannot load 'twrp-3.6.2_12.1-0-hanoip-20220808-0701.img': No such file or directory

C:\platform-tools>fastboot boot twrp-3.6.2_11-1-hanoip-20220808-0633

fastboot: error: cannot load 'twrp-3.6.2_11-1-hanoip-20220808-0633': No such file or directory

C:\platform-tools>adb reboot bootloader

error: no devices/emulators found

C:\platform-tools>flash ROM.zip

'flash' is not recognized as an internal or external command,

operable program or batch file.

C:\platform-tools>adb push rom.zip /sdcard

adb: error: failed to get feature set: no devices/emulators found

C:\platform-tools>adb push ROM.zip\internal storage

adb: error: failed to get feature set: no devices/emulators found

C:\platform-tools>flash ROM.zip

'flash' is not recognized as an internal or external command,

operable program or batch file.

C:\platform-tools>

this was happen and restarted automatically with all data reset
[Moto G40 / G60] reejuu:
usb debugging was on...fingerprint pop up? i didnt get that?
[Moto G40 / G60] arsradu:
Yes, when you connect the phone in usb debugging mode, you should get a pop-up on your phone. If you didn't get it, try to unplug and replug the USB cable
[Moto G40 / G60] arsradu:
You should take things one at a time. :) Flashing ROM is not done like that.

It's easier to be done directly from TWRP, once you're inside it.

But first, fix your adb!

The pop-up that I'm talking about should look like in the screenshot below.

Make sure you check the box that says "Always allow from this computer", then click Allow.

Copy the ROM zip file to your phone (either from Windows, or with adb push...just make sure you fix adb first), and boot into TWRP recovery.

These are the first steps.

If you want to boot into TWRP recovery, you have to have TWRP.img in your adb/fastboot folder on your computer! Otherwise, how can it boot into it, if you don't have the file anywhere? :))

You can rename the file to just twrp.img, to be easier to work with.

Take things one at a time. DON'T just enter commands on your keyboard. You risk bricking your phone this way.

Take things SLOW! And be very careful what you're typing!
[Moto G40 / G60] reejuu:
yes this came and i aloowed and tick the option will later at night.. will you be online then? that will be very grateful for me
[Moto G40 / G60] reejuu:
i have the the twrp.img file inside platform-tools folder and rom zip also...just copied rom.zip to my phone"s internal storage
[Moto G40 / G60] arsradu:
If I'm still awake, I'll try to answer. If not, I'll be answering tomorrow. Until then, please take things slow. You don't wanna mess with fastboot commands. So, l'll try to help you do this right. Step by step. It's not hard but if you never done it before...it can be risky. So you need to have a bit of patience.
[Moto G40 / G60] reejuu:
why this is showing when twrp.img is there inside platform-tools folder?

is there anything problem happens during renaming the folder to twrp.img from original downloaded name?
[Moto G40 / G60] reejuu:
ok i will quote you when i do the thing litlle bit later
[Moto G40 / G60] arsradu:
Perfect.

Then you only have a couple of things to do.

1. Reboot into bootloader.

This is done from Cmd Prompt, on Windows.

Command is:

adb reboot bootloader(make sure USB Debugging is ON, and fingerprinting allowed, like you did before).

2. Once rebooted into bootloader, you can format and erase userdata (you've already done that, probably without realising).

This is also done from Windows (same as above).

Commands are:

fastboot -w

fastboot erase userdata

3. boot into TWRP recovery

This is also done from Windows (same as above).

You can download twrp from here: twrp-3.6.2_11-1-hanoip-20220808-0633.img

After that, rename this to just twrp.img and place it inside your platform-tools folder.

Make sure it's NOT twrp.img.img or something like that. Just twrp.img.

After that, try to boot into it, with this command:

fastboot boot twrp.img

At this point, the phone should reboot into TWRP recovery.

4. install the ROM

This is done from TWRP recovery (with or without Windows). See below.

If you already placed the ROM on your internal memory (Downloads folder, for example), this is where you go to Install (from TWRP), then browse to where you put the ROM, and finally, hopefully, flash it successfully.

Please, note: you might need to copy the ROM again, since you've erased userdata. That's why I was suggesting using an SD Card instead of internal memory.

So, if this happens, you might need to reboot the phone, copy-paste the ROM somewhere, then boot into TWRP again (command above), and install the ROM this way.

EASIER METHOD:

From TWRP, you can go to ADB section.

Then, on your computer, do this command:

adb sideload ROM.zip

For this to work, the ROM needs to be inside the platform-tools folder! Same for the "adb push" method.

Of course, you need to rename the ROM zip file to just ROM.zip (just like we did for twrp.img).

There is a chance you might be getting some errors during flashing. They might be intended. If you want to confirm, you can upload a photo here, so we can check it together.

That's about it. In theory, if you've done everything correctly, at this point you should be able to just reboot and enjoy your new ROM.

Fingers crossed.

If anything, we'll try to fix it as we go.
[Moto G40 / G60] reejuu:
do i need to change the name of the rom zip and twrp img file?
[Moto G40 / G60] arsradu:
In case the ROM installation part is a bit confusing, the idea is very simple: you need to get the ROM from somewhere.

So, either you copy it to the phone (from Windows, with "adb push" or any other way). Or you use adb sideload to just install it from your PC, without copying it to the phone.

The choice is yours. But the idea is the same. Somehow, you need to provide the ROM for installation.
[Moto G40 / G60] arsradu:
You don't need to. I just think it's easier to work with shorter filenames. It's just personal preference.

So no, it's not mandatory. But I just think it makes things easier to work with. That's all.
[Moto G40 / G60] reejuu:
will try now..my android version is 12
[Moto G40 / G60] arsradu:
By the way, you don't have to rename the files. But you do need to make sure the command reflects whatever name the file has.

So...you can't do "fastboot boot twrp.img" if the filename for twrp is actually "twrp-xxx-ccc-2637492.img". Just an example, of course.

What I'm saying is that they need to match.

So...either you change the filename to match the command or change the command to match the filename.

But you can't mix them together.
[Moto G40 / G60] reejuu:
C:\platform-tools>adb reboot bootloader

error: no devices/emulators found

C:\platform-tools>

this is showing when i type adb reboot bootloader
[Moto G40 / G60] arsradu:
Sometimes I'm wondering why I'm doing all of this...

Please, read the instructions above carefully.
[Moto G40 / G60] reejuu:
debugging on...fingerprinting allowed...all set but showing this
[Moto G40 / G60] arsradu:
Try to disconnect and reconnect the phone.

That option is reset when you erase user data. So it needs to be done again.
[Moto G40 / G60] reejuu:
done that also several times...changed usb port also,,,
[Moto G40 / G60] arsradu:
Hmmm weird... Tried to disable and re-enable USB Debugging?
[Moto G40 / G60] arsradu:
You can also reboot into bootloader manually. Just shut down normally, then boot to bootloader by pressing Power and Volume Down.
[Moto G40 / G60] reejuu:
power+vol down will go into bootloader or into fastboot?
[Moto G40 / G60] arsradu:
From bootloader you can do fastboot commands.
[Moto G40 / G60] reejuu:
C:\platform-tools>adb devices

* daemon not running; starting now at tcp:5037

* daemon started successfully

List of devices attached

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

1st step done
[Moto G40 / G60] reejuu:
C:\platform-tools>adb devices

* daemon not running; starting now at tcp:5037

* daemon started successfully

List of devices attached

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>adb reboot bootloader

error: no devices/emulators found

adb reboot bootloader...is not not happening...tried everything..installed fresh drivers also..thistime fingerprint rsa popup also allowed
[Moto G40 / G60] arsradu:
Weird... if you do adb devices again, does it show the serial number in the list, like it does for fastboot?

If not, you can try to skip this step, boot into bootloader manually, and go to step 2.

In theory, once the pop-up for fingerprinting shows up, it should work. I'm not sure why is it still showing an error.
[Moto G40 / G60] reejuu:
C:\platform-tools>adb devices

List of devices attached

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>

its showing this now in fastboot commands after going to fastboot mode by pressing vol down nd power key

and btw it doesnt boot into bootloader manually. after going into fastboot mode if i press vol down and power key its restarting
[Moto G40 / G60] arsradu:
Forgot to mention. For adb commands, the phone needs to be in normal, booted mode. So not in bootloader. Or from recovery mode, in adb mode.

But anyway. Let's try step 2 and 3.
[Moto G40 / G60] reejuu:
fastboot -w

fastboot erase userdata

so from here?
[Moto G40 / G60] arsradu:
Next step
[Moto G40 / G60] reejuu:
there was problem during booting twrp.img...if that that was happened then same will happen all data will erase.....although...i have 100mbps unlimited broadband....three times set my phone in just previous 3 hours
[Moto G40 / G60] reejuu:
adb mode means fastboot mode?
[Moto G40 / G60] arsradu:
No. They're different.
[Moto G40 / G60] arsradu:
What is the problem booting twrp?
[Moto G40 / G60] reejuu:
C:\platform-tools>adb devices

List of devices attached

ZF6526VZXK device

C:\platform-tools>adb reboot bootloader

C:\platform-tools>fastboot devices

ZF6526VZXK fastboot

C:\platform-tools>fastboot -w

Erasing 'userdata' OKAY [ 0.570s]

Erase successful, but not automatically formatting.

File system type raw not supported.

Erasing 'metadata' OKAY [ 0.003s]

Erase successful, but not automatically formatting.

File system type raw not supported.

Finished. Total time: 0.616s

C:\platform-tools>fastboot erase userdata

Erasing 'userdata' OKAY [ 0.360s]

Finished. Total time: 0.374s

C:\platform-tools>fastboot boot twrp.img

fastboot: error: cannot load 'twrp.img': No such file or directory

stucked here...please help
[Moto G40 / G60] reejuu:
i changed the file name to twrp.img