LG G2 - Debugging mode not enabled

17
2014-04
  • ono

    I'm attempting to run an app on the LG G2 (Verizon) using Eclipse on a Mac. The phone, however, is not recognized by the computer. I enabled debugging but it doesn't appear when I do adb devices. Additionally, I never receive the debugging notification when I put the phone in debugging mode. I think it's the phone since I've ran other devices on the mac with no problems.

    Any suggestions on why the debugging mode is not being enabled?

  • Answers
  • ono

    I found the solution: Assuming you have debugging mode enabled, you have to change the USB settings to Internet Connection: Modem or ethernet. Keeping it on Charge Phone, Media Sync, or Camera does not enable debugging.

  • user42949

    Try another usb2 cable. I had the same issues with the S2 after a while it gives me Unknown Device, even if before was known. Try another cable and see if is being recognized. As well it has to be on MTP ( media device ) and not PTP (camera).

    Also you could try another thing: while your phone is connected disable debugging mode and enable it back. Also could try restarting your adb.

  • user44860

    on the G2 goto Settings: About Phone: Software Information: Click Build Number 5 times. Go back and choose Development Settings Enable USB Debugging

  • Seraphim's host

    The user44860 answer is almost correct. Goto Settings, About Phone, Software Information:

    Click Build Number 7 times. You should see a message saying that now you're a developer.

    So, you can go back and enabe USB Debugging in the Development Settings.

    Maybe you've to detach the usb cable, enable the debug and re-plug the usb cable.


  • Related Question

    2.3 gingerbread - Broken screen while debug mode was disabled. How can I re-enable adb?
  • Nate Parsons

    The screen of my phone is physically broken, so it doesn't display anything, but the touch aspect does seem to be working, as I can unlock my phone, and get haptic feedback.

    Before I go to get it replaced, I'd like to back up some personal data from the built-in memory to the SD card. I'm fairly certain that if I can get adb to recognize the device, then I can use Android Screencast to see where I am touching the screen and do what I need to do. Problem is, when I plug it in, it's not recognized, while my emulator is.

    I suspect that I might not have USB debugging enabled, which I think is necessary for adb to work. If this is the case, can someone give me screenshots of their Droid X (running 2.3.X) going from the home screen, through all the menus, to activating debug mode? Hopefully I can do it by dead reckoning and adb from there.

    Edit: I haven't changed anything about the ROM or launcher; it's all stock.


  • Related Answers
  • Broam

    The Droid X does not have a physical keyboard - but if it did you could try this in a terminal. I'm leaving this answer here for other phones that have busted screens.

    setprop persist.service.adb.enable 1

    That turns on USB debugging (on a HTC Dream running RC29), and is one of the ways to root the Dream when it has a busted screen.

  • Joseph

    This should help: http://code.google.com/p/androidscreencast/. Allows you to view your android screen and control your phone from your computer.

  • ce4

    Had exactly the same problem recently (on a friend's Nexus S running stock Android 4.0 with a completely broken screen & digitizer and adb switched off):

    Get a recovery system running with adb enabled. Then use adb console to access the device's data and create a backup. On Nexus S you cannot use the sdcard to get the data off the device, so you need to use adb for that.

    Prerequisites:

    1. Phone does have fastboot mode with boot command enabled
    2. Phone still works (except for the screen)
    3. SDK installed (with working adb + fastboot executables)
    4. CWM recovery image downloaded to /tmp/cwm.zip (has enabled adb when started)
    5. Linux with installed uudecode (part of package 'sharutils' on Ubuntu)

    How to do it:
    a) Start device in fastboot mode and boot the CWM recovery this way

    me@workstation:~$ fastboot boot /tmp/cwm.zip

    b) wait some time for CWM to boot, then log into the device

    me@workstation:~$ adb shell
    shell@android:/ $ mkdir -p /tmp/backup/data /tmp/backup/sdcard

    Replace DATA_DEV and SDCARD_DEV by the real devicenames
    depending on your phone, it's most likely one of these:

    • DATA_DEV: /dev/block/mtdblock*
    • SDCARD_DEV: /dev/block/mmcblk*
    • use 'df' command to find candidates by size.

    shell@android:/ $ mount -oro <DATA_DEV> /tmp/backup/data
    shell@android:/ $ mount -oro <SDCARD_DEV> /tmp/backup/sdcard
    shell@android:/ $ exit
    me@workstation:~$ adb shell tar czf - /tmp/backup \| uuencode foo | uudecode -o - > /tmp/backup.tar.gz

    Caveats and further explanations:

    • Why 'uuencode'? ADB console seems to intercept the data stream and obviously inserts a carriage return before each single line feed. Uuencoding the data before transmitting it via adb's stdout protects against that.
    • Does not work on encrypted devices
    • You can also just repeat the process on unmounted devices and transmit all of the /dev/block/* one by one and figure out which one is for what afterwards
    • You need to find a suitable CWM recovery image yourself
  • ce4

    If the device is capable of USB host mode you can buy a USB-OTG cable (USB on the go) and connect a USB mouse or a USB keyboard to bypass the broken touch screen.

  • geffchang

    Use mobigenie to get the phone connected. You can control the phone from there.