English

The Fairphone 2's factory reset ... or the lack thereof

I am not sure about this. As I know what a factory reset should do (and usually always did for me) is setting everything back to the “factory” state without any individual setup, just as it left the factory. Which brings me to the point that it most sure did not have any (possible [software] problems).
Anyway I could have also got something wrong of your statement.

1 Like

I had the very same expectation based on the meaning of the term, further strengthened by the fact that my backup phone (Windows Mobile) does exactly that when it does a factory reset.

Well, on to practice then with the Fairphone 2 :wink:

1 Like

Totally strange and new to me.
Can it be considered that stock FPOS will do the same way of “factory reset” than LineageOS?
Is there any official statement available on that way FP2 performs its factory reset from FP?
Usually this is some kind of basic last resort task to do before giving up which, in the past, usually could save someones neck.
I tend to claim this is a FP2 specific occurrence.

Take an especially close look at the “If your Fairphone 2 doesn’t start anymore” section where they detail the steps you would have to take in the recovery … it’s all about the user data, no mention of the OS getting restored to an initial version (which would have to be somewhat outdated probably having to result in an immediate automatic update process or a message to the user to start an OS update immediately).

That may well be, but then the Fairphone 2 is what we have, so we have to deal with it.
It’s not much of a problem once you know it, though.

1 Like

We usually refer to this as a hard reset:

4 Likes

Thanks for the link, very interesting and valuable to know.
It looks like this important piece of information was just recently published.

factory_reset

Up to know I was not too deep into this subject as my phone operates flawless. Only once I had to soft reset it due to troubles with Greenify.
With this background info how to maneuver in case of serious trouble it becomes more possible for me to maybe some day start playing with the hardware, switching OS, rooting etc.
Atm I prefer to simply keep it operational.

1 Like

My guess would be it was recently edited.
The corresponding Fairphone 1 article shows a date of June 17, 2018.

1 Like

I like this name better, but on the Fairphone 2 it still doesn’t do what the dictionary entry claims it does.
(I see it’s a Wiki, but I’ve got no time now.)

1 Like

@z3ntu and I were wondering about it today. Maybe at some point the dictionary entry can be enhanced with FP2 information.

So…
My understanding of the whole system is (simplified):
Partitions:

  • boot (image made with mkbootimg) - contains the kernel and the initial ramdisk (initrd/initramfs)
  • recovery (same as boot)
  • system (normally ext4) - contains the complete android system + system apps
  • userdata (normally ext4) - contains user-installed apps, app data, etc

Android makes boot&system read-only and the running system only has write access to the userdata partition.

The thing that’s called “Internal storage” in most apps is actually a folder in the userdata partition (located at /data/media/0) that’s mounted with some magic that makes it look like its a FAT filesystem (so no fancy permissions etc)

Afaik a “Factory Reset” is just wiping the userdata partition = all apps, data, etc is gone. I don’t know what Android does exactly but I can say for TWRP, that when you wipe “Data” but not “Internal Storage” it just rm -rfs all folders and files except the media folder in the userdata partition. When you select the data partition and then press “Repair or Change File System”, then you can really “format” the partition instead of just removing the files on there.

I believe the behaviour with encryption is that when you mount an encrypted partition with TWRP (i.e. enter your passcode) and then wipe, the partition stays encrypted and TWRP wipes the content in the encrypted partition. If you don’t enter your passcode and then wipe, it can’t do anything else than just format the partition and then it’s unencrypted (and empty) again.

4 Likes

On concern is data leakage. I’m not sure about (micro)SD but flash in SSD is harder to get rid of data artifacts than a mechanical harddisk. You cannot overwrite it securely. So it is more safe to use FDE in the first place, provided you can store your keys securely.

@z3ntu

I have rather expected to have a full system image stored somewhere in the internal storage which will be booted when performing a factory-reset and automatically installed into the appropriate system storage memory area. Of course this area would be cleared prior to the reinstall process. Furthermore the system storage memory area keeps the defined user-space area which of course will also be cleared in this process. This way it´s assured that the system afterwards is just in the state as it was when leaving the factory.

The packed system image is ~650MB. Decompressed with an average compression ratio of lets say 40% for zip it´s more than 1GB. To keep both parts stored, some about 1,8GB are needed + storage space for preinstalled apps, lets say another 1GB.
These are close to 3GB used of the installed 32GB. But when you buy the phone afaik there was even more space used. I think freshly unboxed there are some about 28GB free ->leaving roughly 4GB used up storage space. What for all this?

I can only compare this with a stock Linux system. I have setup my smallest 8GB pendrive to only use up about 5GB for Linux Mint18, the rest for fat32 (including the boot ISO with ~1,8GB). So any system is installed from this ISO file taking up about 4,5GB. I could hardly squeeze it into the 5GB partition to get it booting properly.
But there aren´t many more apps needed to be installed as it is feature rich already with a full office suit, pdf reader, browser, email client, image processing tool etc…
A factory-reset in this way would mean to reinstall the available ISO which will (optionally) erase the formerly used space. After this there are no traces of the earlier installation. Any software issue would then be fixed for sure.
That´s how I know factory-resets usually work.

@JeroenH

Why not? Isn´t this the usual way to entirely fill the media with patterns of whatever logarithm in single or multi-pass?
Mechanical hdds can also be recovered with specific drive & head control.
I´m not sure if it´s more easy or harder to get fully cleared compared to modern semi-conductor storage.
For my experience I would assume clearing semi-conductor memory is easier as there can only be one state 0 or 1. Once toggled by a cryptic pattern it should not leave anything else than garbage to recover.
A hdd can be recovered when having more control of the head mechanics as data recovery companies have. Once the magnetic structure is read out reapplying the used logarithms in the correct way (order) should bring back pretty much of the original data.

Without up-to-date security patches and software improvements (stability, fixed bugs, etc), right? In the case of the Fairphone that could result in a lot of cases in a screen (!) and camera not working after the factory reset, unstability and random reboots, unexpected downgrade to Android 5 (!), etc. It really doesn’t have any sense.

I think the only issue here is just literalism. A “factory reset” is a metaphorical term used for historic reasons.

Edit: BTW, at least in the Spanish localization, the phone says “Data factory reset”, with an optional multimedia storage wipe, so it’s clear what it does an what not.

4 Likes

Not quite, as I do expect that each phone is shipped with the latest firmware available at time of dispatch which would then be the latest fallback state.

But yes, for older devices (as I know from other application) this could turn out this way just as when reinstalling Windows from the originally shipped DVD having to download all later patches.
With FP we have read/write able memory though, so the latest firmware image (incremental) could be stored with each update as fallback deleting the last incremental.

We don´t have to go back to the beginning of Lollipop. Imagine someone bought the phone with Android 6 already but still having the old display. Then updates regularly and have to replace the display after 6 Months also installing the update to get it working. Now for whatever reason a “factory-reset” is necessary. Which then should fall back to the state before the screen was replaced leaving a black screen again.
This is how it usually goes if handled the typical way.
Has anyone else beside me ever wondered what using the “uninstall updates” button in the app info of the Fairphone updater would result in?
How far would it set back the device? Assumable to the delivery state.

Nevertheless I do agree that the term is a bit miss leading and yes, the key information is the word “Data”.
The further explanation when proceeding is a bit confusing too.
This will erase all data from your phone´s internal storage, including…".
Not sure how to interpret this comprehensible.

I don’t see any problem with the current behaviour, sorry. The fallback you mention is problematic, though, specially for the module-based Fairphone 2 model.

Also, comparing phones and laptop/desktop computers is not fair because of storage. The factory reset of computers (Windows) you mention is (was?) based on a Recovery partition too. The phone model (Android) has Recovery+Fastboot modes for this exact purpose.

2 Likes

Mechanical harddrives which are overwritten with e.g. GNU shred or srm cannot be recovered. The US military uses a standard with IIRC 6 times overwriting the data, but the security community uses 30 overwrites.

From what I remember the removal of the data leaves artifacts which -in contrast to mechanical HDD- cannot be removed by overwriting a lot. From what I understood this is because flash uses internal redundancy. Not every flash is the same though; there are different techniques (a)MLC, SLC, etc.

1 Like

MLC/SLC good to know although I still prefer mechanical HDDs as long as they are still being sold.

Yes, I remember having read something about this recently…:thinking:
It was about the often experienced ssd slow down when having reached a certain storage fill level. I have done a search on the internet reading across different sides.
Maybe it´s just being picky, but I would rather want to leave it to not being able to restore to 100% but partial fragments on any storage type. With all the wiping options there are it´s just more or less complicated.
For my experience It was quite hurting to see boxes full of hard-disk also being mechanically damaged before leaving the data center for disposal.
Maybe otherwise I would had turned into a bytes dealer…:grinning:

Also in relation to my other post here your concern of data leakage actually is quite realistic and precarious. Hence I think at least one initial format should be done even on freshly purchased media preferable with a scramble pattern.
I have heard of people purchasing new data storage (e.g. usb sticks etc.) which held recycled chips from old phones. There were remaining data fragments found keeping images of child po… As everyone can imagine this got the new owners into massive juristic troubles as they had almost no chance for explanations.
So I think it is even quite vital not simply to use freshly purchased storage but apply at least one format operation.

The news source was our German news broadcast DLF (Deutschland Funk)

“Peter Welchering says that due to a lack of knowledge and missing experts (related to forensic jurisprudence), mistakes have already happened, for example in child pornography processes. Different processes had to be rolled up again, because the images did not come from the owners of the sticks on which they were found in hindsight.”

“The reason: The memory chips on the sticks were recycled and were previously used in smartphones. When recycling the data was insufficient or not deleted and were thus taken on the stick.”

In this case I do expect that generally all manufacturers using recycled storage has to assure to ship them cleared only holding the data they should.

Edit:

There is more to read from @Douwe.

2 Likes

That’s rather disturbing. Ideally though, your previous owner used encryption so that it is irrelevant what data was on the device. Also, it should be possible somehow to track those previous owners, if not just by IMEI.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.