How to Prioritize Wi-Fi Over Mobile Data on Android: A Complete Guide

Have you ever noticed how your smartphone Android suddenly switches from Wi-Fi on mobile internet, even though the wireless network signal is still quite stable? Or have you encountered a situation where apps "leak" into 4G/5G, even though the connection to the router is active? This problem is familiar to many users, especially in conditions of less than ideal Wi-Fi coverage or aggressive power saving settings.

By default Android often switches automatically mobile data if the Wi-Fi speed drops below a certain threshold—even if the connection is technically working. This leads to unjustified consumption of packet traffic (especially relevant for tariffs with a limit) and the unstable operation of online services. Fortunately, the system has hidden and overt tools to Force Wi-Fi Priority — from standard settings to engineering menu.

In this guide, we'll cover all the available methods, from basic to advanced, including nuances for different versions. Android (from Android 10 to Android 14) and manufacturers (Samsung, Xiaomi, Google Pixel etc.). You will learn how to:

  • 🔧 Disable automatic switching to mobile data in the system settings.
  • 📶 Set up smart Wi-Fi priority based on signal quality.
  • 🛠️ Use the engineering menu for deep optimization (for advanced users only!).
  • 📱 Use third-party applications if standard methods do not work.

Please be warned in advance: some methods require root rights or they can reset network settings — so before experimenting, make a backup copy of important data.

📊 How often does your Android switch to mobile data on its own?
Constantly, it's annoying
Sometimes, in places with weak Wi-Fi
It was there before, but I adjusted it
Never noticed

Why Android switches to mobile data and how to fix it

The main reason unwanted switching - mechanism Network Switching, built in AndroidIt evaluates Wi-Fi quality based on three key parameters:

  • 📉 Connection speed (if below 5-10 Mbps, the system may consider the network “not working”).
  • 🔄 Ping stability (delays above 500 ms trigger switching).
  • 📡 Signal level (at a value below -70 dBm, mobile Internet is enabled).

Smartphone manufacturers often overestimate sensitivity these thresholds to "improve" the user experience. For example, Samsung in firmware One UI aggressively switches to 4G, if Wi-Fi slows down even for a split second. And Xiaomi V MIUI may ignore low-speed Wi-Fi even if it is technically connected.

Unfortunately, universal solution No - methods differ depending on the version Android and shells. But there are general approaches:

⚠️ Attention: On devices with Android 12+ And One UI 4.0+ (Samsung) Some settings may be hidden or moved. Check that the paths in your firmware's menu are up-to-date!
Manufacturer shell A typical problem Recommended method
Samsung One UI Frequent switching to 4G when the Wi-Fi signal is weak Disable "Auto-switch" in Wi-Fi settings
Xiaomi/Redmi/Poco MIUI/HyperOS Ignores low speed Wi-Fi Set up "Network Priority" in the engineering menu
Google Pixel Stock Android Switches to mobile data when ping is high Use ADB commands to disable NetworkSwitching
Realme/Oppo ColorOS Wi-Fi disconnects unexpectedly in power saving mode Add Wi-Fi to Optimization Exclusions

Method 1: Disabling auto-switching in the default settings

The easiest way is prohibit the system Automatically switch to mobile data. This method works on most non-rooted devices, but the setup path may vary.

For Samsung Galaxy (One UI):

  1. Open Settings → Connections → Wi-Fi.
  2. Tap the three dots (⋮) in the upper right corner and select Advanced settings.
  3. Find the option Automatic switching to mobile data (or Smart Network Switch) And turn it off.

For Xiaomi/Redmi/Poco (MIUI/HyperOS):

  1. Go to Settings → Wi-Fi.
  2. Select your network and scroll down to Network settings.
  3. Turn it off Automatic connection to a mobile network (may be called Intelligent Wi-Fi Assist).

For Google Pixel and stock Android:

  1. Open Settings → Network & Internet → Wi-Fi.
  2. Tap the gear (⚙️) next to your network.
  3. Find Automatic switching to mobile data and deactivate the slider.

Wi-Fi settings open|

Auto-switch option found (name may vary)|

Option disabled (slider is grey)|

Reboot your smartphone to apply the changes-->

If the option isn't in the menu, it means the manufacturer has hidden it. In this case, try alternative methods from the following sections.

⚠️ Attention: On some devices (Huawei, Honor) disabling auto-switching may result in complete loss of InternetIf your Wi-Fi connection drops, check your network stability before changing settings!

Method 2: Setting network priority via the engineering menu (for experienced users)

If the default settings don't help, you can set priority manually Wi-Fi via engineering menuThis method is suitable for devices on Qualcomm Snapdragon (majority Xiaomi, Samsung, OnePlus etc.), but requires caution - incorrect changes can disrupt the network.

Instructions:

  1. Open the app Telephone and enter the combination:
    ##4636##

    (may be required on some devices) ##808## or ##36446337##).

  2. In the menu that opens, select Wi-Fi information (or WiFi).
  3. Scroll to the block WiFi Network Priority or WiFi Auto Switch Threshold.
  4. Set value WiFi Priority on maximum (usually 1-5, where 5 is the highest priority).
  5. In the section Auto Network Switch install WiFi Threshold on minimum value (for example, -80 dBm instead of -70 dBm).
What should I do if the engineering menu doesn't open?

If nothing happens after entering the code, it is possible:

1. The manufacturer has blocked access (relevant for Huawei, Oppo after 2020).

2. You have Mediatek-processor - try the code ##36446337## or ##54298##.

3. You need to enable “Developer mode” (7 taps on the build number in Settings → About phone).

After the changes reboot your deviceIf Wi-Fi has become more stable, but the speed has dropped, return to the engineering menu and increase the threshold slightly. WiFi Threshold (for example, up to -75 dBm).

Parameter Recommended value What does it do?
WiFi Priority 5 (maximum) Prioritizes Wi-Fi over mobile data
WiFi Threshold -80 dBm Minimum signal level for switching to 4G
Auto Switch Delay 30 seconds Delay before switching (increases stability)
⚠️ Attention: Changes in the engineering menu are not saved after a factory reset or firmware update. Also on some devices (Samsung Exynos, Google Tensor) parameters may be named differently or be absent.

Method 3: Using ADB Commands for Deep Customization (Without Root)

If the engineering menu is not available, you can force shutdown automatic switching mechanism through ADB (Android Debug Bridge). This method works on most devices with Android 8.0+ and does not require root rights, but you will need a computer.

Steps:

  1. Turn on Developer mode (7 taps per Build number V Settings → About phone).
  2. Activate USB debugging in the developer settings.
  3. Connect your smartphone to your PC and install ADB-tools and run the commands:
    adb shell settings put global captive_portal_detection_enabled 0
    

    adb shell settings put global network_recommendations_enabled 0

    adb shell settings put global wifi_watchdog_on 0

  4. For Samsung additionally:
    adb shell settings put global wifi_mobile_data_transition_wifi_score 100

These commands:

  • 🛡️ Disable the "captive portal" check (which can reset Wi-Fi).
  • 🔄 Turn off "network recommendations" (auto-switching mechanism).
  • 📶 Set the maximum Wi-Fi priority for Samsung.

To get everything back, use:

adb shell settings delete global captive_portal_detection_enabled

adb shell settings delete global network_recommendations_enabled

adb shell settings delete global wifi_watchdog_on

⚠️ Attention: On Android 13+ Some ADB commands may require application signatures or not work without root. If the command returns an error Permission denied, try adding a flag --user 0 (For example, adb shell settings --user 0 put global ...).

Method 4: Third-party apps to manage priority

If manual methods don't work, help will come specialized applicationsThey allow you to flexibly configure network priorities, monitor switching, and even block mobile internet for specific applications.

Top 3 applications:

  • 📊 NetGuard — traffic blocker with Wi-Fi prioritization function Allows turn off mobile data completely for selected applications (for example, for YouTube or Netflix). Download: Google Play.
  • 🔄 WiFi Priority — automatically connects to the highest priority Wi-Fi network and blocks switching to 4G. Works on Android 5.0+. Download: Google Play.
  • 🛡️ Internet Guard — monitors traffic usage and forcibly maintains a Wi-Fi connection. Supports white/black lists applications. Download: Google Play.

Example of setting in NetGuard:

  1. Install and open the app, grant root rights (if available) or activate VPN mode.
  2. Go to the tab Applications and find those that “leak” into the mobile Internet (for example, Chrome or Telegram).
  3. Tap on the application → Wi-Fi (allow), Mobile data (block).
  4. Enable the option Block when roaming, if you travel often.

The downside of this approach is continuous operation in the background, which may slightly increase battery consumption. However, it's still more cost-effective than uncontrolled mobile data consumption.

Method 5: Optimize Power Saving (for Stable Wi-Fi)

Often the problem lies not in the network settings, but in aggressive energy saving. Android may turn off Wi-Fi in the background to save battery, which results in switching to mobile data.

How to fix:

  1. Disable Wi-Fi optimization:
    • Go to Settings → Apps → Three dots (⋮) → Special access → Battery optimization.
    • Find Wi-Fi (or Settings) and select Do not optimize.
  2. Add Wi-Fi to the exceptions:
    • IN Settings → Battery → Power saving mode add Wi-Fi to the exceptions.
    • On Xiaomi: Settings → Battery → App Selection → disable restrictions for Settings.
  • Set up Adaptive Battery:
    • IN Settings → Battery → Adaptive settings turn it off Adaptive battery or Background limitation.

    Also check performance mode:

    • On Samsung: Settings → Device Maintenance → Battery → Performance Mode → select High performance.
    • On Xiaomi: Settings → Battery → Performance modeNo restrictions.

    Method 6: Alternative solutions (root, firmware, router)

    If none of the methods worked, there are radical measuresThey are suitable for advanced users and require in-depth knowledge or risk voiding the warranty.

    Options:

    • 🔧 Root access + Xposed/EdXposed:
      • Install the module Network Speed Indicator or WiFi Bonding to force Wi-Fi retention.
      • Use Build.prop Editorto change the settings ro.telephony.def_network_priority.
    • 📱 Custom firmware:
      • Firmware type LineageOS or Pixel Experience often have more flexible network settings.
      • Disadvantage: loss of warranty and risk of bricking the device.
    • 📡 Router setup:
      • Increase signal strength (Transmit Power) in the router settings to 100%.
      • Turn on Band Steering (if the router is dual-band) for smooth switching between 2.4 GHz and 5 GHz.
      • Turn it off 802.11r (Fast Transition) - it can cause conflicts with Android.

    For root users, a useful command to force Wi-Fi priority is:

    su
    

    settings put global wifi_score 1000

    settings put global mobile_data_score 1

    ⚠️ Attention: Change build.prop or installing custom firmware can disrupt NFC, mobile communications, or Wi-FiBefore experimenting, create a full backup via TWRP or OrangeFox.

    Common mistakes and how to avoid them

    Users often encounter common issues when setting Wi-Fi priority. Here's how to prevent them:

    Error Cause Solution
    Wi-Fi connects, but the internet doesn't work. DNS servers are not responding or traffic is being blocked Set up static DNS (eg. 8.8.8.8) in the Wi-Fi settings
    After using ADB commands, my mobile internet stopped working. APN settings have been reset Restore APN in Settings → Mobile network → Access point names (APN)
    The engineering menu does not open. The manufacturer has blocked access. Try alternative codes or use ADB
    Apps ignore Wi-Fi priority The application has its own network settings (for example, VPN) Disable your VPN or adjust the rules in NetGuard

    Another common problem is - "sticky" mobile Internetwhen the smartphone gets stuck on 4G/5G even after returning to a Wi-Fi zone. To fix:

    1. Turn on Airplane mode for 10 seconds, then turn off.
    2. Restart your router and smartphone.
    3. Remove the Wi-Fi network from your saved connections and reconnect.

    FAQ: Answers to frequently asked questions

    🔹 Why did I start switching to mobile data again after updating Android?

    Updates often reset user network settings, including ADB parameters And engineering menuAfter the update:

    1. Repeat the priority setting via ADB or engineering menu.
    2. Check if there are any new options in Settings → Wi-Fi → Advanced.
    3. If you use third-party applications (for example, NetGuard), update them to the latest version.

    On Android 13+ Some parameters may be hidden - try to activate them through ADB with a flag --user 0.

    🔹 Is it possible to customize Wi-Fi priority for individual apps?

    Yes, but only with help third-party applications:

    • NetGuard — blocks mobile data for selected applications.
    • Internet Guard — allows you to create rules for each application.
    • IFTTT (with plugin) AutoWiFi) - automates switching based on conditions (for example, "if YouTube open - use Wi-Fi only").

    Without root rights these applications work through VPN mode, which may slightly reduce the speed.

    🔹 Why doesn't this problem exist on iPhone, but it does on Android?

    iOS uses a different network management algorithm:

    • IN iOS There is no "smart" switching to mobile data - the system either sticks to Wi-Fi or switches off completely.
    • Apple Aggressively caches data, so short-term Wi-Fi interruptions are less noticeable.
    • On Android Manufacturers configure the switching logic themselves, which leads to different behavior Samsung, Xiaomi etc.

    To bring the behavior closer Android To iPhone, disable all auto-switching options and use NetGuard to block mobile traffic.

    🔹 How can I check if my smartphone is actually using Wi-Fi and not mobile data?

    There are several ways:

    1. Network indicator: The Wi-Fi icon (📶) should be displayed in the status bar. without icon 4G/5G or LTE.
    2. Speed ​​test: Launch Speedtest — if the speed matches the Wi-Fi tariff (and not the mobile one), then the traffic goes through the router.
    3. Traffic monitoring: IN Settings → Network & Internet → Data Usage Check if your mobile data counter is increasing during use.
    4. Applications: NetGuard or GlassWire show what type of network is used by each application.

    If your smartphone shows Wi-Fi, but traffic goes through the mobile network, it means it’s turned on. VPN or the mechanism works Network Switching.

    🔹 Will these settings work on a tablet without a SIM card?

    On tablets without 4G/LTE module (For example, Samsung Galaxy Tab S6 Lite or Xiaomi Pad 5):

    • Methods ADB And engineering menu They will work, but they are useless - without a SIM card there is simply nowhere to switch.
    • If the problem is Wi-Fi interruptions, focus on the settings energy saving And router.
    • On tablets with Android 12+ disabling the option may help Automatic connection to open networks in the Wi-Fi settings.