Jump to content

USB Debugging, Android 6.0.1 Galaxy s6


SamR

Recommended Posts

So. I bought a USB Ducky with the hope that it would allow me to enable USB Debugging and set file transfer to MTP mode on my wife's broken Samsung Galaxy S6 with a broken screen, in order to get two years of family photos that she wasn't backing up off the now totally inaccessible phone. I have almost no coding experience (as in, I made a Geocities site in the 90s and learned some basic HTML, and that's it). So when I discovered that the code written by folks a few years back to do this hack to phones on Android 4 wouldn't work at all on Android 6, I gave up hope. For a minute. Then I decided I'd try it myself. I discovered, through trial and error, that this version of android doesn't accept rapid-fire input from a keyboard. A default delay of 300 was needed to prevent the phone from missing commands. If I had to guess, I'd say the Google people got wise and built this in to try to prevent this kind of attack. Still, the code below does work. It does three things: It enables developer mode, enables USB Debugging, and changes the USB behavior from Charging to MTP. If your USB behavior is already MTP, it'll change it to PTP, so edit that if you need to. Anyway, thought I'd share. It did work. Best of luck, especially to others are having similar problems and hoping for an aquatic foul based answer. 

DEFAULT_DELAY 300
REM Enable Developer options and usb debugging on Android
REM Author: SamR
REM Tested on Galaxy S6
REM Android Version 6.0.1
REM To start at the home screen
ESCAPE
ESCAPE
ESCAPE
ESCAPE
ALT ESCAPE
DELAY 500
REM To enter settings
DOWN 
DOWN 
DOWN
ENTER
ENTER
DELAY 500
STRING s
STRING e
STRING t
STRING t
STRING i
STRING n
STRING g
STRING s
DELAY 500
DOWN
ENTER
DELAY 500
REM To Access About Device
RIGHT 
RIGHT
RIGHT
RIGHT
RIGHT
RIGHT
RIGHT
RIGHT
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
ENTER
REM To Enable Developer Options
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
ENTER
ENTER
ENTER
ENTER 
ENTER
ENTER
ENTER
DELAY 500
REM To Enable USB Debugging
ESCAPE
UP
ENTER
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
ENTER
DELAY 500
TAB
ENTER
REM Set To MTP
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
DOWN
ENTER
DOWN
ENTER
REM Return To Home
ESCAPE
ESCAPE
ESCAPE
ESCAPE
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...