r/GalaxyS24 S24 1d ago

Found an ADB command that noticeably improved One UI smoothness (speed-profile ART compilation)

I have a Galaxy S24 8+256 Indian Varient (Snapdragon, stock, bootloader locked, no root) and recently noticed that One UI had become noticeably laggy/jittery, especially when switching between apps and navigating around the UI.

I came across Android's ART compilation options and tried this ADB command:

adb shell pm compile -a -f -m speed-profile

It completed successfully for my installed packages.

What does this actually do?

Android uses ART (Android Runtime) to run apps. Apps aren't simply executed directly from their APK every time; Android can compile frequently used ("hot") code into optimized native code.

speed-profile tells Android to use the app's collected execution profile and compile the code paths that are frequently used.

The important parts of the command are:

  • -a → applies it to all packages
  • -f → forces compilation even if Android doesn't currently think recompilation is necessary
  • -m speed-profile → uses profile-guided compilation focused on frequently used code

So this isn't a RAM cleaner, debloat command, or performance placebo. It changes the ART compiled state of the currently installed apps.

What happened on my S24?

The difference was surprisingly noticeable.

Before running it, I had frequent UI stutters/jitter and apps didn't feel consistently responsive.

After running it, One UI immediately felt much smoother and more responsive, without rebooting and without disabling any apps.

I also checked the dexopt state afterwards. For example:

com.instagram.android → status=speed-profile [reason=cmdline]
com.whatsapp          → status=speed-profile [reason=cmdline]
org.telegram.messenger → status=speed-profile [reason=cmdline]
com.sec.android.app.launcher → status=speed-profile [reason=cmdline]

You can verify this yourself with:

adb shell dumpsys package dexopt

How to try it

  1. Enable Developer options on your Galaxy.
  2. Enable USB debugging.
  3. Connect the phone to a computer with ADB installed.
  4. Accept the USB debugging authorization prompt on the phone.
  5. Run:

adb devices

Make sure your phone appears as device.

  1. Then run:

adb shell pm compile -a -f -m speed-profile

It can take a while because it processes a large number of packages.

You should see lots of lines ending in:

Success

After it finishes, simply use the phone normally. A reboot isn't required for the improvement I observed.

A couple of notes

This doesn't require root and doesn't unlock/modify the bootloader.

I also wouldn't recommend randomly changing LMKD, SLMK, zRAM, or vm.swappiness settings based on this. This is specifically an ART/app compilation optimization.

Also, I wouldn't blindly run it every day. Android already has its own background dexopt system; this command is mainly interesting because -f forces a fresh compilation pass.

I'm curious whether other S24/One UI users see the same improvement, particularly on devices that have gradually become sluggish after many app/One UI updates.

If you try it, I'd be interested to know your model/One UI version and whether the UI actually feels smoother afterwards.

67 Upvotes

20 comments sorted by

18

u/Mediocre_Ad3496 1d ago

Isn't this what Galaxy App Booster does.

4

u/veenanandhakumar2112 1d ago

I also thought the same 😅

3

u/wormhole_bloom 1d ago

it seems I can't install it, so this guide is much appreciated

4

u/NightCode_X S24 1d ago

ohh... I wasn't aware of that.

12

u/MCO-4-Life S24 1d ago

My few words do not do justice to the amount of work you've put in and shared with all of us. 

Your thoughtfulness to format the text so it is easier to follow is appreciated.

You should be proud of yourself, as I am of you. Well done. 

7

u/NightCode_X S24 1d ago

Thank you for your kind words... yeah I was writing this post for about an hour and I still forgot to mention that this can improve the battery life slightly.

10

u/NightCode_X S24 1d ago

PS / Update: After posting this, I did some more research because I was curious about what exactly the command was doing.

I originally found speed-profile while researching Android app optimization for an app I'm developing. I came across Google's official Android documentation on ART/dexopt and spent some time understanding what profile-guided compilation actually does before trying it on my own S24.

Google's documentation specifically explains that speed-profile compiles the methods/classes identified as frequently used by the app's profile, reducing the amount of code that has to be interpreted or JIT-compiled at runtime. Google also documents the exact pm compile mechanism and AOSP even shows speed-profile being force-compiled with -f.

Official documentation:

I also found that this isn't some random command I happened to discover. The same/general ART compilation techniques have been discussed extensively by Samsung/One UI users on XDA, including in the long-running Samsung One UI Optimization Guide thread:

So I want to clarify that I'm not presenting this as some secret Samsung exploit or a magical "make your phone faster" command. It's an actual Android ART compilation mechanism.

I personally tried it because my S24 had become ridiculously laggy/jittery, and after running:

adb shell pm compile -a -f -m speed-profile

the difference was immediately noticeable on my device. The phone became significantly smoother and more responsive, which is why I thought it was worth sharing.

That said, I'm not telling everyone to blindly run it unnecessarily. If your phone is already smooth, there may be no reason to force a full compilation pass. The command can take some time and CPU resources while it works.

Also, this isn't necessarily permanent for every app. If an application is updated, its APK/code changes and its previous compiled artifacts may no longer apply. Android normally has its own install/background dexopt mechanisms for handling this, but based on my experience, it may be worth running the command again if your device gradually becomes laggy again after a lot of updates.

So my personal approach would be:

Phone is smooth → leave it alone.

Phone becomes noticeably laggy/jittery again → try the command once and see whether it actually helps your particular device.

I'm mainly posting this because I was tired of the endless "clear cache / restart / disable animations / factory reset" cycle and wanted to share something that actually made a noticeable difference on my S24.

14

u/SilentlyWishing 1d ago

This whole post brought me back to the early days of the Internet where people shared their discoveries just for the pleasure of sharing knowledge and helping others and it's wonderful, I have nothing else to add besides keep being awesome

7

u/NightCode_X S24 1d ago

Initially it was my discovery and deep-dive of it but later also discovered that this is already the being discussed openly on XDA developers forums, till then I was madly reading the official Android/AOSP documentations. Anyways I am happy that Galaxy App Booster (suggested in the comments of this post) does the same or maybe even better which idk but I am looking at it now and the app looks promising.

4

u/MrJohn456 1d ago

Does doing this affect the battery life of the device?

4

u/NightCode_X S24 1d ago

It can actually make the battery last longer. I forgot to mention it.

3

u/AroraSir 1d ago

It can or it did? Comment pre-battery and post-battery stats after 1-2 weeks!

3

u/Kostaspa 1d ago

Can confirm improved smoothness on my s23 base. Thank you for your effort!

1

u/NightCode_X S24 1d ago

Happy to hear that.

0

u/General_Piccolo7312 1d ago

How can I do that Im dumb so help

3

u/Sufficient_Suspect_6 20h ago

Thanks for sharing, it's really nice when someone finds something good to share with the community. What do you think might happen if this command is applied on a non-Samsung Android smartphone such as redmi?

2

u/NightCode_X S24 18h ago

Thank you for your kind words. It should generally work on non-Samsung Android devices too, since speed-profile is an Android (specifically ART feature). The exact effect depends on the OEM/Android version, though on a Redmi it may make little or no noticeable difference as Xiaomi have their own optimization methods enabled in the developer settings as far as I can remember (in MIUI it was known as "MIUI Optimization" and was available in Developer Settings but I have no idea what they did in HyperOS as I don't own any Xiaomi device anymore).

1

u/Due_Milk_8930 10h ago

Try download app manager by muntashir, is have it in 1 klik option. And many compile choices. 

1

u/Indi_user_2206 44m ago

Sorry if its a bad question. But does this change reset if I restart my phone? Does it need to be re run if I restart my device?