OnePlus Devices
Follow the Common Installation guide first. This page covers OnePlus-specific differences only. Everything in the common guide applies to OnePlus devices โ this page documents the settings, behaviors, and quirks unique to OxygenOS and OnePlus hardware.
OnePlus Overviewโ
OnePlus devices run OxygenOS, a customized Android skin that historically stayed close to stock Android but has diverged significantly in recent years. Starting with OxygenOS 13, the software is built on the same ColorOS codebase used by Oppo (OnePlus's parent company). This means that newer OnePlus devices have different system behaviors, settings locations, and background process management compared to older OxygenOS versions.
For ADL users, the key concern is that OxygenOS includes aggressive battery optimization and background process killing that can terminate Termux sessions without warning. This page explains how to configure your OnePlus device so ADL runs reliably.
OxygenOS vs ColorOSโ
The distinction matters because it changes where settings are located and how aggressively the system manages background apps:
- OxygenOS 12 and earlier (OnePlus 9 series and older with original software): Closer to stock Android. Settings paths resemble what you see on Pixel or Motorola devices. Battery optimization is present but less aggressive.
- OxygenOS 13 and newer (OnePlus 11 and newer, plus older devices updated to OxygenOS 13+): Built on ColorOS. Includes additional background process restrictions, a different battery optimization UI, and features like "Auto-optimize" that aggressively manage apps.
- ColorOS (OnePlus devices sold in China): Full ColorOS without the OxygenOS branding. Similar to OxygenOS 13+ but with additional region-specific features.
If your OnePlus device updated from OxygenOS 12 to 13 or later, your battery optimization settings may have been reset. Termux may start getting killed in the background even if it worked fine before the update. Re-apply all the battery and background process settings described on this page after any major OxygenOS update.
Desktop Modeโ
Some OnePlus devices include a built-in desktop mode that provides a windowed interface when connected to an external display. Unlike Samsung DeX, OnePlus desktop mode is less feature-rich and not available on all models.
Checking for Desktop Modeโ
- Connect your OnePlus device to an external monitor via a USB-C to HDMI adapter.
- Go to Settings > Connected devices > Connection preferences.
- Look for Desktop mode or PC Connect โ if present, you can enable it.
Alternatively, check from Developer Options:
- Go to Settings > About phone and tap Build number seven times to enable Developer Options.
- Go to Settings > System > Developer options.
- Look for Force desktop mode or Enable freeform windows.
Desktop mode is available on the OnePlus 8 Pro, OnePlus 9 series, OnePlus 10 Pro, OnePlus 11, and newer Pro/Ultra models. Standard (non-Pro) models may lack this feature. Even when available, the implementation is basic โ it provides freeform windows but does not include a taskbar or full desktop shell like Samsung DeX.
Desktop Mode and ADLโ
OnePlus desktop mode can coexist with ADL but does not replace Termux:X11. When desktop mode is active and you launch Termux:X11, the X11 session renders inside a freeform window on the external display. This can be useful โ you get a resizable Linux desktop window alongside your Android apps.
If your OnePlus device supports desktop mode and you have an external monitor, try running ADL with desktop mode enabled. The freeform window approach gives you the ability to switch between your Linux desktop and Android apps without Alt-Tabbing through Termux.
OxygenOS-Specific Settingsโ
Battery Optimizationโ
OxygenOS battery optimization is more aggressive than stock Android. You must exempt Termux from multiple layers of optimization.
Step 1: Disable Standard Battery Optimizationโ
- Open Settings > Battery (on OxygenOS 13+, this may be Settings > Battery > More settings).
- Tap Battery optimization.
- Tap the dropdown at the top and select All apps.
- Find Termux, tap it, and select Don't optimize.
Repeat for Termux:X11 and Termux:API.
Step 2: Disable App-Specific Battery Settingsโ
On OxygenOS 13+, there is a second layer of battery management per app:
- Go to Settings > Apps > App management (or Settings > Apps > See all apps).
- Find and tap Termux.
- Tap Battery usage (or App battery usage).
- Select Allow background activity and set battery usage to Unrestricted.
adb shell dumpsys deviceidle whitelist +com.termuxBackground Process Limitsโ
Developer Options includes a setting that limits the number of background processes. By default, OxygenOS allows the system to decide, but you can explicitly increase the limit:
- Go to Settings > System > Developer options.
- Scroll to Background process limit.
- Set it to Standard limit or At most 4 processes (the maximum option).
Setting the background process limit to "No background processes" will immediately kill Termux when you switch to another app. This is sometimes enabled by users attempting to improve performance. If ADL keeps dying when you switch apps, check this setting first.
OxygenOS Auto-Kill Behaviorโ
OxygenOS 13+ includes an "Auto-optimize" or "Smart power saver" feature that learns your app usage patterns and kills apps it considers unused. Termux does not fit the usage pattern of a typical Android app โ it runs long background sessions with no visible UI activity โ so the system is likely to target it.
To prevent auto-kill:
- Go to Settings > Battery > Advanced settings (or Settings > Battery > More settings).
- Disable Sleep standby optimization if present.
- Disable Optimize battery use during sleep if present.
Additionally, lock Termux in the recent apps view:
- Open Termux so it appears in your recent apps.
- Open the recent apps view (swipe up and hold, or tap the square navigation button).
- Tap the three-dot menu on the Termux card (or long-press the card, depending on OxygenOS version).
- Select Lock (a lock icon will appear on the card).
Locking an app in the recent apps view tells OxygenOS to never auto-kill it. This is the single most effective step for keeping Termux alive on OnePlus devices. Do this for Termux:X11 as well.
ColorOS Differences (OxygenOS 13+)โ
If your OnePlus device runs OxygenOS 13 or newer, the underlying system is ColorOS. The following additional settings may apply:
Auto-Launch Managementโ
ColorOS has an auto-launch management system that controls which apps can start themselves or be started by other apps:
- Go to Settings > Apps > App management > Termux.
- Tap Auto-launch and ensure it is enabled.
- Tap Allow other apps to launch and ensure it is enabled.
This is important because Termux:X11 needs to be launched by Termux, and auto-launch restrictions can block this.
OnePlus frequently reorganizes settings menus across OxygenOS updates. If you cannot find a setting at the path described above, use the search function in the Settings app to find it by name.
Performance on Snapdragon Chipsโ
OnePlus devices use Qualcomm Snapdragon processors, which are well-suited for ADL workloads. The Snapdragon platform benefits from mature Adreno GPU drivers and strong single-core CPU performance.
What to Expect by Chipsetโ
- Snapdragon 8 Gen 3 / 8 Elite (OnePlus 12, 13): Excellent performance. Compiling, multitasking, and desktop rendering are smooth. These chips handle ADL workloads with headroom to spare.
- Snapdragon 8 Gen 2 (OnePlus 11): Very good performance. Slightly less thermal headroom than Gen 3 but handles sustained workloads well.
- Snapdragon 8 Gen 1 (OnePlus 10 Pro): Good performance but runs hot. Expect thermal throttling during heavy compilation. Consider using a cooling solution for extended sessions.
- Snapdragon 888 (OnePlus 9 series): Adequate for basic ADL use. The 888 is notorious for thermal issues, so expect throttling under sustained load.
- Snapdragon 865 and earlier (OnePlus 8 and older): Functional but limited. These chips have less RAM bandwidth and slower cores. Suitable for light desktop use and text editing but not recommended for development workloads.
Snapdragon chips provide better single-core performance than Tensor chips at the same generation, which translates to faster single-threaded compilation and snappier UI rendering in the Linux desktop. If raw performance for development work is your priority, OnePlus devices with recent Snapdragon chips are among the fastest Android devices for ADL.