What would happpen if i zero-filled the entire storage? - General Questions and Answers

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

Related

"Stale NFS file handle"

Hi all
I have all my apps and data moved to the sdcard a while back but my phone crashed and I decided to move only the apps to the sdcard.
I'm trying remove the /system/sd/data folder on the sdcard and keeps getting that error message. How to fix it?
Thanks
This should only happen if an NFS export is mounted to a linux box of some sort, and that export has changed or otherwise become inaccessible.
any idea how to fix it?
i have this problem, i'm not able to delete the data folder beacause of that error. :/
your ext2 partition is corrupted. this happens quite a lot if data is moved to the sdcard. boot up linux and run fsck on the sdcard and that should fix it.
cool. I'll give that a try.
Thanks
I'm having this problem too. Can you provide some basic instructions for how to mount and fix under linux? I have an ubuntu vmware image I can boot to on my windows pc and a usb card reader. Will that suffice?
When you plug the card into an ubuntu box it should automatically mount it as the next available drive. You'll have to figure out what device node the card shows up as, unmount it (umount /dev/<insert device name here>), and then run a filesystem check (fsck /dev/<insert device name here>) on the unmounted card. The utility will report various problems about "inodes" which you will want to say yes to fix. Once it has run through the file system should be in a consistent state and ready for use again.
You run the risk of losing stuff written to the card (which is probably corrupt anyways) when you run the fsck so you may want to take a copy of the data first.
On a side note: I am not sure what the default mount options are listed for moving the stuff onto the sd card in the faqs but I suspect it may help prevent corruption to mount the card on android with the sync option. Though, this will definitely slow writes to the card. It would definitely be a bad idea to remove the card while your G1 is running either way.
equid0x said:
On a side note: I am not sure what the default mount options are listed for moving the stuff onto the sd card in the faqs but I suspect it may help prevent corruption to mount the card on android with the sync option. Though, this will definitely slow writes to the card. It would definitely be a bad idea to remove the card while your G1 is running either way.
Click to expand...
Click to collapse
I was thinking of using the sync option, but then I read this at http://linux.die.net/man/8/mount:
sync
All I/O to the file system should be done synchronously. In case of media with limited number of write cycles (e.g. some flash drives) "sync" may cause life-cycle shortening.
Click to expand...
Click to collapse
Busybox seems to have an fsck command built in, but I don't think all the supporting stuff is there. I'd like to have a way to fsck my ext2 partition while on the go and not near my linux box.
I know that you can't fsck without unmounting the partition and of course it would be bad to unmount the partition with apps on it while the phone is running, but I was thinking it would be nice to be able to boot into the recovery console.
I tried this and attempted to do a fsck on /dev/mmcblk0p2 with the fsck in busybox as follows:
Code:
busybox fsck -t ext2 /dev/mmcblk0p2
But the error I got was that fsck.ext2, which is the actual executable that should be used, isn't there.
What would it take to get this onto the system so that I could boot into recovery and do a quick fsck and then reboot back into phone mode?
I was thinking of using the sync option, but then I read this at http://linux.die.net/man/8/mount:
Click to expand...
Click to collapse
Where flash lifetime is concerned... I agree, this will certainly have some impact. However, the amount of wear concerned really depends on the number of write cycles the particular flash you are writing to can handle, and how good any wear leveling in the memory controller is. Modern flash memory will likely last on the order of years even with tons of writing going on. If all you are moving to the card are the apps, that data will likely be written once (or maybe a few times over the life of an app) and only re-read from that point forward. The caching will eventually commit any data in the buffer to "disk" regardless of how much is actually there. The idea is to line up all the writes so they can be done efficiently. Where ext3 is concerned, the commit interval is 5 seconds by default, I am not sure what it was in ext2 but I imagine it is similar. Ext2 is not really a flash optimized filesystem, but it is readily available on basically any linux distro, and is supported on Android. A better fs for flash drives where write cycles are an issue might be something like jffs2 or yaffs.
At any rate, sd cards are cheap. Why not just throw it away when it starts to die?
But the error I got was that fsck.ext2, which is the actual executable that should be used, isn't there.
What would it take to get this onto the system so that I could boot into recovery and do a quick fsck and then reboot back into phone mode?
Click to expand...
Click to collapse
You would have to compile an ARM6 compatible version of fsck and get it onto the recovery partition so you could run it.
just turn off your phone, pull out the sdcard, boot on a linux os and
then in console type :
fsck -p /dev/your_ext2_partition
Is there any way to clear this error message on a windows xp computer?
Maybe use pargon partion manager, but where do I go to fix it in pargon?
equid0x said:
Ext2 is not really a flash optimized filesystem, but it is readily available on basically any linux distro, and is supported on Android. A better fs for flash drives where write cycles are an issue might be something like jffs2 or yaffs.
Click to expand...
Click to collapse
Hmm... Well, we know that yaffs is supported on Android because that's what the onboard storage uses. So I wonder why the tutorial for apps-on-sdcard suggests creating an ext2 partition? Couldn't we create a yaffs partition on the sdcard and use that instead?
Maybe because yaffs isn't as commonly supported in non-Android partitioning tools (which you would have to use to set up the card initially)?
In any case, if there's no real downside to having the partition be yaffs, how can I go about formatting it as such? I don't recall seeing such an option on gParted or anything, but then again I didn't look that carefully.
So can anyone clue me into how I might add yaffs/yaffs2 support to my desktop linux box? I'd like to try using a yaffs2 partition rather than ext2 to see if I get better reliability, but I need to add support for that filesystem first. Can't seem to figure out how to do that quite yet...
You will likely need to create the partition from the terminal using something like fdisk or cfdisk which will allow you to select the proper filesystem ID. The command for creating the filesystem is mkyaffs. The fstab in android will need to be modified to enable mount of this file system at boot. You will need to install all of the yaffs support tools on a linux desktop to get access to the mkyaffs command.
Yaffs is designed to be used directly on NAND or NOR flash memory (not abstracted through the controller built into an SD card) but it may work anyways. I am not very familiar with the specifics of this particular FS. Most of these flash filesystems are designed to provide a bootable root filesystem for an embedded device.
Yaffs kernel support can be built into a custom kernel with the instructions here:
http://yaffs.net/howto-incorporate-yaffs
Its not likely you will find pre-made packages for any of this in a common distro like Ubuntu. So, you will need to know how to compile it all by hand. A good starting point for a lot of linux info is The Linux Documentation Project at:
http://www.tldp.org/
FWIW I have built homebrew linux based routers for dual ISPs, IPSEC VPN and the like using a lightly modified version of CentOS and 4GB CF cards plugged into an ATA adapter. I used EXT2 on these and they were in production use at a small 13 server farm for a couple of years before being replaced with newer equipment without any failures whatsoever.
I have also used CF cards in small 200Mhz cube PCs as basic web kiosks for extended periods of time without any failures as well.
Under normal usage patterns on a mobile device probably does not require a large amount of writes in the grand scheme of things. I'd say it is fairly likely that your card will outlive the device you are using it in regardless of the filesystem in use.
If you are seeing lots of corruption I would suspect a flakey/failing SD card or some other hardware related problem. It definitely pays to buy high quality flash media. I would also suggest not allowing the phone to constantly run dead if you know things are being written to the SD card, since random power failures during a write to flash can permanently damage the media.

[SOLVED] Completely format system data cache partitions[making all zeroes]

I know the obvious ans would be to use 4ext superwipe.
What I want is like re-writing those partitions with all memory locations set to zeroes. The 4ext full wipe only works like quick format in windows desktop.
Any ideas how to do it?
____________________
Solved. See post 17 for details.
pushpann said:
I know the obvious ans would be to use 4ext superwipe.
What I want is like re-writing those partitions with all memory locations set to zeroes. The 4ext full wipe only works like quick format in windows desktop.
Any ideas how to do it?
Click to expand...
Click to collapse
Had to search a bit, but found an article that explains how to do this. It links to 3 apps (havn't tested myself, just remember there's no going back), from the description the first one only works on SD card, the second one might (it does not mention which partitions it formats), and the last one seems to be removed.
I did not read the whole article, but I suggest you do that before doing anything.
Good luck.
pushpann said:
I know the obvious ans would be to use 4ext superwipe.
What I want is like re-writing those partitions with all memory locations set to zeroes. The 4ext full wipe only works like quick format in windows desktop.
Any ideas how to do it?
Click to expand...
Click to collapse
Hi,
A RUU will reset everything back to stock, and fix any partition issues.
Is that what you are after?
malybru said:
Hi,
A RUU will reset everything back to stock, and fix any partition issues.
Is that what you are after?
Click to expand...
Click to collapse
As he said, he wants it to be completely formatted, meaning no data can be recovered, which is like a hard full wipe - no way to restore.
RUU does format the data partition, but it only removes records of files, and the data itself is still available and possible to read (until new files will be written over it).
No! I dont want to get involved with RUU stuff.. I just want to completely wipe my phone.. Like complete formatting of the USB drives. All system and data partitions set to zeroes.
In simple words, if you do quick formating on pendrives, you can restore (some or all data before format, depends on what you've put on the drive after format ) using some Data Recovery tools.
What i believe is that recovery just wipes the memory addresses, without putting zeroes on all the memory locations. have been googling for this for almost a week, haven't got any clue yet!
pushpann said:
I know the obvious ans would be to use 4ext superwipe.
What I want is like re-writing those partitions with all memory locations set to zeroes. The 4ext full wipe only works like quick format in windows desktop.
Any ideas how to do it?
Click to expand...
Click to collapse
I would do it this way (this is something I came up with, and if it screws up anything, you are responsible) :
Write a script that reformat your nand rom and then dumps (creates) a huge file containing zeroes. Then reformat using 4ext and repartition.
I am curious, why exactly do you want to do this? The lack of results from Google would suggest that this is not something people would normally do.
JAM THAT THANKS BUTTON.
Happy to help.
I assume you're not going to use the phone after?
If you aren't going to use the phone after, one word. Sledgehammer.
If you are keeping the phone; create a file on the partition filled with rubbish (linux has a command for this). Make sure it fills the entire partition and then run mkfs.ext4 /dev/block/partition. Repeat a dozen times or create a script to do it for you.
It's easier than erasing the whole NAND disk and partitioning it. Mainly because you'll wipe the recovery partition and create an expensive paperweight. Which brings me back to sledgehammer.
Sent from my HTC
pushpann said:
No! I dont want to get involved with RUU stuff.. I just want to completely wipe my phone.. Like complete formatting of the USB drives. All system and data partitions set to zeroes.
In simple words, if you do quick formating on pendrives, you can restore (some or all data before format, depends on what you've put on the drive after format ) using some Data Recovery tools.
What i believe is that recovery just wipes the memory addresses, without putting zeroes on all the memory locations. have been googling for this for almost a week, haven't got any clue yet!
Click to expand...
Click to collapse
On my first commented I linked to an article which gives two ways to wipe your phone (set to zeroes and all). Here are the two apps:
https://play.google.com/store/apps/details?id=com.kovit.p.forevergone
https://play.google.com/store/apps/details?id=ch.ethz.infsyssec.sddroid
Try those to see if they format the Data partition.
Far_SighT said:
I would do it this way (this is something I came up with, and if it screws up anything, you are responsible) :
Write a script that reformat your nand rom and then dumps (creates) a huge file containing zeroes. Then reformat using 4ext and repartition.
I am curious, why exactly do you want to do this? The lack of results from Google would suggest that this is not something people would normally do.
JAM THAT THANKS BUTTON.
Happy to help.
Click to expand...
Click to collapse
Hmm.. My phone has become very laggy.. No matter what ROM flash, what firmware I flash.
DennisBold said:
I assume you're not going to use the phone after?
If you aren't going to use the phone after, one word. Sledgehammer.
If you are keeping the phone; create a file on the partition filled with rubbish (linux has a command for this). Make sure it fills the entire partition and then run mkfs.ext4 /dev/block/partition. Repeat a dozen times or create a script to do it for you.
It's easier than erasing the whole NAND disk and partitioning it. Mainly because you'll wipe the recovery partition and create an expensive paperweight. Which brings me back to sledgehammer.
Sent from my HTC
Click to expand...
Click to collapse
By hearing what you say, i kinda feel little scared to do these steps. Anyway thanks for the suggestion..
astar26 said:
On my first commented I linked to an article which gives two ways to wipe your phone (set to zeroes and all). Here are the two apps:
https://play.google.com/store/apps/details?id=com.kovit.p.forevergone
https://play.google.com/store/apps/details?id=ch.ethz.infsyssec.sddroid
Try those to see if they format the Data partition.
Click to expand...
Click to collapse
Those apps dont work.. By internal data they mean internal sdcard not system or data partition.
BTW just saw this app called lagfix. It says it will discard the unused blocks, but doesnot work on my phone.. Has anyone tried it? For me it's saying trim on system,data and cache not supported! DAMN
DennisBold said:
I assume you're not going to use the phone after?
If you aren't going to use the phone after, one word. Sledgehammer.
If you are keeping the phone; create a file on the partition filled with rubbish (linux has a command for this). Make sure it fills the entire partition and then run mkfs.ext4 /dev/block/partition. Repeat a dozen times or create a script to do it for you.
It's easier than erasing the whole NAND disk and partitioning it. Mainly because you'll wipe the recovery partition and create an expensive paperweight. Which brings me back to sledgehammer.
Sent from my HTC
Click to expand...
Click to collapse
Yeah, I had similar thoughts. I was going for repartition becasue then the whole of nandroid can be wiped in one go.
To clean the phone, sledgehammer / mowing the device with a car (or both, one after the other) are the best methods.
Here's one more idea. Create a pseudo nandroid backup with all of your nandroid partitions(/system /data /cache etc) filled with garbage/zeroes. Then restore that. And bam, the nandroid is hard formatted (after a quick format of course).
Like always, it's your phone. I am not responsible for anything that you do to it.
JAM THAT THANKS BUTTON.
Happy to Help.
pushpann said:
Hmm.. My phone has become very laggy.. No matter what ROM flash, what firmware I flash.
By hearing what you say, i kinda feel little scared to do these steps. Anyway thanks for the suggestion..
Those apps dont work.. By internal data they mean internal sdcard not system or data partition.
BTW just saw this app called lagfix. It says it will discard the unused blocks, but doesnot work on my phone.. Has anyone tried it? For me it's saying trim on system,data and cache not supported! DAMN
Click to expand...
Click to collapse
Tried it yesterday, it's meant for certain devices that did not use the TRIM command like they should (Many Nexus 7 tablets were slowed down by this issue), but it seems the Sensation does not need it (or at least our kernels do not support the command).
What seems as the only way to do so is to create many blank files and delete them (like many already said). you can create a large file and copy it a few times to the Data partition, which will fill it, and then delete it. using a normal file manager will work (or you can use "adb push" command to push the file a couple of times).
Far_SighT said:
Yeah, I had similar thoughts. I was going for repartition becasue then the whole of nandroid can be wiped in one go.
To clean the phone, sledgehammer / mowing the device with a car (or both, one after the other) are the best methods.
Here's one more idea. Create a pseudo nandroid backup with all of your nandroid partitions(/system /data /cache etc) filled with garbage/zeroes. Then restore that. And bam, the nandroid is hard formatted (after a quick format of course).
Like always, it's your phone. I am not responsible for anything that you do to it.
JAM THAT THANKS BUTTON.
Happy to Help.
Click to expand...
Click to collapse
You sure it does complete format while restoring nandroid? BTW i still am not sure how to fill system and data partitions with zeroes or garbage! Anyway thanks for the heads up
pushpann said:
You sure it does complete format while restoring nandroid? BTW i still am not sure how to fill system and data partitions with zeroes or garbage! Anyway thanks for the heads up
Click to expand...
Click to collapse
You shouldn't have to worry about formatting empty space. No one ever, except possibly computer forensics is going to want information from an empty phone. They have access to browsing history from Google, call records from your mobile provider and ban access details from your banks. They wouldn't need your phone. There are things that make it hard for the average person. Including mounting the NAND disk in a way that it can be opened like a normal disk drive, and then running the tools to restore data. If someone really wanted data it's possible but they will not go through all that for 500MB of bank details, porn or whatever people do with phones these days. If you're trying to hinder the police because you did something wrong, then you should just stop.
Theoretically it can be done through an android device but cross compiling tools to recover data is long and tedious to do. There is nothing so important that someone would spend hours creating tools for an Android device to restore data that may already be irrevocably gone. Not to mention the learning curve for new software. If you are worried, burn the device and buy something new. That is the general rule for sensitive data. Make sure it's gone before you move on.
It's safe to click "Format all partitions" and then erase your SD card and give your phone away.
If it helps, install Android on top. Choose something big. Most of your application data is stored on your SDCard FYI.
Lastly, if it's lag you are trying to fix. Go backwards with Android not forwards. JellyBean demands more than ICS and ICS demands more than GingerBread. Having the latest OS doesn't work for everyone. For example, Windows 8.1 doesn't work for me because there's no fastboot support without huge editing of system drivers. The same is true in Android. GingerBread stability may be more important than ICS or JB features, or JellyBean features may be more important. However don't expect lag free 4.2 or 4.3, our devices may work with it, but they were never intended to go above 4.1(Ville C2 updates stop there too I think) due to hardware limitations. Others may argue differently, but you should question the effort they're (including me) putting in with kernel and device tree upgrades. It's amazing work nonetheless but it basically shouldn't have to be done if the device were supported. Buy a new device if you want the latest and greatest. My Sensation has become a trophy for me to the amazing things you can do with one of HTCs first dual core phones. I don't expect it to work without some kinks and bugs or even fatal flaws but I still respect it for having running Sense 3.0 to 5.0 (yes I've tried it).
Sorry for the rant. I'm a little bit grumpy, but hope it helps explains why you can mostly erase and install a new version of android then throw the device away and be relatively safe.
There's probably going to be someone who reads all of this and thinks I'm crazy, to that guy or girl. Thanks for reading all of it!
Sent from my HTC
DennisBold said:
You shouldn't have to worry about formatting empty space. No one ever, except possibly computer forensics is going to want information from an empty phone. They have access to browsing history from Google, call records from your mobile provider and ban access details from your banks. They wouldn't need your phone. There are things that make it hard for the average person. Including mounting the NAND disk in a way that it can be opened like a normal disk drive, and then running the tools to restore data. If someone really wanted data it's possible but they will not go through all that for 500MB of bank details, porn or whatever people do with phones these days. If you're trying to hinder the police because you did something wrong, then you should just stop.
Theoretically it can be done through an android device but cross compiling tools to recover data is long and tedious to do. There is nothing so important that someone would spend hours creating tools for an Android device to restore data that may already be irrevocably gone. Not to mention the learning curve for new software. If you are worried, burn the device and buy something new. That is the general rule for sensitive data. Make sure it's gone before you move on.
It's safe to click "Format all partitions" and then erase your SD card and give your phone away.
If it helps, install Android on top. Choose something big. Most of your application data is stored on your SDCard FYI.
Lastly, if it's lag you are trying to fix. Go backwards with Android not forwards. JellyBean demands more than ICS and ICS demands more than GingerBread. Having the latest OS doesn't work for everyone. For example, Windows 8.1 doesn't work for me because there's no fastboot support without huge editing of system drivers. The same is true in Android. GingerBread stability may be more important than ICS or JB features, or JellyBean features may be more important. However don't expect lag free 4.2 or 4.3, our devices may work with it, but they were never intended to go above 4.1(Ville C2 updates stop there too I think) due to hardware limitations. Others may argue differently, but you should question the effort they're (including me) putting in with kernel and device tree upgrades. It's amazing work nonetheless but it basically shouldn't have to be done if the device were supported. Buy a new device if you want the latest and greatest. My Sensation has become a trophy for me to the amazing things you can do with one of HTCs first dual core phones. I don't expect it to work without some kinks and bugs or even fatal flaws but I still respect it for having running Sense 3.0 to 5.0 (yes I've tried it).
Sorry for the rant. I'm a little bit grumpy, but hope it helps explains why you can mostly erase and install a new version of android then throw the device away and be relatively safe.
There's probably going to be someone who reads all of this and thinks I'm crazy, to that guy or girl. Thanks for reading all of it!
Sent from my HTC
Click to expand...
Click to collapse
I dont wanna sell my phone and I know that my data isnt that valueable that anyone will try to read my data with hard efforts. My sensation used to perform awesome 2-3 months back, and now that I must have quick formatted my system and data partitions more than 1500 times, i think a full wipe may do some help for those nag n lag issues.
And about going back to GB? Man, Everyone feels GB is sad after using ICS/JB. If my phone doesnot stop lagging every second after I format these partitions, i think its time for a new phone!
Anyway thanks for such a detailed reply
pushpann said:
I dont wanna sell my phone and I know that my data isnt that valueable that anyone will try to read my data with hard efforts. My sensation used to perform awesome 2-3 months back, and now that I must have quick formatted my system and data partitions more than 1500 times, i think a full wipe may do some help for those nag n lag issues.
And about going back to GB? Man, Everyone feels GB is sad after using ICS/JB. If my phone doesnot stop lagging every second after I format these partitions, i think its time for a new phone!
Anyway thanks for such a detailed reply
Click to expand...
Click to collapse
The lag isn't from formatting. You can try ARHD ICS if you want. Or probably Sense 4+ with 4.1.2 but anything above that might not work out great.
Sent from my HTC
pushpann said:
I dont wanna sell my phone and I know that my data isnt that valueable that anyone will try to read my data with hard efforts. My sensation used to perform awesome 2-3 months back, and now that I must have quick formatted my system and data partitions more than 1500 times, i think a full wipe may do some help for those nag n lag issues.
And about going back to GB? Man, Everyone feels GB is sad after using ICS/JB. If my phone doesnot stop lagging every second after I format these partitions, i think its time for a new phone!
Anyway thanks for such a detailed reply
Click to expand...
Click to collapse
How old is your Sensation? I could well be that your nand is dying. In that case, repartition your phone and make /system and /data from parts seldom used (like /cache).
If you want data security, full encryption will keep noobs away.
Thanks for the replies guys!
Today i actually did the zeroing of the partitions with Nandroid method.. I download an app called dummy file creator and it created dummy files(files with zeroes all over it. after searching in internet it seemed legit method of fully zeroing out the memory locations) in data partition untill it ran out of memory. Then i copied those files to system partition too manually till it also became full(I had to do this manually because the app didnt support creating dummy files in system partition) and made nandroid of data and system separately then did almost a dozen time 4ext format and restoring the nandroid. Finally i formatted all the partitions and installed Codename Lungo ROM(CM10.1).
HELL YEAH! it feels FASTer. Not sure if its gonna last long.
pushpann said:
Thanks for the replies guys!
Today i actually did the zeroing of the partitions with Nandroid method.. I download an app called dummy file creator and it created dummy files(files with zeroes all over it. after searching in internet it seemed legit method of fully zeroing out the memory locations) in data partition untill it ran out of memory. Then i copied those files to system partition too manually till it also became full(I had to do this manually because the app didnt support creating dummy files in system partition) and made nandroid of data and system separately then did almost a dozen time 4ext format and restoring the nandroid. Finally i formatted all the partitions and installed Codename Lungo ROM(CM10.1).
HELL YEAH! it feels FASTer. Not sure if its gonna last long.
Click to expand...
Click to collapse
Just found something and wanted to add - for future reference - Android Tuner seems to be able to make the TRIM operation on all partitions on our sensation, in a much easier way.
pushpann said:
Thanks for the replies guys!
Today i actually did the zeroing of the partitions with Nandroid method.. I download an app called dummy file creator and it created dummy files(files with zeroes all over it. after searching in internet it seemed legit method of fully zeroing out the memory locations) in data partition untill it ran out of memory. Then i copied those files to system partition too manually till it also became full(I had to do this manually because the app didnt support creating dummy files in system partition) and made nandroid of data and system separately then did almost a dozen time 4ext format and restoring the nandroid. Finally i formatted all the partitions and installed Codename Lungo ROM(CM10.1).
HELL YEAH! it feels FASTer. Not sure if its gonna last long.
Click to expand...
Click to collapse
Can you guide me? i want to do that but i'm noob . how did you do that? pls help me
BSHD666 said:
Can you guide me? i want to do that but i'm noob . how did you do that? pls help me
Click to expand...
Click to collapse
hehe you found it:good:

[Q] HOXL Data Recovery

Hi fellow xda-members,
I recently wiped my One XL 32GB with the HBOOT Factory Reset,
didnt know that it wipes the internal storage aswell...
Needless to say that I work with the phone and the data is priceless...
I already tried to pipe the whole mmcblk0 via netcat, which worked fine.
All but the FAT 25GB partition are getting recognised via testdisk.
Did 2 dd's, so I got 2 raw-images of mmcblk0 and mmcblk0p36.
None of the recovery tools (Recuva, testdisk, @active, pc inspector recovery, etc.) did find any files.
The Partition wasnt formatted and also wasnt mounted yet, there should be no changes made from android since the wipe.
If I open the mmcblk0p36 via hex editor, its complete null.
The mmcblk0 image has random data all over the whole area,
but also mostly null (estimated 80-90% null). The internal memory was almost full,
about 22/25GB, so there are 3 options:
1.:The HBOOT Factory Reset doesnt delete just the FAT, but also nulls the whole data. (Which would be weird, because the reset took 3-5 seconds, I doubt it can null 25gigs in 5 seconds ;D)
2.:The chip has a kind of "fast-wipe" option, which makes it possible to null 25gb in 5 seconds, never seen this before, but who knows
3.:The data wasnt nulled, but dd doesnt read 1:1, which would be also weird.
Is there any app/commandline tool for android to directly check
whats on the specific part of the internal storage?
Or are there ways to access the memory directly to get
a exact image of the internal storage for recovery other than "dd if=/dev/block/mmcblk0"?
If none of the above, is there a chip-recovery expert that can recover the files with jtag/advanced hardware?
Thanks for all replys
criestr
Was the phone modified? If so, the factory reset in the bootloader doesn't just wipe the data, but it completely corrupts it, that's probably why you're getting no data show up with the recovery tools you're using.
Sent from my Evita
timmaaa said:
Was the phone modified? If so, the factory reset in the bootloader doesn't just wipe the data, but it completely corrupts it, that's probably why you're getting no data show up with the recovery tools you're using.
Sent from my Evita
Click to expand...
Click to collapse
Yes, the phone is rooted and s-off'ed,
I personally didnt change the partition alignment,
but updated the hboot from somewhat 1.09 to 2.18 a few days before.
Has the layout been changed in the past?
And, if the data was really corrupted, what to do about?
Is there any chance to recover the files?
thanks
criestr
criestr said:
Yes, the phone is rooted and s-off'ed,
I personally didnt change the partition alignment,
but updated the hboot from somewhat 1.09 to 2.18 a few days before.
Has the layout been changed in the past?
And, if the data was really corrupted, what to do about?
Is there any chance to recover the files?
thanks
criestr
Click to expand...
Click to collapse
I don't see how the partition alignment is relevant, but no I don't believe it's changed. I don't think you're going to have much luck in recovering your data, if all those recovery tools aren't yielding any positive results.
timmaaa said:
I don't see how the partition alignment is relevant, but no I don't believe it's changed. I don't think you're going to have much luck in recovering your data, if all those recovery tools aren't yielding any positive results.
Click to expand...
Click to collapse
If the partition alignment has changed, the hboot factory reset could possibly null more/less/other/the wrong ranges of memory while wiping.
I have new results:
I've checked the fresh raw dumps with a hex editor, finding out the range of mmcblk0p36, the internal sdcard only contains nulls.
Thats why every recovery tool doesnt gather any file.
I know that dd copys every bit 1:1, so I am out of luck with dd.
Does someone have experience with jtag raw data recovery?
Is there a way to gather other/deeper data with jtag?
Thanks
criestr

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

[Completed] Need info on the deeper levels of storage access: formatting, repartitioning, etc

I think I have a decent grasp of how the Android system functions, what the partitions are, what's stored on each partition, etc.
However, I've recently been put in a strange situation with my Note 4, requiring me to do a repartition of the internal memory, basically wiping everything and starting from 0. I realised I have basically 0 info on this, except using a PIT file in ODIN, and even then the concept is a bit fuzzy.
I need to understand some things:
- where exactly is the software that allows a connection to ODIN stored? Is it in sort of a BIOS of the phone? Is there an equivalent to a BIOS on a smartphone?
- can the internal memory ever be fully wiped and repartitioned like you can do to a PC's HDD or SSD? If so, how exactly? What are the tools needed? What are the risks?
- I keep reading about soft bricked and hard bricked phones. How exactly does a phone become hard bricked?
- Could you recommend some literature or wikis, forum posts, etc. on this subject?
Thank you very much.
SCViper said:
I need to understand some things:
- where exactly is the software that allows a connection to ODIN stored? Is it in sort of a BIOS of the phone? Is there an equivalent to a BIOS on a smartphone?
Click to expand...
Click to collapse
I'm not really a Samsung man but the software used to connect to odin is download mode which I think is the SBL partition (secondary bootloader.) On LG devices it's called the laf partition. That would be the closest equivalent to a BIOS. I found this thread which takes a good look into the partitions of various phones: http://forum.xda-developers.com/showthread.php?t=1959445. (It says it's for the El Grande but it has info for galaxy's, LG's etc).
- can the internal memory ever be fully wiped and repartitioned like you can do to a PC's HDD or SSD? If so, how exactly? What are the tools needed? What are the risks?
Click to expand...
Click to collapse
You can re-partition the internal memory but not exactly like a PC. Some people do it to increase the size of the /data partition with space from /sdcard (internal memory.) For some devices you can use a simple linux utility like parted but for a samsung it's done by editing your pit file. Have a look at these 2 links.
http://forum.xda-developers.com/gal.../mod-partition-internal-memory-t-989-t3051556
http://forum.xda-developers.com/xperia-l/general/guide-repartition-internal-memory-data-t3052242
- I keep reading about soft bricked and hard bricked phones. How exactly does a phone become hard bricked?
Click to expand...
Click to collapse
I've never hardbricked a device, even after wiping my main partitions. It's just a general term for when your phone is so badly borked that it's completely unresponsive and you can't even access it by pc. Mostly by hardware failure.
- Could you recommend some literature or wikis, forum posts, etc. on this subject?
Click to expand...
Click to collapse
Check out the above threads and just have a look around here yourself for others. If you want to post a new topic it might be better to ask in your device section to get advice that's more relevant to your phone.
Thanks for this answer, I'll read the topics you've posted and see what's there.
Thank you very much Art, I've (finally) read the topics you posted and now have a better understanding of Android partitions.

Categories

Resources