As you can see in the title, i decided to write a small fastboot tut, especially for our p880 and its "own" commands and tricks
I am, as always, not responsible for what you do with your device. Do it on your own risk.
I will however not explain on how to set up fastboot on your PC. There are tons of tuts out there on xda, just search for it
NOTICE: You need an unlocked bootloader for this
Screenshots will be added later, 'cause my lappy is compiling right now and i thought i could use the time to write this so just wait a bit
Now, lets begin with the fun, shall we?
General
Fastboot is usually quite easy to use. But if you went searching for a tut on the web, you might have noticed that it doesn't work the way it should on your device.
That's because LG messed something up in the bootloader, but let's don't worry about that now, it does work nontheless
Fastboot is "a part" of the bootloader. This means, neither the kernel (boot), nor the recovery gets booted.
That gives you the ability to flash, but also boot kernels/recoveries. And yes, i meant booting, without really flashing it
Now we need to get into fastboot mode:
And this is (one of) the point(s) where LG messed up. The usual command is "adb reboot bootloader". But this command does not work on your device the way it should.
It gets you into a kind of fastboot mode, but you can't flash anything, because it says the bootloader would be locked, even tho it isn't.
The working command is
Code:
adb reboot oem-unlock
i guess this command sounds familliar, doesn't it? and don't worry, it will not lead you to a menu that deletes your data.
It will lead you to the working fastboot mode
now we're in the working fastboot mode. To check if you've set up fastboot correctly, type
Code:
fastboot devices
this should list your phone and its serial number.
It is recognized? good. so now we might want to check the status of our device (BL unlock state, serial number,...).
Therefore type
Code:
fastboot getvar all
now you can check whether it's really unlocked or not.
If everything's fine, you might want to...
Flash something
In order to flash something, you need the appropriate image. For kernels it's mostly "boot.img"
The command to flash something via fastboot is in general
Code:
fastboot flash <partition> <filename>
Example: You want to flash a kernel (named test_boot.img) and you have downloaded the kernel to the folder where your fastboot.exe is.
So you type
Code:
fastboot flash boot test_boot.img
This will copy the kernel to your device and then flash it to the LNX (boot) partition.
Of course you can flash other partitions, too, like system, data, cache, recovery...
After a flash, it is wise to clear the cache, or even your /data partition...
Deleting a partition
You don't need a recovery to wipe a partition, just use fastboot
The general command is
Code:
fastboot erase <partition>
For our example it's enough to wipe the cache. You can do this using this command:
Code:
fastboot erase cache
Also here you can wipe all partitions, like system, data, cache, boot, recovery...
So now we've flashed what we wanted to, wiped the needed partitions, but how do i..
Get out of fastboot
This is as easy as getting in just type
Code:
fastboot reboot
to reboot the device (Here's another thing, where LG messed up.... it reboots, but stays at the LG spash screen.
So press the power button for at least 10 secs. Now your device will reboot into recovery (!?)
then just tap reboot system now and be happy )
or
Code:
fastboot continue
this one will not reboot the device, but continue the boot procedure. I, for one, would suggest you to use the first command
now your device will boot up normally (except your kernel/system.... has a bug of course )
for more help, just type
Code:
fastboot help
and the last point is...
Bricking the device
nah, just kidding
Reserved
Thanks for this usefull post!
Sent from my LG-P880 using xda app-developers app
thanks, it's very useful for me.:good:
Thanks,
it's so easy
fastboot boot <kernel> <ramdisk> -c "androidboot.mode=normal"
Click to expand...
Click to collapse
<kernel> is the kernel zImage
<ramdisk> can be a .img, .cpio, .cpio.gz
-c "androidboot.mode=normal” is needed the get the kernel booted for the p880 with the correct commandline
Gesendet von meinem LG-P880 mit Tapatalk 4 Beta
So, to get into fastboot mode, I have to turn on my phone, plug it to my computer and in cmd I type adb reboot oem-unlock, right? Is there any possibility to access it in case of a bootloop or something?
boot into recovery system by holding power+vol-down till it vibrates, then use either adb to issue the command or when using twrp as recovery system: Reboot --> Fastboot
Gesendet von meinem LG-P880 mit Tapatalk 4 Beta
A little update from LG...
I wrote them that they have messed up our bootloader, and told them the bugs/problems/... well, see yourself:
1) "adb reboot bootloader" doesn't bring me into bootloader. Well it does, but even though i have unlocked the bootloader, it still says it would be locked.
instead i need to use "adb reboot oem-unlock" to get into bootloader.
- P880 does not support "adb reboot bootloader" to go into bootloader. P880 only works "adb reboot oem-unlock" instead of "adb reboot bootloader" to go into bootloader. and then you can use the fastboot command mode after accept unlock bootloader.
2) "fastboot reboot" partly reboots the device, but then it keeps stuck at the first LG splash screen. pressing power button for 10 seconds brings me into recovery then, instead of into the ROM.
- P880 supports "fastboot reboot", before flashing the customize image, "fastboot reboot" reboot normally.
3) "fastboot flash system [path/to/system.img]" gives me "fatal error: unknown partition"
- P880 can only flash boot, recovery. Ex> fastboot flash boot/recovery boot.img/recovery.img
4) "fastboot boot [...]" doesn't work at all.
- P880 does not support "fastboot boot [...]" command
- P880 supports only flash, erase, reboot as you already seen in bootloader unlock warning message.
5) I have found no way to boot into fastboot/bootloader without a booting phone. Maybe you could try to add the possibility to boot directly into fastboot.
- You can only go into fastboot mode using "adb reboot oem-unlock"
Click to expand...
Click to collapse
lg is retarded, but hey atleast they had the decency to answer
Yeh, you need to kdz flash if you mess up both system and recovery.
Keep an suid busybox in /data so you can root and re-flash CWM/TWRP in the backup+restore mode without having to clear data so the stock ROM can boot.
Can't seem to get his wokring properly, think it's the drivers.
I connect my phone to the pc, run cmd and I reboot it to to the bootloader. From there, I can't do anything. I i Write "fastboot devices" I get nothing, can't flash anything either. Have tried the official drivers from lg, but it doesn't work.
That's the same way of using fastboot like it is on Sony devices, you should mention it so more people would use this guide.
The only difference is that on sony devices if you want to unlock your bootloader you need to get the key from this site and then fastboot 0x0fce oem unlock 0xKEY
hi dudes , if phone (4x hd) is in s/w update mode , can I use fastboot command?
ppl, i beg for help:
when I use adb reboot oem-unlock or adb reboot bootloader, my phone only resets itself and boots back into normal working mode. I've tried to boot it into bootloader with holding volume up and power button and it boots into some kind of mode wheres only picture with symbols of mobile with symbols of data cable and power cable being plugged into phone with red symbol over cables that they shouldn't be unplugged. I've also tried eboot oem-unlock and reboot bootloader commands in that mode and it only resets the phone back into normal working mode while command fastboot flash recovery twrp.img only gave me "waiting for the device" and nothing happening...
also I've entered into hidden menu with 3845#*880# command bit there's no "BL status" or "Bootloader Unlock Check" or anything that has any connection to Bootloader
help?
@gesaugen: Works only with firmware 20A and higher.
GoodSoul said:
@gesaugen: Works only with firmware 20A and higher.
Click to expand...
Click to collapse
GoodSoul, thanks for info!
So I only need to upgrade firmware and it should work then...
I tried this method and for fastboot devices
i get no permissions fastboot
pls help
edit: i just did it with sudo fastboot devices
but i have another error:
fastboot flash zimage zImage
sending 'zimage' (4913 KB)...
OKAY [ 1.216s]
writing 'zimage'...
FAILED (remote: Invalid Partition Name.)
InterrtuptoR said:
but i have another error:
fastboot flash zimage zImage
sending 'zimage' (4913 KB)...
OKAY [ 1.216s]
writing 'zimage'...
FAILED (remote: Invalid Partition Name.)
Click to expand...
Click to collapse
Only "boot" and "recovery" are supported for fastboot flash command. Boot is the kernel and takes boot.img. Unfortunately, "system" is not supported, otherwise developing on this phone would have been similar to Nexus devices.
Back Story:
I cracked the screen on my Moto X a few days ago and just received my insurance replacement. Before I send the old one back I want to return it to stock. I am attempting to do so using RSD Lite and the FXZ from the the Android Development section.
My problem is that the usb drivers are not installing correctly! I downloaded the device manager, and when my phone connects and Windows says it is installing driver software it returns this error. (see attached)
As a result, I cannot get the phone to be recognized by RSD Lite, therefore not being able to return to stock.
PLEASE HELP!
Troubleshooting up to this point:
-Uninstalled and reinstalled drivers
-rebooted computer
-rebooted phone
-tried different usb ports
-tried new phone
In case I cannot resolve this issue, is there another way to return to stock? I really don't think Asurion will like me very much when they try to factory reset this phone and nothing happens
jmcharles said:
Back Story:
I cracked the screen on my Moto X a few days ago and just received my insurance replacement. Before I send the old one back I want to return it to stock. I am attempting to do so using RSD Lite and the FXZ from the the Android Development section.
My problem is that the usb drivers are not installing correctly! I downloaded the device manager, and when my phone connects and Windows says it is installing driver software it returns this error. (see attached)
As a result, I cannot get the phone to be recognized by RSD Lite, therefore not being able to return to stock.
PLEASE HELP!
Click to expand...
Click to collapse
I had this issue too. Simply boot into the bootloader and choose BP Tools. Your computer should recognize it now. Also, make sure you have USB Debugging checked in developer options in the phone settings. If you are running Windows 8 you may run into issues running RSD Lite. If that is the case you can use fastboot to flash back to stock. Simply unzip the FXZ and place the fastboot files in the same folder. Then boot your phone into the bootloader. and connect your phone. Run the following commands:
cd C:\<the directory your files are in>
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin (optional: this is the boot logo)
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize (optional: will erase any customizations if ordered through motomaker)
fastboot erase clogo (optional: will erase the custom boot logo if ordered through motomaker)
fastboot oem config carrier <carrier name>
fastboot oem fb_mode_clear
fastboot reboot
That should reset your phone. You may want to double check the oem commands against the ones listed in the xml file in the zip. I have the AT&T version and that's what I'm basing it off of.
EDIT:
You can also just flash the recovery partition and factory reset that way. However, it might not erase any root files. I've done some factory resets on other devices and maintained root.
EDIT 2:
I attached the fastboot files in case you needed them.
EDIT 3:
Just though of this. Make sure when you run RSD Lite that your phone is booted into the bootloader.
Thank you!
So...I tried to get it recognized using the Motorola drivers, but it just was not working. Instead, I attempted to update the drivers manually to Android ADB interface while in the bootloader. This worked, and my device was recognized. However, RSD Lite still failed to work, so I did it manually thru command prompt. I double checked all the commands with the Verizon XML file, and it worked!
Thank you for giving such an exhaustive reply. I am still unable to get the phone recognized with Motorola drivers, but the Android ADB drivers I already had on my computer seem to work. I'm not too smart on that stuff, so maybe someone can explain why this is and why I was able to get it to work.
jmcharles said:
So...I tried to get it recognized using the Motorola drivers, but it just was not working. Instead, I attempted to update the drivers manually to Android ADB interface while in the bootloader. This worked, and my device was recognized. However, RSD Lite still failed to work, so I did it manually thru command prompt. I double checked all the commands with the Verizon XML file, and it worked!
Thank you for giving such an exhaustive reply. I am still unable to get the phone recognized with Motorola drivers, but the Android ADB drivers I already had on my computer seem to work. I'm not too smart on that stuff, so maybe someone can explain why this is and why I was able to get it to work.
Click to expand...
Click to collapse
Glad to hear you were able to get your phone back to stock. I haven't figured out why it does that either. Never had that issue with my other phones and they were Motos too.
Sent from my XT1058 using XDA Premium 4 mobile app
File Error
Dark9781 said:
I had this issue too. Simply boot into the bootloader and choose BP Tools. Your computer should recognize it now. Also, make sure you have USB Debugging checked in developer options in the phone settings. If you are running Windows 8 you may run into issues running RSD Lite. If that is the case you can use fastboot to flash back to stock. Simply unzip the FXZ and place the fastboot files in the same folder. Then boot your phone into the bootloader. and connect your phone. Run the following commands:
cd C:\<the directory your files are in>
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin (optional: this is the boot logo)
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize (optional: will erase any customizations if ordered through motomaker)
fastboot erase clogo (optional: will erase the custom boot logo if ordered through motomaker)
fastboot oem config carrier <carrier name>
fastboot oem fb_mode_clear
fastboot reboot
That should reset your phone. You may want to double check the oem commands against the ones listed in the xml file in the zip. I have the AT&T version and that's what I'm basing it off of.
EDIT:
You can also just flash the recovery partition and factory reset that way. However, it might not erase any root files. I've done some factory resets on other devices and maintained root.
EDIT 2:
I attached the fastboot files in case you needed them.
EDIT 3:
Just though of this. Make sure when you run RSD Lite that your phone is booted into the bootloader.
Click to expand...
Click to collapse
I'm very new to this. I got caught up in the PwnMyMoto boot loop after the Verizon OTA. I am trying to reload the phone back to Factory Default without root. When I try to use the commands above I get the error "Variable not supported! target reported max download size of 805306368 bytes
I have the files in the same directory as fastboot.exe so they are in the path. Can anyone tell me why I am getting this error, and what I can do to resolve it? Thanks
Hi,
after upgrading to Lollipop, I wanted to downgrade to Kitkat. I think I flashed Kitkat's fastboot and what I only see after logo is:
"Fastboot Starting...
Fastboot Starting#1...
Fastboot Starting#2...
Fastboot Starting#3..."
currently adb doesn't recognize.
fastboot recognizes the device however,
the only command accepted is "boot". The others like "flash" doesn't work.
Any ideas?
kaltugce said:
Hi,
after upgrading to Lollipop, I wanted to downgrade to Kitkat. I think I flashed Kitkat's fastboot and what I only see after logo is:
"Fastboot Starting...
Fastboot Starting#1...
Fastboot Starting#2...
Fastboot Starting#3..."
currently adb doesn't recognize.
fastboot recognizes the device however,
the only command accepted is "boot". The others like "flash" doesn't work.
Any ideas?
Click to expand...
Click to collapse
Man I have one week with this problem. Some people told me who I erased the bootloader's unit they says than then this I need someone who own a hardware who has like name like "box" or something to set up the Bootloader and then Install the OS
I've been having connectivity issues with my phone ever since I flashed LineageOS. I've tried a ton of fixes, but none of them have solved it. I want to try the fix outlined here:
Go-to your phone bootloader mode connect pc adbfastboot command mode then type command.
Mfastboot erase modemst1
Enter
Mfastboot erase modemst2
Enter
Then reboot
Click to expand...
Click to collapse
But I can't get it to work. When I try to erase modemst1, I get this message:
FAILED (remote: 'Erasing is not allowed for partition')
I thought perhaps I had relocked my bootloader, so I tried to unlock it again, but got this message:
FAILED (remote: 'Device already unlocked')
Then I thought Magisk might be interfering with this, so I unstalled Magisk. But the message was the same.
What's causing this, and how do I fix?
Remove the "M" from the start of the command.
SXUsr said:
Remove the "M" from the start of the command.
Click to expand...
Click to collapse
Oh yeah, did that. I'm on a Mac so it's ./fastboot
Hi guys, im posting this hoping theres a solution for my problem. I was folowing this guide to try install the stock firmware on this device and remove a virus that i wasnt able to remove even after cleaning the user data partiton (it was an anoying bar that started every time the phone booted). Well everything went acording to plan until i send a reboot command trough adb before flashing anything. Now the phone wont turn on and my computer doesnt detect it, doesnt show anything on screen and the computer plays the pluged and unplugged hardware sound constantly.
Moto E4 Guide To Full Stock Firmware Restore and Re-lock Bootloader Any Variant
Note : Do not erase/flash Bootloader file preloader.img or preloader.binfastboot erase preloader fastboot flash preloader preloader.img Do not erase/flash partition table file pgpt.img/gpt.img or pgpt.bin/gpt.binfastboot erase pgpt or gpt...
forum.xda-developers.com
fastboot erase boot
fastboot erase efuse
fastboot erase expdb
fastboot erase flashinfo
fastboot erase frp
fastboot erase hw
fastboot erase keystore
fastboot erase lk
fastboot erase logo
fastboot erase metadata
fastboot erase nvdata
fastboot erase nvram
fastboot erase oem
fastboot erase oemkeystore
fastboot erase otp
fastboot erase para
fastboot erase persist
fastboot erase proinfo
fastboot erase protect1
fastboot erase protect2
fastboot erase recovery
fastboot erase seccfg
fastboot erase secro
fastboot erase tee1
fastboot erase tee2
fastboot erase utags
fastboot erase system
fastboot erase userdata
Click to expand...
Click to collapse
I ran all of the above, searching on the forums i find some people that could get the phones back into adb using an sd card but the image files dont match my model number. Is there any way the phone can be recovered?.
R3ISEN said:
Hi guys, im posting this hoping theres a solution for my problem. I was folowing this guide to try install the stock firmware on this device and remove a virus that i wasnt able to remove even after cleaning the user data partiton (it was an anoying bar that started every time the phone booted). Well everything went acording to plan until i send a reboot command trough adb before flashing anything. Now the phone wont turn on and my computer doesnt detect it, doesnt show anything on screen and the computer plays the pluged and unplugged hardware sound constantly.
Click to expand...
Click to collapse
If you PC is making that sound, it is connecting, it may be in some kind of bootloop.
try using wall charger for a few hours.
Moto E4 Guide To Full Stock Firmware Restore and Re-lock Bootloader Any Variant
Note : Do not erase/flash Bootloader file preloader.img or preloader.binfastboot erase preloader fastboot flash preloader preloader.img Do not erase/flash partition table file pgpt.img/gpt.img or pgpt.bin/gpt.binfastboot erase pgpt or gpt...
forum.xda-developers.com
I ran all of the above, searching on the forums i find some people that could get the phones back into adb using an sd card but the image files dont match my model number. Is there any way the phone can be recovered?.
Click to expand...
Click to collapse
Not unless it's in EDL mode, PC will show it as a Qualcomm device.
sd_shadow said:
If you PC is making that sound, it is connecting, it may be in some kind of bootloop.
try using wall charger for a few hours.
Not unless it's in EDL mode, PC will show it as a Qualcomm device.
Click to expand...
Click to collapse
Thanks ill try pluggin it to the wall for a few hours, i will post back with the updates
Well i left it overnight to charge and now ive got the same unplugged and plugged hardware sound on windows but the device manager shows up a "MT65xx preloader" that pops in and out from the list.
Do you think there is good sign?
R3ISEN said:
Well i left it overnight to charge and now ive got the same unplugged and plugged hardware sound on windows but the device manager shows up a "MT65xx preloader" that pops in and out from the list.
Do you think there is good sign?
Click to expand...
Click to collapse
Yes, the MT65xx preloader means you have a MediaTek processor.
The XT1772 MediaTek version is codename is nicklaus.
Try this Flashtool
https://mirrors-obs-2.lolinet.com/firmware/motorola/2016/nicklaus/flashtool/
sd_shadow said:
Yes, the MT65xx preloader means you have a MediaTek processor.
The XT1772 MediaTek version is codename is nicklaus.
Try this Flashtool
https://mirrors-obs-2.lolinet.com/firmware/motorola/2016/nicklaus/flashtool/
Click to expand...
Click to collapse
I dont have the MediaTek DA USB VCOM driver installed, so at the moment it only shows up a unknown device. Could you help my find the correct driver? Also, if i manage to get the tool to flash the phone do i have to untick any component from the list? (like preloader) or i jus select everything?
Thank you in advance
Hey good news i finally was able to resucitate the phone! i found the drivers searching for the device id shown in device manager. I used the latest sp flash tool with my oem rom with all the firmware modules selected and got it working!. Now im trying to relock the bootloader to completly restore it to factory defaults.