Rick's b.log - 2017/09/25 |
|
It is the 21st of November 2024 You are 3.144.46.90, pleased to meet you! |
|
mailto:
blog -at- heyrick -dot- eu
You can see where this is heading, right?
I had 200 photos copied - ones from mid February when I got the phone, to mid-April - and selected for deletion. I pressed
So I hit Enter to do the deletion and expected it to take a moment refreshing the display with 200 images less this time.
I knew something was wrong when it refreshed immediately with the contents of the
I knew something was very wrong when the
Huh? I will put my hand on a bible (programmers reference manual or anything) and say that the last operation I did before pressing
Doesn't help with 5GB of photos and videos that suddenly no longer exist.
And here we run into some interesting things.
Firstly, all the photos and such were there, and were probably intact. How a computer "deletes" files is to retrieve the catalogue information for the file in question, and simply throw it away, marking the space used as available. How this applies to a deleted folder depends upon the operating system. The traditional way is to recurse through all of the files within, marking them as deleted (and free up the space used). A smarter more modern way which is likely in use on modern telephones is to simply throw away references to the directory being deleted, then calculate what to mark as free, and then mark all the free space at once. Why? Because if you are throwing away five thousand files in a directory being deleted, what sense does it make to update the directory data five thousand times, only to then delete the directory data? That sort of thing isn't friendly to the specifics of how Flash memory works. You should take a potential ten thousand and two writes (update directory, update free space) and condense it down to two writes.
Now, if this had been an SD card, I could have powered my phone down, put the card into a PC, and run a data-digger program that searches for what looks like valid file headers. I did this a while back when a USB stick's FAT got corrupted. I couldn't recover any videos (fragmentation?) but did get back most of the JPEGs on the device.
But on the internal storage of a phone? That's a whole different matter.
In short, it is impossible.
Oh, there are ways - various toolkits that will attempt to root the phone by various means and then do low level scans looking for data to recover, but from looking on-line, there are two issues. The first is $$$. Expect the scan to find files, and then prompt you with some ridiculous price to restore them. The second problem is that rooting, even soft (supposedly non-destructive) rooting, may have severe consequences. Your phone may flag itself as tampered with meaning warranty support ends, DRM ceases to work (which can have a knock on effect on banking applications and media players for example), plus you are authorising unknown code to do some really deep stuff to your phone, plus after doing that, there is no guarantee anything will be found. Remember, the act of putting the rootkit on the phone will use space, and this space may be important space used by the data you are hoping to recover.
ADB is not much help either. It can be used as an entry into the phone (
Given how very easy it is to accidentally delete important things, it would be really good if a newer version of Android offered an "oops" function. It can delete however it wants, but so long as you get into the phone immediately, you can "Oops!" it and the deleted stuff will be restored.
As for me. The photos of mom and I at the vineyard in the summer holiday (that was a lovely day). The best rainbow photos I've ever taken. The one of mom and I in the woods that mom wants to have made up as a double-size photo. My responses to the "quality of workplace" questionnaire at work. The photos of the guy putting up the new electric line. Our meal at a rather nice (and shockingly expensive) tearoom. Our two trips to Rennes for "admin" stuff (wow, I can't imagine Operation Escargot making much difference given I could walk faster than the 8am traffic on the Rocade Sud!). Flowers. Washing machine. And about a billion of various small furry objects.
Gone.
Seeing as I was in a state close to grumpy-cat-has-heart-attack, mom coaxed me outside for a walk. Wawa decided to be fat and lazy, so instead we sat while Wawa chewed the grass.
I came back in after a while, and went to copy those 200 photos from the temp directory to "S7 Photos" on the USB harddisc.
That's when I noticed the name of the folder above.
"S7 Full Backup - 2017-09-02".
I'm not worried about dropping my phone, even if it shatters. I pay something like €13 a month insurance (because it's list price is more than half a month's wage, not insuring that would be insane). What I am worried about, however, is gaining access to the phone. You see, if I drop it and all the glass bits shatter and the Lithium battery doesn't have a melt-down, there is the really obvious problem of how will I get into the phone? If the battery does blow up, the phone may still be recoverable depending on how it happens, by patching in another power source. But, once again, we hit the problem of how one gets into a phone with a shattered screen. I must enter my SIM unlock code (would be worked around by removing the SIM?). And while my phone has fingerprint unlock, after a reset I must enter the password. And, last but not least, when hooking in a USB lead, I need to specifically authorise the phone to talk to the computer. Every time.
With all of this in mind, at the start of my summer holiday I took a full backup of everything on the phone. Both internal memory and SD card - though for the latter I cheated and popped out the SD card with the phone turned off, and copied the files in a USB SD reader. Much quicker than MTP.
Which meant I had everything up until the 2nd of September. The summer holiday, trips to Rennes, down South to that lovely supermarket, the woods, the cats, the flowers, the lot. All I was missing was the last three weeks which means I lost all the photos of making my DSO Shell Oscilloscope, but that's no big deal as most of that was for my blog. A few others, no doubt, but nothing I'm going to lose sleep over.
The morals here are obvious:
Tragedy!
So I was backing up the photos from my phone, and moving them to a harddisc so I could free up space on the phone.
Because Windows' MTP driver is weird and prone to losing files here and there, I decided the simplest approach would be to copy them over in groups of 200, and just check in another folder view to ensure 200 new files have arrived. Then delete the ones already copied.
Delete
and since Microsoft installed a weirdo Italian version of the MTP driver on my machine for some reason, up popped the usual gibberish dialogue box with YES preselected as always because Microsoft are too dumbass to default to the safe option...
/DCIM
folder.
/DCIM/Camera
folder no longer existed.
Delete
was to select those 200 files. How the highlight apparently got to the other pane, I have no idea. None. Zero.
adb shell
will give you, on your PC, a command line running on the phone) but without rooting the phone you have pretty much the same set of permissions as you do as the regular phone user. That means a lot of stuff, like /data
is off-limits to you. As such, you can't poke around much using ADB.
Obviously you can't delete a gigabyte of photos, use the phone for a week, and expect to "Oops!" the photos back, but if you get to the phone within a minute, say, just after that warm wet feeling between your legs when you realise "all my marriage photos!", you should be able to "Oops!" them back.
And:
You can, of course, retain the photos if you have a billion marriage/baby/holiday photos you want to bore your family/friends with. But make sure you have copies.
If the photos are irreplaceable, make a THIRD copy and give the media to somebody you trust who does not live locally. That way fire/flood/hurricane and your photos will still be intact. They might be destroyed by war, nuclear bomb, alien invasion, or Nibiru... but in those cases you probably have more to worry about (if you're still alive).
Don't click that button until you know exactly what is going to happen. Never assume as, you know, one day............
Read every prompt carefully before doing any action on them. Sure, I know, you might have done this a billion times before. As had I. I've copied files from my S5, my Xperia U, my Xperia Mini Pro, and my MotoDEFY. This is my fifth Android phone. The first few were USB mass storage, the more recent were MTP devices. Either way, it more or less looks the same in Explorer. Draggy-droppy, no surprises. Nothing unexpected other than the odd file being missed here or there. Nothing out of the ordinary.
Until today.
Maybe if I had read the message, even in Italian, I might have noticed it was asking about deleting one object instead of 200 of them. I might have done something useful on Sunday instead of freaking out. And I might have done something useful on Sunday evening rather than watching the first DVD of "Elementary" (first season box, €9,99 in the supermarket) to get over it. That and far too many Mars bars to want to admit to.
Mick, 26th September 2017, 18:06 Another point regarding passcodes. You might want to tell a trusted family member or friend what your passcode is. Following a stroke, a friend of mine couldn't remember her code, neither could she understand why Apple would not unlock her phone for her. Luckily the phone automatically backed itself up on the a-cloud so a restore brought them back (sort of). The backup was at a lower resolution than the originals when compared with file sizes of other photos she'd copied earlier, but okay for a PC screen.Rob, 4th October 2017, 01:16 If you have a google account enabled, with sync turned on, it's possible your photos got backed up to your google account. Try https://photos.google.com .... worth the two seconds to click through and check.Rick, 4th October 2017, 01:38 Thanks for the suggestion Rob, but one of the first things I disable is synchronising everything god only knows where...
© 2017 Rick Murray |
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted. RIPA notice: No consent is given for interception of page transmission. |