Once in fastboot mode, you can connect to pc or another android device to boot to recovery and factory reset/wipe data. It won't be any three letter agency safe, but most data should be lost for any common tech person.
https://developer.android.com/studio/command-line/adb
My phone has a button combination to hold when powering on to get into a recovery mode, then you can wipe it with adb.
And wipe commands that one can send to flash memory chips are sometimes broken too (they might be implemented as no-ops).
Edit: Also, even if you tell it to write zeros everywhere, it might not delete the content, because there is hidden extra memory on flash memory chips.
But that doesn't help you if the erase command was not implemented correctly.
And I am sure that you cannot implement an erase command from within the operating system. It has to be implemented in the flash memory controller. So if your hardware manufacturer got it wrong, you can't fix it.
We tested ATA commands for sanitizing an entire SSD, [...]. We find that while most implementations of the ATA commands are correct, others contain serious bugs that can, in some cases, result in all the data remaining intact on the drive."
M. Wei, L.M. Grupp, F.E. Spada, S. Swanson: "Reliably Erasing Data From Flash-Based Solid State Drives." <https://www.usenix.org/legacy/events/fast11/tech/full_papers...>
Is that wrong? Does the OS on smartphones generally have direct access to the flash memory proper?
Edit: I remembered another protocol that I would guess is used in smartphones for communication with the flash memory, namely UFS (which is also utilized with SD cards).
Edit 2: Note that it is irrelevant whether the protocol used is ATA, UFS, or something different.
No matter what protocol they are using to communicate, it is quite conceivable that the erase commands are not properly implemented. In fact, as the comment you're replying to pointed out, there have been many devices found historically which do not properly implement erase commands. Since you can't(*) bypass the flash controller and see what's actually in the flash, there is no way to verify whether or not the data has in fact been deleted.
Just encrypt your device. It's so damn simple.
(* Yes of course you can desolder the memory or hook up to it directly and bypass the flash controller that way, like the authors of the paper in GP, but that's far beyond the capabilities of even the average HNian)
If you're worried about a state removing the flash chips to recover data from dead/used cells, you don't send your phone in for repair. You secure the data with a drill before disposing of it. That clearly wasn't the owner's concern. They wanted a method for securing the device, but couldn't due to the screen. This is in no way the owner's fault. I can't say I blame them wanting to have a working phone and not a very expensive paper weight.
A better method for securely erasing data from a phone before service is in everyone's best interests. The customer's data isn't at risk, the manufacturer has significantly reduced liability, and the vendor doing the work doesn't have to worry about employees doing something stupid like this and risking their contract with Google. You really just have to make the process of getting the data off the phone slightly more difficult to avoid casual theft (infringement? -- I don't know the right word here).
I think that is true, but with one caveat, you should test if the resetting actually worked.
I once had an Android phone with "full encryption" enabled that, after resetting, still had all the user data on it. It was obviously not only not reset, it wasn't even encrypted in the first place.
I am sure a lot of mobile phones have problems like that, because I think that smartphone manufacturers don't care about quality too much, as long the issues are not immediately apparent to an average user.
But if you can't recover the data afterwards yourself, I would agree that you can normally send it to recycling or repair.
Thank you. My comments might sound very strict and total. But of course everyone has different threats that they care about, and repair shops are probably not too sophisticated.