Open Android Settings
Pull down the notification shade and tap the gear icon, or open the "Settings" app from your application drawer.
Step-by-step guide to unlocking Developer Options and enabling USB Debugging on Samsung, Google Pixel, Xiaomi, OnePlus, and Motorola devices.
Pull down the notification shade and tap the gear icon, or open the "Settings" app from your application drawer.
Scroll down to the bottom of the Settings menu and tap "About phone" (on Samsung devices: Settings > About phone > Software information).
Find the "Build number" entry and tap it 7 times in rapid succession. You will see a toast notification saying "You are now a developer!" Enter your lock screen PIN/password if prompted.
Go back to the main Settings menu. Tap "System" > "Developer options" (on Samsung: Settings > Developer options at the very bottom; on Xiaomi: Additional settings > Developer options).
Scroll down to the "Debugging" section and flip the toggle switch for "USB debugging". Tap "OK" on the confirmation prompt.
Plug your Android device into your computer with a USB data cable. Unlock your phone. When the "Allow USB debugging?" dialog appears, check "Always allow from this computer" and tap "Allow".