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 slots6. 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.
Related
Hello guys,,, so i have this galaxy j5 that i think i fu*ed up...
it is rooted and has twrp... (v2.8.7.0) since it was the only one aviable
in bootloader mode doesn't get recognized, it has all the possible drivers installed and tried different cables but nothing...
in twrp recovery mode, if i try anything to wipe or mount i get error message
Could not mount /data
unable to mount storage
and i get at the top an unable to find the crypto footer or something
Failed to wipe dalvik
tried with usb otg, but nothing, not recognized/mounted
i also get internal storage: 0MB
no adb sideload,,, nothing
if this can help it says frp lock Off
Samsung Galaxy J5 Pc Suite and Usb Driver Installation
You should know that if Samsung Galaxy J5 smartphone is powered by a corresponding MTK processor, here is explained how to install the Usb drivers and Pc Suite for the model of this type.
1- Run and use as an administrator if you are Samsung Galaxy J5 Usb drivers and Pc Suite work very precisely and correctly.
2- Enable USB debugging on Samsung Galaxy J5 to do that, please go to Settings> Developer Options.
3- Download the driver to the computer's usb driver Extract files using WinZip or WinRAR, find the file "PdaNetA4150.exe" and start note (Be sure to close all programs).
4-Select the Type phone model (Samsung Galaxy J5 Smartphone), Please select press / click the install button.
Now you just connect Samsung Galaxy J5, there will be a popup message saying your phone is connected. Congratulations you have completed the installation.
thanks the PdaNetA4150.exe file did the trick and now adb get's recognized via twrp
and this is the only place i have acces,,, i cannot boot, no bootloader recognized, nothing...
after everything i try i get unable to mount /data
any command to erase, mount everything?
If you have TWRP, I think ADB works in TWRP whereas if you boot your phone into download/bootloader mode you use fastboot. So what you need to do is find the correct drivers for FASTBOOT NOT ADB as they both do different things, require different drivers and are used in different modes. You might need to manually update them using Device Manager and downloading the drivers.
AtharvD said:
If you have TWRP, I think ADB works in TWRP whereas if you boot your phone into download/bootloader mode you use fastboot. So what you need to do is find the correct drivers for FASTBOOT NOT ADB as they both do different things, require different drivers and are used in different modes. You might need to manually update them using Device Manager and downloading the drivers.
Click to expand...
Click to collapse
the problem is when i put it in bootloader mode, i get no sign of life...
the smartphone used to work fine, but i wanted to hard reset and i clicked Format Data....
after that, no boot, nothing
i saw that i had messed up with partitions...
like really bad.. i don't know how... here is my result
Code:
print
Model: MMC QN16MB (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 19.9MB 15.7MB apnhlos
2 19.9MB 80.2MB 60.2MB modem
3 80.2MB 80.7MB 524kB sbl1
4 80.7MB 80.7MB 32.8kB ddr
5 80.7MB 82.8MB 2097kB aboot
6 82.8MB 83.3MB 524kB rpm
7 83.3MB 83.9MB 524kB qsee
8 83.9MB 84.4MB 524kB qhee
9 84.4MB 87.5MB 3146kB fsg
10 87.5MB 87.5MB 16.4kB sec
11 87.5MB 98.6MB 11.0MB pad
12 98.6MB 109MB 10.5MB param
13 109MB 124MB 14.7MB ext4 efs
14 124MB 127MB 3146kB modemst1
15 127MB 130MB 3146kB modemst2
16 130MB 144MB 13.6MB boot
17 144MB 159MB 15.7MB recovery
18 159MB 172MB 13.1MB fota
19 172MB 180MB 7331kB backup
20 180MB 183MB 3146kB fsc
21 183MB 183MB 8192B ssd
22 183MB 191MB 8389kB ext4 persist
23 191MB 192MB 524kB persistent
24 192MB 201MB 9437kB ext4 persdata
25 201MB 2382MB 2181MB ext4 system
26 2382MB 2592MB 210MB ext4 cache
27 2592MB 2665MB 73.4MB ext4 hidden
28 2665MB 7818MB 5153MB userdata
(parted)
please some moderator if could move this thread to galaxy j support forum!! thanks !!
Read before continue:
http://forum.xda-developers.com/showthread.php?t=1914359
http://forum.xda-developers.com/showthread.php?t=2136738
http://forum.xda-developers.com/showthread.php?t=2345860
http://forum.xda-developers.com/showthread.php?t=3303112
DrGit said:
As I understand it, this only works because the Snapdragon boot ROM (NOT the bootloader, which resides on the eMMC - this is part of the CPU) has a fallback mode which reads the bootloader from an SD card if the eMMC fails.
Click to expand...
Click to collapse
ᴿℓᴚ said:
Check the references below about MSM8960 boot architecture. PBL (Primary Bootloader) Error Handler sequence:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Requirements:
A hardbricked Yuphoria/lettuce (YU5010/YU5010A) - when connected with a PC, it should expose itself as QHUSB_BULK (when no driver is installed)/Qualcomm HS-USB QDLoader 9008 (when appropriate driver is installed).
(Optional) A working Yuphoria/lettuce, if you want to create the recovery image yourself.
A microSD card - contrary to the popular belief, you don't need a 16 GB or bigger one. 1 GB is sufficient.
Win32 Disk Imager (Windows) / dd (*nix).
Information regarding the recovery image:
The partition structure of Yuphoria is as follows:
Code:
Number Start (sector) End (sector) Size Code Name
1 131072 262143 64.0 MiB 0700 modem
2 262144 262145 1024 bytes FFFF fsc
3 262146 262161 8.0 KiB FFFF ssd
4 262162 263185 512.0 KiB FFFF sbl1
5 263186 264209 512.0 KiB 0700 sbl1bak
6 264210 265233 512.0 KiB FFFF rpm
7 265234 266257 512.0 KiB 0700 rpmbak
8 266258 267281 512.0 KiB FFFF tz
9 267282 268305 512.0 KiB 0700 tzbak
10 268306 269329 512.0 KiB FFFF hyp
11 269330 270353 512.0 KiB 0700 hypbak
12 270354 273425 1.5 MiB FFFF modemst1
13 273426 276497 1.5 MiB FFFF modemst2
14 276498 296977 10.0 MiB FFFF splash
15 393216 393279 32.0 KiB FFFF DDR
16 393280 396351 1.5 MiB FFFF fsg
17 396352 396383 16.0 KiB FFFF sec
18 396384 398431 1024.0 KiB FFFF aboot
19 398432 400479 1024.0 KiB 0700 abootbak
20 400480 466015 32.0 MiB FFFF boot
21 466016 531551 32.0 MiB FFFF recovery
22 531552 4725855 2.0 GiB FFFF system
23 4849664 4980735 64.0 MiB FFFF cache
24 4980736 5046271 32.0 MiB FFFF persist
25 5046272 5048319 1024.0 KiB FFFF misc
26 5048320 5049343 512.0 KiB FFFF keystore
27 5049344 5050367 512.0 KiB FFFF config
28 5050368 30785502 12.3 GiB FFFF userdata
From the above table, its evident that dumping the first 200 MB should be enough to include all required partitions, but you can opt for a full dump as well.
To dump, we can use any of the following methods:
Directly to the PC using ADB.
Be rooted, connect to adb shell with root privilege & call dd to dump it in external sdcard.
Without being rooted but on unlocked bootloader, boot to (tethered booted/permanently flashed) TWRP, get shell access in TWRP or via adb shell, call dd to dump it in external sdcard.
For dumping the whole eMMC, use:
Code:
dd if=/dev/block/mmcblk0 of=/external_sd/backup.img bs=512 count=30535646
For dumping first 200 MB, use:
Code:
dd if=/dev/block/mmcblk0 of=/external_sd/backup.img bs=512 count=409600
You can directly write to the external sdcard as well:
Code:
dd if=/dev/block/mmcblk0 of=/dev/block/mmcblk1
Be very careful working with dd! mmcblk0 is the eMMC and mmcblk1 is the external SD card.
Pre-created eMMC dump:
eMMC backup - Google Drive
drive.google.com
It is created from a bootloader unlocked Yuphoria running cm-12.1-YOG4PAS47N build.
The size of the whole dump is ~14.5 GB.
After compression, the size is ~998 MB. Its compressed using 7-Zip & split into 10 parts.
File hashes (SHA-1) are as follows:
Code:
9ce4d504395e1c64fbb6960c781fc537eb6b04a2 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.001
523287e0c3fb85c5c2ca1004a1b8219585845462 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.002
ad88026b7b723adf2591b622ebdb3051220c69d8 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.003
b0c6396ddae119d85c9135a6ff4e3cf122e5823e *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.004
c88b13065babcb7792fd66b877af5f2f4811f710 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.005
bbf88b156bd67d79bd3da64a1b9273d92c1487ee *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.006
99c2be608f8c359caabcd13889828ea1777dde73 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.007
e60acbafd6326d4d000a81128f8195ad0c14342e *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.008
895d7db6e961e56ce5c9e541adddfb72815f44c5 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.009
6267aac32bedcff93f4b873a5bce749b85d0ba09 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.010
0c7639808db3480dd06246e952f1f0d363edf6ba *cm-12.1-YOG4PAS47N-lettuce-eMMC.img
Usage:
Download the eMMC dump created by me or make it yourself.
Use Win32 Disk Imager (Windows) / dd (*nix) to write in a microSD card. I've used a 16 GB Class 10 one.
Insert the sdcard into the hardbricked Yuphoria, insert the battery, press Volume Up key & connect it with PC. It should expose itself as a bootloader/fastboot interface.
Flash official Cyanogen OS - you may need to omit the bootloader unlock/re-lock part.
Profit!
Note:
Try at your own risk! If you've any doubt, please contact with the nearest YU service center & ask them for a replacement.
Credit goes to the countless number of people, who risked their devices to find a working method to unbrick it (especially the girlfriend of my friend, who was forced to lend her device for the experiment).
The process is known to many persons out there - earlier I advised some of the Yureka users to try it out, but didn't get any further feedback. Credit goes to @Jimmyz0r for testing the hypothesis on Yureka on his own.
Please provide detailed feedback regarding your success/failure story, so that this tutorial can be enhanced more.
Reserved for future v1.
Reserved for future v2.
@Titokhan,
I tried using first 100MB dump before using full eMMC dump from Yureka but unfortunately I was unable to boot into fastboot, didn't tried 200MB though. I might make one 200MB dump and try it when I get enough time to brick and unbrick my device again.
PS: thanks for the credit m8
Thank You man For the nice Post I just got my phone back , I sucessfully restore my phone from Hell. It was complete Dead , Showing only qualcomm 9008 mode . I followed ur steps And My mobile is working again ... WAITED 4 mOnths for this Post I though i have to put my phone is trash , But it is working now
After Flashing Phone Nothing Boot Up
After follow your steps and download your EMMC data in 16GB 10class SD Card phone is able to connect with pc in fastboot mode and after i download the firmware and flash this with fastboot on my phone it is not booting up ..when i connect my phone to my it nothing show up any..please send me instrucations what can i do for my phone :crying::crying::crying::crying:
@lakhwinderlucky
1. How did you brick the device?
2. Which was original OS - Cyanogen OS or stock Android?
3. Is there any error while flashing via fastboot?
first my phone start restarting automattically and i thought that
there is any problem in firmware and i download the YU Yuphoria firmware and when i flash the downloaded package the phone become completely dead....now i put my phone in trash and crack it with aa big hammer..now i never purchase aa Yu Phone its all bull ****...without any major reason the phone was unexpetdly dead ...and service center is very poor and they refuse for the replacement in the warranty..anyway now i am free to that phone...:laugh::laugh:
Just one question. Does it matters if bootloader is locked or unlocked ? I have a dead Yuphoria with locked bootloader so just want to make sure before trying this revival guide.
Ruvy said:
Just one question. Does it matters if bootloader is locked or unlocked ? I have a dead Yuphoria with locked bootloader so just want to make sure before trying this revival guide.
Click to expand...
Click to collapse
Shouldn't be a problem - please post your feedback.
I have my friend's Yuphoria, due to some problem, I was asked to re-flash the stock rom, I tried to do the same. At that time it was in working condition, successfully entered the fastboot mode, flashed he file, while flashig I saw some message asking me "" volume up to Continue"" or
"" volume down to Cancel"" .. I don't remember the HEAD of the message, and also I don't remember which button I pressed (vol up or vol down). But the phone got bricked and it was never ON back. Now I nneed to try out your procedure.
My doubt is, are all the 3 procedures required to be done to dump the emmc ? If I have a 16GB memory card with class 4, is it OK ?
Rajatmohod said:
Thank You man For the nice Post I just got my phone back , I sucessfully restore my phone from Hell. It was complete Dead , Showing only qualcomm 9008 mode . I followed ur steps And My mobile is working again ... WAITED 4 mOnths for this Post I though i have to put my phone is trash , But it is working now , If anybody has difficulty to restore this phone , Pls Dont bother to call me .. I will help you to Get back your Phone My cell no. is +919975235086
Click to expand...
Click to collapse
Hi bro,
I am trying to reach you on your mobile but you are not picking up the phone. I have downloaded all the 10 zip filrs, made an image file and tried to write to the micro SD card of 16 GB class 10. But I saw about 67 files in my 16gb memory card and can't find the 25+ files as mentioned in the original post. Please guide me...
Sent from my YU5010 using XDA-Developers mobile app
Titokhan said:
Read before continue:
http://forum.xda-developers.com/showthread.php?t=1914359
http://forum.xda-developers.com/showthread.php?t=2136738
http://forum.xda-developers.com/showthread.php?t=2345860
http://forum.xda-developers.com/showthread.php?t=3303112
Requirements:
A hardbricked Yuphoria/lettuce (YU5010/YU5010A) - when connected with a PC, it should expose itself as QHUSB_BULK (when no driver is installed)/Qualcomm HS-USB QDLoader 9008 (when appropriate driver is installed).
(Optional) A working Yuphoria/lettuce, if you want to create the recovery image yourself.
A microSD card - contrary to the popular belief, you don't need a 16 GB or bigger one. 1 GB is sufficient.
Win32 Disk Imager (Windows) / dd (*nix).
Information regarding the recovery image:
The partition structure of Yuphoria is as follows:
Code:
Number Start (sector) End (sector) Size Code Name
1 131072 262143 64.0 MiB 0700 modem
2 262144 262145 1024 bytes FFFF fsc
3 262146 262161 8.0 KiB FFFF ssd
4 262162 263185 512.0 KiB FFFF sbl1
5 263186 264209 512.0 KiB 0700 sbl1bak
6 264210 265233 512.0 KiB FFFF rpm
7 265234 266257 512.0 KiB 0700 rpmbak
8 266258 267281 512.0 KiB FFFF tz
9 267282 268305 512.0 KiB 0700 tzbak
10 268306 269329 512.0 KiB FFFF hyp
11 269330 270353 512.0 KiB 0700 hypbak
12 270354 273425 1.5 MiB FFFF modemst1
13 273426 276497 1.5 MiB FFFF modemst2
14 276498 296977 10.0 MiB FFFF splash
15 393216 393279 32.0 KiB FFFF DDR
16 393280 396351 1.5 MiB FFFF fsg
17 396352 396383 16.0 KiB FFFF sec
18 396384 398431 1024.0 KiB FFFF aboot
19 398432 400479 1024.0 KiB 0700 abootbak
20 400480 466015 32.0 MiB FFFF boot
21 466016 531551 32.0 MiB FFFF recovery
22 531552 4725855 2.0 GiB FFFF system
23 4849664 4980735 64.0 MiB FFFF cache
24 4980736 5046271 32.0 MiB FFFF persist
25 5046272 5048319 1024.0 KiB FFFF misc
26 5048320 5049343 512.0 KiB FFFF keystore
27 5049344 5050367 512.0 KiB FFFF config
28 5050368 30785502 12.3 GiB FFFF userdata
From the above table, its evident that dumping the first 200 MB should be enough to include all required partitions, but you can opt for a full dump as well.
To dump, we can use any of the following methods:
Directly to the PC using ADB.
Be rooted, connect to adb shell with root privilege & call dd to dump it in external sdcard.
Without being rooted but on unlocked bootloader, boot to (tethered booted/permanently flashed) TWRP, get shell access in TWRP or via adb shell, call dd to dump it in external sdcard.
For dumping the whole eMMC, use:
Code:
dd if=/dev/block/mmcblk0 of=/external_sd/backup.img bs=512 count=30535646
For dumping first 200 MB, use:
Code:
dd if=/dev/block/mmcblk0 of=/external_sd/backup.img bs=1M count=200
You can directly write to the external sdcard as well:
Code:
dd if=/dev/block/mmcblk0 of=of=/dev/block/mmcblk1 bs=1M count=200
Be very careful working with dd! mmcblk0 is the eMMC and mmcblk1 is the external SD card.
Pre-created eMMC dump:
https://drive.google.com/folderview?id=0B9zZIJPXbMsuaGg2SXFHcW5mbzQ&usp=sharing
It is created from a bootloader unlocked Yuphoria running cm-12.1-YOG4PAS47N build.
The size of the whole dump is ~14.5 GB.
After compression, the size is ~998 MB. Its compressed using 7-Zip & split into 10 parts.
File hashes (SHA-1) are as follows:
Code:
9ce4d504395e1c64fbb6960c781fc537eb6b04a2 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.001
523287e0c3fb85c5c2ca1004a1b8219585845462 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.002
ad88026b7b723adf2591b622ebdb3051220c69d8 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.003
b0c6396ddae119d85c9135a6ff4e3cf122e5823e *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.004
c88b13065babcb7792fd66b877af5f2f4811f710 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.005
bbf88b156bd67d79bd3da64a1b9273d92c1487ee *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.006
99c2be608f8c359caabcd13889828ea1777dde73 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.007
e60acbafd6326d4d000a81128f8195ad0c14342e *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.008
895d7db6e961e56ce5c9e541adddfb72815f44c5 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.009
6267aac32bedcff93f4b873a5bce749b85d0ba09 *cm-12.1-YOG4PAS47N-lettuce-eMMC.7z.010
0c7639808db3480dd06246e952f1f0d363edf6ba *cm-12.1-YOG4PAS47N-lettuce-eMMC.img
Usage:
Download the eMMC dump created by me or make it yourself.
Use Win32 Disk Imager (Windows) / dd (*nix) to write in a microSD card. I've used a 16 GB Class 10 one.
Insert the sdcard into the hardbricked Yuphoria, insert the battery, press Volume Up key & connect it with PC. It should expose itself as a bootloader/fastboot interface.
Flash official Cyanogen OS - you may need to omit the bootloader unlock/re-lock part.
Profit!
Note:
Try at your own risk! If you've any doubt, please contact with the nearest YU service center & ask them for a replacement.
Credit goes to the countless number of people, who risked their devices to find a working method to unbrick it (especially the girlfriend of my friend, who was forced to lend her device for the experiment).
The process is known to many persons out there - earlier I advised some of the Yureka users to try it out, but didn't get any further feedback. Credit goes to @Jimmyz0r for testing the hypothesis on Yureka on his own.
Please provide detailed feedback regarding your success/failure story, so that this tutorial can be ehanced more.
Click to expand...
Click to collapse
Dear Mr Titokhan,
I have done the same exercise as was mentioned in post #1 of thsi thread, but nothing has happened. Let me come with my exercise..
* I have downloaded all the 10 files from google drive and made it 1 image file with 7Z
* I have downloaded win32 disk imager and wrote the image to a Samsung 16 GB Class 10 with 48/mbps Memory card
* Inserted this card into the bricked device and pressed volume up and connected the cable to PC for flashing. But nothing came up.
* Tried vol+ and Power button retaining the MC in the device - no use.
* When tried to see the contents of memory card that was written the image file, I could not see anything except 63 mb of free data. (
* When entered the Disk Management I could see number of partitions without any names.
* I have tried with the ROM files, cm-12.1-YOG4PAS47N-lettuce-signed-fastboot-5d674b9b61 and cm-12.0-YNG1TBS2P2-lettuce-signed-fastboot but no use.
I have my friend's Yuphoria, due to some problem, I was asked to re-flash the stock rom, I tried to do the same. At that time it was in working condition, successfully entered the fastboot mode, flashed he file, while flashig I saw some message asking me "" volume up to Continue"" or
"" volume down to Cancel"" .. I don't remember the HEAD of the message, and also I don't remember which button I pressed (vol up or vol down). But the phone got bricked and it was never ON back. Now I need your help.
Note: I have 1 more YU5010 with me and presently using that. Since if it is useful for any type of backup of stock rom, I am just telling you in advance. Please help me with step by step procedure.
@vsrkmurthy
1. Please don't quote the whole first post.
2. Have you matched the hash of the eMMC image after extracting?
3. Windows can't see multi-partitioned removable media; it only shows the first readable partition.
4. After inserting the sdcard, pressing volume up & connecting the device with PC please send me the screenshot of Device Manger.
Titokhan said:
@vsrkmurthy
1. Please don't quote the whole first post.
2. Have you matched the hash of the eMMC image after extracting?
3. Windows can't see multi-partitioned removable media; it only shows the first readable partition.
4. After inserting the sdcard, pressing volume up & connecting the device with PC please send me the screenshot of Device Manger.
Click to expand...
Click to collapse
Thanks for the reply, If you can give me your whatsapp number, I want to send you the screenshots thro' that. Infact, yesterday, Rajat (refer post #5 of this thread) and myself tried a lot by connecting Team Viewer also. But no use. Please give me your contact number so that we can discuss and finalise. else, my number is +919059927728 (whatsapp also).
Bro ; you are a god. Seriously bro ; i went to All shops of NEHRU PLACE; NEW Delhi. They all said ; we can't do it. we(Service centre guys) have to change the motherboard of your YUpHORIA YU5010. and they were asking for ₹3k ;. I literally ordered a new smart phone ; but after reading your post and following each step i got my Yuphoria back. Thank You bro. Hats off to u. Thank You so much bro.
Please give me your contact number
Sent from my 2013023 using XDA-Developers mobile app
eMMc Dump not extracting
Titokhan said:
Shouldn't be a problem - please post your feedback.
Click to expand...
Click to collapse
Hello @Titokhan I have downloaded all the files but they are not extracting i have 16 Gb class 10 samsung card so can you please tell how to only dump necessary files.
Thanks in advance
How did you dump only 100mb?
YuganshT7 said:
Hello @Titokhan I have downloaded all the files but they are not extracting i have 16 Gb class 10 samsung card so can you please tell how to only dump necessary files.
Thanks in advance
Click to expand...
Click to collapse
Jimmyz0r said:
@Titokhan,
I tried using first 100MB dump before using full eMMC dump from Yureka but unfortunately I was unable to boot into fastboot, didn't tried 200MB though. I might make one 200MB dump and try it when I get enough time to brick and unbrick my device again.
PS: thanks for the credit m8
Click to expand...
Click to collapse
Can you tell me how can i Dump only 200mb of eMMc on My SD card . I am on windows
@YuganshT7
Can you please elaborate more? What was the exact error message you got?
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.
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
I have been try to build TWRP for SM-J737S today, finally i got it.
but when I flash it, It say to me "could not do normal boot invalid ramdisk length".
I wanted to fix it, but I couldn't get any information from google
No one may have mentioned it because it is too simple a matter for some people, but I need help with it.
please help me
Post your recovery.
We're not Carnac the Magnificent.
here's my recovery file
Your ramdisk looks ok, it spans from 11c5800 to 2005182.
You have a DTB from 2005800 to 20a0cac
In Android header type 0 (which you have) a DTB should be snuck in after the kernel.
Surely you meant Android header type 2?
Do you have your stock recovery?
I can't sure what is Android header type.
I think I need more study to find what i did wrong...
thanks for your help.
here's stock recovery
Your stock recovery is type 0 and has the dtb after the ramdisk too.
I guess that must be ok for your device, but it seems non-standard.
I'll take another look.
I'm still scratching my head.
In ye olde times pagesize (quantization on Android images) was 4096.
Then they became appalled at the waste of potentially 2048 bytes on a 30 Meg image.
So some folks changed the pagesize to 4096. (Savings!)
Then people decided to park non-header-referenced things after the image.
Oh, boy.
Like AVB0 signatures. These were quantized to 4096 even if the page size was 2048.
So now your (stock) image puts the DTB after the referenced parts of the image.
It's quantized to 2048 (the page size).
It also has this "DTBH" header that I've never seen before.
But we do find 5 (five) dtbs (just in case you want to load this on another model).
And after that in the stock image, we find (at a 2048 quantization) a "SEANDROIDENFORCESignerVer02".
Who the heck knows what that is.
Then there is the obvious issue: Youre recovery is over 32 MB.
Is the partition that big?
surely I need to chack partition size.
I'm trying to get root..
Code:
GPT fdisk (gdisk) version 0.8.4 Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk mmcblk0: 61071360 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 52444E41-494F-2044-4D4D-43204449534B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 1024-sector boundaries
Total free space is 18365 sectors (9.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 8192 16383 4.0 MiB 0700 BOTA0
2 16384 24575 4.0 MiB 0700 BOTA1
3 24576 65535 20.0 MiB 0700 EFS
4 65536 81919 8.0 MiB 0700 CPEFS
5 81920 90111 4.0 MiB 0700 m9kefs1
6 90112 98303 4.0 MiB 0700 m9kefs2
7 98304 106495 4.0 MiB 0700 m9kefs3
8 106496 108543 1024.0 KiB 0700 NAD_REFER
9 108544 124927 8.0 MiB 0700 PARAM
10 124928 190463 32.0 MiB 0700 BOOT
11 190464 268287 38.0 MiB 0700 RECOVERY
12 268288 272383 2.0 MiB 0700 DTBO
13 272384 452607 88.0 MiB 0700 RADIO
14 452608 453631 512.0 KiB 0700 PERSISTENT
15 453632 455679 1024.0 KiB 0700 MISC
16 455680 463871 4.0 MiB 0700 STEADY
17 463872 475135 5.5 MiB 0700 RESERVED2
18 475136 6422527 2.8 GiB 0700 SYSTEM
19 6422528 7454719 504.0 MiB 0700 VENDOR
20 7454720 7864319 200.0 MiB 0700 ODM
21 7864320 8478719 300.0 MiB 0700 CACHE
22 8478720 8499199 10.0 MiB 0700 HIDDEN
23 8499200 8540159 20.0 MiB 0700 OMR
24 8540160 8550399 5.0 MiB 0700 CP_DEBUG
25 8550400 8591359 20.0 MiB 0700 NAD_FW
26 8591360 61061119 25.0 GiB 0700 USERDATA
as you can see, RECOVERY partition is bigger then 38mb.
I have no idea what the problem is
Ok, looking around it seems like that error is just what it says.
There seems to be some hard limit on the size of ramdisks for recovery.
Code:
ramdisk 14,940,546
ungzipped ramdisk 34,343,936
I'm not sure if they mean the gzipped ramdisk or the ungzipped ramdisk (raw cpio).
You've got the kitchen sink in there.
How about getting rid of 99% of that terminfo junk?
You really want the Python stuff?
I tried to make ramdisk smaller today, but I failed.
I couldn't figure out which files were important and which ones weren't.
Actually, I'm used to using linux, but I know very little about Android system
Can you tell me what I should do or search?
@voskresenie
Well, here's a shot for you. I removed all the terminfo and Python stuff.
I had to manually extract the DTB and stick it on the end.
Give it a shot. It weighs in at less than 32MB
now it doesn't say "could not do normal boot invalid ramdisk length", but I can see black screen and irregularly flashing backlight.
is it possible that I solve the ramdisk size problem in the source code?
I think I need to change setting and rebuild TWRP..
Hmm, did you check to see if you had ADB?
Renate said:
Hmm, did you check to see if you had ADB?
Click to expand...
Click to collapse
adb doesn't work.
actually, windows says USB device recognition failure
It could be that I screwed up or that there was an actual problem in your TWRP build.
Are you testing this by fastboot boot recovery.img?
Or are you doing fastboot flash recovery recovery.img?
If you are doing the first one have you tried with the stock recovery image to make sure that works?
most of samsung devices don't have fastboot.
instead of fastboot, they have download mode.
I think the work that i do is play same role fastboot flash recovery recovery.img
It probably looks like separating partitions by file name.
If I use a name other than recovery.img or boot.img, the flash fails.
Did I mention that I hate Samsung and wouldn't take one if you gave it to me?
I did mention that the stock has some custom signature at the end.
Try booting the stock recovery file that you posted like you are trying to boot your TWRP. Does it work?
If it works you can try truncating it yourself to 27,123,712 bytes, 0x019DE000
See if that runs.
If you can't truncate it, I could post it.