Off late I have been seeing the android.process.media error frequently on my android device. Find the screenshot below containing the java.lang.OutOtMemoryError:

java.lang.OutOtMemoryError: Failed to allocate a 589832 byte allocation with 359544 free bytes and 351KB

Not sure what causes this.

Some other observations:

  1. Data usage by System Apps sees a 80% rise approximately
  2. Most of the times this error pop-up comes up while launching apps.

What I have tried:

  1. Cleared All data by going to Apps --> Google Services Framework

  2. Opened Google Play Services from Apps --> Google Play Services

  3. Cleared All data and Force stop Google Play services

  4. Cleared All data and Force stop Google Services Framework

  5. Device Reboot

It didn't work! I know there is an option to format the device. But I am wondering if there is a better way to do it.


The error clearly tries to write a JSON file and chokes on it. The question is now where the JSON file is located and to which app it belongs.

My first guess would be to clear the data and cache of the system app "Media storage" (com.android.providers.media). Hopefully the JSON file belongs to this app and clearing the data resets it so that it can start again from zero size.

BTW: The "memory" here means RAM - not flash memory. Therefore clearing data/caches of unrelated apps will not help in this case.

  • Surprisingly, could not locate com.android.providers.media – Yash Saraiya May 10 '18 at 15:01
  • Got it now! Do I need to take a backup before I clear it ? – Yash Saraiya May 10 '18 at 15:08
  • 1
    AFAIK no. All it does is storing meta-data of the files you have. Deleting the data will just trigger the mechanism to scan the files and collect the meta-data again. – Robert May 10 '18 at 16:43
  • This has worked for me so far! Does this process (com.android.providers.media) has anything to do with data usage ? I am experiencing high data usage even with no activity. And I am pretty sure the usual background processes doesn't consume 1.4 GB a day. Upon checking, I noticed majority of the data s being used by System apps (90% of which is used by Downloads system app). Also I found 2 downloads apps with different versions. – Yash Saraiya May 11 '18 at 5:24
  • 1
    AFAIK this app does not do any network traffic at all. It provides the audio/video meta data and the list of files you can see when you connect your phone via USB to your PC. However what I say is about the AOSP version, don't know if Xaiomi has modified it. – Robert May 11 '18 at 10:58

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.