[Android Software/Hacking General [Developers Only]] MotoDefier:
so about two days ago my wife decided to drop her s3 and break the screen as well as the digitizer or touchpad, after much research on how to remove all of her important info that she needed for work i was finally able to do this, and i am going to show you step by step how this is done, the method i am using works on all android devices provided the following pre-requisites.

You must have root, have adb debugging checked on the device, and your device must not be a legacy device unless you have ADB access.

you will need the following before you start this process otherwise you will be shooting blindly and may harm yourself more than help.

Android SDK

Java JDK

Java JRE

an IDE

Android Screen Cast

i recommend for windows users to just download the Android SDK that is bundled with Eclipse IDE, Follow the setup instructions provided with the SDK and then you should be good to go, except you will still need to download Android Screen Cast as it is not included in the SDK.

normally if you have Root and ADB then you can just use the following command to get everythig off of your internal sd card, this will vary by device manufacturer so you may need to find a device specific location of where the data you would like to get would be stored in your specific device. the command you would normally use is "adb pull /storage/sdcard0""C:\" this command issued exactly this way will pull the full contents of your internal sd card to the root of your c:\ drive on your computer

if your like my wife however and you have a keylock it will be a much more daunting task as you cannont use this command to begin with on a screenlocked device you will need to unlock the phone first and depending on how long you devices screen timeout is set to, it will make it harder the faster you have it set to shut off after being inactive so lets get started with how to unlock the screen when it is broken and not touch responsive as well.

you will still use ADB for this its just a matter of how you use it that will get you ready to pull the data you want or need from a device.

for this step you will need a program called android screen cast, this Java Applet will allow you to see what you would be seeing if your screen was working.

once you have this downloaded and open it should be displaying your device on your computer sceen as it would on the device its self, take note that the following process will produce a little lag in what is displayed so it is not going to change as soon as you issue the commands.

so you now have Android screen cast open and adb open as well, its time to start issuing commands to you device.

the first string of commands you will issue is as follows

adb kill-server

adb start-server

adb devices

once you issue the adb devices if your device is connected to adb properly you will get a read back of a number in your adb terminal window this is the serial no. of your device

if you get a read back that says list of devices, your device is not connected properly and you will need to follow a different guide for troubleshooting instructions.

so now that you have the serial no. of your device you are ready to issue the time sensative commands to unlock the screen on your device, once again to unlock the screen you will have to be able to type the second command faster than your screen times out after pressing the power button/ home key or any other device key that would wake the screen. i found the best way to achieve being able to enter these two commands quickly enough to unlock the screen before it times out is to type the first command into adb, wake the phone, hit the enter button to send the command and then you only have to type the second command before the screen times out, here are the two commands

adb shell input text YOUR PASSWORD HERE

adb shell input keyevent 66

this will unlock your device, now you will need to navigate through your system settings with keyevents to disable the lockscreen, and to enable the keep awake function in your settings, at this point i hope you are fairly familiar with every menu and sub-menu on your phone as digging through the phone frantically with keyevents will become very frustrating,very quickly.

so once you have unocked your phone you will need to know the following keyevents in order to navigate through the phone and menu's to get your settings fixed where this becomes a less painful process

keyevents have a number associated with what would normally happen if you pressed on your screen wether it is enter or select, a number you dial or using the d pad or trackball to focus or highlight the item you want to use.

you will have to focus or highlight several times when you enter a sub-menu.

adb shell input events

0 --> "KEYCODE_UNKNOWN"

1 --> "KEYCODE_MENU"

2 --> "KEYCODE_SOFT_RIGHT"

3 --> "KEYCODE_HOME"

4 --> "KEYCODE_BACK"

5 --> "KEYCODE_CALL"

6 --> "KEYCODE_ENDCALL"

7 --> "KEYCODE_0"

8 --> "KEYCODE_1"

9 --> "KEYCODE_2"

10 --> "KEYCODE_3"

11 --> "KEYCODE_4"

12 --> "KEYCODE_5"

13 --> "KEYCODE_6"

14 --> "KEYCODE_7"

15 --> "KEYCODE_8"

16 --> "KEYCODE_9"

17 --> "KEYCODE_STAR"

18 --> "KEYCODE_POUND"

19 --> "KEYCODE_DPAD_UP"

20 --> "KEYCODE_DPAD_DOWN"

21 --> "KEYCODE_DPAD_LEFT"

22 --> "KEYCODE_DPAD_RIGHT"

23 --> "KEYCODE_DPAD_CENTER"

24 --> "KEYCODE_VOLUME_UP"

25 --> "KEYCODE_VOLUME_DOWN"

26 --> "KEYCODE_POWER"

27 --> "KEYCODE_CAMERA"

28 --> "KEYCODE_CLEAR"

29 --> "KEYCODE_A"

30 --> "KEYCODE_B"

31 --> "KEYCODE_C"

32 --> "KEYCODE_D"

33 --> "KEYCODE_E"

34 --> "KEYCODE_F"

35 --> "KEYCODE_G"

36 --> "KEYCODE_H"

37 --> "KEYCODE_I"

38 --> "KEYCODE_J"

39 --> "KEYCODE_K"

40 --> "KEYCODE_L"

41 --> "KEYCODE_M"

42 --> "KEYCODE_N"

43 --> "KEYCODE_O"

44 --> "KEYCODE_P"

45 --> "KEYCODE_Q"

46 --> "KEYCODE_R"

47 --> "KEYCODE_S"

48 --> "KEYCODE_T"

49 --> "KEYCODE_U"

50 --> "KEYCODE_V"

51 --> "KEYCODE_W"

52 --> "KEYCODE_X"

53 --> "KEYCODE_Y"

54 --> "KEYCODE_Z"

55 --> "KEYCODE_COMMA"

56 --> "KEYCODE_PERIOD"

57 --> "KEYCODE_ALT_LEFT"

58 --> "KEYCODE_ALT_RIGHT"

59 --> "KEYCODE_SHIFT_LEFT"

60 --> "KEYCODE_SHIFT_RIGHT"

61 --> "KEYCODE_TAB"

62 --> "KEYCODE_SPACE"

63 --> "KEYCODE_SYM"

64 --> "KEYCODE_EXPLORER"

65 --> "KEYCODE_ENVELOPE"

66 --> "KEYCODE_ENTER"

67 --> "KEYCODE_DEL"

68 --> "KEYCODE_GRAVE"

69 --> "KEYCODE_MINUS"

70 --> "KEYCODE_EQUALS"

71 --> "KEYCODE_LEFT_BRACKET"

72 --> "KEYCODE_RIGHT_BRACKET"

73 --> "KEYCODE_BACKSLASH"

74 --> "KEYCODE_SEMICOLON"

75 --> "KEYCODE_APOSTROPHE"

76 --> "KEYCODE_SLASH"

77 --> "KEYCODE_AT"

78 --> "KEYCODE_NUM"

79 --> "KEYCODE_HEADSETHOOK"

80 --> "KEYCODE_FOCUS"

81 --> "KEYCODE_PLUS"

82 --> "KEYCODE_MENU"

83 --> "KEYCODE_NOTIFICATION"

84 --> "KEYCODE_SEARCH"

85 --> "TAG_LAST_KEYCODE"

lets focus on the keyevents your going to use most and the majority of the rest you will not use but i have included them for your convienence if you do need them

adb shell input keyevent 1 will open your menu

adb shell input keyevent 3 is the same as your home button

adb shell input keyevent 4 is the same as pressing the back button

adb shell input keyevent 19 will move the highlighted area up so if you need to go up in a menu this is what you would enter

adb shell input keyevent 20 will move the highlighted area down

adb shell input keyevent 21 will move the highlighted area left

adb shell input keyevent 22 will move the highlighted area left

adb shell input keyevent 66 is enter this will choose what you have highlighted just like if you were to press on the option to enter it or alter the on/off checkbox of a setting

so to unlock your phone and change the settings you command string should look something like this, this is an example and probably will not give you the results you are seeking you have to pay attention to what is happenng on the Android screen cast applet and enter the commands to manipulate you device properly.

adb kill-server

adb start-server

adb devices

adb shell input text 3337< this number was my wifes pass key yours should be different

adb shell input keyevent 66

adb shell input keyevent 1

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 66

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 20

adb shell input keyevent 66

adb shell input keyevent 66

adb shell input text 3337

adb shell input keyevent 66

adb shell input keyevent 20

adb shell input keyevent 66

adb shell input keyevent 4

adb shell input keyevent 19

adb shell input keyevent 19

adb shell input keyevent 66

and so on, each tiime you enter a keyevent once you have your device unlocked it will act the same as if you were touching the screen, which will keep the phone from sleeping and you having to start over at the beginning, a little tip also is once you have issued a command in the terminal window you can use the up arrow key on your keyboard to scroll through commands that you have issued previously, this comes in handy when you need to issue the same command several times in a row, it saves you from having to type the full command each time. once you have successfully unlocked your phone and disabled the screen lock and enabled the keep awake function usually in developer options section of your menu your quest will become much easier and you can start to use the adb pull function to get your precious data off that busted phone, while you can use the sqlite 3 tool included with the android SDK to pull the .db of your texting app i found it easier to just navigate the phone to the texting app and navigate through my text messages to get the pertainent info we needed from them, using the keyevents to navigate, hope this helps someone save alot of time doing just this with thier device all of this info i just gave you is in many places on the web including some of it on here, however the full spectrum was so fragmented throughout the web that i decided to compile it here in one place for everyones convienence.