Understanfing partition on S7 - Samsung Galaxy S7 Questions and Answers

Ok guys. I use custom ROM for a while know and I did some mistake that sometime I can fix sometime I can't.
Today I messed with backups and I need help.
I did a full backup using adb directly on my laptop (TWRP recovery).
I tried to restore it using adb restore backup comand line. It didn't worked, why memory got filed up, the phone wouldn't boot, neither on recovery or normal.
I succesfully managed to flash back TWRP using odin, and from there I flashed lineageOS and get my phone to boot.
Evrything was fine but... my external SD isn't regognize anymore, neither by lineage nor TWRP. It just didn't show anywhere, and when I try to mount it in TWRP, the box isn't checkable.
The card is fine, I've tested it on my laptop and on another phone.
So it's either a hardware issue and my phone is broken and it's OK I guess.
Or it's a software issue, and my restoring messed up something, a partition that I'm not aware of, that handles the sd card.
So my question is : what can I try to fix my problem ? And on a larger issue, what are exactly the different partitions on a S7 hardrive, what are their purpose, How can I restore them to their initial state ? How do I identify partition in TWRP ? In Odin ? In Heimdall (I'm a linux user) ? I know that there's something called MoDem, or EFS ? Can someone explain those or point me to a class that explain this ?

No harddrive. The EFS partition is especially important, it contains your phone's unique radio information such as your IMEI. Backup it as soon as possible, if you were to have a rainy day you will thank the stars you made that backup. You could try printing the partition table on ADB shell with gdisk and investigating it.

Wattsensi said:
No harddrive. The EFS partition is especially important, it contains your phone's unique radio information such as your IMEI. Backup it as soon as possible, if you were to have a rainy day you will thank the stars you made that backup. You could try printing the partition table on ADB shell with gdisk and investigating it.
Click to expand...
Click to collapse
df comand line and cat /proc/partition returns this. Can't say if it's right

Using gdisk on /dev/block/mmcblk0 you can print the exact GPT table in a human readable form :^)

Related

[Q] Writing to interal sdcard flash (/mnt/sdcard) galaxy s i9000 not possibe

Hello !
I have a big problem with my galaxy s.
Since January i am working with my JPY firmware quiete fine. On sunday the phone rebooted without anything done by me. Afterwards my homescreen was empty.
Most of my apps are not working now. So i have done a wipe. Nothing, the same. Interesting is, that all my data was still on the device. Then i try to format the internal sd. Not working, no error message. When I delete all files and deinstalled all apps, everthing was gone. After a reboot all data is back on the internal sd as before.
OK then i tried to flash different 1 and 3 file firmware versions with odin(also with repartitioning). But no version is really working and i never get to the homescreen. So I flashed the JPY back. Then everything is like before my first steps. All data is on the phone, i can not delete anything.
I tried do delete the storage also with recovery mode. Nothing.
I tried with adb (android sdk), deleted all files in /mnt/sdcard. After a remount all data appears back.
What can i do to get my phone working ? I have found no possibility so far.
Thanks in advance for your help!
Frederik
Fred001 said:
Hello !
I have a big problem with my galaxy s.
Since January i am working with my JPY firmware quiete fine. On sunday the phone rebooted without anything done by me. Afterwards my homescreen was empty.
Most of my apps are not working now. So i have done a wipe. Nothing, the same. Interesting is, that all my data was still on the device. Then i try to format the internal sd. Not working, no error message. When I delete all files and deinstalled all apps, everthing was gone. After a reboot all data is back on the internal sd as before.
OK then i tried to flash different 1 and 3 file firmware versions with odin(also with repartitioning). But no version is really working and i never get to the homescreen. So I flashed the JPY back. Then everything is like before my first steps. All data is on the phone, i can not delete anything.
I tried do delete the storage also with recovery mode. Nothing.
I tried with adb (android sdk), deleted all files in /mnt/sdcard. After a remount all data appears back.
What can i do to get my phone working ? I have found no possibility so far.
Thanks in advance for your help!
Frederik
Click to expand...
Click to collapse
try to update it using kies or if u have latest version then try flash your device using odn flasher
Thanks for your help harmandeep45. But all this is already done. I worked on this issue little longer and can say that there is some unrepairable problem with the internal sd. I can not delete any partition neither with adb (parted /dev/block/mmcblk0p1 rm). When I do a print everything is there. I am able to mount and unmount the partitions. No problem. But it is not possible to reorganize them. Even if i write on the sdcard partition, after a remount it is as before the write. Maybe the flash memory is broken. Does anybody had the same issue? I already tried the things written in this post, but without luck : http://forum.xda-developers.com/archive/index.php/t-845708.html
I have the same problem, i had installed another firmware on my sgs and start throwing me program errors I had before in my other firmware and when it comes to memory I saw that the folders that were there had not cleared and when I trying to delete the folders and files reappeared.
Ok, what i have tested is to flash different firmware versions. Nothing worked. I used the debug console adb to log in and tried to delete the partitions from /dev/block/mmcblk0 with parted. Nothing happens. I am not able to delete them. I don't want to send the phone to the samsung service, because there is important company data on it, like emails, banking, ebay, etc. I tried to mount it in Linux as usb memory device and used gpartet to create new partitions and overwrite all with dd if=/dev/zero of=/dev/sdb1, but after reboot everything was like before. Is there any other possibility to delete the flash???
Fred001 said:
Ok, what i have tested is to flash different firmware versions. Nothing worked. I used the debug console adb to log in and tried to delete the partitions from /dev/block/mmcblk0 with parted. Nothing happens. I am not able to delete them. I don't want to send the phone to the samsung service, because there is important company data on it, like emails, banking, ebay, etc. I tried to mount it in Linux as usb memory device and used gpartet to create new partitions and overwrite all with dd if=/dev/zero of=/dev/sdb1, but after reboot everything was like before. Is there any other possibility to delete the flash???
Click to expand...
Click to collapse
you have to flash it with jtag box riff, but I doubt you have one, you have to find a place where they have the box

[Q] Emmc got write-protected or frozen

About a month ago my Xoom (MZ605, EOS 3.0) froze and I had to do a hard reset. After that the tablet became unusable due to the neverending stream of Closed Force dialogs. First I thought the fs and or partition table were buggered, but now I have discovered that whatever I do to the emmc, nothing changes at all: Fastboot flash, SBF flashing, fsck and gdisk in recovery (using adb shell). In all cases, the writing and flashing completes without any errors, but when checking for the results, nothing has changed at all.
Any idea on what might have caused this? Or even better: how to make to emmc writable again? If necessary I'm willing to open it up and mess with the hardware.
Thanks!
Have you tried locking and then re-unlocking the boot loader? Just a suggestion, not promising anything.
It will, normally, wipe your internal storage so make sure you backup any necessary data to a computer.
Sent from my SAMSUNG-SGH-I747 using xda premium
Hi d3athsd00r,
I tried that several times, but just be sure I tried it again. Unfortunately it didnt help Thanks for the suggestion anyway! If you or anyone else has any other ideas, please let me know. The personal data on the tablet isn't important btw (just music), so there's no problem if everything is lost.
Have you tried to format everything in cwm under the mounts menu? (Remove sdcard before doing so)
Sent by Samsung Galaxy Nexus (SCH-I515 Verizon LTE) using Tapa2
I use TWRP, but that one seems to do an rm -rf instead of a real format. Either way it has no effect: even after wiping everything several times, nothing changes: all files are still there. The same goes for using an adb shell in recovery and manually doing an ext4 format. No matter what I do, the data on the internal storage seems frozen or write protected.
ioish said:
I use TWRP, but that one seems to do an rm -rf instead of a real format. Either way it has no effect: even after wiping everything several times, nothing changes: all files are still there. The same goes for using an adb shell in recovery and manually doing an ext4 format. No matter what I do, the data on the internal storage seems frozen or write protected.
Click to expand...
Click to collapse
I would say your recovery is faulty. Try an earlier version or a different kind
Sent from my Xoom
Hi cdexsw
The problem is that flashing has no effect: when I do a fastboot flash or even RSD Lite, the commands complete without error. However after that nothing seems to have changed: the recovery stays the same, the rom (EOS 3 at the moment) stays the same and all my personal data is still there even although I did an oem lock and then oem unlock several times. It seems that whatever I do, the internal storage doesn't change a single byte. I even used dd if=/dev/zero =/dev/block/mmcblk0p10 (and also on the system and cache partitions) in an adb shell to wipe the userdata completely, but it doesn't do anything at all. So I simply can't seem to replace the recovery since not even flashing has any effect.
ioish said:
Hi cdexsw
The problem is that flashing has no effect: when I do a fastboot flash or even RSD Lite, the commands complete without error. However after that nothing seems to have changed: the recovery stays the same, the rom (EOS 3 at the moment) stays the same and all my personal data is still there even although I did an oem lock and then oem unlock several times. It seems that whatever I do, the internal storage doesn't change a single byte. I even used dd if=/dev/zero =/dev/block/mmcblk0p10 (and also on the system and cache partitions) in an adb shell to wipe the userdata completely, but it doesn't do anything at all. So I simply can't seem to replace the recovery since not even flashing has any effect.
Click to expand...
Click to collapse
odd indeed....have u looked to see if any other devices from other makes have had a similar issue?
Sent by Samsung Galaxy Nexus (SCH-I515 Verizon LTE) using Tapa2
I looked a lot on google, but didn't find anything relevant to my case. I even tried to find the datasheet of the chip to if there's a pin (ball) that controls the read-only, like a switch would. Unfortunately it doesn't seem to be publicly available on the internet.
The only topics I found to remotely relevant is:
http://discussions.nokia.com/t5/Maemo-and-MeeGo-Devices/Memory-In-Readonly-Cannot-Flash-EMMC/td-p/1030885
bu that doesn't have any relevant info.
Are you familiar with linux?
If you are, check out the first post on page 2 of this thread.
http://forum.xda-developers.com/showthread.php?t=1609825&page=2
Sent from my SGH-I747 using xda premium
Yep, quite familiar
That indeed sounds the same as my problem, but I already ran fsck a million times and everytime it complains that there are problems with the journal and won't continue. Either way, there do seem to be FS errors, because when mounting the partition it says it's fixing certain errors (very few) and then continues to mount it RW. After trying to change anything, the kernel drops the partition into RO mode. "mount" continues to show it as rw though.
That's why I tried doing an mke2fs, which completes succesfully, but it seems that the changes are only in RAM and never persisted to emmc.
ioish said:
Yep, quite familiar
That indeed sounds the same as my problem, but I already ran fsck a million times and everytime it complains that there are problems with the journal and won't continue. Either way, there do seem to be FS errors, because when mounting the partition it says it's fixing certain errors (very few) and then continues to mount it RW. After trying to change anything, the kernel drops the partition into RO mode. "mount" continues to show it as rw though.
That's why I tried doing an mke2fs, which completes succesfully, but it seems that the changes are only in RAM and never persisted to emmc.
Click to expand...
Click to collapse
Very odd indeed. I might have missed this but have you tried installing CWM (not TWRP as it only does the rm) and attempting to do a format from there?
Sent from my SGH-I747 using xda premium
I did try installing CWM using fastboot flash and also a newer version of TWRP and the command completes succesfully, no errors on the screen. When booting into recovery, the same TWRP is still there, as if I never flashed anything
Same problem with my Moto G. Nothing gets flashed. emmc is just write protected and I cannot mount anything

twpr backup from a nexus to another nexus

Hi guys,
I own a Nexus 5 16gb with purenexus 6.01 I'm buying another 32gb and to speed things up I would like to transfer the Nandroid backup of the first on thesecond.it can do? there would be stability problems?
i will use the 32gb as main phone and the 16gb for "home experiments" about rom, kernels and another...
thank you
It is possible to restotre it, but HELL DONT EVER RESTORE EFS!!!! it will mess up the imei and you will loose conectivity
aciupapa said:
It is possible to restotre it, but HELL DONT EVER RESTORE EFS!!!! it will mess up the imei and you will loose conectivity
Click to expand...
Click to collapse
of course, just boot, system and data (cache?).
I'm just afraid that in the boot.img is saved some serial number [phone, or a wifi mac address] that do not meet on the other device, can lead to malfunctions or brick
Luca TIR said:
of course, just boot, system and data (cache?).
I'm just afraid that in the boot.img is saved some serial number [phone, or a wifi mac address] that do not meet on the other device, can lead to malfunctions or brick
Click to expand...
Click to collapse
I have been restoring all of my partitions with twrp for a long time, no problems. TeamWin had informed users that restoring the EFS partition on a specific device (nexus 5x, 6, don't remember exactly) would brick the device. But restoring your 16gb backup to a 32gb device might have other problems such as not seeing your entire memory.
Judging by the fact that if you flash your 32gb nexus 5 with the google factory image then you have to manually "wipe data/factory reset" via recovery to get it to recognize 32gb (or else it says you have only 16, small heart attack there), then that means that the memory capacity is defined somewhere in the software (obviously). Also, the partitions would be of different sizes. You'd have no problem transferring backups between identical devices, though when you have a different memory storage, you need to reinstall everything.
Hardware information such as MAC adresses are not saved anywhere, they are retrieved at runtime. Consider that you can even change a MAC address on the fly and the device would have no problem with it as long as you turn it off and on again (ifconfig wlan0 down && ifconfig wlan0 up) (as far as the OS is concerned, because you can't truly change it, I think it's hardware defined). Same goes for IMEI etc. But the flash memory consists of many partitions that need to be of specific size. If you restore a partition with different size than it's original one, you might soft brick it.
In conclusion, no, don't transfer your backup. Unlock the device, flash recovery, flash zips, setup your device again...
chrisk44 said:
I have been restoring all of my partitions with twrp for a long time, no problems. TeamWin had informed users that restoring the EFS partition on a specific device (nexus 5x, 6, don't remember exactly) would brick the device. But restoring your 16gb backup to a 32gb device might have other problems such as not seeing your entire memory.
Judging by the fact that if you flash your 32gb nexus 5 with the google factory image then you have to manually "wipe data/factory reset" via recovery to get it to recognize 32gb (or else it says you have only 16, small heart attack there), then that means that the memory capacity is defined somewhere in the software (obviously). Also, the partitions would be of different sizes. You'd have no problem transferring backups between identical devices, though when you have a different memory storage, you need to reinstall everything.
Hardware information such as MAC adresses are not saved anywhere, they are retrieved at runtime. Consider that you can even change a MAC address on the fly and the device would have no problem with it as long as you turn it off and on again (ifconfig wlan0 down && ifconfig wlan0 up) (as far as the OS is concerned, because you can't truly change it, I think it's hardware defined). Same goes for IMEI etc. But the flash memory consists of many partitions that need to be of specific size. If you restore a partition with different size than it's original one, you might soft brick it.
In conclusion, no, don't transfer your backup. Unlock the device, flash recovery, flash zips, setup your device again...
Click to expand...
Click to collapse
clear, precise and convincing ... you're right .especially different partitioning and memory size did not convince me, you have confirmed to me. I try suffered some rom nougat when I get the device
p.s.:no small heart attack please, i'm an ambulance driver :laugh: (really)
many thanks
The emulated sdcard is not backed up by twrp anyway. I would just adb pull that partition and then push all the files back on the knew device. Data and system should be fine with twrp.
(apparently) it's working!!!
Today, I received the "twin"
just out of curiosity I tried to restore the backup on the 16gb and 32gb [purenexus 6.01] and all seems to work.but I have yet to test it.
Now I go to work tomorrow I put the sim card and use it normally to confirm that everything is ok.
p.s.:the data on the free / busy sd internal memory are righteous

What would happpen if i zero-filled the entire storage?

I'm new to rooting and installing new roms on android systems, but i work making custom linux and windows systems and optimizing for over a decade.
So, my optimizing spirit is tingling to try everything, but this particular thing is just a question, i'm not intending to actually do it.
When using the terminal on TWRP, i've noted that i could fdisk the internal storage (/dev/mmcblk0) and that i could see all the partitions it had, like system, data, cache and so on.
TWRP and other tools only re-format those partitions with ext4 in order to wipe, so i used 'dd' in terminal to zerofill the ones i knew i could wipe and then formatted then in ext4 (with 'dd if=/dev/zero of=partition').
But i had a bigger question and i couldn't find answer nowhere: What would happen if i actually used dd to zero fill EVERYTHING, the entire /dev/mmcblk0, including the very partition table, every byte on it?
Would the device still enter fastboot mode? Would i still be able to connect it on the fastboot utility and flash a new recovery or do something?
Or, if after zero filling, still on the terminal, if i used fdisk to re-create the proper partitions and then formatted them, could i reboot, re-flash the recovery (once there would be the partition for it) and do an very-deep-clean install?
Not that i think that this has any utility, i just wonder if this would end up rendering the device totally useless, or if the fastboot mode is stored in an ROM chip, like a computer bios is.
Guilherme Franco said:
I'm new to rooting and installing new roms on android systems, but i work making custom linux and windows systems and optimizing for over a decade.
So, my optimizing spirit is tingling to try everything, but this particular thing is just a question, i'm not intending to actually do it.
When using the terminal on TWRP, i've noted that i could fdisk the internal storage (/dev/mmcblk0) and that i could see all the partitions it had, like system, data, cache and so on.
TWRP and other tools only re-format those partitions with ext4 in order to wipe, so i used 'dd' in terminal to zerofill the ones i knew i could wipe and then formatted then in ext4 (with 'dd if=/dev/zero of=partition').
But i had a bigger question and i couldn't find answer nowhere: What would happen if i actually used dd to zero fill EVERYTHING, the entire /dev/mmcblk0, including the very partition table, every byte on it?
Would the device still enter fastboot mode? Would i still be able to connect it on the fastboot utility and flash a new recovery or do something?
Or, if after zero filling, still on the terminal, if i used fdisk to re-create the proper partitions and then formatted them, could i reboot, re-flash the recovery (once there would be the partition for it) and do an very-deep-clean install?
Not that i think that this has any utility, i just wonder if this would end up rendering the device totally useless, or if the fastboot mode is stored in an ROM chip, like a computer bios is.
Click to expand...
Click to collapse
The hardware side of fastboot is typically stored on mmcblk0 somewhere in bootloader, meaning it is in the boot partition which is one of the things you would wipe. This would hardbrick your device, rendering it virtually unrecoverable, with a very slim chance of recovering, if its even possible at all, typically, it isn't possible.
Just stick with the tools already designed to handle any wiping that you need.
Sent from my SCH-I535 using Tapatalk
Droidriven said:
The hardware side of fastboot is typically stored on mmcblk0 somewhere in bootloader, meaning it is in the boot partition which is one of the things you would wipe. This would hardbrick your device, rendering it virtually unrecoverable, with a very slim chance of recovering, if its even possible at all, typically, it isn't possible.
Just stick with the tools already designed to handle any wiping that you need.
Sent from my SCH-I535 using Tapatalk
Click to expand...
Click to collapse
That's interesting, i thought my fear was irrational, but it seems to be the case.
But, why is it like that? Why leave everything you need in an RW memory, while you could use a piece of ROM memory to grant the basic functions and the capability of manipulating the RW one (like a PC BIOS)?
In computers you usually don't need to mind wiping everything you can, your device will still work or will be at least recoverable.
Even screwing BIOS and firmwares in computers and some other devices is something that usually won't render the device unrecoverable. Although they sure can cause a hell lot of headache and may need physical intervention like soldering chips and such, i myself strove to find the correct bios images for certain motherboards and to flash the chips because i didn't have an proper flashing equipment, so i had to build an arduino circuit for that (but i luckily worked with detachable chips).
The only other device i know to be rendered unrecoverable are hard drives if you wipe the firmware stored in platter, as it has the service area, which keeps a big part of all information needed to properly address and read the disk and even the other system tracks spread through the disk, that are also needed to control the head, to read and to correct data errors.
Some of these are written at factory, but others must be writable so the hard drive can take care of itself.
But you'd only be able to mess with these data with proprietary low-level software using specific microcode, zero fill and low-level formatting software can't write on any of these tracks, they can only access LBA addressed tracks.
Guilherme Franco said:
That's interesting, i thought my fear was irrational, but it seems to be the case.
But, why is it like that? Why leave everything you need in an RW memory, while you could use a piece of ROM memory to grant the basic functions and the capability of manipulating the RW one (like a PC BIOS)?
In computers you usually don't need to mind wiping everything you can, your device will still work or will be at least recoverable.
Even screwing BIOS and firmwares in computers and some other devices is something that usually won't render the device unrecoverable. Although they sure can cause a hell lot of headache and may need physical intervention like soldering chips and such, i myself strove to find the correct bios images for certain motherboards and to flash the chips because i didn't have an proper flashing equipment, so i had to build an arduino circuit for that (but i luckily worked with detachable chips).
The only other device i know to be rendered unrecoverable are hard drives if you wipe the firmware stored in platter, as it has the service area, which keeps a big part of all information needed to properly address and read the disk and even the other system tracks spread through the disk, that are also needed to control the head, to read and to correct data errors.
Some of these are written at factory, but others must be writable so the hard drive can take care of itself.
But you'd only be able to mess with these data with proprietary low-level software using specific microcode, zero fill and low-level formatting software can't write on any of these tracks, they can only access LBA addressed tracks.
Click to expand...
Click to collapse
The simple answer would be that the manufacturers don't want you messing with the device to begin with so they don't do anything to make flashing or recovering easier for us.
Sent from my SCH-I535 using Tapatalk

Need full ROM dump of Nexus 5

Hello,
Yesterday my good old friend, ordered via google store in 2014, suddenly rebooted, bootlooped twice in a row and then booted with most of apps missing (including system ones like keyboard). Factory reset did literally nothing - it's rebooted into same half-working system.
I've rebooted in TWRP, found a lot disk errors via fsck, did mkfs of all partitions and reflashed ROM. I've already did this few months ago in same situation, but this time it's not helped - i hanged at welcome screen and a lot of I/O errors in logs.
Internal flash memory of phone has died. But i know that flash memory can be recovered by a low level zeroing and did this dozen of times. I know that this will help me only for a very little time but i need only a day or two until holidays will end.
I've did nandroid backup of /persist and /firmware partitions and did "dd if=/dev/zero of=/dev/block/mmcblk0" (currently my phone in TWRP so it's a not yet hard bricked until reboot).
Now i need to restore a full ROM. There is 20+ partitions totally, most of them are hidden, never changes and that's why are not a part of nandroid backups or so. I need all this firmware-related stuff but can't find that nowhere.
So i need anybody with Nexus 5 LTE to do a full 16GB backup for me. For this, boot in TWRP, attach USB drive via OTG and do following in adb:
dd if=/dev/block/mmcblk0 of=/usb-otg/rom.img
I don't need any data from /system or /data, you may wipe data but partitions itself must be included - i've lost master boot record. Also i'm ALMOST sure that i have D820(H) model but only now i founded that there is a D820(E) model too, i don't know difference and not 100% sure that i have (H) so I will be grateful for a both variants. Need LTE, not European model.
Thank you in advance!

Categories

Resources