2

iOS takes a screenshot of an app every time it is sent to the background (maybe to show as a thumbnail when viewing recent apps. Details are available on this Stack Overflow question).

I did a little research and came to understand that the same feature is used by Android also. This Stack Overflow question deals with it.

This is a security issue if these snapshots are being stored somewhere in the device and are accessible to other apps.

I wanted to test this feature for my app, but I have no idea where Android stores these snapshots. I did some Googling but found nothing about the storage location.

Where are these snapshots located? Is this accessible to users other than root?

4

If what are you asking for is the location of the thumbnails displayed by Android when switching apps, then (on my LineageOS 13) they are stored inside /data/system/recent_images as PNG files called x_task_thumbnail.png (x being a possibly random number).

Since the thumbnails are owned by user system and group system, and their octal permissions are 600, you do need root to access them in whatsoever way.

| improve this answer | |
  • Couldn't find the directory in my Lenovo running Kitkat. :( – Anonymous Platypus Apr 12 '17 at 11:56
2

As a follow-up to Death Mask Salesman's answer, Irfan Latif's comment, and also based on a self-experiment on Nexus 5 running Lineage OS 14.1 (Android 7.1) and self-research,

The directory is <SYSTEM_DIR><IMAGES_DIRNAME> where

  • SYSTEM_DIR:

  • IMAGES_DIRNAME: common values are recent_images and snapshots, but might be customized by vendors/ROM makers.

The snapshots filename format is <TASK_ID><TASK_THUMBNAIL_SUFFIX><IMAGE_EXTENSION> where:

  • TASK_ID: task ID (arbitrary increasing number).
  • TASK_THUMBNAIL_SUFFIX: default is _task_thumbnail
  • IMAGE_EXTENSION: default is .png

Accessing these directories and their images needs root access.


Sources:

| improve this answer | |
  • /data/system_ce/0/snapshots is in AOSP code, not customized: android.googlesource.com/platform/frameworks/base/+/…. – Irfan Latif Nov 27 '19 at 16:08
  • @IrfanLatif interesting, because it's /data/system_ce/0/recent_images on Nexus 5, LineageOS 14.1 (Android 7.1). Reworded as best as I can. – Andrew T. Nov 27 '19 at 16:14
  • May be something to do with ROM build type or build flags or system properties, will have to look into code deeply (which is far from my reach). On my device (AOSP Extended Pie) also both directories exist. – Irfan Latif Nov 27 '19 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.