Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
ramonaa86 la Simpatie.ro
Femeie
25 ani
Brasov
cauta Barbat
31 - 46 ani
Mrrrr's Forum (VIEW ONLY) / Android Stuff / [ANDROID] Recover Images From Gallery Cache and Preserve Date Modified Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 18 ani
Postari: 2331
To create full backup of Android phone/tablet on PC see this topic:

I lost the images I had saved on my SDCard because of my stupid mistake.
I wanted to backup the card manually to PC and figured I'd first copy all of the other folders besides DCIM, then copy DCIM. Got interrupted and forgot to copy DCIM and formatted the card. I scanned with all kinds of software with deep scans, but none were able to find the images that were in the DCIM folder - not one of them - let alone try to recover.

However, on Internal Storage, the gallery app saves cached files (normally).
So I can recover most (all?) images from that cache at a lower resolution, but viewable nonetheless. Not thumbnail size, but bigger (e.g., ~ 1300 x 2200 etc.). I just want to know what I missed, if anything important. I basically have no idea how many photos I had (around 4 GB, can estimate about 1000 pictures in there maybe) and what they contained. I remember making them, but can't remember what 1000 pictures contained of course.

So, I found them in gallery cache in the Internal Storage location below:

Android\data\com.miui.gallery\files\gallery_disk_cache

In the location above I have 3 folders: full_size, small_size, and remote_data. The latter is empty, but full_size contains about 2000 files in total, while small_size has ~double that amount. But small files - thumbnail style, so I don't want these.

I need to copy the full_size folder to my HDD, except when I copy - whether I do it via Windows Explorer with copy/paste or via adb with normal adb pull command, the "Modified" column in Windows Explorer will not preserve the dates of the files, it will overwrite all dates to today's date.

1. I connected my phone with a data cable to my PC, and enabled USB debugging.

2. I have platform-tools on my PC from Android\SDK folder, and open CMD and run the command adb devices

3. After running the command above, my device is listed under List of devices attached, like this:

List of devices attached
abcd00e0fgh0    device


4. The command I have to use to copy files with correct (preserved) Modified attributes to my D drive is below:

adb -s abcd00e0fgh0 pull -a /storage/emulated/0/Android/data/com.miui.gallery/files/gallery_disk_cache/full_size D:\gallery_cache


Copying takes some time depending on the size of the folder and the speed of your cable - mine 800 MB was copied in about 60 seconds.

Now I have lots of 0 files (extension is zero).

5. I open the D:\gallery_cache folder in Bulk Rename Utility (BRU), select all files and press CTRL+C to copy all attributes to clipboard, then paste in an Excel file, where I get separate column for Created, Modified, Accessed & Item Date. I added all these columns, normally in BRU the Modified column should be enough, or Accessed column. Item Date also shows correct date, but not the same time as the other two columns (Item Date doesn't have seconds - they're always zero). Both Modified and Access columns should match the date I see for these files in Windows Explorer in my phone internal storage.

6. In Excel, I can now strip the date from time, as I don't care for the time really, and extract the unique dates, to create folders for them. Since I want to make the batch file (.bat) syntax as well in one go, I built the formula below:

=LET(
    dates; G2:G2179;
    date; DATE(YEAR(dates);MONTH(dates);DAY(dates));
    unique; UNIQUE(date);
    IF(ISNUMBER(SEQUENCE(COUNTA(unique);;1;1));"MD ") &
         BYROW(unique; LAMBDA(x;
              TEXT(YEAR(x);"@") & "-" & TEXT(MONTH(x);"@") & "-" & TEXT(DAY(x);"@")))
)


This gets me the following results:

MD 2025-12-30
MD 2025-12-29
MD 2025-12-28
MD 2025-12-24
MD 2025-12-19
MD 2025-12-17
MD 2025-12-15
MD 2025-12-13
etc.

7. I copy all those to Notepad and save the file as .bat (batch file), then run it in the desired folder to make the ~200 folders with the names 2025-12-30, 2025-12-29 etc.

8. I change the extension for all the files using BRU, then move them to the desired folders for sorting. I can also sort by date in main folder but when I see 2000 images at once is not the same as seeing ten images 200 times heheh.


_______________________________________


pus acum 12 zile
   
Pagini: 1  

Mergi la