The steps to enable USB debugging depend on the version of Android running on the target device, as indicated in the following table:
Android Device
Instructions
Android 4.0 and newer (Jelly Bean)
Enable the USB Debugging option under Settings > Developer options.
For Android 4.2 and newer, Developer options is hidden by default; use the following steps:
On the device, go to Settings > About .
Tap the Build number seven times to make Settings > Developer options available.
Then enable the USB Debugging option. Tip: You might also want to enable the Stay awake option, to prevent your Android device from sleeping while plugged into the USB port.
Kindle Fire devices
Select Settings > Security and set Enable ADB to On. For more information, see the Amazon documentation.
If you are running Android 4.2.2 or later, you may see the following dialog when you connect your device to your PC running RAD Studio:
Click OK to allow USB debugging on your PC. If you accidentally click Cancel, disconnect your device from your PC and connect it back to make the dialog show up again on your device.
Troubleshooting
If your Android device is not correctly detected by RAD Studio or the system Device Manager, follow the steps above to verify that USB debugging is enabled.
For general information about development setup for Android devices, see the Android documentation.
Источник
Как включить отладку по USB на Android
Включенная отладка по USB на Android устройстве может потребоваться для самых разных целей: прежде всего, для выполнения команд в adb shell (прошивка, кастомный рекавери, запись экрана), но не только: например, включенная функция может пригодиться и для восстановления данных на Android.
В этой пошаговой инструкции подробно о том, как включить отладку по USB на Android 5-7 (в общем-то, то же самое будет и на версиях 4.0-4.4), в видео показано включение отладки на Android 9 Pie и на смартфонах Samsung Galaxy.
Скриншоты и пункты меню в руководстве соответствуют почти чистой ОС Android 6 на телефоне Moto (то же самое будет на Nexus и Pixel), но принципиальной разницы в действиях на других устройствах, таких как Samsung, LG, Lenovo, Meizu, Xiaomi или Huawei не будет, все действия практически те же самые, также в статье присутствуют текстовые пути для настроек на других версиях Android и марках телефонов.
Включение отладки по USB на Android телефоне или планшете
Для того, чтобы появилась возможность включить отладку по USB, сначала необходимо включить режим разработчика Android, сделать это можно следующим образом.
Зайдите в Настройки и нажмите пункт «О телефоне» или «О планшете», на Samsung — «Сведения о телефоне» — «Сведения о ПО». На чистом Android 9.0 зайдите в пункт «Система» — «О телефоне».
Найдите пункт «Номер сборки» (на телефонах Xiaomi и некоторых других — пункт «Версия MIUI») и несколько раз нажимайте по нему, пока не увидите сообщение о том, что вы стали разработчиком.
Теперь в меню «Настройки» вашего телефона появится новый пункт «Для разработчиков» и можно переходить к следующему этапу (может быть полезно: Как включить и отключить режим разработчика на Android).
Процесс включения отладки по USB также состоит из нескольких очень простых шагов:
Зайдите в «Настройки» — «Для разработчиков». На Android 9, например, на Nokia — в Настройки — Система — Дополнительно — Для разработчиков. На некоторых китайских телефонах, например, на Xiaomi — в Настройки — Дополнительно — Для разработчиков или Настройки — Расширенные настройки — Для разработчиков. Если вверху страницы есть переключатель, который установлен в положение «Выкл», переключите его в «Вкл».
В разделе «Отладка» включите пункт «Отладка по USB», чтобы включить режим отладки по USB.
Подтвердите включение отладки в окне «Разрешить отладку по USB», внимательно прочитав предупреждение.
На этом всё готово — отладка по USB на вашем Android телефоне включена и ее можно использовать с нужными вам целями.
Видео инструкция
В дальнейшем, вы можете отключить отладку в том же разделе меню, а при необходимости — отключить и убрать из меню Настроек пункт «Для разработчиков» (ссылка на инструкцию с необходимыми действиями была приведена выше).
А вдруг и это будет интересно:
17.07.2021 в 22:27
Здравствуйте! С помощью «Для разработчиков» и «Отладки USB» я удалял проблему связи, через кабель компьютер видел и изображения, и видео, и я оперировал ими. И это прекрасно! Но есть пару но. 1. На всё время данной связи связи с интернетом не было (пока я работал с файлами через кабель, файлы, направляемые ко мне как и всегда через вай-фай, отсутствовали. И как только восстановил через Google связь, файлы гурьбой прилетели). 2. Второе но — после восстановления интернета связь через кабель с компьютером опять отсутствует. Как и ранее. Есть ли вариант разовой настройки на связи одновременно и с интернетом, и компьютером по USB навсегда, кто знает?
28.09.2021 в 17:24
13.10.2021 в 18:30
Спасибо, никак не мог разобраться с просмотром файлов с телефона Redmi 4 на ПК, очень помогли.
Источник
Remote debug Android devices
Published on Monday, April 13, 2015
Technically, I’m a writer
Remote debug live content on an Android device from your Windows, Mac, or Linux computer. This tutorial teaches you how to:
Set up your Android device for remote debugging, and discover it from your development machine.
Inspect and debug live content on your Android device from your development machine.
Screencast content from your Android device onto a DevTools instance on your development machine.
Figure 1. Remote Debugging lets you inspect a page running on an Android device from your development machine.
# Step 1: Discover your Android device
The workflow below works for most users. See Troubleshooting: DevTools is not detecting the Android device for more help.
Open the Developer Options screen on your Android. See Configure On-Device Developer Options.
Select Enable USB Debugging.
On your development machine, open Chrome.
Go to chrome://inspect#devices .
Make sure that the Discover USB devices checkbox is enabled.
Figure 2. The Discover USB Devices checkbox is enabled
Connect your Android device directly to your development machine using a USB cable. The first time you do this, you usually see that DevTools has detected an offline device. If you see the model name of your Android device, then DevTools has successfully established the connection to your device. Continue to Step 2.
Figure 3. The Remote Target has successfully detected an offline device that is pending authorization
If your device is showing up as Offline, accept the Allow USB Debugging permission prompt on your Android device.
# Troubleshooting: DevTools is not detecting the Android device
Make sure that your hardware is set up correctly:
If you’re using a USB hub, try connecting your Android device directly to your development machine instead.
Try unplugging the USB cable between your Android device and development machine, and then plugging it back in. Do it while your Android and development machine screens are unlocked.
Make sure that your USB cable works. You should be able to inspect files on your Android device from your development machine.
Make sure that your software is set up correctly:
If your development machine is running Windows, try manually installing the USB drivers for your Android device. See Install OEM USB Drivers.
Some combinations of Windows and Android devices (especially Samsung) require extra set up. See Chrome DevTools Devices does not detect device when plugged in.
If you don’t see the Allow USB Debugging prompt on your Android device try:
Disconnecting and then re-connecting the USB cable while DevTools is in focus on your development machine and your Android homescreen is showing. In other words, sometimes the prompt doesn’t show up when your Android or development machine screens are locked.
Updating the display settings for your Android device and development machine so that they never go to sleep.
Setting Android’s USB mode to PTP. See Galaxy S4 does not show Authorize USB debugging dialog box.
Select Revoke USB Debugging Authorizations from the Developer Options screen on your Android device to reset it to a fresh state.
If you find a solution that is not mentioned in this section or in Chrome DevTools Devices does not detect device when plugged in, please add an answer to that Stack Overflow question, or open an issue in the webfundamentals repository!
# Step 2: Debug content on your Android device from your development machine
Open Chrome on your Android device.
In the chrome://inspect/#devices , you see your Android device’s model name, followed by its serial number. Below that, you can see the version of Chrome that’s running on the device, with the version number in parentheses. Each open Chrome tab gets its own section. You can interact with that tab from this section. If there are any apps using WebView, you see a section for each of those apps, too. In Figure 5 there are no tabs or WebViews open.
Figure 4. A connected remote device
In the Open tab with url text box, enter a URL and then click Open. The page opens in a new tab on your Android device.
Click Inspect next to the URL that you just opened. A new DevTools instance opens. The version of Chrome running on your Android device determines the version of DevTools that opens on your development machine. So, if your Android device is running a very old version of Chrome, the DevTools instance may look very different than what you’re used to.
# More actions: pause, focus, reload, or close a tab
Below the URL you can find a menu to pause, focus, reload or close a tab.
Figure 5. The menu for pausing, reloading, focusing, or closing a tab
# Inspect elements
Go to the Elements panel of your DevTools instance, and hover over an element to highlight it in the viewport of your Android device.
You can also tap an element on your Android device screen to select it in the Elements panel. Click Select Elementon your DevTools instance, and then tap the element on your Android device screen. Note that Select Element is disabled after the first touch, so you need to re-enable it every time you want to use this feature.
# Screencast your Android screen to your development machine
Click Toggle Screencastto view the content of your Android device in your DevTools instance.
You can interact with the screencast in multiple ways:
Clicks are translated into taps, firing proper touch events on the device.
Keystrokes on your computer are sent to the device.
To simulate a pinch gesture, hold Shift while dragging.
To scroll, use your trackpad or mouse wheel, or fling with your mouse pointer.
Some notes on screencasts:
Screencasts only display page content. Transparent portions of the screencast represent device interfaces, such as the Chrome address bar, the Android status bar, or the Android keyboard.
Screencasts negatively affect frame rates. Disable screencasting while measuring scrolls or animations to get a more accurate picture of your page’s performance.
If your Android device screen locks, the content of your screencast disappears. Unlock your Android device screen to automatically resume the screencast.
Last updated: Monday, April 13, 2015 • Improve article
Источник
How To Enable USB Debugging On Your Android Phone
Learning how to enable USB debugging mode is critical if you want to do anything useful with your Android Mobile Phone. This tutorial explains how to do it.
Are you interested in creating Android Apps, or maybe just running home diagnostics on your device? If so, one of the first things you’ll want to do is connect your phone to your computer. But to do this, it requires that you set up your phone and enable USB debugging mode accordingly. Let’s enable Debug Mode.
Note: Every manufacturer of Android devices varies. This article was written in 2010 and some things have changed but this should give you an idea of what to look out for.
Debugging Mode for Android
When paired with a computer running Android SDK (or another diagnostic program), Debug Mode can allow you to pull up all sorts of useful information about your phone. In the screenshot below I’m using the DDMS tool from the Android SDK to monitor where RAM is being used on my Samsung Galaxy S Android phone. But this is just one example of what you can do!
Enable USB Debugging Mode On Your Android Mobile Phone Device
Newer versions of Android (4.0+)
Step 1
Launch the Settings app on your phone. This app can be found in your App Drawer, or by pressing the menu button on the outside of your device.
Step 2
In the Ice Cream Sandwich (4.0+) or a newer version of the Android OS, the System USB Debugging is now located under Developer Options > Android Debugging.
Done! That’s all there is to enable USB debugging in the new version of Android.
Older versions of Android
The same as above, except after entering the Settings menu you’ll need to enter Applications options.
Next tapDevelopment.
Check the box for USB debugging.
You can also Enable, Stay Awake, and Allow mocklocations to make things easier when you are running tests.
Your phone should now be in Debug Mode. If you go into the notification bar, you’ll find an Ongoing alert stating USB debugging connected. Note that even while USB debug mode is enabled you can still Mount your Android phone to your computer to transfer files without causing any problems!
79 Comments
Awesome – Is there a simple way to backup your phone this way also?
Thanks man totally worked!!
Yes, if your phone is rooted, Titanium Backup Pro is by far the best backup utility out there
Thank you, awesome it is so simple super.
hello there…!!1 i need to know if there is other ways that makes my android phone get in to hard reset mode because the three combination key wont work for me and i even tried to connect to mobogenie but how could i enable usb debug mode please help…. 1??
Thank you so much! Was really helpful;-)
i am locked out and cannot enable debbuging. not linked with google account and have no 3 button combi. “/ HEEEEEEEEEELPPPP need to master reset but adb wont connect to device, odin connects but hangs at file analysis. newB but im sure ive done EVERYTHING
@tanny I have the exact same problem, did you manage to do anything? Send me a reply pls if you found any solution. Any help would be appreciated
YES! i have my galaxy S working perfectly now 🙂 Go to youtube and Search Galaxy usb jig. when in download mode odin WILL flash but i just chose to reset. the youtube video does no justice for how fiddly the thing is to make, but it does work so be patient. dont buy a jig kit its only like 50pence to get all the bits you need.
please help bro . your problem is now my problem any solution please contact me
Excellent Dennis! Thanks for the feedback. I’m glad the article helped out!
Nice,, Thanks a lot.
Thanks for this info! I am using EasyTether Pro and I have a question. Once I check the box for ‘USB Debugging’ do I (and should I) leave this box check alway? Or should I manually check this box every time I go to use my EasyTether Pro app? Is there any danger in leaving the box for ‘USB Debuggin’ always checked? Also, why wouldn’t something like USB Debugging be a default feature anyway? Thanks for any help and information!
@Aaron, Great feedback! To answer your question, once you check USB Debugging it should remain checked indefinitely. There are a few things that can disable it; certain apps, system updates, and total loss of battery life (in some cases).
There isn’t any danger in leaving USB debugging mode enabled, but the reason that it isn’t on by default is because it causes a lot of driver issues if you plug it into a computer. You’ll notice while USB debug mode is off that you can easily mount your phone as an external drive, enable (built-in subscription based) tethering, or just have it charge. With Debug mode on, you usually need to download/install an additional driver on your computer if you want to retain the same features.
USB debug mode also uses up more system resources on the phone, so if you need to use it while it is charging you might notice slower performance. But, most USB-based tethering apps need it enabled because it grants elevated access privileges.
Hope that helps. Thanks for the groovy question!
whenever i m trying to turn on USB debugging it restarts my phone & after the restart again debug mode is unchecked.. & same restarting thing is there… can’t connect my Phone to PC.. any solution
Can someone hack in your phone going through USB debugging. Is that what this is for. Do they need access to your phone to hack in it?
look at bet your bottom dollar on youtube the one with the guy in the mask
I have problem to log as debug mode even I have set the option to debug mode. It will still remain as USB storage, any advise on this? I am using Galaxy S, Android 2.3.3. Thanks.
Sir , Have you solved this problem ? Till now existing for me. If you got rid of this , pleaese show me the way.
i hope by now you have the issue resolved.two years down the line.
> i hope by now you have the issue resolved.two years down the line.
Yes – by buying a new phone with Android 4.1 (not because of the problem with USB debugging but because the old one had too small a memory and a lot of software doesn’t install on the SD card).
The new phone (Samsung Galaxy S II plus) has USB debugging switched OFF by default, which is what I want. Connecting it to the Win7-PC at home as a hard drive now works fine without having to switch off USB debugging manually every time.
Unfortunately, at work, where an old XP system without admin rights is installed, the PC does not find a driver for accessing the phone as a hard disk, so I cannot load pictures ONTO the phone (download of pictures still works with some XP-builtin camera app).
Older versions of Android like 2.3.3: Task the following: Enter the Settings menu you’ll need to click Application options. Then click on development;you’ll see debug mode. Click on it….You should get it right now.
Is there a way to enable USB debugging with a broken screen?
Hi, I don’t have the Development entry. What should I do ? Android 2.3.4, kernel 2.6.32.9 infotmic “flytouch 3”
Thanks 🙂 Good Help
nice post. its really help for my Android IP Webcam.
Thanx a million Sir. It worked for my Samsung Galazy Note. Was struggling for a week. Wroked as a breeze..Thanx again.
You bet! And welcome to the groovyPost community!
I need a help with my phone Motorola XT531. After its Rooted, i could move many apk files to SDcard and create a link file to place in the original folder. So using this method was great. But I dont remember exactly why, I guess I move motoswitch.apk from system/app and did not create de link to replace it. So now i can not access the home and the worst the usb debug is not selected. Does anybody know how can I enable it? Or use the Update.zip to restore just the system/app folder to the original place, because I’ve a original copy of it in the SDCard.
Thanks! Simple and easy to understand!
I have a Droid RAZR. Following your instructions it will not let me changer the USB debugging to USB charge. Can you help me.
Maybe you need to click some ones times on Adjust> About telephone> Compilation number
Just by switching off the USB debugging mode I resolved the issue tht had been driving me barmy.
Thanks for your help.
What issue were you having Geoff?
thanks for the post.
Like Geoff Berry, I need to switch *OFF* USB Debugging on my Samsung Galaxy Ace in order to connect it as a mass storage device to my PC.
The problem is that I have to do it every time again, which is a big hassle. Even when I have it switched off, as soon as I plug in the USB cable, it automatically switches on again, and I have to perform all the above steps again.
Do you know of a way of permanently switching OFF the USB debugging once and for all?
Thanks in advance.
Groooooveee Mannnnnnn! Yeah walked me right home, I love ya for this.
Thanks, was really helpful 🙂
NOT help Have any ideas? pls
Some time ago I was had a problem related some posts above tha was about I got blank screen after I had moved a system file. So I asked for help on how to enable the usb debug without use settings menu, off course that was because if I got a blank screen i could not use settings menu. So far I don’t know how to enable de usb debug, but the solution were this steps. 1 – Reset the cellPhone to default factory 2 – paste the missed file on the sdcard using a PC. 3 – using another phone send to you a sms and paste a link to an webmail. 4 – using a PC, send to yourself a link to the file posted on your sdcard described above using the webmail. 5 – turn on you phone, follow the initial setup screen. 6 – Your sms will be received and so click on the link, then the webmail will be launched. 7 – click on the link and select to install the missed file. Doing this steps I solve my problems, good look to you.
thaanx. you are great!
Just great. Thanks!!
Once again, you are amazing!
dude… you literally saved my life…
The best post I have seen so far about USB debugging.
Well thank you very much!
For the last few days I have looked at debugging an Android phone or any indormation to connect an android phone. I have an HTC Magic which I received last Christmas from my son. He knows I like gadgets and buttons, it was an introduction to touch phone. I used it until some time in February and then on and off the next couple of months. I have a very nice Nokia E5 which does GPS without going online and I can connect to the computer to transfer files and photos to my hearts content. Now my needs from a mobile are that I can TXT, phone, take pictures and use the GPS. Now the Magic, the camera pixels are less, the GPS you have to go online being Google, yes I can text and phone, but I cannot connect to the computer so I cannot upload Co-pilot which I bought. I have ticked the debug, and the phone tells me the software is up to date. I am tempted to do a factory reset, do you know how dangerous that is, should I have the sim card out, it is the same card I use on my Nokia when I am fed up with the Magic. By the way I live in rural France where mobile signals are optional, I am not a computer whiz but I get by and I am retired.
I’m not sure of what you’re tying to do. Co-pilot has a free android app which can be downloaded form the Google Play store. If you are trying to run the co-pilot Windows program on your phone that will not work, it only works on Windows computers.
If you purchased one of the area-specific premium Co-pilot apps from the Google Play Market, you don’t need USB debugging to transfer it to your phone. It should just be downloadable straight to your device. If the device isn’t listed as compatible, you can try forcing it by just transferring it to your device after mounting the SD.
Don’t forget to disable debug mode when its not in use. Leaving debug mode enabled is a security issue.