After the recent announce that GrapheneOS would not longer be supported on the 2017 Pixel 2 XL, I decided to give LineageOS another go. It’s a fantastic project that’s built with mostly free and open source software, but one qualm I have with LineageOS is the fact I can’t disable certain apps that come preinstalled with the OS. Keep in mind that this “bloat” is nowhere near to the amount of garbage that comes preinstalled on a stock Pixel or Samsung device. For example, I will not ever use AudioFX, Gallery, or the default File Manager that comes preinstalled on LineageOS – it clutters up my app launcher!
After some investigating, I discovered an XDA article that outlines how to disable any pre-installed system app on Android without root access, the only prerequisites is 1) you need ADB installed on your computer, and 2) you need to enable developer mode and USB debugging on your Android device. You can confirm your Android device is ready by entering the command
adb devices in terminal and it should return with at least one device.
You need to know the package name of the app which should be found under Settings > Apps > App Info > Advanced. Here I can see that the package name is
org.lineageos.audiofx. Now connect your Android phone to your computer via USB and open a terminal. The command is the same regardless if you’re using Linux, Windows, or Mac. Enter the command:
adb shell pm disable-user --user 0 <package_to_disable> (here I replaced “<package_to_disable>” with “org.lineageos.audiofx”, but you can substitute any application package). The application should now be disabled on your device.
If you need to re-enable the application for any reason, you must do so via the commandline as you don’t have an option to do so from settings. Enter the command
adb shell pm enable <package_to_enable> and your application with be restored.