Fixing a greyed-out USB debugging toggle on Android
You open Developer options, scroll to USB debugging, and the switch is grey. You tap it and nothing happens, or you get a line like “This setting is managed by your organization”. adb can’t see the phone, and every guide you find says “just enable USB debugging” as if that were the hard part.
The short answer: there are three usual causes. One, Developer options aren’t fully unlocked or the master switch at the top is off. Two, something is managing the phone, either an MDM or a work profile policy. Three, an OEM security layer (Samsung, Xiaomi and a few others) is holding the setting back until you satisfy a condition. This tutorial goes through them in the order I check them, cheapest first.
This is for developers, QA people and operators who run a handful of Android phones and need adb working. I run phones for a living out of Singapore, and this shows up whenever a new, second-hand or company-issued handset lands on my desk. By the end you should know which of the three causes you have, and either have the toggle working or know exactly who to ask to change a policy.
What you need
- the phone, unlocked, with a screen lock (PIN, pattern or password) already set. some builds refuse to unlock Developer options without one
- a USB data cable, not a charge-only cable. this matters later, when adb still shows nothing
- a computer with Android platform-tools installed. the download and setup are documented in the official adb page on developer.android.com
- the phone’s Google account and, on Xiaomi devices, the Mi account, plus a working SIM if the OEM asks for one
- admin contact details, if the phone was issued by an employer or school
- cost: nothing for the fix itself
If adb is new to you, read what is adb, the client, server and daemon first. it explains what the “unauthorized” and “offline” states mean, which will save you time in step 7.
Step by step
1. Tap build number 7 times, properly
Most greyed-out toggles I see are really Developer options that were never fully unlocked.
Go to Settings, About phone, and tap Build number seven times in a row. Enter your PIN when asked. You should see a toast such as “You are now a developer!” (if it was already unlocked, it says “No need, you are already a developer”).
The location of Build number varies:
- Pixel and most near-stock phones: Settings, About phone, Build number
- Samsung: Settings, About phone, Software information, Build number
- Xiaomi, Redmi, POCO: Settings, About phone, tap the MIUI or OS version line seven times (it is not labelled Build number)
- Oppo, Realme, OnePlus: Settings, About device, Version, Build number
Expected output: a new Developer options entry, under System on stock Android, or at the bottom of Settings on some skins.
If it breaks: no toast and no menu means you are probably not the primary user (see step 3), or a policy hides the menu entirely (step 4). Guest and secondary user profiles can’t unlock it.
2. Check the master switch at the top of Developer options
Open Developer options and look at the very top. There is a “Use developer options” switch (the wording varies a bit by version). When it is off, everything below it is greyed, including USB debugging.
Turn it on, then scroll down and try USB debugging again.
You can confirm the state from a shell if adb already works from an earlier session:
adb shell settings get global development_settings_enabled
adb shell settings get global adb_enabled
Expected output: 1 for each when everything is on. adb_enabled is the value the USB debugging toggle controls.
If it breaks: the master switch is on but USB debugging is still grey. Go to step 3.
3. Rule out multi-user and guest restrictions
Android lets a phone have several users, and only the owner (or an admin, depending on the build) normally controls debugging.
Swipe down, tap the user icon, and switch to the owner profile. Try steps 1 and 2 again there. On a phone you bought second-hand, also check Settings, System, Multiple users, and see whether someone left extra profiles behind.
Expected output: the toggle becomes tappable in the owner profile.
If it breaks: you are the owner and it is still grey. That points to management or an OEM condition. Step 4 covers management.
4. Look for MDM or work profile restrictions
This is the cause that stumps people most, because the phone looks normal. Android has a device policy that lets a device owner or an enterprise admin disallow debugging features entirely. It is a documented restriction called DISALLOW_DEBUGGING_FEATURES in the Android UserManager reference.
Signs the phone is managed:
- Settings shows a “Managed by your organization” or “Managed by your administrator” banner or line item
- there is a briefcase icon on some apps, meaning a work profile exists
- Settings, Security, Device admin apps (or Device admin apps under Security and privacy) lists an MDM agent such as Intune Company Portal, Workspace ONE, or a Google-based device policy app
- tapping the greyed toggle shows a message that mentions your IT admin
What to do depends on who owns the phone:
- it is your phone and a work profile was added to it: removing the work profile (Settings, Accounts, Work) often lifts the restriction if the policy applied to the profile. removing it deletes work app data, so check with your employer first
- it is a company or school phone: ask the admin. many MDMs support a test group or an exception for developer devices, and it is a two-minute change for them if you have a reason
- it is a second-hand phone that is still enrolled in someone else’s MDM: contact the seller, or the previous organization, to release the device. I won’t cover ways around enrollment or policy locks here, and I’d steer clear of anything that promises to
Expected output: after the policy change, the toggle becomes active, usually without a reboot.
If it breaks: no management signs anywhere and the toggle is still grey. Go to step 5.
5. Clear OEM security conditions
Some manufacturers add their own gate on top of stock Android.
Xiaomi, Redmi and POCO have a separate entry called “USB debugging (Security settings)” just below the normal one. Turning it on requires being signed into a Mi account, and Xiaomi’s own prompt says a SIM card must be inserted. If you can’t enable USB debugging (Security settings), you often can’t approve app installs or input over adb either. Insert a SIM, sign in to a Mi account, and try again.
Samsung One UI has Auto Blocker (Settings, Security and privacy, Auto Blocker), which includes an option to block commands over a USB cable. On One UI 6.1 and later, leaving that on can stop a computer from talking to the phone, even with USB debugging on. If adb connects oddly on a Galaxy, turn Auto Blocker off temporarily while you work. Samsung also has Knox policies, which are the same class of problem as step 4 if the phone is enrolled.
Expected output: the toggle enables, and the security variant on Xiaomi also enables.
If it breaks: every OEM condition is met and the toggle is still grey. Try a reboot, then a safe-mode check: boot into safe mode. If the toggle works in safe mode, a third-party app (usually a device manager, launcher or security app) is interfering. Uninstall the newest one and retry.
6. Turn USB debugging on and set the USB mode
With the greying gone, tap USB debugging and accept the confirmation. Then pull down the notification shade after plugging in a cable and set USB mode to File transfer (MTP) instead of Charging only. Some phones will not bring up the adb interface in charge-only mode.
Expected output: a dialog on the phone titled “Allow USB debugging?” showing an RSA key fingerprint from your computer. tick “Always allow from this computer” and tap Allow.
If it breaks: no dialog appears. Swap the cable and port. Charge-only cables are the most common reason for a phone that charges but never shows up.
7. Verify from the computer
Run:
adb kill-server
adb start-server
adb devices
Expected output looks like this, with your own serial:
List of devices attached
R58M12ABCDE device
If it breaks: the state matters.
unauthorized: the RSA prompt wasn’t accepted. In Developer options, tap “Revoke USB debugging authorizations”, unplug, replug and accept againoffline: restart the adb server, then replug. update platform-tools if the version is old- nothing listed: on Windows check Device Manager for an unknown device and install the OEM USB driver, or Google’s USB driver for Pixels
8. Save a check you can rerun
Once it works, keep a small script so the next phone takes seconds to diagnose:
#!/usr/bin/env bash
serial="${1:?usage: check.sh SERIAL}"
adb -s "$serial" shell settings get global development_settings_enabled
adb -s "$serial" shell settings get global adb_enabled
adb -s "$serial" shell dpm list-owners
dpm list-owners prints any device owner or profile owner. Empty output means no MDM is registered as owner. A package name means something is managing the phone, which explains a policy lock from step 4.
Expected output: two 1 lines and either nothing or a component name.
If it breaks: dpm prints a security exception on some builds. Fall back to the Settings checks in step 4.
If you want a graphical front end for repeated checks, best adb GUI tools compares the options. And when a phone misbehaves later, adb bugreport, capture and read shows how to grab logs that mention device policy and settings changes.
Common pitfalls
- tapping the wrong line seven times: on Xiaomi it’s the OS version, not the build number. people on Samsung often stop at “About phone” and never open Software information
- assuming a factory reset fixes an MDM lock: on an enrolled company phone, the enrolment usually re-applies after the reset, and you’ve lost your data for nothing. ask the admin first
- fixing the toggle but never accepting the RSA prompt: you end up with
unauthorizedand think the toggle didn’t work - using a charge-only cable and blaming the software
- forgetting Auto Blocker or the Xiaomi security toggle
Scaling this
Below about ten phones, the manual route above is fine. Note each phone’s model, Android version and which step fixed it in a spreadsheet.
At around a hundred phones, per-device taps stop being realistic. Move enrolment into an MDM that you control, put developer devices in their own group, and set the policy so debugging is allowed on that group only. Keep one written checklist per OEM. If you drive phones with scripts, Android RPA with adb and uiautomator2 shows what a reliable setup needs on the device side. only automate apps and devices you own or are authorised to test.
At a thousand, you are running a device fleet. USB hubs, per-device authorization keys, and a proper adb server layout become the main work, and the greyed toggle becomes a provisioning ticket rather than a tap.
If the phone in your hand is locked by someone else’s policy and you just need a device to test on, you can rent one. cloudf.one rents real Android phones in Singapore on dedicated hardware, each with a persistent Singapore mobile IP, controlled from the browser. it’s Singapore-only. there is no self-service adb: adb and Appium reach a rented phone only through a WireGuard tunnel that we set up on request (email [email protected]). It won’t help if you specifically need to fix your own handset, only if you need a clean device.
Where to go next
- what is adb, the client, server and daemon for how the connection actually works once the toggle is on
- best adb GUI tools if you’d rather click than type
- the blog index for the rest of the adb how-tos
Written by Xavier Fok
disclosure: this article may contain affiliate links. if you buy through them we may earn a commission at no extra cost to you. verdicts are independent of payouts. last reviewed by Xavier Fok on 2026-09-30.