[Q] Function of Nexus 5X partitions, and which to back up - Nexus 5X Q&A, Help & Troubleshooting

Hi,
Where can I find an explanation of the Nexus 5X partitions, and which of those are changed during use and are a good idea to back up?
Coming from Nexus 7 3G 2012, I see the 5X has quite a few more partitions. I've searched this site and the wider Internet for their purpose but have come up only with a parted listing without explanation.
E.g. what typically goes into "vendor", why do "system" and "vendor" have "... image" counterparts, and what exactly goes into the crucial "EFS" partition?
Following from that, it seems that an unlocked but otherwise unmodified device can be fully restored from the factory image and a data partition backup (apart from perhaps needing to restore EFS in extreme cases), right?
Or are there other partitions that may get modified during normal use and need to be backed up too?

I've come across one of the answers.
It seems the vendor partition contains the platform-specific drivers/binaries that were previously stored in the /system partition: https://plus.google.com/+JeanBaptisteQueru/posts/akHWypRNEn3.

...and according to this the "... image" selections aren't device partitions, but TWRP options to add fastboot flashable image backups of the corresponding partitions.

fvisagie said:
what exactly goes into the crucial "EFS" partition?
Click to expand...
Click to collapse
Continuing the monologue, although I haven't found a definitive source, most authorative-sounding ones like this one and this one claim it contains device-specific IDs, mostly connectivity, such as IMEI/ESN, Wi-Fi and Bluetooth MAC addresses, network unlock information etc.
fvisagie said:
Following from that, it seems that an unlocked but otherwise unmodified device can be fully restored from the factory image and a data partition backup (apart from perhaps needing to restore EFS in extreme cases), right?
Or are there other partitions that may get modified during normal use and need to be backed up too?
Click to expand...
Click to collapse
I recall from a previous experience that to be completely safe, user data/internal storage (/sdcard) needs to be backed up and restored too. Most Android apps that had been run and had created data on /sdcard before the backup will fail to run if restored without their /sdcard content.

Related

S4 Mini LTE IMEI

Hello,
I have screwed up my IMEI after some risky operations. I have a backup of EFS partition (folder), which is useless, since it doesn't contain my IMEI, which I haven't checked previously and just dumbly/blindly relied on it containing my IMEI. The big question is, where is IMEI stored on galaxy s4 mini LTE (I9195)? I tried to restore using several methods, like:
EFS Professional Qualcomm Tools, by writing my original IMEI, but it still doesn't do any changes, nor before restart of the phone, nor after.
NV Items Reader/Writer - same result as EFS Qualcomm. Same goes to QPST tools.
Tried reboot nvrestore through adb/console, but i haven't had made backup previously.
I guess it stores it in some other partition. Also, after research done, there have been claims that phone stores backup of nv_data in some partition and automatically restores it if there are differences between backup and real imei. Or phone just restores backup automatically on each phone bootup. Either way, I must've screwed really big, since on my adventures both are wiped and my nulled IMEI seems to be right for the phone.
I include a PIT file.
Seems like I am the only one unlucky in this situation, cause there are no similar topic on this forum or internet altogether concerning EFS and I9195.
.PIT FILE
any1?
well i had a i9000 before. and there was always a efs backup made when you installed cm for example. i screwed my imei also more than once on this phone and restored it by installing an factory image from samsung. i has to be a complete image with all parts for odin i think.
OT: here are less developers around. this phone isn't so much supported as i thought it would be. but i really dont want to buy a 5inch just to have developer support so i hope someone will be able to help you.
x10isrooted said:
well i had a i9000 before. and there was always a efs backup made when you installed cm for example. i screwed my imei also more than once on this phone and restored it by installing an factory image from samsung. i has to be a complete image with all parts for odin i think.
OT: here are less developers around. this phone isn't so much supported as i thought it would be. but i really dont want to buy a 5inch just to have developer support so i hope someone will be able to help you.
Click to expand...
Click to collapse
You are right, it does make a some kind of backup, which manually could be made through adb with command "reboot nvbackup", but my problem is that either I don't have that backup, or it somehow has made a backup of efs after it was corrupted. Somewhere in this forum i saw someone writing that reboot nvbackup command backups efs to fsg and backup partitions, but I through-Hex-checked it, no trace of any content of efs/nvdata.(Or it is encrypted somehow.). Also I did recieved backup and fsg partitions of healthy phone, and checked-through it. Same story.
In despair I stormed every single partition on the phone I could reach. The only partition containing contents of efs (also IMEI) was mmcblk0p24, which stores userdata and mounts on root as /data. I doubt it's legitimacy, since as far as I know, it gets wiped after factory reset, so it couldn't be the place sensitive data are stored. Now I am waiting to receive a healthy phones userdata.img.ext4 partition backup to get memory addresses of IMEI location and to be able to write my IMEI in my userdata.img.ext4 backup. Cross fingers, but doubt this will work.
Also, I didn't check loop# and ram# partitions under /dev/block/. This will be my next step, if writing and restoring userdata fails, which probably will.
farewellartist said:
Hello,
I have screwed up my IMEI after some risky operations. I have a backup of EFS partition (folder), which is useless, since it doesn't contain my IMEI, which I haven't checked previously and just dumbly/blindly relied on it containing my IMEI. The big question is, where is IMEI stored on galaxy s4 mini LTE (I9195)? I tried to restore using several methods, like:
EFS Professional Qualcomm Tools, by writing my original IMEI, but it still doesn't do any changes, nor before restart of the phone, nor after.
NV Items Reader/Writer - same result as EFS Qualcomm. Same goes to QPST tools.
Tried reboot nvrestore through adb/console, but i haven't had made backup previously.
I guess it stores it in some other partition. Also, after research done, there have been claims that phone stores backup of nv_data in some partition and automatically restores it if there are differences between backup and real imei. Or phone just restores backup automatically on each phone bootup. Either way, I must've screwed really big, since on my adventures both are wiped and my nulled IMEI seems to be right for the phone.
I include a PIT file.
Seems like I am the only one unlucky in this situation, cause there are no similar topic on this forum or internet altogether concerning EFS and I9195.
Click to expand...
Click to collapse
You've found the address of IMEI? I also did not find my IMEI in a full backup of EFS partition. I also do not believe that it is in mmcblk0p24, if it were, would lose the IMEI on a factory reset.
Sorry for bad English... :silly:
lrdslr said:
You've found the address of IMEI? I also did not find my IMEI in a full backup of EFS partition. I also do not believe that it is in mmcblk0p24, if it were, would lose the IMEI on a factory reset.
Sorry for bad English... :silly:
Click to expand...
Click to collapse
Yes, I think, that I have found it, but this is difficult. I haven't slept for over 40 hours, I'll convert this thread into research thread after I get some sleep. But for now, short version.
Using Cygwin, i have backed up healthy phones every single partition in .RAW format (which backs up not only files, but every single bit of memory) , including phones whole memory partition (mmcblk0), all 7 loop and 15 ram partitions and then hex checked them. What I've discovered is: that none of partitions contain IMEI nor in HEX or STRING format except mmcblk0p24, which contains 24 entries in my case in STRING format. BUT the whole phone memory block (mmcblk0) contains 60+ entries ..
If we weight information (considering all backups were made in .RAW format) that none of the partitions contain IMEI and IMEI is stored in whole memory block, I think we probably can conclude, that IMEI is not stored in any file on the phones memory. (And this is concluded based on information I got on backing up mmcblk0 using cygwin in .bin format. After hex checking file, it also contained around 24 entries, which is roughtly the same as userdata partition.) It is stored in phones memory not as a file, but as written bits in memory, which are not FRS recognizable.
I only I could restore .RAW format backups, this problem could easilly be solved. Damn, if I mange to solve and fill lacking information bits that spoils a big picture, I won't hesitate to spare one day of my life to actually create a tool to solve this. This has been a long and painful process,
Hi, I know this is an old topic, but I 've got same issue and I'd like to know if someone successed to re-write the IMEI on S4 mini LTE.
Thanks.

Weird backup-restore TWRP behaviour

I have been using TWRP for a while and have been saving backups regularly on the external SD-card. I have restored many times after testing some custom ROM.
Today I tried to restore my most recent backup and after it was done, it throws me back into the boot screen.
I can see a long list of previous backups but when I select them I observe the following, which I had not paid attention to before:
1) the most recent backup involves the partitions System and Data
2) the three next backups show no partitions and TWRP refuses to restore them (and I could swear I had restored from them in the past)
3) a very old backup shows System, Data and Boot
4) an older custom ROM backup also shows System, Data and Boot
Can someone please tell me what you think the problem is here? I cannot go back to my most recent backup.
Make sure you've not somehow ended up with 2 twrp folders with different id's as twrp will only recognize the current Id.
If that's the case copy the backups into that folder.
There is only one TWRP folder. It seems some backups contain "Boot" "Data" and "System" and some backups contain only "System" and "Data" and are missing "Boot".
As I only followed the "defaults" when I did the backups, I need to understand why in some cases it did not save "Boot".
Would you know why?
Zilliman said:
There is only one TWRP folder. It seems some backups contain "Boot" "Data" and "System" and some backups contain only "System" and "Data" and are missing "Boot".
As I only followed the "defaults" when I did the backups, I need to understand why in some cases it did not save "Boot".
Would you know why?
Click to expand...
Click to collapse
I've no idea, never come across it, unless you accidentally unchecked those partitions?
In any case none are full backups.
You should make a backup of EFS and modem too.
ashyx said:
I've no idea, never come across it, unless you accidentally unchecked those partitions?
In any case none are full backups.
You should make a backup of EFS and modem too.
Click to expand...
Click to collapse
I have managed to restore an older backup which had Boot, Data and System partitions. I then restored the latest backup which only had Data and System. It now seems to work. I started it up and it all appears to be in place.
I then booted into TWRP and selected to do a backup and it had automatically selected the Data, System and Boot partitions. Why did it leave Boot out of the previous backups I do not understand but will keep an eye on it from now on.
Regarding the EFS partition: Originally I installed the stock ROM using ODIN. Does this mean that all the partitions were created during that initial installation? Or was the EFS partition present beforehand?
EFS partition is not part of the firmware, so is extremely important to back up, probably the most important of all to backup as it contains a lot of information that could render your device useless if it gets corrupted.
OK, thanks, will do it now.
ashyx said:
EFS partition is not part of the firmware, so is extremely important to back up, probably the most important of all to backup as it contains a lot of information that could render your device useless if it gets corrupted.
Click to expand...
Click to collapse
Can we make EFS checked by default? I had no idea that it's that important..
alexeyp said:
Can we make EFS checked by default? I had no idea that it's that important..
Click to expand...
Click to collapse
"Important" - is there anything other than the IMEI to worry about? On my other, dual-SIM Chinese phones, I used to change the IMEI as I liked.
Yes. And it's ONLY 20MB, compared to the other partitions which are many GB in length.
And Restore should be made to have the partition unchecked by default.
Zilliman said:
"Important" - is there anything other than the IMEI to worry about? On my other, dual-SIM Chinese phones, I used to change the IMEI as I liked.
Yes. And it's ONLY 20MB, compared to the other partitions which are many GB in length.
And Restore should be made to have the partition unchecked by default.
Click to expand...
Click to collapse
Check it and it should stay checked.
And yes it contains a lot of important stuff related to imei, wifi, network, Bluetooth.
Lose it and you could be in trouble.
Search Google for more info.

Twrp backup question

Please somebody could explain exactly what i need to backup in twrp? The system image and vendor image are needed? What they are in def? Thanks in advance...
From this forum, "the /vendor partition would only need backing up if you manually made changes to it yourself (for instance, if you use Layers). Otherwise, you can just use the vendor.img from the factory image if you need to restore /vendor."
From this forum, "According to TWRP in regards to System Image... this is a system read-only option that's intended to help you make a pure backup of your system image that you can later flash to receive over-the-air updates after having rooted or ROMed your device."
"The default backup options in TWRP are system, data, and boot. For most cases, this is sufficient for backing up a ROM. (Note that in some rare cases, boot isn’t available for backup on certain devices). If your device has the option, backing up android_secure and/or sd-ext may be a good idea. There’s usually no reason to back up cache or recovery (recovery not available for backup on some devices)." Answer found here.
enzippo said:
Please somebody could explain exactly what i need to backup in twrp? The system image and vendor image are needed? What they are in def? Thanks in advance...
Click to expand...
Click to collapse
Also make sure you backup your efs and keep atleast 2 copies eg 1 on phone and another on computer or in the cloud etc.
You only need to restore this if you loose your imei number due to corruption etc.

[Help] Possible to dump the userdata partition?

So I've just gotten the infamous hardware induced boot loop and I've had my return request honoured by Amazon.
While I still have access to the bootloader (nothing else though) and have time to format the userdata partition, I wondered if there's a way to dump the userdata partition so I can retrieve some data from it later (although it's encrypted, I know the password of course).
If this is possible, how can it be done? And how could I decrypt it if there's a method known? If the method of decryption is not known, I guess I could possibly be able to flash it to my new Pixel when I order it, but I'm not entirely sure where/if there's data included within the raw dump that would specify where the partition should be placed (I've not looked into it and only have 2 days before my device MUST be shipped) maybe as an offset from partitions before it, or maybe a specific block range in the flash memory it would be written to.
If this is far from possible, then I don't mind, the only thing I really want to recover is a few meaningless pictures/videos (they're backed up anyway) and the data for my 2FA app so I can drop it in my new device without needing all the hassle of resetting all the codes my every account I have with 2FA enable...

[UNOFFICIAL][ARM64] TWRP 3.2.3-2 with decrypt [cedric]

Hello
This is a TWRP recovery for Motorola Moto G5 Cedric for arm64 ROMS, with encryption support, backup support for persist and efs partitions and possibility to flash/backup logo boot image.
I need review and test, especially for the storage decryption and/with LineageOS fingers-crossed. I was able to test it on my device (XT1676 3Go).
It is my first ROM so it is possible that there are bugs.
- Be carefull, there are problems with the backup system :
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
- freeZbies
Click to expand...
Click to collapse
Changelog
TWRP 3.2.3-2
add sdcardfs
add FB2PNG for screenshot
fix brightness path and define it at 160
fix time zone error
fix incorrect lun path for USB
You can download it here :
TWRP 3.2.3-2 (md5: 0dbd3846593ae907d3391596876c1f35)
TWRP 3.2.3-1 (md5: 404b54d27653b5a1ec5b59023f53d3cb)
TWRP 3.2.3-0
Sources :
https://github.com/Akipe/twrp_android_device_motorola_cedric
https://github.com/Akipe/twrp_android_device_motorola_msm8937-common
Manifest :
https://github.com/Akipe/android_development_manifest
Would it be possible for you to compile a version capable of backing up all partition, including persist and efs? see here: https://forum.xda-developers.com/showpost.php?p=78695191&postcount=95
Guttergorm said:
Would it be possible for you to compile a version capable of backing up all partition, including persist and efs? see here: https://forum.xda-developers.com/showpost.php?p=78695191&postcount=95
Click to expand...
Click to collapse
Hi!
Sorry for the delay, I added the functions you wanted. Can you try and tell me if everything is ok?
Hi,
tested your recovery image with my installed LOS 15.1. (32bit) Device: XT1676 16GB P5
- storage decryption: OK
- backup support for persist and efs partitions and possibility to flash/backup logo boot image: OK
nice work, thx for you effort
mikefive said:
Hi,
tested your recovery image with my installed LOS 15.1. (32bit) Device: XT1676 16GB P5
- storage decryption: OK
- backup support for persist and efs partitions and possibility to flash/backup logo boot image: OK
nice work, thx for you effort
Click to expand...
Click to collapse
Thx for testing :good:
Akipe can u help us to build treble rom for cedric???
Works nicely, thanks.
I just tested it and it decrypts my internal storage normally.
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
freeZbies said:
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
Click to expand...
Click to collapse
Hello ! Thank you for your test and sorry for your backup
I will test the backup system and add a warning
freeZbies said:
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
Click to expand...
Click to collapse
I have backup up data partition from my TWRP, reboot one time to recovery, restore the data backup with digest verification, and reboot to LineageOS, with no problem (my rom is LineageOS 16.0 without encryption.)
I think there may be 2 errors (maybe more) :
1) There is a problem with data restore when encryption is enable. I can not test this scenario for now, but i will do it as soon as i can
2) Was your backup stored on your SD card? if so, it is possible that the sd card may be damaged, because it is too old or of poor quality (more info here : https://photo.stackexchange.com/questions/40489/what-causes-an-sd-card-to-go-corrupt )
if you have other information or other ideas, do not hesitate to share it!
if people want to participate, try to save the data partition and restore it, especially with the encrypted partition :good::good:
be careful, make a backup of your data before test
Akipe said:
I have backup up data partition from my TWRP, reboot one time to recovery, restore the data backup with digest verification, and reboot to LineageOS, with no problem (my rom is LineageOS 16.0 without encryption.)
I think there may be 2 errors (maybe more) :
1) There is a problem with data restore when encryption is enable. I can not test this scenario for now, but i will do it as soon as i can
2) Was your backup stored on your SD card? if so, it is possible that the sd card may be damaged, because it is too old or of poor quality (more info here : https://photo.stackexchange.com/questions/40489/what-causes-an-sd-card-to-go-corrupt )
if you have other information or other ideas, do not hesitate to share it!
if people want to participate, try to save the data partition and restore it, especially with the encrypted partition :good::good:
be careful, make a backup of your data before test
Click to expand...
Click to collapse
I agree it may be any of the 2 problems.
My data partition was indeed encrypted, and yes, my SD card is not what I would call genuine, though I think that's not the case since the card is relatively new and I never had any problem related to data corruption.
Anyways, thanks for your effort.
freeZbies said:
I agree it may be any of the 2 problems.
My data partition was indeed encrypted, and yes, my SD card is not what I would call genuine, though I think that's not the case since the card is relatively new and I never had any problem related to data corruption.
Anyways, thanks for your effort.
Click to expand...
Click to collapse
I have test backup the data partition with encryption on LineageOS 16 (arm64), backup and restore work without issue
What ROM did you use when you made the backup, and with what arch (arm or arm64) ?
Akipe said:
I have test backup the data partition with encryption on LineageOS 16 (arm64), backup and restore work without issue
What ROM did you use when you made the backup, and with what arch (arm or arm64) ?
Click to expand...
Click to collapse
I was on stock oreo, so its arm, not arm64
freeZbies said:
I was on stock oreo, so its arm, not arm64
Click to expand...
Click to collapse
Oh ok, there are chances that's why the backup did not work .
This recovery is mainly intended for arm64 rom !
Just wanted to say that everything worked well for me in backing up and restoring the OmniROM, on both decrypted and encrypted phone.
Thanks @Akipe for the great job
Can you update it to latest TWRP?
Sent from my cedric using XDA Labs
forgot password to decrypt??
hi,
first, sorry if this is the wrong place to post this. right now, when i install the 64 bit twrp i am asked for a password to decrypt my data. i have tried some passwords i think i would have used, but those don't work and i get a message also saying that the default password didn't work - i haven't typed a default password, though, so i assume there is a default one that twrp tries automatically. in the past, i did try a rom requiring 64 bit twrp and i am guessing i set a password other then the default to encrypt/decrypt, but i went back to stock without issues so have not thought about the password and cannot remember what i would have used. i wanted to try dotos on my phone, which i assume requires 64 twrp because i got error 255 when i tried to flash without twrp64. so i installed twrp64 but cannot get any further. so here are my questions:
is there any way to decrypt the data if i forgot my password?
if not, can i format the data while encrypted to install the new rom? if i can do that, what should i back up? i have pictures and other necessary files backed up, so i am not worried about completely wiping the phone to start over. however, should i back anything else up before formatting? do i need to worry about losing imei or losing any partitions that would make phone inoperable or not have any signal? should i back up with twrp64 or the non-64 bit twrp currently installed? any help or point in the right direction is greatly appreciated.
tia,
nurvus
nurvus said:
hi,
first, sorry if this is the wrong place to post this. right now, when i install the 64 bit twrp i am asked for a password to decrypt my data. i have tried some passwords i think i would have used, but those don't work and i get a message also saying that the default password didn't work - i haven't typed a default password, though, so i assume there is a default one that twrp tries automatically. in the past, i did try a rom requiring 64 bit twrp and i am guessing i set a password other then the default to encrypt/decrypt, but i went back to stock without issues so have not thought about the password and cannot remember what i would have used. i wanted to try dotos on my phone, which i assume requires 64 twrp because i got error 255 when i tried to flash without twrp64. so i installed twrp64 but cannot get any further. so here are my questions:
is there any way to decrypt the data if i forgot my password?
if not, can i format the data while encrypted to install the new rom? if i can do that, what should i back up? i have pictures and other necessary files backed up, so i am not worried about completely wiping the phone to start over. however, should i back anything else up before formatting? do i need to worry about losing imei or losing any partitions that would make phone inoperable or not have any signal? should i back up with twrp64 or the non-64 bit twrp currently installed? any help or point in the right direction is greatly appreciated.
tia,
nurvus
Click to expand...
Click to collapse
You need to format data
Push back button when it asks for decrypt
Goto wipe and select the option on the right to format data
This will erase everything on internal storage so copy any files you want to keep to pc first (pictures music etc)
Once formatted data restart back to recovery to check encryption has been removed and data partition is mountable
TWRP backups do not save personal files (pictures music etc) They only backup data and system files (and other named partitions)
Once you have flashed a new rom you can encrypt again if you want to via the security settings menu in phone settings
TheFixItMan said:
You need to format data
Push back button when it asks for decrypt
Goto wipe and select the option on the right to format data
This will erase everything on internal storage so copy any files you want to keep to pc first (pictures music etc)
Once formatted data restart back to recovery to check encryption has been removed and data partition is mountable
TWRP backups do not save personal files (pictures music etc) They only backup data and system files (and other named partitions)
Once you have flashed a new rom you can encrypt again if you want to via the security settings menu in phone settings
Click to expand...
Click to collapse
thanks for the quick response! and just for clarification and for me to be sure, should i back up any partitions before formatting? right now i have 32 (or non64 i guess) bit twrp installed, stock rom and bootloader unlocked. do i need to take any precautions with data/imei/signal before reinstalling twrp64, formatting data, and installing a new rom? if it matters any i have the international version of the moto g5. thanks again!!
nurvus
nurvus said:
thanks for the quick response! and just for clarification and for me to be sure, should i back up any partitions before formatting? right now i have 32 (or non64 i guess) bit twrp installed, stock rom and bootloader unlocked. do i need to take any precautions with data/imei/signal before reinstalling twrp64, formatting data, and installing a new rom? if it matters any i have the international version of the moto g5. thanks again!!
nurvus
Click to expand...
Click to collapse
Backup efs if you want to preserve your current emei state or need to restore it in future

Categories

Resources