ADB Commands to Check an Android Phone Before Buying (2026 Guide)
Useful ADB commands to check a used Android phone before buying: model, Android version, serial number, battery health, MDM apps and accounts — copy and paste.
Updated · 5 min read
In this article
Settings screens can be skinned, menus can be renamed, and a clever seller can install a launcher that shows whatever they like. ADB — the Android Debug Bridge from Google — talks to the operating system directly. With a laptop, a USB cable and five minutes, you can read the real model, software version, battery condition and device-management status of a used Android phone.
This guide gives you the exact commands, explains what each output means, and shows where ADB stops and an IMEI check has to take over.
Before you start: install ADB and enable USB debugging
1. Get the platform tools
Download Google’s official SDK Platform-Tools for Windows, macOS or Linux and unzip them. Open a terminal (or PowerShell / Command Prompt on Windows) in that folder. On Windows PowerShell you may need to type .\adb instead of adb.
2. Turn on Developer options on the phone
- Pixel and most phones: Settings › About phone › tap Build number seven times.
- Samsung: Settings › About phone › Software information › tap Build number seven times.
- Xiaomi / Redmi / POCO: Settings › About phone › tap OS version (or MIUI version) seven times.
3. Enable USB debugging
Open Settings › System › Developer options (Samsung: Settings › Developer options) and switch on USB debugging. Connect the cable, then tap Allow on the “Allow USB debugging?” prompt that shows your computer’s RSA key fingerprint.
Confirm the connection
adb devices
adb devices -lYou should see one line ending in device. unauthorized means the prompt on the phone wasn’t accepted; an empty list usually means a charge-only cable or a missing USB driver on Windows. The -l version also prints the model and product name.
Identity: manufacturer, model and serial number
adb shell getprop ro.product.manufacturer
adb shell getprop ro.product.brand
adb shell getprop ro.product.model
adb shell getprop ro.product.device
adb get-serialno
adb shell settings get global device_namero.product.modelreturns the model number, such asSM-S921Bfor a Galaxy S24 or a Pixel’s marketing name. Search the model number on the manufacturer’s site to confirm the variant and region.adb get-serialnoreturns the serial ADB uses for the device — on most phones the hardware serial number. On older versionsadb shell getprop ro.serialnoshows the same value.device_nameis the name the user set. A name like “John’s Galaxy” on a phone sold as “new” tells you something.
Samsung owners can also run adb shell getprop ro.csc.sales_code to read the region / carrier code (CSC). Compare everything with the Samsung Info report, the Google Pixel Info check or the Motorola Info check, which pull the official record for the IMEI.
Software: Android version, patch level and boot state
adb shell getprop ro.build.version.release
adb shell getprop ro.build.version.security_patch
adb shell getprop ro.build.fingerprint
adb shell getprop ro.boot.verifiedbootstate
adb shell getprop ro.boot.flash.lockedversion.releaseis the Android version (for example14); the security patch date shows how up to date it is.ro.build.fingerprintshould start with the real brand. A “Samsung” whose fingerprint starts with an unknown brand is a clone.verifiedbootstate=greenandflash.locked=1on most phones means a locked bootloader running official software.orangemeans the bootloader is unlocked — fine for enthusiasts, but a warning sign on a phone sold as stock. Not every brand exposes these properties.
Battery health and storage
adb shell dumpsys battery
adb shell df -h /dataIn the battery output, check:
- health:
2= good,3= overheat,4= dead,5= over-voltage,6= failure,7= cold. - temperature: tenths of a degree Celsius, so
310= 31 °C. Above 400 at idle is worrying. - level and voltage (in mV) — watch whether the level drops fast while you test.
Some newer phones also report a charge counter or cycle count here; many don’t. df -h /data shows the user storage size, a quick way to confirm a “256 GB” claim.
Device management, MDM apps and accounts
A phone enrolled in a company’s management system can be locked or wiped remotely, and a phone still signed in to a Google account will hit Factory Reset Protection after a reset. Check both:
adb shell dumpsys device_policy
adb shell pm list packages | grep -i -E "mdm|airwatch|intune|mobileiron|soti|hexnode|kiosk"
adb shell dumpsys accountadb shell dumpsys device_policy
adb shell pm list packages | findstr /i "mdm airwatch intune mobileiron soti hexnode kiosk"
adb shell dumpsys accountdumpsys device_policy: look for a Device Owner or Profile Owner entry. On a personal phone there should be none. An owner app here means the phone is managed.- The package search lists apps from common management vendors. Samsung phones include built-in Knox components — that’s normal; a third-party MDM agent is not.
dumpsys account: near the top, the accounts count should be0on a phone that’s been properly reset for sale.
For a record-level answer, run an MDM status check on the IMEI or serial.
What about the IMEI?
Older guides suggest adb shell service call iphonesubinfo 1. Since Android 10, Google restricts IMEI access to privileged system apps for privacy, so on modern phones that trick returns an error or nothing useful. Read the IMEI the reliable way: dial *#06# or open Settings › About phone. Type dial in the terminal below for every method, then imei followed by the number to validate it:
Then check what ADB can’t see: a GSMA blacklist check for lost/stolen reports and, for Xiaomi, the Xiaomi check for Mi account and lost status. Our used Samsung checklist and check-before-you-buy guide cover the rest.
When you’re done, ask the seller to switch off USB debugging, or do it yourself after purchase under Developer options › Revoke USB debugging authorizations.
Frequently asked questions
Can ADB show the IMEI of an Android phone?
Not on most modern phones. Since Android 10 the IMEI is restricted to privileged apps. Dial *#06# or check Settings › About phone instead.
How do I check battery health with ADB?
Run adb shell dumpsys battery. A health value of 2 means good; the temperature is shown in tenths of a degree Celsius.
Is it safe to enable USB debugging on a phone I’m buying?
Yes, for a short inspection. Turn it off and revoke USB debugging authorizations afterwards.
How can I tell if an Android phone has MDM?
Run adb shell dumpsys device_policy and look for a Device Owner or Profile Owner. Confirm with an official MDM status check.
What does adb devices unauthorized mean?
The phone hasn’t accepted your computer’s RSA key. Unlock the phone and tap Allow on the USB debugging prompt.