[Q] What happens when you flash? - Samsung Galaxy S (4G Model)

I'm a noob. I have 1 phone that can't go down. I have searched XDA, Google, Bing, and YouTube but can't find an answer.
What happens to all the files, folders, and data on a phone when you flash it?
I know there are files on the phone that ID it to the provider. I think it's in the EFS folder, but in all the guides I've read and YouTubes I've watch, not one of them mentions copying anything first nor does it say anything about putting a file back.
Some of the guides I've read make it sound like you wipe everything down to basic hardware before flashing a ROM and kernel back onto the phone.
Does anybody know of a really, really basic guide to what happens?
Most of the time I learn by trial and error. I take it apart and see how it works. I have 4 laptops in varies stages of repair to prove it. But like I said, I only have one phone and I can't spend another $300 just to have another phone to tear down.
On another note...is there a way to set up a sig on this forum?

Firstly, know your hardware as most phones now are using NAND chips for (as it would be) your HDD (Hard Disc Drive) writing files/data/folders/etc is not done the same as a standard HDD.
The NAND chip when being written to copies out (in a size dictated by the chip manufacturer) the Original data, erases the data once copied then writes in your data, verifies it's written correctly, erases the Copied data, moves onto next block/page/sector/etc of data and repeats the process.
If verification fails, the original block/etc of data is written back from the copied location.
Bashing away at my HTC Desire C
---------- Post added at 11:33 PM ---------- Previous post was at 11:26 PM ----------
I don't think there is a 'basic' guide that could cover all the intricacies of how different manufacturers work around the hardware and software also allowing for the proprietary software Dev's are trying to figure out how it works just to make (sometimes) the simplest things work.
Bashing away at my HTC Desire C

RackMonkey said:
What happens to all the files, folders, and data on a phone when you flash it?
Click to expand...
Click to collapse
If you wanna see what would happen when you flash CM11 you can read our upgrader.sh script that tells the phone the steps needed to back up or wipe certain partitions.
https://github.com/teamacid/android_device_samsung_galaxys4gmtd/blob/cm-11.0/updater.sh
If you're flashing from Gingerbread (BML), your EFS partition gets backed up to the SD card, the kernel/bootimage gets overwritten, then the phone reboots.
After it reboots it will copy the modem file into the /radio partition, then the system partition gets wiped, then it will flash the bootimage again with using a new method.
After this the cache and data partitions get wiped, and your EFS backup that was restored to the sd card gets put on the newly created /efs partition.
After all this is done, the script ends and the recovery will continue instlaling the CM11 files to the /system partition
Any other data doesn't get wiped/erased, only what I mentioned.

Thanks FB. That's the first explanation that I could really understand.
I'm asking friends if they have an old phone I can destroy. Then the fun really begins.

FBis251 said:
If you wanna see what would happen when you flash CM11 you can read our upgrader.sh script that tells the phone the steps needed to back up or wipe certain partitions.
https://github.com/teamacid/android_device_samsung_galaxys4gmtd/blob/cm-11.0/updater.sh
If you're flashing from Gingerbread (BML), your EFS partition gets backed up to the SD card, the kernel/bootimage gets overwritten, then the phone reboots....
Click to expand...
Click to collapse
Thanks for posting that file, it was interesting to see. I would also like to know, how the 1 GB ROM of the phone is partitioned.

llinkll said:
Thanks for posting that file, it was interesting to see. I would also like to know, how the 1 GB ROM of the phone is partitioned.
Click to expand...
Click to collapse
Here's the file that defines the partition layout for CM11:
https://github.com/teamacid/niltmt_kernel/blob/cm-11.0/drivers/mtd/onenand/samsung_galaxys4g.h
It starts at around line 31, as an example:
Code:
.name = "boot",
.offset = (72*SZ_256K),
.size = (40*SZ_256K), //101
The offset will tell you how many bytes into the flash chip the particular partition is, this one is at 72 * 256kB blocks which is at 18432kB.
The size of it is 40 256kB blocks. 40 * 256kB = 10,240kB. So the boot partition is starts around 18mB after the first block, and is a size of 10mB.
Once you scroll to the bottom we find the reservoir partition, you can read the description in the comment on that file (line 67).
It ends at (4012 + 84) * 256kB = 1,048,576 kB

FBis251 said:
Here's the file that defines the partition layout for CM11:
https://github.com/teamacid/niltmt_kernel/blob/cm-11.0/drivers/mtd/onenand/samsung_galaxys4g.h
It starts at around line 31, ....
Click to expand...
Click to collapse
Thanks a lot for the help, it's really appreciated.

Related

[Q] Can't change (any) memory contents on sns

Hi!
Some time lurker but it's my first post.
I just created this post because of the 10 posts rule on dev section.
Following this thread:
http://forum.xda-developers.com/showthread.php?t=947950
My problem is:
Phone boots right, after unlocking the screen the error messages start.
Any settings changed get lost after reboot.
Can't change anything, even SD card contents
What I tried:
I can install clockwork (it's the only partition I can change)
But nothing more. Because what ever I copy from pc to SD card get lost when unmounting from pc. Not even NAndroid
With fastboot only flashing recovery works.
With others I get errors, I guess because it can't write to memory.
So I tried ODIN even with 512 .pit. Got firmware from samfirmware.com and other places
(I tried many times with different sources).
All procedure with Odin says sucessfull but when rebooting I got the previous installation unchanged.
It looks like I have a real ROM memory (in the real definition of the word) and nothing can change it. (A real unbrickable phone for ever )
I suspected first from hardware problem but if the problem was that I couldn't write to any partition, not even recovery (it's a single chip on motherboard). And if I mess up with pit and only repartitionate, the phone restarts over and over to bootloader.
If I repeat the steps again with correct files in Odin, it sucessfully reboots to the unchanged installation again. Like it never writed anything. Even the sdcard is unchanged with lot of musics ans photos.
Any ideas?
Thanks in advance
Anyone?
Anyone?
Are there any tool to format / resize change flash memory on Nexus S?
Like there are tools for HDD.
Or go to specific hardware and JTAG?
If you point me any direction it could help a lot.
Its not a single chip from my understanding. The sdcard partition is a seperare chip from the bootloader/recovery. Sounds like it could be a hardware issue. I have never heard of this exact problem though, most commonly the sdcard partition becomes unmountable
Sent from my Nexus S 4G using xda premium
Chip
I believe it's only one chip.
check step 10 on here
w_w_w.ifixit.com/Teardown/Nexus-S-Teardown/4365/2
and it's equal to my own motherboard,
Besides, the SDcard mounted on Nexus S is only ~13G , the rest is partitioned to system, boot, ...
yeah, I'm screwed
Anyone?
I'm screwed.
Anyone know where can I find motherboard to replace it?
(ebay has a lot of digitizers, flexs, etc but not motherboards)
Or maybe one to sell.
Or maybe figured out how to change NAND chip
Contact Samsung. They should repair it. Just sucks because you will be without your phone for two to three weeks.
Sent from my Nexus S 4G using xda premium

[Q] Lost files after Factory Reset in HBOOT, Can i recover them?

Good day,
I recently flashed a new version of jellybean to my HTC one x. I was going to follow the regular method i use (wipe data, clear cache, push boot.img to device, flash rom, flash google apps), however, before i flashed, i realized my sd card was corrupt. So i used this method (which worked for me previously and was posted on an external website):
Download a recovery tool, extract recovery img, push with adb fastboot to device, factory reset on hboot, device restarts and fixes corrupts sectors in sd, reboot, push twrp.img to device, restart in recovery, and now you can reflash.
to fix it.
The method asked me to use the "factory reset" option on HBOOT and i did. (I also did this the last time i flashed a rom, with no problems)
However, this time, after hitting that option, i went into TWRP to flash zip and i saw absolutely no files or folders in my sd card. However, i could still mount the sd card and transfer files. But apparently, all my previous files (music, pictures, video etc) were deleted.
Is there anyway i could restore these old files?
Thank you.
Nope, you quite thoroughly wiped everything with that approach.
akumaukpo said:
Good day,
I recently flashed a new version of jellybean to my HTC one x. I was going to follow the regular method i use (wipe data, clear cache, push boot.img to device, flash rom, flash google apps), however, before i flashed, i realized my sd card was corrupt. So i used this method (which worked for me previously and was posted on an external website):
Download a recovery tool, extract recovery img, push with adb fastboot to device, factory reset on hboot, device restarts and fixes corrupts sectors in sd, reboot, push twrp.img to device, restart in recovery, and now you can reflash.
to fix it.
The method asked me to use the "factory reset" option on HBOOT and i did. (I also did this the last time i flashed a rom, with no problems)
However, this time, after hitting that option, i went into TWRP to flash zip and i saw absolutely no files or folders in my sd card. However, i could still mount the sd card and transfer files. But apparently, all my previous files (music, pictures, video etc) were deleted.
Is there anyway i could restore these old files?
Thank you.
Click to expand...
Click to collapse
you could google some data recovery software. i would avoid writing to the sd card though until you do.
i dont have any suggestions personally, i think i used one before that came with ultimate bootcd... it may not have though.
theres no easy way. and i warn you, it takes a while.
---------- Post added at 09:56 PM ---------- Previous post was at 09:54 PM ----------
iElvis said:
Nope, you quite thoroughly wiped everything with that approach.
Click to expand...
Click to collapse
hmmm? does it overwrite the data?? i would assume like any other hard drive the data is still technically "there" until overwritten... no?
exad said:
hmmm? does it overwrite the data?? i would assume like any other hard drive the data is still technically "there" until overwritten... no?
Click to expand...
Click to collapse
I'm not sure how completely a factory reset in bootloader corrupts the sdcard (and remember this is flash memory, not a hard drive). Presumably something is still there but I think you're unlikely to be able to recover music or video files in useable format no matter what data recovery software you use, if it's even useable in this case.
iElvis said:
I'm not sure how completely a factory reset in bootloader corrupts the sdcard (and remember this is flash memory, not a hard drive). Presumably something is still there but I think you're unlikely to be able to recover music or video files in useable format no matter what data recovery software you use, if it's even useable in this case.
Click to expand...
Click to collapse
Ah yeah i didnt take the corruption into account. under normal circumstances though flash memory should be recoverable all the same.
This happened to me. I tried recovering my invaluable photos with many different programs.. Found squat. It essentially writes 0 to every sector "permanently" deleting things from the average user. If the same was done on a hard drive, some *may* be recoverable by professionals. But in this case you aren't going to get much recovered, if at all.
Sent from my Nexus 4
if you never did the sd card repair you might of recovered something. now i doubt it, you could try Ontrack EasyRecovery which is one of the best recovery apps, also try GetDataBack, and Recuva. those are the only recovery apps i use, try all possible recovery methods in those apps the vary in results so dont give up with a single scan. make sure not to write to sdcard again. you most likely will need to do some sorta raw scan since you killed you partition so programs wont be able to use it i believe.

[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

Categories

Resources