2

I'm looking for a way to retrieve timestamps of my download history at the full precision that they are stored at, preferably to at least second precision.

Unfortunately though, without obtaining root permission over my phone, I don't have access to my own user data at /data/, so I'm trying to figure out a way to do this through Firefox using JavaScript.

Situation: I made the big mistake of moving pictures and videos from the internal storage of my phone to a microSD card using Android's stock tool to do so (‘Settings’ → ‘Storage’ → ‘Transfer data to SD card’). Unfortunately, this bumped the timestamps of all of the files, and also messed around with directories other than DCIM/ (images and videos were also moved from the Download/, image/, Pictures/, and video/ directories). In hindsight it seems silly that I used such a tool (I'd normally use Ghost Commander), but it appeared as a notification when running low on internal storage space and it just looked so easy. I've since been trying to piece back together the timestamps of the various images and videos.

I have restored the timestamps of photos and recorded videos in DCIM/100ANDRO/ based on timestamps in their embedded metadata (see this Unix & Linux Q/A), and I've figured out how to restore the timestamps of all of the images and videos in the image/, Pictures/, and video/ directories, but I'm still stuck with how to restore the images in Download/.

The embedded metadata of these files isn't going to help me to restore their timestamps, because I want to restore them back to when I obtained the file (i.e. downloaded it), so I need to get access to my Firefox data and obtain the download timestamps. Once I have the timestamps, I'll then be able to touch the files to approximately the correct timestamp that they had before Android lost them.

I'm using mobile Firefox 27.0 on Android 4.3.

0

1 Answer 1

2

This is probably too late for OP, but I found a possible way to do this.

You can open the Firefox Profile folder (no root required since Firefox owns the folder) by entering the following URL in Firefox Mobile's address bar:

file:///data/data/org.mozilla.firefox/files/mozilla/

This opens the folder that stores your Firefox profiles. The actual profile folder is the folder with the random looking folder name there. In my phone for example, the profile folder is y7hj32bc.default (this name will change for every installation).

Inside the profile folder, there should be a file named:

downloads.json

You can tap on the file and Firefox would open the file as text file. Copy the content of this file to somewhere and open it with a text editor.

The downloads.json file contains a JSON file that looks like the following:

{
  "list": [
    { 
      "source": "http:\/\/example.com\/path\/file.txt",
      "target": {
        "path": "\/storage\/emulated\/0\/Download\/file.txt", 
        "partFilePath": "\/storage\/emulated\/0\/Download\/file.txt.part" 
      }, 
      "saver": { 
        "type": "copy", 
        "entityID": "%2239907-3fe8c75e5c140%22\/235783\/Wed, 17 Aug 2005 18:42:37 GMT" 
      }, 
      "startTime": "2015-04-04T17:25:59.468Z",
      "succeeded": true,
      "totalBytes": 235783,
      "tryToKeepPartialData": true,
      "contentType": "text\/plain"
    },
    ...

Your file download start date is in the startTime field, and the file path is in target/path. The date is formatted as ISO8601 format.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .