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.
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
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...
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
/DCIM/Camera folder no longer existed.
Huh? I will put my hand on a bible (programmers reference manual or anything) and say that the last operation I did before pressing
Delete was to select those 200 files. How the highlight apparently got to the other pane, I have no idea. None. Zero.
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 (
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.
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.
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.
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.
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:
- Take regular backups. Don't be lazy and think "I'll do it next week". Next week might be too late.
- Copy important files off of a phone that evening. Don't consider a phone to be a storage device, only a means of holding the image long enough to copy it to a harddisc.
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.
- And a copy on a harddisc isn't enough. Make a DVD-ROM, or SD card, or something. Make a second copy.
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............
- For God's sake, if you have the habit of clicking past annoying dialogues. STOP. Right now.
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.
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.
Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.
|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...
Japanese Red Cross
Earthquake relief donations have closed.
Read about the JRC
Make a general donation
List all b.log entries
Return to the site index
PS: Don't try to be clever.
It's a simple substring match.
Last read at 07:24 on 2017/12/15.
© 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.