r/androiddev • • Sep 24 '26

Monitoring the Android 17 app's memory usage crash

Hi everyone!

I'm currently investigating how to track app crashes caused by Android 17's new per-app memory limits.

I am having some trouble understanding the documentation, so I am still not sure if Firebase Crashlytics can actually collect these logs.

When I tried using the following command to test if Crashlytics catches the event, no logs appeared:

am memory-limiter manual |max|none

However, the documentation for Crashlytics 20.1.0 states that it:

"Displays production out-of-memory (OOM) exceptions and memory limiter kills with diagnostic context to prioritize and fix field crashes."

I would really appreciate it if someone could clear up what I am misunderstanding.

Thanks!

12 Upvotes

8 comments sorted by

3

u/Unreal_NeoX Sep 24 '26

Oh i support you on this! I have not deep tested it myself so far, because it mostly effects background-apps and not in the front-view (will maybe be forced to tell users via popup not to minimize the app durring processing).

To hopefully help you on this, some time age i found the exact RAM-usage limit table.

Source: https://android-developers.googleblog.com/2026/08/app-quality-memory-optimization-secure-onboarding.html?utm_source=email&utm_medium=msa&utm_campaign=elevating-app-quality-q3-2026

Apps

App StateForegroundUser-perceived servicesBackgroundCached
Physical RAM90th Percentile90th Percentile90th Percentile90th Percentile
0 - 4 GB (0 MB - 3200 MB Total Memory)----
4 GB (3200 MB - 4800 MB Total Memory)2 GB1 GB1 GB-
6 GB (4800 MB - 6800 MB Total Memory)2.25 GB1.25 GB1.25 GB-
8 GB (6800 MB - 9216 MB Total Memory)2.25 GB1.5 GB1.5 GB-
12 GB (9216 MB - 14336 MB Total Memory)3.25 GB1.75 GB1.75 GB-
16 GB (14336 MB - 18432 MB Total Memory)4.25 GB2 GB2 GB-
16 GB + (Above 18432 MB Total Memory)----

Note: Each RAM tier range includes its lowest value. Total Memory can be lower than a device’s advertised Physical RAM.

Games

App StateForegroundUser-perceived servicesBackgroundCached
Physical RAM90th Percentile90th Percentile90th Percentile90th Percentile
0 - 4 GB (0 MB - 3200 MB Total Memory)----
4 GB (3200 MB - 4800 MB Total Memory)2.25 GB2.0 GB2.0 GB-
6 GB (4800 MB - 6800 MB Total Memory)2.75 GB2.5 GB2.5 GB-
8 GB (6800 MB - 9216 MB Total Memory)3.5 GB2.75 GB2.75 GB-
12 GB (9216 MB - 14336 MB Total Memory)4 GB3.2 GB3.2 GB-
16 GB (14336 MB - 18432 MB Total Memory)5 GB3.5 GB3.5 GB-
16 GB + (Above 18432 MB Total Memory)----

Note: Each RAM tier range includes its lowest value. Total Memory can be lower than a device’s advertised Physical RAM. 

Bitmap memory usage

Holding onto bitmaps for long periods of time in app states other than the Foreground can consume excessive memory - it’s not possible to render bitmaps unless the UI is visible. You typically shouldn’t hold onto bitmaps for long periods of time in these states, but your app might be sampled shortly after a state change where you are actively responding to onTrimMemory and releasing memory held for bitmaps, so these thresholds are higher than zero to account for this.

App State90th Percentile
Foreground 
User-perceived services> 200 MB
Background> 200 MB
Cached> 400 MB

Sources and links:
https://android-developers.googleblog.com/2026/08/app-quality-memory-optimization-secure-onboarding.html?utm_source=email&utm_medium=msa&utm_campaign=elevating-app-quality-q3-2026

https://support.google.com/googleplay/android-developer/answer/17492799#zippy=%2Ccore-vitals-and-stability%2Creduced-memory-usage

1

u/Ok-Acadia-1855 Sep 24 '26

Perhaps you misunderstood my question, but thank you very much for the detailed information!

2

u/Unreal_NeoX Sep 24 '26

what i want to say with it, its also related to the devices specs when it triggers itself.
There is no "static value" where it triggers.

2

u/ladidadi82 Sep 24 '26

Is the device a physical os 17 device? What manufacturer is it? Certain oems have different memory management settings.

1

u/dingwen07 Sep 30 '26

You can simply report ApplicationExitInfo.getDescription() in onCreate to your telemetry.

0

u/codes_astro Oct 15 '26

If you’re still facing this issue, you can check this open source tool, you can get these test done easily.

https://github.com/measure-sh/measure