Firmware Flash Guide. - Moto G8 Plus Guides, News, & Discussion

Hello, ALOT of people have been having tons of errors from wrong commands lying on the internet. I made a guide to fix that. Hope it works :highfive:
I am not responsible for any bricks but will help for a solution
You Must have your bootloader unlocked.
Android 10: use this link for retail firmware, will work on all device channels excluding AMX. beware.
https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
After downloaded, unzip, open the folder containing all of the files and open powershell or cmd promt window here (shift + right click)
After that use
adb devices
Click to expand...
Click to collapse
to check and make sure your device is recognized. Use these commands after that.
fastboot --set-active=a
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash modem_a NON-HLOS.bin
fastboot flash modem_b NON-HLOS.bin
fastboot flash fsg_a fsg.mbn
fastboot flash fsg_b fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash bluetooth_a BTFM.bin
fastboot flash bluetooth_b BTFM.bin
fastboot flash dsp_a dspso.bin
fastboot flash dsp_b dspso.bin
fastboot flash logo_a logo.bin
fastboot flash logo_b logo.bin
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash system_a system.img_sparsechunk.0
fastboot flash system_a system.img_sparsechunk.1
fastboot flash system_a system.img_sparsechunk.2
fastboot flash system_a system.img_sparsechunk.3
fastboot flash system_a system.img_sparsechunk.4
fastboot flash system_a system.img_sparsechunk.5
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash oem_a oem.img
fastboot flash oem_b oem_other.img
fastboot flash vendor_a vendor.img_sparsechunk.0
fastboot flash vendor_a vendor.img_sparsechunk.1 fastboot flash vendor_b vendor.img_sparsechunk.0 fastboot flash vendor_b vendor.img_sparsechunk.1 fastboot erase carrier
fastboot erase userdata
fastboot erase ddr
fastboot oem fb_mode_clear
fastboot reboot
Click to expand...
Click to collapse
Android 9: Please don't use android 9.
A quick just so you know. TWRP doesn't boot on Android 10. a fix for that is coming soon.
WARNING: DO NOT DOWNGRADE FIRMWARE/ANDROID VERSIONS. IT WILL BRICK YOUR DEVICE!
Good luck all

Hi, for amx devices. How it Will work?
My code Is: amxpe.
I bought in operator from Peru. . I install android 10 soak test AND then pone started having problems with WiFi and I downgrade to android 9. And now its softbricked. I install some android 10 zip from lolinet but its stuck. I have bootloops or initial error message. Please any help

Jidnet said:
Hi, for amx devices. How it Will work?
My code Is: amxpe.
I bought in operator from Peru. . I install android 10 soak test AND then pone started having problems with WiFi and I downgrade to android 9. And now its softbricked. I install some android 10 zip from lolinet but its stuck. I have bootloops or initial error message. Please any help
Click to expand...
Click to collapse
I said in the warning don't install this specific firmware on AMX. I also said don't downgrade, wtf.

@SnowTalker these commands are not working for people same. They are also posing issues for certain users. Like i hard bricked with these commands. Stop posting half-baked stuff! harcd brick.

methuselah said:
@SnowTalker these commands are not working for people same. They are also posing issues for certain users. Like i hard bricked with these commands. Stop posting half-baked stuff! harcd brick.
Click to expand...
Click to collapse
These commands work only fro android 10 firmware and with a unlocked bootloader. I've tested them already they work.

SnowTalker said:
These commands work only fro android 10 firmware and with a unlocked bootloader. I've tested them already they work.
Click to expand...
Click to collapse
lol then again, probably i have also tried them for android 10! And then still it caused hard brick in my device case

methuselah said:
lol then again, probably i have also tried them for android 10! And then still it caused hard brick in my device case
Click to expand...
Click to collapse
What device channel.

I tested your codes in my phone : amxpe, and it works well , I recieve a message at the benning but i think is not main problem , phone now works. thanks I hope you can improve the codes

SnowTalker said:
Hello, ALOT of people have been having tons of errors from wrong commands lying on the internet.
Click to expand...
Click to collapse
The easiest way to fix the problems caused by wrong flash commands is not to post any command.
As you can see nobody cares about your warnings. But later you are the one to blame for it.
Even if you write "your device will self-destruct after using the commands", would they use them anyway.
Always refer to the flashfile.xml

Just a heads-up for anyone with the XT2019-1 version. I just successfully flashed the RETEU
https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
version of Android 10 using my FlashAllPartitions.bat based on flashfile.xml
[url]https://drive.google.com/file/d/1nGl1saSSJEZkCLAucU8RHVNuFQFamP1C/view?usp=sharing
Working great.

WoKoschekk said:
The easiest way to fix the problems caused by wrong flash commands is not to post any command.
As you can see nobody cares about your warnings. But later you are the one to blame for it.
Even if you write "your device will self-destruct after using the commands", would they use them anyway.
Always refer to the flashfile.xml
Click to expand...
Click to collapse
xda has changed a lot. Now anyone with half baked info just comes here and paste something and people tries it and brick their devices. I also used these commands and had flashed ROM which snowy has posted here, even that guy didn't replied afterwards lol when i said my device is hard bricked. So just wait and see what vache says. its horrible to do stuff with this device without proper info.
i guess these threads are nothing more than thanks meter increasing stuff.

methuselah said:
xda has changed a lot. Now anyone with half baked info just comes here and paste something and people tries it and brick their devices. I also used these commands and had flashed rom which snowy has posted here, even that guy didn't replied afterwards lol when i said my device is hard bricked. So just wait and see what vache says. Its horrible to do stuff with this device without proper info.
i guess these threads are nothing more than thanks meter increasing stuff.
Click to expand...
Click to collapse
i said what is your device channel!

methuselah said:
xda has changed a lot. Now anyone with half baked info just comes here and paste something and people tries it and brick their devices. I also used these commands and had flashed ROM which snowy has posted here, even that guy didn't replied afterwards lol when i said my device is hard bricked. So just wait and see what vache says. its horrible to do stuff with this device without proper info.
i guess these threads are nothing more than thanks meter increasing stuff.
Click to expand...
Click to collapse
And when did I once ask for a thanks on this post?

SnowTalker said:
And when did I once ask for a thanks on this post?
Click to expand...
Click to collapse
I do understand the intention of your first post. But you made the same mistake as other users made. Let me explain why.
All firmware .zips for Moto devices on mirrors.lolinet.com or Telegram groups were originally downloaded from Motorola's cloud servers. They are designed to be installed with the manufacturer's flash tools (e.g. LMSA). These tools use the .xml files (flashfile and service) to execute the flash commands that are needed to install the firmware images.
So that means this is Motorola's recommended way to flash your device.
1. By flashing the complete firmware (start with gpt.bin, the GUID partition table) your device switches automatically to slot A. I would like to explain you why but I don't know it exactly.
Since fastboot always uses the active slot, there's no need to specify slot A within your commands. It's not wrong or would mess up sth, but it's not needed.
2. Just because there's a corresponding partition on slot B you don't need to flash all images on A and B. Only images named like '*_other.img' are intended for this.
You also ignored the bootloader in this context. The bootloader consists of several partitions which are also devided in A and B (example Moto G6 Plus)
mmcblk0p1 -> xbl_a
mmcblk0p2 -> xbl_b
mmcblk0p3 -> tz_a
mmcblk0p4 -> tz_b
mmcblk0p5 -> rpm_a
mmcblk0p6 -> rpm_b
mmcblk0p7 -> hyp_a
mmcblk0p8 -> hyp_b
mmcblk0p9 -> devcfg_a
mmcblk0p10 -> devcfg_b
mmcblk0p11 -> pmic_a
mmcblk0p12 -> pmic_b
mmcblk0p13 -> abl_a
mmcblk0p14 -> abl_b
mmcblk0p15 -> cmnlib_a
mmcblk0p16 -> cmnlib64_a
mmcblk0p17 -> cmnlib_b
mmcblk0p18 -> cmnlib64_b
mmcblk0p19 -> keymaster_a
mmcblk0p20 -> keymaster_b
mmcblk0p21 -> storsec_a
mmcblk0p22 -> storsec_b
mmcblk0p23 -> prov_a
mmcblk0p24 -> prov_b
The bootloader.img is structured like the firmware .zip. It contains all the images which define the 'bootloader' and it also contains the commands to flash the images. You'll find them in the header.
<flash partition="xbl" filename="xbl.elf"/>
<flash partition="prov" filename="prov64.mbn"/>
<flash partition="cmnlib" filename="cmnlib.mbn"/>
<flash partition="cmnlib64" filename="cmnlib64.mbn"/>
<flash partition="abl" filename="abl.elf"/>
<flash partition="keymaster" filename="keymaster.mbn"/>
<flash partition="storsec" filename="storsec.mbn"/>
<flash partition="rpm" filename="rpm.mbn"/>
<flash partition="pmic" filename="pmic.elf"/>
<flash partition="hyp" filename="hyp.mbn"/>
<flash partition="tz" filename="tz.mbn"/>
<flash partition="devcfg" filename="devcfg.mbn"/>
I don't know if it's possible to use 'fastboot flash bootloader_b ...' at all.
You should understand that every image of the .zip only needs to be flashed once to the correct partition. So it doesn't make sense to post or use other's flash commands. Which commands need to be used depends on which images you want to flash. This defines the correct flash commands for you.

WoKoschekk said:
I do understand the intention of your first post. But you made the same mistake as other users made. Let me explain why.
All firmware .zips for Moto devices on mirrors.lolinet.com or Telegram groups were originally downloaded from Motorola's cloud servers. They are designed to be installed with the manufacturer's flash tools (e.g. LMSA). These tools use the .xml files (flashfile and service) to execute the flash commands that are needed to install the firmware images.
So that means this is Motorola's recommended way to flash your device.
1. By flashing the complete firmware (start with gpt.bin, the GUID partition table) your device switches automatically to slot A. I would like to explain you why but I don't know it exactly.
Since fastboot always uses the active slot, there's no need to specify slot A within your commands. It's not wrong or would mess up sth, but it's not needed.
2. Just because there's a corresponding partition on slot B you don't need to flash all images on A and B. Only images named like '*_other.img' are intended for this.
You also ignored the bootloader in this context. The bootloader consists of several partitions which are also devided in A and B (example Moto G6 Plus)
mmcblk0p1 -> xbl_a
mmcblk0p2 -> xbl_b
mmcblk0p3 -> tz_a
mmcblk0p4 -> tz_b
mmcblk0p5 -> rpm_a
mmcblk0p6 -> rpm_b
mmcblk0p7 -> hyp_a
mmcblk0p8 -> hyp_b
mmcblk0p9 -> devcfg_a
mmcblk0p10 -> devcfg_b
mmcblk0p11 -> pmic_a
mmcblk0p12 -> pmic_b
mmcblk0p13 -> abl_a
mmcblk0p14 -> abl_b
mmcblk0p15 -> cmnlib_a
mmcblk0p16 -> cmnlib64_a
mmcblk0p17 -> cmnlib_b
mmcblk0p18 -> cmnlib64_b
mmcblk0p19 -> keymaster_a
mmcblk0p20 -> keymaster_b
mmcblk0p21 -> storsec_a
mmcblk0p22 -> storsec_b
mmcblk0p23 -> prov_a
mmcblk0p24 -> prov_b
The bootloader.img is structured like the firmware .zip. It contains all the images which define the 'bootloader' and it also contains the commands to flash the images. You'll find them in the header.
<flash partition="xbl" filename="xbl.elf"/>
<flash partition="prov" filename="prov64.mbn"/>
<flash partition="cmnlib" filename="cmnlib.mbn"/>
<flash partition="cmnlib64" filename="cmnlib64.mbn"/>
<flash partition="abl" filename="abl.elf"/>
<flash partition="keymaster" filename="keymaster.mbn"/>
<flash partition="storsec" filename="storsec.mbn"/>
<flash partition="rpm" filename="rpm.mbn"/>
<flash partition="pmic" filename="pmic.elf"/>
<flash partition="hyp" filename="hyp.mbn"/>
<flash partition="tz" filename="tz.mbn"/>
<flash partition="devcfg" filename="devcfg.mbn"/>
I don't know if it's possible to use 'fastboot flash bootloader_b ...' at all.
You should understand that every image of the .zip only needs to be flashed once to the correct partition. So it doesn't make sense to post or use other's flash commands. Which commands need to be used depends on which images you want to flash. This defines the correct flash commands for you.
Click to expand...
Click to collapse
The thing is I have no intention of just jumping inside the threads. Whenever I read the things that i did wrong and the half baked stuff what comes from unreliable sources, I just try people not to make same mistakes that i did.

methuselah said:
The thing is I have no intention of just jumping inside the threads. Whenever I read the things that i did wrong and the half baked stuff what comes from unreliable sources, I just try people not to make same mistakes that i did.
Click to expand...
Click to collapse
ok sir. Whatever you say

Thanks Lollyjay, works a treat & got me out of trouble.

Related

[Q] xt925 Encryption Unsuccessful - cannot flash

So a year or so ago I flashed up to 4.1.2 (FIDO) on the phone and all worked fine.
Now the phone wont boot, all I get is Encryption Unsuccessful screen. I have tried reFlashing FIDO, and Stock 4.0.4 but RSDlite just throws a message saying "FAIL" - I think is due to a Partition problem. I have access to the Boot menu (10.9B), I have tried wiping the Cache and factory reset - Nothing.
Any Ideas how I can fix the partition and re Flash a ROM?
Have a came error too.
is0lde said:
So a year or so ago I flashed up to 4.1.2 (FIDO) on the phone and all worked fine.
Now the phone wont boot, all I get is Encryption Unsuccessful screen. I have tried reFlashing FIDO, and Stock 4.0.4 but RSDlite just throws a message saying "FAIL" - I think is due to a Partition problem. I have access to the Boot menu (10.9B), I have tried wiping the Cache and factory reset - Nothing.
Any Ideas how I can fix the partition and re Flash a ROM?
Click to expand...
Click to collapse
Waiting for an answer too.
---------- Post added at 11:13 AM ---------- Previous post was at 10:48 AM ----------
KisL said:
Waiting for an answer too.
Click to expand...
Click to collapse
cat /proc/partitions
major minor #blocks name
179 0 15388672 mmcblk0
179 1 102400 mmcblk0p1
179 2 1500 mmcblk0p2
179 3 1500 mmcblk0p3
179 4 512 mmcblk0p4
179 5 256 mmcblk0p5
179 6 140 mmcblk0p6
179 7 192 mmcblk0p7
179 8 512 mmcblk0p8
179 9 4 mmcblk0p9
179 10 1500 mmcblk0p10
179 11 2048 mmcblk0p11
179 12 1500 mmcblk0p12
179 13 500 mmcblk0p13
179 14 500 mmcblk0p14
179 15 512 mmcblk0p15
179 16 1632 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 3072 mmcblk0p18
179 19 2048 mmcblk0p19
179 20 640 mmcblk0p20
179 21 8 mmcblk0p21
179 22 8192 mmcblk0p22
179 23 8 mmcblk0p23
179 24 3072 mmcblk0p24
179 25 1024 mmcblk0p25
179 26 512 mmcblk0p26
179 27 3072 mmcblk0p27
179 28 128 mmcblk0p28
179 29 4096 mmcblk0p29
179 30 512 mmcblk0p30
179 31 10240 mmcblk0p31
259 0 10240 mmcblk0p32
259 1 8192 mmcblk0p33
259 2 138754 mmcblk0p34
259 3 786432 mmcblk0p35
259 4 1523712 mmcblk0p36
259 5 153600 mmcblk0p37
259 6 12608751 mmcblk0p38
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 421180 48 421132 0% /dev
~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
~ # mount /system
mount /system
~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,relatime,user_xatt
r,barrier=1,data=ordered 0 0
mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed:
Invalid argument
please help
KisL said:
Waiting for an answer too.
---------- Post added at 11:13 AM ---------- Previous post was at 10:48 AM ----------
cat /proc/partitions
major minor #blocks name
179 0 15388672 mmcblk0
179 1 102400 mmcblk0p1
179 2 1500 mmcblk0p2
179 3 1500 mmcblk0p3
179 4 512 mmcblk0p4
179 5 256 mmcblk0p5
179 6 140 mmcblk0p6
179 7 192 mmcblk0p7
179 8 512 mmcblk0p8
179 9 4 mmcblk0p9
179 10 1500 mmcblk0p10
179 11 2048 mmcblk0p11
179 12 1500 mmcblk0p12
179 13 500 mmcblk0p13
179 14 500 mmcblk0p14
179 15 512 mmcblk0p15
179 16 1632 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 3072 mmcblk0p18
179 19 2048 mmcblk0p19
179 20 640 mmcblk0p20
179 21 8 mmcblk0p21
179 22 8192 mmcblk0p22
179 23 8 mmcblk0p23
179 24 3072 mmcblk0p24
179 25 1024 mmcblk0p25
179 26 512 mmcblk0p26
179 27 3072 mmcblk0p27
179 28 128 mmcblk0p28
179 29 4096 mmcblk0p29
179 30 512 mmcblk0p30
179 31 10240 mmcblk0p31
259 0 10240 mmcblk0p32
259 1 8192 mmcblk0p33
259 2 138754 mmcblk0p34
259 3 786432 mmcblk0p35
259 4 1523712 mmcblk0p36
259 5 153600 mmcblk0p37
259 6 12608751 mmcblk0p38
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 421180 48 421132 0% /dev
~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
~ # mount /system
mount /system
~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,relatime,user_xatt
r,barrier=1,data=ordered 0 0
mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed:
Invalid argument
Click to expand...
Click to collapse
Any ideas? In Russia no Motorola service. I read about this problem on another phones. It can be crashed internal storage, but why in ADB i can see partitions? How to format all internal storage and parted it like a stock?
My FIDO XT925 also had this problem suddenly. From what I have found so far I have tried to use the stock recovery (hold vol +/- then power button,white menu will pop up, follow the instructions and select recovery with vol +), to update to Jelly bean but that is not working. I have also tried RSD Lite 6 and the flash process always fails to verify even after I modified the xml file. I'm pretty stuck at this point as well, hoping someone can help.
Bumping this. Just happened to my XT925 a day ago. Was working fine, last thing I noticed was googleservices crashing (with the OK button that was stuck in an infinite loop) so I had to hard-shut it off..
Was rooted since last year, but nothing odd happening recently, seemed totally random.. Also did the above, nothing seems to be working, is it bricked?
Also, any way to recover the internal SD card contents?
Weaponx525 said:
My FIDO XT925 also had this problem suddenly. From what I have found so far I have tried to use the stock recovery (hold vol +/- then power button,white menu will pop up, follow the instructions and select recovery with vol +), to update to Jelly bean but that is not working. I have also tried RSD Lite 6 and the flash process always fails to verify even after I modified the xml file. I'm pretty stuck at this point as well, hoping someone can help.
Click to expand...
Click to collapse
Gloomfrost said:
Bumping this. Just happened to my XT925 a day ago. Was working fine, last thing I noticed was googleservices crashing (with the OK button that was stuck in an infinite loop) so I had to hard-shut it off..
Was rooted since last year, but nothing odd happening recently, seemed totally random.. Also did the above, nothing seems to be working, is it bricked?
Also, any way to recover the internal SD card contents?
Click to expand...
Click to collapse
i dont know if i can help, but partition errors need to be fixed with moto fastboot. no other solution will work.
there are a couple of ways to go about this.
1. get moto fastboot and your stock file (if it doesnt contain a partition file your stuck, some do some dont)
flash each partition manually with mfastboot command starting with the partition file (important you flash the partition file first).
2. grab my "script" from the dev forum. make sure you get the "gpt fix" version. DO NOT USE THE SCRIPT AS IS, IT IS FOR 926 ONLY.
you can either:
A. run your commands from that folder as it already has the required moto fastboot.
or
B. delete all the 926 files from that folder
drop in all of your phones files and edit the "win batch file" file to fix any file name mismatches (you only need to flash the partitions i have listed, dont bother adding any more)
i dont recall if i left the "-w" command in there. that is the data wipe command. remove this line entirely if you want to try and keep data.
not sure if this will help, but if you have partition issues, these are the only ways to fix it.
bweN diorD said:
i dont know if i can help, but partition errors need to be fixed with moto fastboot. no other solution will work.
there are a couple of ways to go about this.
1. get moto fastboot and your stock file (if it doesnt contain a partition file your stuck, some do some dont)
flash each partition manually with mfastboot command starting with the partition file (important you flash the partition file first).
2. grab my "script" from the dev forum. make sure you get the "gpt fix" version. DO NOT USE THE SCRIPT AS IS, IT IS FOR 926 ONLY.
you can either:
A. run your commands from that folder as it already has the required moto fastboot.
or
B. delete all the 926 files from that folder
drop in all of your phones files and edit the "xml" file to fix any file name mismatches (you only need to flash the partitions i have listed, dont bother adding any more)
i dont recall if i left the "-w" command in there. that is the data wipe command. remove this line entirely if you want to try and keep data.
not sure if this will help, but if you have partition issues, these are the only ways to fix it.
Click to expand...
Click to collapse
Thanks, can I run some links by you to make sure I'm using the right stuff?
Moto fastboot: http://forum.xda-developers.com/showthread.php?t=1953948
Stock file: http://sbf.droid-developers.org/phone.php?device=6 - Should I use 4.0.4 or 4.1.2? I was on 4.1.2 OTA.
How do you mean flash each partition manually?
2. http://forum.xda-developers.com/showthread.php?t=2474393, downloading the "GPT error fix - Mirror 1" correct?
Is it step 1 OR step 2? Seems like you said you already have the moto fastboot in your link.. Also, what XT926 files are there to delete?
Gloomfrost said:
Thanks, can I run some links by you to make sure I'm using the right stuff?
Moto fastboot: http://forum.xda-developers.com/showthread.php?t=1953948
Stock file: http://sbf.droid-developers.org/phone.php?device=6 - Should I use 4.0.4 or 4.1.2? I was on 4.1.2 OTA.
How do you mean flash each partition manually?
2. http://forum.xda-developers.com/showthread.php?t=2474393, downloading the "GPT error fix - Mirror 1" correct?
Is it step 1 OR step 2? Seems like you said you already have the moto fastboot in your link.. Also, what XT926 files are there to delete?
Click to expand...
Click to collapse
m fastboot (check)
stock file (you have to use one = to or higher than the one currently installed. so 404 is a no)
flash manually (open a command prompt where you have mfastboot saved, connect your phone in fastboot, also make sure you have all of your stock files in the same dir as mfastboot, flash each partition using the mfastboot command and your correct file name. it would be easier if you look at the win batch file file in my gpt script for the proper commands to send rather than me trying to explain it. you will send the commands exactly as i have them in the batch file only correcting for file names and wait for each to finish, make sure its finished some take a bit of time like system.)
gpt utility (check)
step 1 or 2 (some people are lazy (not you obviously and wont go find mfastboot, so i only mentioned it is in my script for convenience)
what 926 files (just delete everything but the mfastboot.exe and the batch file file. all the other files you wont need or can use.
if you want, i can quickly upload the batch file file so you dont have to dl all that just for one file, and you can get the mfastboot from the other thread you posted.
---------- Post added at 06:05 PM ---------- Previous post was at 06:03 PM ----------
Gloomfrost said:
Thanks, can I run some links by you to make sure I'm using the right stuff?
Moto fastboot: http://forum.xda-developers.com/showthread.php?t=1953948
Stock file: http://sbf.droid-developers.org/phone.php?device=6 - Should I use 4.0.4 or 4.1.2? I was on 4.1.2 OTA.
How do you mean flash each partition manually?
2. http://forum.xda-developers.com/showthread.php?t=2474393, downloading the "GPT error fix - Mirror 1" correct?
Is it step 1 OR step 2? Seems like you said you already have the moto fastboot in your link.. Also, what XT926 files are there to delete?
Click to expand...
Click to collapse
OMG, i think my head is up my arse.
you dont want the xml file, you want the windows batch file. let me go edit those post grrrrr
---------- Post added at 06:11 PM ---------- Previous post was at 06:05 PM ----------
Gloomfrost said:
Thanks, can I run some links by you to make sure I'm using the right stuff?
Moto fastboot: http://forum.xda-developers.com/showthread.php?t=1953948
Stock file: http://sbf.droid-developers.org/phone.php?device=6 - Should I use 4.0.4 or 4.1.2? I was on 4.1.2 OTA.
How do you mean flash each partition manually?
2. http://forum.xda-developers.com/showthread.php?t=2474393, downloading the "GPT error fix - Mirror 1" correct?
Is it step 1 OR step 2? Seems like you said you already have the moto fastboot in your link.. Also, what XT926 files are there to delete?
Click to expand...
Click to collapse
ok here are the exact commands (just fix your file name as needed)
mfastboot flash partition gpt_main0.bin
mfastboot flash system system.img.ext4
mfastboot flash boot boot.img
mfastboot -w (this can be omitted if you want to try and save data)
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot reboot
bweN diorD said:
m fastboot (check)
stock file (you have to use one = to or higher than the one currently installed. so 404 is a no)
flash manually (open a command prompt where you have mfastboot saved, connect your phone in fastboot, also make sure you have all of your stock files in the same dir as mfastboot, flash each partition using the mfastboot command and your correct file name. it would be easier if you look at the win batch file file in my gpt script for the proper commands to send rather than me trying to explain it. you will send the commands exactly as i have them in the batch file only correcting for file names and wait for each to finish, make sure its finished some take a bit of time like system.)
gpt utility (check)
step 1 or 2 (some people are lazy (not you obviously and wont go find mfastboot, so i only mentioned it is in my script for convenience)
what 926 files (just delete everything but the mfastboot.exe and the batch file file. all the other files you wont need or can use.
if you want, i can quickly upload the batch file file so you dont have to dl all that just for one file, and you can get the mfastboot from the other thread you posted.
---------- Post added at 06:05 PM ---------- Previous post was at 06:03 PM ----------
OMG, i think my head is up my arse.
you dont want the xml file, you want the windows batch file. let me go edit those post grrrrr
---------- Post added at 06:11 PM ---------- Previous post was at 06:05 PM ----------
ok here are the exact commands (just fix your file name as needed)
mfastboot flash partition gpt_main0.bin
mfastboot flash system system.img.ext4
mfastboot flash boot boot.img
mfastboot -w (this can be omitted if you want to try and save data)
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot reboot
Click to expand...
Click to collapse
Okay thanks. I downloaded your GPT fix, deleted everything inside except mfastboot.exe and the batch file. Then I downloaded the 4.1.2 from sbf and extracted everything inside your utility folder. However, I'm not seeing file extensions.. what's up with that? Like, no bin, no .ext4? I downloaded the Android 4.1.2
Blur_Version.98.21.122002.XT925.RCI.en.CA
I'm going to assume it won't work unless they have file extensions..
Also, if I'll be running mfastboot manually using cmd prompt, why do I need the batch file? --EDIT: Nevermind, you want me to replace what it says with what you wrote here. Gotcha. What do you mean then by 'just fix your file name as needed' - You mean like if the 4.1.2 thing has 'fsg_signed' I should use that in the batch file correct?
Btw sorry, new user limits, have to wait 5 min before edits heh.. =|
Gloomfrost said:
Okay thanks. I downloaded your GPT fix, deleted everything inside except mfastboot.exe and the batch file. Then I downloaded the 4.1.2 from sbf and extracted everything inside your utility folder. However, I'm not seeing file extensions.. what's up with that? Like, no bin, no .ext4? I downloaded the Android 4.1.2
Blur_Version.98.21.122002.XT925.RCI.en.CA
I'm going to assume it won't work unless they have file extensions..
Also, if I'll be running mfastboot manually using cmd prompt, why do I need the batch file?
Click to expand...
Click to collapse
i dont know actually, it might work. you could try going to control panel/folder option/view/hide extensions for known file types and check or uncheck and see if it fixes the issue.
you dont, it was more of a guide assuming you didnt know the sequence and proper commands. but since i posted that, there is no reason if you want to do it manually.
---------- Post added at 06:29 PM ---------- Previous post was at 06:24 PM ----------
Gloomfrost said:
Okay thanks. I downloaded your GPT fix, deleted everything inside except mfastboot.exe and the batch file. Then I downloaded the 4.1.2 from sbf and extracted everything inside your utility folder. However, I'm not seeing file extensions.. what's up with that? Like, no bin, no .ext4? I downloaded the Android 4.1.2
Blur_Version.98.21.122002.XT925.RCI.en.CA
I'm going to assume it won't work unless they have file extensions..
Also, if I'll be running mfastboot manually using cmd prompt, why do I need the batch file? --EDIT: Nevermind, you want me to replace what it says with what you wrote here. Gotcha. What do you mean then by 'just fix your file name as needed' - You mean like if the 4.1.2 thing has 'fsg_signed' I should use that in the batch file correct?
Btw sorry, new user limits, have to wait 5 min before edits heh.. =|
Click to expand...
Click to collapse
no problem
yea if you want to use the batch file and have it do everything for you automatically, you likely would need to fix some file names as the ones in your stock file might not match the ones i have.
for instance
our partition file is: mfastboot flash partition gpt_main0.bin
but your file may be called partition.bin so you would have to change that line to
mfastboot flash partition partition.bin
bweN diorD said:
i dont know actually, it might work. you could try going to control panel/folder option/view/hide extensions for known file types and check or uncheck and see if it fixes the issue.
you dont, it was more of a guide assuming you didnt know the sequence and proper commands. but since i posted that, there is no reason if you want to do it manually.
---------- Post added at 06:29 PM ---------- Previous post was at 06:24 PM ----------
no problem
yea if you want to use the batch file and have it do everything for you automatically, you likely would need to fix some file names as the ones in your stock file might not match the ones i have.
for instance
our partition file is: mfastboot flash partition gpt_main0.bin
but your file may be called partition.bin so you would have to change that line to
mfastboot flash partition partition.bin
Click to expand...
Click to collapse
Okay so this is what I have now in the batch file, along with brackets for clarifications:
mfastboot flash partition partition_signed.bin
mfastboot flash system system_signed.img.ext4 (what extension should this have?)
mfastboot flash boot boot_signed.img
mfastboot -w
mfastboot flash modem_signed.bin
mfastboot erase modemst1 (leave this in even though I don't have any files like that in the package?)
mfastboot erase modemst2 (same as above?)
mfastboot flash fsg fsg_signed.mbn
mfastboot reboot
Should I take out all the extensions in the bat since that package file has none, or add them to the files as per above?
Gloomfrost said:
Okay so this is what I have now in the batch file, along with brackets for clarifications:
mfastboot flash partition partition_signed.bin
mfastboot flash system system_signed.img.ext4 (what extension should this have?) dont put an extension if your file states none, i think it will be fine
mfastboot flash boot boot.img
mfastboot -w delete this line if you want to try and save any data, i doubt either option will effect the success or failure of this mission but i would leave it in if you can
mfastboot flash modem NON-HLOS.bin (don't have anything like this in that package - should i remove this line?) doubt the modems were encrypted so delete this line
mfastboot erase modemst1 (left this in) delete this or you may have no modems, only because we arent re-writing them
mfastboot erase modemst2 (left this in) same as above
mfastboot flash fsg fsg_signed.mbn
mfastboot reboot
Should I take out all the extensions since that package file has none? no, just omit any that dont have extensions in your stock file. if we need to drop back and try another route, i would like to know that we tried the file names as you see them.
Click to expand...
Click to collapse
ok im going to go out on a limb here and make some edits above in red
bweN diorD said:
ok im going to go out on a limb here and make some edits above in red
Click to expand...
Click to collapse
Sorry I edited my previous message again - I have modem_signed. Leave that in instead of NON-HLOS?
Gloomfrost said:
Sorry I edited my previous message again - I have modem_signed. Leave that in instead of NON-HLOS?
Click to expand...
Click to collapse
thats kind of a catch 22, yea lets put that in but still remove the erase lines below it as you are writing the same modem.
bweN diorD said:
thats kind of a catch 22, yea lets put that in but still remove the erase lines below it as you are writing the same modem.
Click to expand...
Click to collapse
sending 'partition' (32 KB)...
OKAY [ 0.022s]
writing 'partition'...
This may take a few seconds, if a
different partition table is being
flashed since we need to backup
and restore a few partitions
Failed to program partition table
FAILED (remote failure)
finished. total time: 0.338s
sending 'system' (30720 KB)...
OKAY [ 2.348s]
writing 'system'...
Failed to erase partition
FAILED (remote failure)
finished. total time: 4.030s
sending 'boot' (10240 KB)...
OKAY [ 0.796s]
writing 'boot'...
Failed to erase partition
Failed to flash partition boot
FAILED (remote failure)
finished. total time: 1.544s
erasing 'userdata'...
Failed to erase partition
FAILED (remote failure)
finished. total time: 0.057s
unknown partition 'modem_signed'
error: cannot determine image filename for 'modem_signed'
sending 'fsg' (2849 KB)...
OKAY [ 0.236s]
writing 'fsg'...
Failed to erase partition
Failed to flash partition fsg
FAILED (remote failure)
finished. total time: 0.383s
rebooting...
finished. total time: 0.005s
Gloomfrost said:
sending 'partition' (32 KB)...
OKAY [ 0.022s]
writing 'partition'...
Click to expand...
Click to collapse
yea, that sucks.
im having the same problem over here.
i made this other user the same updated (not published) script, just because he has a 926, and i can share the script with anyone who needs it. (just to say, i know this is the only method, you are in a bad spot!)
anyways, its the same as you just made with the same results.
have a look to see if maybe one of the simple fixes (not yet confirmed or denied) helped this member.
I really appreciate the efforts here. When I can wrap my head around this I will try as well as post my results. I felt I had hit a brick wall last night and email Motorola Canada for tech support help..
Sent from my SM-N900W8 using Tapatalk
Weaponx525 said:
I really appreciate the efforts here. When I can wrap my head around this I will try as well as post my results. I felt I had hit a brick wall last night and email Motorola Canada for tech support help..
Sent from my SM-N900W8 using Tapatalk
Click to expand...
Click to collapse
Keep me posted on this if you don't mind - after maybe 18 hours at this, I'm going to give up
I find it interesting that I managed to unlock my bootloader (even though it still threw a FAILED (remote failure), but going into fastboot DOES say 'Unlocked Status Code: 3'
I also found some chinese forum where people were posting how to do stuff with fastboot oem codes, but if I do fastboot oem anything it just says 'Restricted oem code'. Meh.
Any new phone suggestions? Something that will hopefully last 2 days with battery like this one did.
Gloomfrost said:
Keep me posted on this if you don't mind - after maybe 18 hours at this, I'm going to give up
I find it interesting that I managed to unlock my bootloader (even though it still threw a FAILED (remote failure), but going into fastboot DOES say 'Unlocked Status Code: 3'
I also found some chinese forum where people were posting how to do stuff with fastboot oem codes, but if I do fastboot oem anything it just says 'Restricted oem code'. Meh.
Any new phone suggestions? Something that will hopefully last 2 days with battery like this one did.
Click to expand...
Click to collapse
I am personally trying harder than usual to fix this phone because the battery life is so awesome. It's still a great deal. I hear the Moto X gets pretty great battery life and its cheaper than Nexus 5 right now. Personally I would wait for the Nexus 6, which is rumored to be be built by Motorola.
I am trying to fix this phone for my wife. Personally I am using a Note 3: great big battery and screen but no loyalty to Samsung. If the Nexus 6 pops up I may not be able to resist
---------- Post added at 05:46 AM ---------- Previous post was at 05:39 AM ----------
I'm trying to keep this phone stock. However I am curious if using Fastboot to unlock and installing custom recovery can work with the partition as screwed up as it is. If so maybe with custom recovery we can properly format the partitions. Thoughts?
Weaponx525 said:
I am personally trying harder than usual to fix this phone because the battery life is so awesome. It's still a great deal. I hear the Moto X gets pretty great battery life and its cheaper than Nexus 5 right now. Personally I would wait for the Nexus 6, which is rumored to be be built by Motorola.
I am trying to fix this phone for my wife. Personally I am using a Note 3: great big battery and screen but no loyalty to Samsung. If the Nexus 6 pops up I may not be able to resist
---------- Post added at 05:46 AM ---------- Previous post was at 05:39 AM ----------
I'm trying to keep this phone stock. However I am curious if using Fastboot to unlock and installing custom recovery can work with the partition as screwed up as it is. If so maybe with custom recovery we can properly format the partitions. Thoughts?
Click to expand...
Click to collapse
After everything sane failed (trying to save the userdata, trying to keep stock), I tried flashing random stuff, including sideloading. Nothing worked. Even the 'unlock' like I said threw an error, though the device does say unlocked. If you manage to successfully install custom recovery please post back how.

What is blankflash?

What is a blankflash file? I have seen people requesting blankflash file for their phones...
Does it help to recover device from bootloop/brick?
A good question.
I see a lot of people glibly saying, "Oh, you have to blankflash first".
I don't know and I have a suspicion that the people who use it don't know either.
I can go to EDL mode (on Qualcomm processors) and wipe every byte in flash to zero (0x00).
Presumably this mystic "blankflash" is something more.
Maybe it's some OEM enforced stupidity where it wipes everything then puts in a signature to say, "No, really, I'm erased".
So, to answer my own question:
Blankflash is a Motorola invention of throwing a bunch of partitions into a tar archive.
You can list it/extract it using 7zip or other utilities.
It's tar-"like", but not tar. Packed inside is:
Code:
programmer
gpt
aboot
rpm
tz
devcfg
cmnlib
cmnlib64
keymaster
prov
sbl1
This is the absolute minimum you need to flash to get fastboot running from aboot.
All of these (except the GPT) are either 32 or 64 bit ELF files with Qualcomm signing.
See: http://www.temblast.com/qcomview.htm
Note, none of this precludes you from using any EDL client to just write all your partitions

[Guide] Resize partition in daisly to install large system images (like miui, one UI)

It is possible to brick your device or future problems caused by this guide
Need flash patched boot image to use parted
1. Download Parted
2.Paste in inside Adb root
3. Boot Twrp
4. Execute in fastboot and adb:
Code:
adb push parted /sbin/parted
adb shell
su (linux users)
cd /sbin && chmod 777 parted
5.
Code:
parted /dev/block/mmcblk0
(start parted)
Parted tutorial
uses "print" and copy results to make backup
Use "help" for list all commands
print - show all partition statuts
Rm (number of partiton) - delete partition
mkpart - create partiton
Code:
[SIZE="4"]exemple:[/SIZE]
mkpart
[FONT="Comic Sans MS"]Partition name?
[/FONT]system_a
[FONT="Comic Sans MS"]File system type?
[/FONT] ext4
[FONT="Comic Sans MS"]Start?
[/FONT] 930
[FONT="Comic Sans MS"]End?
[/FONT]4030
Now we need to name the partitions so the bootloader can find them
name 56
Name?
system_a
​
type "i" or "ignore" to any messages parted gives you which are warnings and not errors, do NOT type yes if it talks about sectors being moved.
in my case:
Code:
print...
....
56 738MB 3423MB 2684MB ext2 system_a
57 3423MB 6107MB 2684MB ext2 system_b
58 6107MB 6912MB 805MB ext2 vendor_a
59 6912MB 7718MB 805MB ext2 vendor_b
60 7718MB 31.3GB 23.6GB ext4 userdata
Deleted 56 to 60 ,and recrate system to 3.1 Gb, keeping vendor intact, and recrate userdata with what remained
Pos resize:
56 738MB 4239MB 3501MB ext2 system_a msftdata
57 4239MB 7740MB 3500MB ext2 system_b
58 7740MB 8546MB 806MB ext2 vendor_a msftdata
59 8546MB 9352MB 806MB ext2 vendor_b
60 9352MB 31.2GB 21.9GB ext4 userdata msftdata
Soon tutorial in images and more detailed (no time this week)...
Font: http://lunarixus.party/oxygenosguide/part1.html​
If i face with a problem or bootloop, flashing stock rom via mi flash will fix everything?
Kineceleran said:
If i face with a problem or bootloop, flashing stock rom via mi flash will fix everything?
Click to expand...
Click to collapse
nop, only to flash large system images like Miui,one ui ....
Do not touch in partitions it if you do not know
this is not proper method.......after this we have to name the partition..without doing this the phone will brick 100%.
........

While on Slot_A Flash copypartitions.zip??

Sorry for the noob question but how do I do "While on Slot_A Flash copypartitions.zip"
I cant find the copypartitions.zip
please help thanks
same here
I have the same problem, new in phone customizing; not computer noob but android; well how unlock bootloader - described, no problem; done; how install twrp or magisk, all infos and links are available;
but copypartitions.zip? what is it, where is it explained or described; when exactly do this thing? when i'm flashing custom rom the first time? after or before it? and where is partitions zip file? flash from PC to phone using fastboot or what? I'm stuck;
if theres forum topic about it , thats all what i'm asking for; just like its for twrp or magisk;
and Yes, i'm aware of this topic https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/, understand idea of A/B partitions but don't understand the meaning of copy A/B partitions zip; what zip? where it is? make backup of A and B partitions using TWRP?
There is nothing to copy and make a backup of
Download the copy A/B partitions zip from here
https://androidfilehost.com/?fid=4349826312261636295
Just flash that zip file in custom recovery directly coming from stock or recently restoring stock firmware.
From wiki.lineageos.org:
In some cases slot b can be unpopulated(*) or contain much older firmware than slot a(**), leading to various issues including a potential hard-brick. We can work around that by copying the contents of slot a to slot b.
(*) new devices which have never done an update before
(**) e.g. an older version of Android
@darko454
You must have an unlocked bootloader to install this or any rom on any Android device.. https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
Magisk isn't mandatory. If you don't want root just don't flash magisk during your installation. While on "slot a" be sure and flash the copy partitions ab zip from the original post here and make sure it installs correctly with no errors on your screen then flash rom and reboot as it says in the op. If it takes you to recovery and prompts for factory reset then factory reset and afterwards you will boot up and be up and running. You can always return to stock by fastboot flashing your stock firmware for your device model. There have been MANY hard bricks on this device because people didn't flash that copy ab zip while on slot a. Also unlike many devices instead of installing custom recovery I recommend booting recovery instead: fastboot boot recovery.img You won't have any freezes on your recovery touch screen when you boot recovery -vs- if you install it.
I use a USB thumb drive and a micro sdcard and keep everything on them and not on my internal storage because when you install a rom on this device you have to format data. That being said ..
How I flash: Move anything and everything I want to keep to either my external sdcard or thumb drive storage. Check mark developer options and USB debugging and take any screen lock is off in security settings, plug up to computer, look on phone for a pop up. If nothing pops up scroll down in developer options to "default USB configuration" and change that to " file transfer" and watch phone for pop up. As soon as it pops up checkmark the box allowing computer to communicate with your phone .. On phone push power and reboot then hold down volume down button until you're in bootloader mode and has a black screen with "start" run fastboot command: fastboot getvar all , That will tell you what slot you're activly on. You want to be on slot a. If you're on slot b then: fastboot set_active a ,Once it goes to slot a then: fastboot reboot bootloader ,then boot recovery: fastboot boot recovery (where "recovery" is replace that word with whatever you renamed your recovery image that you're flashing.)
Wipe data, system, cache, internal storage, format data, flash copy partitions ab zip, flash rom , reboot system. Then it will take you to recovery, select factory reset and confirm and it will then boot system and you'll be up and running.
*I wrote this over on pixel experience rom thread in the Moto g7 power roms section of our forum. Hope it helps someone. I knew nothing about this device when I first came here and I owe what I have learned to xda and everyone who shared about what to do , what not to do....etc but going on telegram group for moto g7 power and reading up has been a great learning experience. Thanks Gabi and Electimon and everyone else on there who helped me. I bricked quite a few times when I first got my device. I got it too early the same day metro pcs at the time was getting them is when I ended up grabbing mine. There was nowhere near the information here there is now. :good:
***Copy partition ab zip is also located in the original post of pixel experience rom here on xda.
Here: https://forum.xda-developers.com/g7-power/development/rom-pixel-experience-plus-t4072061
heres my question. so in slot a, boot twrp and do i install twpermanently before wiping data, system, cache and internal and format datta before installing copy partitions zip an hten the rom an then gapps. I am new at a b flashing and iwant to be sure beforei amke any mistakes that may end up bricking the device.
mrk2815 said:
heres my question. so in slot a, boot twrp and do i install twpermanently before wiping data, system, cache and internal and format datta before installing copy partitions zip an hten the rom an then gapps. I am new at a b flashing and iwant to be sure beforei amke any mistakes that may end up bricking the device.
Click to expand...
Click to collapse
Ok, your current active slot is _a. I give you a step by step guide:
1. boot TWRP with
Code:
fastboot boot twrp-XXX.img
2. do a complete backup of all you can select and store it on your PC or external SD
3. select 'Wipe' > 'Format Data' > type 'yes' > swipe to confirm
4. select 'Reboot' > reboot into bootloader > boot TWRP again
5. now flash:
a) copy-partitions.zip
b) your ROM => will be installed on slot _b
c) TWRP-installer.zip => installs TWRP on both slots​6. select 'Reboot' > reboot into recovery => boot slot changes automatically, no need to change it!
7. now you are on slot _b > flash GApps
8. You don't need to wipe /cache, /data or internal storage because you already formatted /data which stores all these directories. You don't need to wipe /system as well because it was flashed by your ROM.
9. reboot into system and enjoy your ROM!
---------- Post added at 11:32 PM ---------- Previous post was at 11:24 PM ----------
I forgot that your new ROM on slot _b will install a new boot.img also. So it would be better to flash the TWRP-installer.zip after you installed your new ROM. !!Edited steps above to bring them in the right order!!
these steps you explained to me.did they work for you and did your new rom boot after the entire process was complete . hopefully there were no issues after the reboot correct
mrk2815 said:
these steps you explained to me.did they work for you and did your new rom boot after the entire process was complete . hopefully there were no issues after the reboot correct
Click to expand...
Click to collapse
This is a common guide for a A/B device, nothing special
thanks to all the info on the matter. I will b attempting this soon.we will se if i am successful in the new venture of a/b flashing.i have flashed a only devices in the past and i would always have success when flashing.but with the new scheme, its a bit confusing at first.but i will gradually grasp it hopefully.
mrk2815 said:
thanks to all the info on the matter. I will b attempting this soon.we will se if i am successful in the new venture of a/b flashing.i have flashed a only devices in the past and i would always have success when flashing.but with the new scheme, its a bit confusing at first.but i will gradually grasp it hopefully.
Click to expand...
Click to collapse
I "remastered" the guide and now you can follow it steb by step.
WoKoschekk said:
I "remastered" the guide and now you can follow it steb by step.
Click to expand...
Click to collapse
wait so if flash to stock do I need to do this?
Malfrosty said:
wait so if flash to stock do I need to do this?
Click to expand...
Click to collapse
u gonna use a flash script for the stock rom?
WoKoschekk said:
u gonna use a flash script for the stock rom?
Click to expand...
Click to collapse
yeah its what I normally do, but I am confused on if I need to use copypartitions.zip when going to stock
Malfrosty said:
yeah its what I normally do, but I am confused on if I need to use copypartitions.zip when going to stock
Click to expand...
Click to collapse
No
Malfrosty said:
yeah its what I normally do, but I am confused on if I need to use copypartitions.zip when going to stock
Click to expand...
Click to collapse
What's described here in my guide has nothing to do with how a stock rom is being flashed. Use your flash script and you should be fine with that. Use the copy-partition.zip only for custom ROMs.
if one does flash copy partitions at first then rom then gaps then twrp installer then install copy partitions zip again, then reboots recovery an then install rom and gapps and then twrp installer and then reboot system.will that brick the device or not.just wondering.
No, you will only brick your brain, but not your device! Although it does not make any sense to do this, I will try to explain it:
Regarding to this copy-partions.zip from LineageOS, I'll take my Moto G6+ as an example.
Here is the complete partition layout (mmcblk0):
Number Start (sector) End (sector) Size Code Name
1 256 7423 3.5 MiB A012 xbl_a
2 7424 14591 3.5 MiB FFFF xbl_b
3 14592 18687 2.0 MiB A016 tz_a
4 18688 22783 2.0 MiB FFFF tz_b
5 22784 23807 512.0 KiB A018 rpm_a
6 23808 24831 512.0 KiB FFFF rpm_b
7 24832 25855 512.0 KiB A017 hyp_a
8 25856 26879 512.0 KiB FFFF hyp_b
9 26880 27135 128.0 KiB FFFF devcfg_a
10 27136 27391 128.0 KiB FFFF devcfg_b
11 27392 28415 512.0 KiB A01E pmic_a
12 28416 29439 512.0 KiB FFFF pmic_b
13 29440 31487 1024.0 KiB FFFF abl_a
14 31488 33535 1024.0 KiB FFFF abl_b
15 33536 34559 512.0 KiB FFFF cmnlib_a
16 34560 35583 512.0 KiB FFFF cmnlib64_a
17 35584 36607 512.0 KiB FFFF cmnlib_b
18 36608 37631 512.0 KiB FFFF cmnlib64_b
19 37632 38655 512.0 KiB FFFF keymaster_a
20 38656 39679 512.0 KiB FFFF keymaster_b
21 39680 39935 128.0 KiB FFFF storsec_a
22 39936 40191 128.0 KiB FFFF storsec_b
23 40192 40703 256.0 KiB FFFF prov_a
24 40704 41215 256.0 KiB FFFF prov_b
25 41216 266495 110.0 MiB 0700 modem_a
26 266496 491775 110.0 MiB FFFF modem_b
27 491776 491777 1024 bytes A029 fsc
28 491784 491799 8.0 KiB A02C ssd
29 492032 524799 16.0 MiB FFFF dsp_a
30 524800 557567 16.0 MiB FFFF dsp_b
31 557568 559615 1024.0 KiB A01A ddr
32 559616 560639 512.0 KiB FFFF utags
33 560640 561663 512.0 KiB FFFF utagsBackup
34 561664 565759 2.0 MiB A027 modemst1
35 565760 569855 2.0 MiB A028 modemst2
36 569856 590335 10.0 MiB A02A fsg_a
37 590336 610815 10.0 MiB FFFF fsg_b
38 610816 676351 32.0 MiB A026 persist
39 676352 677375 512.0 KiB FFFF frp
40 677376 677631 128.0 KiB FFFF cid
41 677632 710399 16.0 MiB FFFF carrier
42 710400 711423 512.0 KiB FFFF metadata
43 711424 727807 8.0 MiB FFFF kpan
44 727808 858879 64.0 MiB A036 boot_a
45 858880 989951 64.0 MiB FFFF boot_b
46 989952 1022719 16.0 MiB FFFF dto_a
47 1022720 1055487 16.0 MiB FFFF dto_b
48 1055488 1057535 1024.0 KiB A01F misc
49 1057536 1073919 8.0 MiB FFFF logfs
50 1073920 1074431 256.0 KiB A022 apdp
51 1074432 1074943 256.0 KiB A023 msadp
52 1074944 1074945 1024 bytes A024 dpo
53 1074952 1074959 4.0 KiB A021 devinfo
54 1074960 1084175 4.5 MiB FFFF bluetooth_a
55 1084176 1093391 4.5 MiB FFFF bluetooth_b
56 1093392 1160239 32.6 MiB FFFF logo_a
57 1160240 1227087 32.6 MiB FFFF logo_b
58 1227088 1227215 64.0 KiB FFFF vbmeta_a
59 1227216 1227343 64.0 KiB FFFF vbmeta_b
60 1227344 1261567 16.7 MiB FFFF padA
61 1261568 1277951 8.0 MiB FFFF hw
62 1277952 1294335 8.0 MiB FFFF sp
63 1294336 1785855 240.0 MiB FFFF oem_a
64 1785856 2277375 240.0 MiB FFFF oem_b
65 2277376 4145151 912.0 MiB FFFF vendor_a
66 4145152 6012927 912.0 MiB FFFF vendor_b
67 6012928 11649023 2.7 GiB A038 system_a
68 11649024 17285119 2.7 GiB FFFF system_b
69 17285120 122142686 50.0 GiB A03A userdata
Assuming we start on slot A and slot B is empty.
mrk2815 said:
if one does flash copy partitions at first...
Click to expand...
Click to collapse
First of all we should know which partitions are being copied and flashed by the script. Every partition whose name contains a slot will be copied except those:
Code:
# Partitions ignored
IGNORED=" dtbo_a dtbo_b system_a system_b boot_a boot_b vbmeta_a vbmeta_b "
Flashing the script will still leave those ones blank, because you will flash them with your ROM. Always.
=> Result of this step: All parts, especially your bootloader, are now copied to slot B. Except the above mentioned "ignored parts"
mrk2815 said:
...then rom then gaps then twrp installer....
Click to expand...
Click to collapse
Now the ignored parts were flashed by the ROM and slot B is completely written (GApps are only single files and not an image for an entire partition, you could ignore them). TWRP installer patches both boot partitions - slot A+B.
=> Result of this step: Slot A is completely written with your old ROM and TWRP. Slot B is completely written with your new ROM and TWRP.
mrk2815 said:
...then install copy partitions zip again,...
Click to expand...
Click to collapse
=> Slot A is still the same and Slot B is still the same. Remember the ignored parts!
mrk2815 said:
...then reboots recovery an then install rom and gapps and then twrp installer....
Click to expand...
Click to collapse
Reboot sets the active slot to B. So, the ROM will be installed on slot A. TWRP installer patches both slots again.
=> New ROM is installed on both slots now. TWRP was installed a second time = no changes
mrk2815 said:
...and then reboot system.will that brick the device or not.just wondering.
Click to expand...
Click to collapse
=> Reboot sets active slot to A and you will boot into your new ROM on slot A.
Any questions?
thanks for all the explanations .its now more clear on what's going on with a b device flashing. Thanks to your step by step instructions, i was was able to successfully flash my first custom rom to an a b device without any fear of bricking it . Again thanks for the best step by step explanation of hte entire proces of flashing a B devices.
mrk2815 said:
thanks for all the explanations .its now more clear on what's going on with a b device flashing. Thanks to your step by step instructions, i was was able to successfully flash my first custom rom to an a b device without any fear of bricking it . Again thanks for the best step by step explanation of hte entire proces of flashing a B devices.
Click to expand...
Click to collapse
A kind of brain teaser. :laugh:
But you will only hard brick your device if bootloader is blank or corrupted. That's all.

Need a repartitioning expert to restore an omitted partition

I think I did some mistakes while trying to reflash a rom on my Sony Xperia S (lt26i).
I was following this guide, the first time it worked but then I decided to ungoogle my phone but it went bad.
[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo
[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo [GUIDE/TUTORIAL/HOWTO] Upgrade Sony Xperia S (Model LT26i codename nozomi) from Android 2.3.7 to Android 8.1 Oreo / nAOSP Rom This detailed step-by-step guide helps you transform...
forum.xda-developers.com
My problem is that I deleted my OS and TWRP can't read the data partition nor mount to Windows.
So now, with djibe89's help (the OP of the guide), I managed to figure out that my data partition is corrupted.
Using the adb shell, like on step 12 of the guide, I went to the partitions and it gave me this
Omitting empty partition (14)
Disk /dev/block/mmcblk0: 31.9 GB, 31910264832 bytes
4 heads, 16 sectors/track, 973824 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 65 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 65 81 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 129 768 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 769 954240 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 785 800 512 46 Unknown
/dev/block/mmcblk0p6 833 928 3072 4a Unknown
/dev/block/mmcblk0p7 961 1056 3072 4b Unknown
/dev/block/mmcblk0p8 1089 1184 3072 58 Unknown
/dev/block/mmcblk0p9 1217 1376 5120 70 Unknown
/dev/block/mmcblk0p10 1409 1664 8192 83 Linux
/dev/block/mmcblk0p11 1665 2176 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 2177 34944 1048576 83 Linux
/dev/block/mmcblk0p13 34945 42944 256000 83 Linux
~ # fdisk -l /dev/block/mmcblk0
Click to expand...
Click to collapse
The partition 14 should be the data one, that i already merged with the 15 the first time i flashed the rom.
What should I do?
try deleting it and let Android generate new one??
Code:
fastboot erase userdata
fastboot format:ext4 userdata
fastboot reboot
now there's a high chance that your device doesn't support " fastboot format:ext4 userdata "
here's an alternative
fastboot erase userdata <~ never reboot your device after typing this command you would go on infinite bootloop type the next command ...
fastboot reboot recovery <~ if this command does not work and just restarted your device instead of going recovery mode you are now on bootloop ... access recovery mode by pressing combination key instead
via recovery mode do "wipe data / factory reset"
then reboot
ineedroot69 said:
Code:
fastboot erase userdata
fastboot format:ext4 userdata
fastboot reboot
now there's a high chance that your device doesn't support " fastboot format:ext4 userdata "
here's an alternative
fastboot erase userdata <~ never reboot your device after typing this command you would go on infinite bootloop type the next command ...
fastboot reboot recovery <~ if this command does not work and just restarted your device instead of going recovery mode you are now on bootloop ... access recovery mode by pressing combination key instead
via recovery mode do "wipe data / factory reset"
then reboot
Click to expand...
Click to collapse
the first method didn't work because of the format command like you predicted.
then i did the <erase userdata> but i think the <reboot recovery> command isn't available because it returns me the commands list. so i used this command from the list
fastboot reboot-bootloader
Click to expand...
Click to collapse
then unplugged the usb and rebooted on twrp.
now my data partition went back to 0mb (going to wipe -> advanced wipe -> data -> repair or change file system) and i can't even reformat it.
should i re-do the adb procedure to recreate the data partition?
mongolino0 said:
the first method didn't work because of the format command like you predicted.
then i did the <erase userdata> but i think the <reboot recovery> command isn't available because it returns me the commands list. so i used this command from the list
then unplugged the usb and rebooted on twrp.
now my data partition went back to 0mb (going to wipe -> advanced wipe -> data -> repair or change file system) and i can't even reformat it.
should i re-do the adb procedure to recreate the data partition?
Click to expand...
Click to collapse
yes your device won't boot without userdata partition since it got deleted with "fastboot erase userdata" so you need to recreate it by "formatting" it somehow
so i wanted to "recreate" the data partition with adb but now i can't even use adb.
i went to mount on twrp with the phone connected and the cmd still running from 2 hours ago. when I type adb devices I can't find
... is it possible that i did some irreversible mistake?
mongolino0 said:
so i wanted to "recreate" the data partition with adb but now i can't even use adb.
i went to mount on twrp with the phone connected and the cmd still running from 2 hours ago. when I type adb devices I can't find
... is it possible that i did some irreversible mistake?
Click to expand...
Click to collapse
you have TWRP flashed? you can't use it to format data?
also looking at the Sony Xperia S (lt26i) specification it was released back in February 2012 i guess it has serve its purpose for too long it is time for it to retire

Categories

Resources