Currently I have installed latest official nightly LineageOS 14.1 on my device. I want to return to stock ROM and lock bootloader. Previously, before bootloader unlocking, I had 6.0.1 stock, version with january security updates (probably).
I have downloaded latest stock 6.0.1 MPD24.107-52 ( https://github.com/motoxplay/stock ).
Unfortunately, I got an error when tried to flash it:
HTML:
$ fastboot flash partition gpt.bin
it returns:
HTML:
(bootloader) Preflash validation failed
same with recovery.img
To lock bootloader I have to flash all stock files.
Any ideas? Thanks
skip it. You cant flash same bootloader and same gpt.bin again.
https://forum.xda-developers.com/mo...de-return-to-stock-relock-bootloader-t3489110
NOTE: You must use a factory firmware image that is the same version as what you have installed or newer to successfully relock the bootloader, you cannot just grab the old (shipped) version from Moto's site. If you attempt to use a firmware image that is older than what you have installed currently, you will receive a Preflash Validation Error indicating such when you attempt to flash the partition table (gpt.bin). At this point you can either continue the flash and NOT lock the bootloader at the end, or stop until you can find the most current image. Moto used to be quite willing to hand these out when they were requested, so if you have a very new firmware installed you may not find one that you can use to relock with on the Internet. Part of the requirements to lock the bootloader is you must successfully flash the partition table (gpt.bin) in order to complete the lock process, if you can't then the bootloader lock process cannot be finished.
Click to expand...
Click to collapse
so i have to wait for the official nougat flashable file.
bump
any workaround?
Related
I'm trying to take my phone back to as stock as possible. Using the requested official firmware pack from Motorola when trying to flash motoboot.img through fastboot it fails everytime saying (bootloader) has-slo:motoboot: not found... error: cannot load "motoboot.img" . Also, when trying to relock my bootloader after typing fastboot oem lock begin it says (bootloader) Please fully flash the signed build before locking phone!
I'm assuming that since motoboot.img isn't flashing that's why it says please fully flash the signed build, because everything else is flashed properly. The phone boots fine and all I'd just like to get rid of the bootloader unlocked screen and have it stock.
Because there is no "motoboot.img" in the zip, only "boot.img" and "bootloader.img".
Ah true, but the command to lock the bootloader still says "Please fully flash the signed build before locking phone!" Any ideas?
"OEM lock begin" says that. You just proceed. The phone is locked at the end with "OEM lock" command.
Lol... OK. so I started over with the fastboot commands using "fastboot oem lock begin" before flashing the rest of the items from the Moto firmware zip. When I get to the system.img I get (bootloader) Invalid signed image and (bootloader) Preflash validation failed.
This phone is ridiculous, back to the nexus 5x... this thing can sit in a drawer and rot
When this happened to me, I just restored via TWRP the stock image backup and flashed stock recovery via fastboot. After that you can flash the same rom via fastboot and lock it but where's the point to lock it anyway? Motorola knows that you unlocked it. And no, the phone is not ridiculous and imho much better than N5x. [emoji4]
Hello,
my goal is to get the latest version of Marshmallow. I think it is MPJ24.139-63
Build number I have is: MPJ24.139-48 with XT1642 retapac (32gb 3gb ram dualsim)
But when I try to update to 139-63 (with the XT1642_MPJ24.139-63_Blur_Version.24.24.4.athene.retail.en.US.zip via recovery mode),
it gives me an error, something like: Package expects build thumbprint of 6.0.1/MPJ24.139-63/64:user/release-keys or 6.0.1/MPJ24.139-23.4/4:user/release-keys; this device has .... (i had 139-48).
Another thing is, I can't flash boot.img or twrp.img, it gives the error: (bootloader) Image not signed or corrupt.
Flashing all the other files work.
I was also able to root earlier (systemless root) by starting twrp temporarely (command: fastboot boot twrp-3.0.2-0-athene.img). I reflashed to my original version, by using ATHENE_MPJ24.139-48_cid50_subsidy-DEFAULT_CFC.xml.zip and the many fastboot commands (only getting error at some files, some recovery and boot img i think, error example see below. It still booted perfectly and original, without root again.
I want root on the latest Marshmallow version (139-63 I think), and not on 139-48.
So, anybody knows how I can reach that?
And the bonus question: just wondering what the reason is for the error when I try to flash some .img, like twrp or boot.img
Code:
fastboot flash boot boot.img
[SIZE="2"](bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:boot: not found
target reported max download size of 536870912 bytes
sending 'boot' (16384 KB)...
OKAY [ 0.516s]
writing 'boot'...
(bootloader) Image not signed or corrupt[/SIZE]
Thanks in advance,
paul
paul-1 said:
So, anybody knows how I can reach that?
And the bonus question: just wondering what the reason is for the error when I try to flash some .img, like twrp or boot.img
Click to expand...
Click to collapse
The image does get flashed. Ignore the error.
zeomal said:
The image does get flashed. Ignore the error.
Click to expand...
Click to collapse
The 139-63 update did not get flashed because it aborts because it is not coming from the suggested version. I used the load from sdcard (internal) from the recovery menu (not twrp but standard recovery menu).
So I can use the XT1642_MPJ24.139-63_Blur_Version.24.24.4.athene.retail.en.US.zip although it says it is not compatible with my 139-48 and stops the recovery process. ?
If it's ok anyway, how to do it? What fastboot commands should I use? Or should I use TWRP? I am on 139-48
If I recall, the updater script checks if your OS build is the correct one to flash onto, else it aborts (as you've found). Is there an update to 139-63 for the Asia Pacific region? I'm just wondering if updating to 139-63 will still keep your radios functioning after the update.
This signed ROM flashed fine on my XT1642 (though it was already updated to 193-63 here in the UK), perhaps have a look and see if it'll fit the bill? https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1643-updated-signed-t3460695
Over the air it shows me that an update is available, the 7.0 version.
But I want to stay on Marshmallow, and want to have the latest version. The phone came with MPJ24.139-48 installed.
I don't know if there is/was an update higher than MPJ24.139-48 for the asia-pac region. But they probably received MPJ24.139-63 too?!
echo92 said:
If I recall, the updater script checks if your OS build is the correct one to flash onto, else it aborts (as you've found). Is there an update to 139-63 for the Asia Pacific region? I'm just wondering if updating to 139-63 will still keep your radios functioning after the update.
This signed ROM flashed fine on my XT1642 (though it was already updated to 193-63 here in the UK), perhaps have a look and see if it'll fit the bill? https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1643-updated-signed-t3460695
Click to expand...
Click to collapse
That 139-63 stock rom is for XT1643 and not for XT1642. So I don't really want to use it.
My Baseband Version: M8952_70009.08.03.45R
So I had this idea: In order to update to the XT1642_MPJ24.139-63_Blur_Version.24.24.4.athene.retail.en.US.zip, I will first downgrade my 139-48 to XT1621-XT1622-XT1642_ATHENE_MPJ24.139-23.4_cid50_subsidy-DEFAULT_CFC.xml.zip. And then it should not show an error when updating from 139-23.4 to 139-63.
So my question now is this: Can I flash to XT1621-XT1622-XT1642_ATHENE_MPJ24.139-23.4_cid50_subsidy-DEFAULT_CFC.xml.zip, although the phone came shipped with MPJ24.139-48 installed on it?
Good morning everyone, i have a horrible problem with my Moto G5 Plus XT1685.
I had the stock version NPNS25.137-33-11 of the firmware a couple of days ago, and i decided to unlock my bootloader and flash one custom rom.
Well, i did it but i realize i can't use Android Pay and i need it.
I tried to flash a firmware via ADB but i'm getting this error when i write "fastboot fash XXX XXX.img"
Code:
(bootloader) Security version downgrade
(bootloader) Image o failed validation
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.689s
I would RELOCK my bootloader and FLASH the original firmware but i can't because of this problem. Who can help me?
Thanks in advance
Unfortunately, to lock your device, you'd likely need the NPNS25.137-33-11 stock firmware to flash; generally, only stock firmwares of the same build or newer than what you have will be able to re-lock your device. Currently, I can't see that particular firmware having been released/leaked.
If you need Android Pay, you may wish to look into rooting and using magisk to hide your unlocked bootloader status, which may give you SafetyNet and Android Pay. I'm not familiar with rooting and with magisk on G5 Plus devices though.
kombocore said:
Good morning everyone, i have a horrible problem with my Moto G5 Plus XT1685.
I had the stock version NPNS25.137-33-11 of the firmware a couple of days ago, and i decided to unlock my bootloader and flash one custom rom.
Well, i did it but i realize i can't use Android Pay and i need it.
I tried to flash a firmware via ADB but i'm getting this error when i write "fastboot fash XXX XXX.img"
Code:
(bootloader) Security version downgrade
(bootloader) Image o failed validation
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.689s
I would RELOCK my bootloader and FLASH the original firmware but i can't because of this problem. Who can help me?
Thanks in advance
Click to expand...
Click to collapse
You can flash any potter fastboot you want, upgrade/downgrade, whatever; just don't flash the bootloader or gpt.
As long as you skip these, you won't have any issues.
FYI, flashing a stock fastboot file will NOT relock your bootloader.
echo92 said:
If you need Android Pay, you may wish to look into rooting and using magisk to hide your unlocked bootloader status, which may give you SafetyNet and Android Pay. I'm not familiar with rooting and with magisk on G5 Plus devices though.
Click to expand...
Click to collapse
Agreed, magisk is the way to go for root and solutions for rooted devices on the g5.
Thanks both for the replies, very helpful.
But how about relocking the bootloader? There is nothing I can do? I know you reply me yet about this, but I just wanna be sure..thanks again
kombocore said:
Thanks both for the replies, very helpful.
But how about relocking the bootloader? There is nothing I can do? I know you reply me yet about this, but I just wanna be sure..thanks again
Click to expand...
Click to collapse
Until the NPNS25.137-33-11 or newer stock firmware comes out, I think you cannot re-lock your bootloader (and as I mentioned, I see no sign of such stock firmware). Only stock ROM firmware of the same build or newer than the bootloader patch level on your device can re-lock your device.
Many thanks sir, very helpful.
I think we solved the problem.
Hello to this amazing community,
I have recently tried for the first time to root my device.
Being unaware of the XDA community, I used this guy's guide - https://theunlockr.com/2016/11/29/root-motorola-moto-g4-moto-g4-plus/ .
As I went through the steps of unlocking, booting TWRP and installing superSU, I found out that the device won't start anymore, though the bootloader was still working at that point.
Unfortunately, that guide didn't emphasized the importance of first backing-up the system with TWRP.
Panicking, I even ended up wiping the entire device.
So I started my sisyphic journey of reviving the phone.
Being clueless of OEM stock versions etc. at this point, I thought that I should look for a fresh TWRP backup someone did after purchasing my exact Moto G4 Plus model - XT1644 so I ended up recovering the version that this dear guy has uploaded:
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1644-stock-unmodified-6-t3536448
Happy as I was that the machine would finally start, I found out I was running an old Marshmallow version - exactly as the title says.
Still, I assumed that new OTA versions will be available and my device will be upgraded to the most up-to-date version.
Surprisingly for a rookie as me, checking for software updates showed " Your device's software is up to date".
So I search for a more up-do-date OEM stock version, and I have found the following version - NPJS25.93-14-13 here:
https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
I ran the bash file to flash the OEM while keeping the device unlocked.
The device has loaded finally with the familiar up-to-date version, and an available OTA update appeared.
I immediately ran the update.
That's when I first became familiar with the term "Brick". The device became completely dead.
Now, thanks to siddhesh9146 inceredible thread I managed to revive the device:
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-hardbrick-solved-guide-t3657761
I went through his steps, installed BlankFlash, flashed the latest gpt and bootloader and flashed version NPJS25.93-14-10.
The device will finally work! I would realize then, that the latest version is actually ATHENE_NPJS25.93-14-13 ,
And again, the device won't show any updates available.
So, finally, here are my questions:
1. What could I have done wrong in first place? Was it a wrong superSU version that caused the problem? (In case my rooting aspirations will return)
2. What caused the device to turn brick? I realize it has to do with downgrading version, but after I wiped the device, I only upgraded versions.
3. In general, when OTA are available? Only the newest stock version would receive OTA? Will I have to manually upgrade versions from now on?
4. Could I upgrade now to NPJS25.93-14-13 using the version that siddhesh9146 presented without wiping my entire phone? What exactly should I flash to do so?
5. What are the precautions I have to take while doing so? Is there a risk my phone will tun brick again?
Thanks!
Good to hear your device is working again, seems like it's been through a journey.
1)When you originally rooted, were you on stock Nougat (7.0)? If so, those rooting guides will not work and are likely for Marshmallow 6.0 systems only. What they fail to mention is that attempting to root whilst still on the stock Motorola Nougat kernel likely causes your device to not boot. The Nougat 7.0 stock kernel for our devices seems to be much stricter than the Marshmallow kernel when it comes to anti-rooting protections. Thus, we generally need to flash a custom kernel onto our devices before rooting - either with SuperSU or magisk. An example of a working guide for rooting on stock Nougat Moto G4/Plus is here: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
2)Do you remember what the OTA you received was? I don't think there's an OTA for a build later than NPJS25.93-14-13 out yet. That suggests that the NPJS25.93-14-13 flash didn't work - did you check if the bash script reported [OKAY] after each command? By brick, do you mean the device had a blinking LED light, and there was no screen, and you were unable to boot to the bootloader and/or recovery? If the flash didn't work, then you may have taken a Marshmallow to Nougat OTA (NPJ25.93-14) which may have corrupted your device bootloader in the process.
3)OTAs are generally available for a particular build and for a particular software channel when they are released. For NPJS25.93-14-13, that's currently the latest build for EU/UK, Brazil and India devices, and there's word that there's a February 2018 OTA coming soon (no sign of it yet).
However, for your device (XT1644), if you are on the retUS - retail US - software channel, your device is on a different update path - NPJ25.93-14.7 would be the corresponding September 2017 patch for retUS software channel devices. NPJS25.93-14-10 is not one of the builds deployed to the retUS, and as such the Motorola servers may not issue you an OTA patch, regardless of whether the firmware would work. There have been reports of NPJS25.93-14-10 and NPJS25.93-14-13 working on US devices without issue, but you may not receive OTA updates.
You could manually update to NPJS25.93-14-13 using the OTA here, provided that you fully flashed the NPJS25.93-14-10 stock ROM (including GPT and bootloader, system, modem, boot, recovery, OEM, DSP, FSG). If you did not fully flash, you may be risking another hardbrick. https://forum.xda-developers.com/showpost.php?p=74973505&postcount=7
4)If you want to flash the NPJS25.93-14-13 stock ROM to be safe, or attempt to cross flash to the Sept 2017 NPJ25.93-14.7 firmware without wiping your data, you can use the following flashing commands. Be warned that you may have to factory reset if your device becomes unstable, so backup anyway. I would recommend manually flashing these commands:
a)copy and paste the first command to the ADB terminal
b)press enter, wait for [OKAY] to appear.
c) copy the next command, individually and in order, to the terminal, repeat b) and c) until you get to the end of the list.
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot reboot
These commands omit the fastboot erase userdata, preserving your data, and omit the OEM locking commands, which would lock your bootloader and erase your data in the process as well. Bear in mind that cross flashing can be risky, however, you may have to flash the NPJ25.93-14.7 update if you wish to receive OTA updates for the retUS software channel, if you are on that software channel. Link for the NPJ25.93-14.7 stock firmware if you wish to try: https://androidfilehost.com/?fid=817906626617945295
5)Generally, the main source of hard bricks I've noted has been users have been on stock Nougat (particularly the March 2017-latest) builds. They downgrade their device to stock Marshmallow firmware, which goes okay. However, in most - if not all - cases, their bootloaders are not downgraded, so you have a system and bootloader mismatch, with a newer Nougat bootloader but an older system than their bootloader patch level. For example, a B1:06 June 2017 patch level bootloader but a July 2016 Marshmallow system patch level.
The OTA checks that are performed are mainly on the system side i.e is your device on the July 2016 system patch? Are your system, OEM, recovery, boot etc. partitions unmodified and match the expected checksums for this OTA patch? If so, then install. However, in the updater script, there is no such check for the bootloader - the OTA updates appear to assume your bootloader is of the same patch level as your system. Normally, for a locked bootloader or for a user that has only updated their device, that assumption holds.
The issue we have here is that the system was downgraded to Marshmallow, so that assumption no longer holds. As the OTA updates are signed by Motorola, they have authorisation to write to your bootloader. That means this OTA can overwrite your bootloader, and if it's applying older code, can corrupt your newer Nougat bootloader and thus hard brick your device, which necessitates a blankflash to repair.
In other words, if you downgrade your device firmware, do not use or install OTA updates. If you do downgrade, only update with stock firmware that is as new or newer than your bootloader patch level. If your device is on the same patch level , then you should be able to use OTA updates. However as mentioned above, you need to be on the correct build for your device software channel as well to receive OTA updates from Motorola.
hi now I no you prob see this title and think oh another 1 but hear me out as I cant find any thing the same as the issue I'm having.
so I followed a rooting guide unlocked bootloader installed twrp all good installed supersu phone wont boot reinstalled twrp systemless installed supersu still nothing I have followed every guide I can find phone will only boot into twrp or bootloader I have flashed custom and stock roms however I do keep getting
target reported max download size of 536870912 bytes
sending 'partition' (32 KB)...
OKAY [ 0.004s]
writing 'partition'...
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.071s
PS C:\Program Files (x86)\Minimal ADB and Fastboot>
I have tried every way I can find still nothing when I try to boot it freezes on the screen saying my phone is unlocked and cant be trusted I'm now lost don't no were to go from here I did not back any thing up as the first thread I read don't say bout it and iv neva had any problems with any of my other phones or games consoles I no games consoles are different any help would be amazing
Most likely the flashing wasn’t complete or corrupted or the stock ROM wasn’t the correct one (Remember to be safe you’d have to flash the original ROM when you bought the phone) that being said. My suggestion you should try flashing TWRP again and boot into TWRP. Then flash stock ROM which will overwrite the current config. Not guaranteed, but it’s worth a shot.
Good luck.
Sent from my iPhone 7 Plus from Tapatalk
Sorry to sound dumb flash it through twrps? I can get twrps to boot but thats it iv flashed through bootloader putting all commands in separate but when i tried to boot it came up with no command with the andriod dude with a red triangle above him but i can flash and boot twrps after this
1) If you're rooting on stock Motorola Nougat ROMs, you need a custom kernel - attempting to root on the stock Motorola hudsoncm kernel usually results in a boot failure or bootloop as you've found. https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918 for a useful guide, you can root with either magisk or SuperSU.
2)That security downgrade error suggests you're attempting to flash stock firmware older than the firmware matching your device's bootloader. If you need newer firmware, you could look into this thread: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You'll need to flash this firmware via fastboot/the bootloader.
3) Try first of all booting into TWRP, copy a custom kernel to your device via a computer and USB cable, and then flash the custom kernel. See if that gets your device booting. If not, you may have to re-flash the stock firmware to get your device booting again (or use a backup, if you had one).
echo92 said:
1) If you're rooting on stock Motorola Nougat ROMs, you need a custom kernel - attempting to root on the stock Motorola hudsoncm kernel usually results in a boot failure or bootloop as you've found. https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918 for a useful guide, you can root with either magisk or SuperSU.
2)That security downgrade error suggests you're attempting to flash stock firmware older than the firmware matching your device's bootloader. If you need newer firmware, you could look into this thread: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You'll need to flash this firmware via fastboot/the bootloader.
3) Try first of all booting into TWRP, copy a custom kernel to your device via a computer and USB cable, and then flash the custom kernel. See if that gets your device booting. If not, you may have to re-flash the stock firmware to get your device booting again (or use a backup, if you had one).
Click to expand...
Click to collapse
If xt1625 amazon not having understood flash RSD firmware ATHENE_NPJS25.93-14-13 (instead ATHENE_AMZ_NPJ25.93-14.7) is there any way to restore the phone's load ?
bootloder lock, oem lock, "we have detected an attempt to flash unauthorized sw on your device"
hlpain said:
If xt1625 amazon not having understood flash RSD firmware ATHENE_NPJS25.93-14-13 (instead ATHENE_AMZ_NPJ25.93-14.7) is there any way to restore the phone's load ?
bootloder lock, oem lock, "we have detected an attempt to flash unauthorized sw on your device"
Click to expand...
Click to collapse
Have you tried to flash this firmware: https://androidfilehost.com/?fid=817906626617956922 That should be the AMZ NPJ25.93-14.7 US firmware (for XT1625 and XT1644)
tried, error gpt bootloader, all firmware below 14-13 not installed, AMZ NPJ25.93-14-13 I did not find it or it does not exist.
hlpain said:
tried, error gpt bootloader, all firmware below 14-13 not installed, AMZ NPJ25.93-14-13 I did not find it or it does not exist.
Click to expand...
Click to collapse
Unfortunately you'd have to wait for a newer firmware, the NPJS25.93-14-13, NPJS25.93-14-15 and NPJS25.93-14-18 firmwares are for retail devices. Amazon devices are on a different firmware and as you've partially flashed the Dec 2017 firmware, you'd likely need AMZ NPJ25.93-14.7-3 or NPJ25.93-14.7-5 (Feb 2018 update), however neither AMZ build appears to be available at the moment.
If you're desperate for a working device, your best bet may be to talk to Amazon or Motorola support, or if your bootloader was previously unlocked, you could try to unlock your bootloader and flash a custom ROM.
I will wait for a new firmware amz