Hi
So you want to emulate the native android shutdown sequence. Broken power button? Car or fixed Nexus 7 installation? TV Stick? Here is the solution! (I advise you not to use one of the many shutdown apps because they shutdown without unmounting filesystem etc. and thus can damage your filesystem in the long run).
This should work on ANY Android device!
You can do it directly on your device, no adb needed. BUT: You have to be rooted!
How to:
1. Install Bash X from playstore (I'm not affiliated with them)
2. Start it and choose #root shell
3. Type: getevent -c 3
4. Push power button and release it (short, without the boot dialog)
5. Now you see something like this:
# getevent -c 3
add device 1: /dev/input/event0
name: "pmic8xxx_pwrkey"
add device 2: /dev/input/event1
name: "gk-keypad-8064"
add device 3: /dev/input/event4
name: "hs_detect"
add device 4: /dev/input/event3
name: "suspend_autotest_pwrkey"
could not get driver version for /dev/input/mice, Not a typewriter
add device 5: /dev/input/event2
name: "touch_mxt1188S"
/dev/input/event0: 0001 0074 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0074 00000000
#
add device output shows you the event numbers off your input devices. On my LG Pad the power key is assigned to /dev/input/event0. On your device it will be a other eventX number. On my Nexus 7 it is event2 (gpio).
Now we convert the hex strings of the events in dec (google a online converter). The last 3 lines then look like this:
/dev/input/event0: 1 116 1
/dev/input/event0: 0 0 0
/dev/input/event0: 1 116 0
1 116 1 means power key down
1 116 0 means power key release
6. Install Tasker. Set up a new profile with the profile you want to be the trigger for your action (shutdown). Under tasks choose script, start shell and paste our new script:
/dev/input/event0: 1 116 1;
/dev/input/event0: 0 0 0;
sleep 1;
/dev/input/event0: 1 116 0;
Now we need only some dpad keys for going down and right in the menu:
input keyevent 20;
input keyevent 66;
input keyevent 22;
input keyevent 66;
(Where 20 is down, 22 is right and 66 is enter. This works on stock and CM10)
The Tasker action finally looks like this:
/dev/input/event0: 1 116 1;
/dev/input/event0: 0 0 0;
/dev/input/event0: 1 116 0;
input keyevent 20;
input keyevent 66;
input keyevent 22;
input keyevent 66;
exit;
Don't forget to check "use root" in your action. Test it out!
Cool it is
I also thank the many people working on this question on other places.
edit: if you experience no proper shutdown (have to press 15sec power button for boot), its because tasker hangs on shutdown. Export a app from tasker and start it with automateit. Weird but it works
Olivier
Related
I use an Apple Wireless keyboard with my android phone and it works well but not perfectly. Many keys aren't mapped properly.
On this thread I hope some skilled people will come along and help generate a keymap bin file for this great keyboard so more android users can benefit from it.
Checking the logs when the phone connects to the keyboard show:
W/KeyCharacterMap(13414): Can't open keycharmap file
W/KeyCharacterMap(13414): Error loading keycharmap file '/system/usr/keychars/Apple_Wireless_Keyboard.kcm.bin'. hw.keyboards.196612.devname='Apple Wireless Keyboard'
W/KeyCharacterMap(13414): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
Click to expand...
Click to collapse
So it appears we just need to generate an Apple Wireless Keyboard kcm file and this page should help: http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html#androidKeymapIntro
I am going to have a go but am probably not technically skilled enough for this.
i got the same problem, but no solution...
I use the apple wireless keyboard, the norwegian version, and of course the layout for default bluetooth keyboard is english and doesn't match the hardware keys for my norwegian keyboard. My question is about the file pointed to here:
"Using default keymap: /system/usr/keychars/qwerty.kcm.bin"
Is this in any way related to the on-screen keyboard? If not, if it will be working as a default with the apple keyboard, then maybe it is possible to just manually edit the file? I don't know anything about this, so sorry if this is a stupid question My phone is not rooted, so I don't even have access to "/system/usr/keychars/qwerty.kcm.bin"..
I would very much appreciate if anyone could check this on their phone, maybe paste the contents of the file here? If one could easily change the mapping of the bluetooth keyboard in this file, this could work for me.
In my case, I'm satisfied with the keyboard, works well, but the default layout is in english and that means I can't use the norwegian hardwarebuttons "ÆØÅ".
Have been trying a bit on my own, with the fear of "bricking" my device,
I am a total noob with android so please don't laugh if my ideas are stupid
Please help!
The file /system/usr/keychars/qwerty.kcm.bin seems impossible to edit.
However, I found the file /system/usr/keylayout/qwerty.kl
The following is the contents of the file:
key 399 GRAVE
key 2 1
key 3 2
key 4 3
key 5 4
key 6 5
key 7 6
key 8 7
key 9 8
key 10 9
key 11 0
key 1 BACK WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 230 SOFT_RIGHT WAKE
key 60 SOFT_RIGHT WAKE
key 107 ENDCALL WAKE_DROPPED
key 62 ENDCALL WAKE_DROPPED
key 229 MENU WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 59 MENU WAKE_DROPPED
key 127 SEARCH WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 228 POUND
key 227 STAR
key 231 CALL WAKE_DROPPED
key 61 CALL WAKE_DROPPED
key 232 DPAD_CENTER WAKE_DROPPED
key 108 DPAD_DOWN WAKE_DROPPED
key 103 DPAD_UP WAKE_DROPPED
key 102 HOME WAKE
key 105 DPAD_LEFT WAKE_DROPPED
key 106 DPAD_RIGHT WAKE_DROPPED
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 116 POWER WAKE
key 212 CAMERA
key 16 Q
key 17 W
key 18 E
key 19 R
key 20 T
key 21 Y
key 22 U
key 23 I
key 24 O
key 25 P
key 26 LEFT_BRACKET
key 27 RIGHT_BRACKET
key 43 BACKSLASH
key 30 A
key 31 S
key 32 D
key 33 F
key 34 G
key 35 H
key 36 J
key 37 K
key 38 L
key 39 SEMICOLON
key 40 APOSTROPHE
key 14 DEL
key 44 Z
key 45 X
key 46 C
key 47 V
key 48 B
key 49 N
key 50 M
key 51 COMMA
key 52 PERIOD
key 53 SLASH
key 28 ENTER
key 56 ALT_LEFT
key 100 ALT_RIGHT
key 42 SHIFT_LEFT
key 54 SHIFT_RIGHT
key 15 TAB
key 57 SPACE
key 150 EXPLORER
key 155 ENVELOPE
key 12 MINUS
key 13 EQUALS
key 215 AT
Click to expand...
Click to collapse
If I use a text-editor to edit this file, and save it in the same charset as the original, it should work, right?
When I press the hardwarebuttons -ÆØÅ- , I get ';[
so accordingly I am thinking of changing the following:
key 26 LEFT_BRACKET --> Å
key 39 SEMICOLON --> Ø
key 40 APOSTROPHE --> Æ
I fear that I will "brick" my phone if this doesn't work. Does anyone have an opinion?
If this is indeed a stupid idea, I hope somebody can tell me before I destroy my phone
I went ahead and tried this, after consulting an experienced friend who thought this wouldn't do any harm. It turned out this had no effect at all. Phone is ok, still nothing changed at all.
Found out how to edit the .kcm.bin-file and now I made it work for me,
and maybe others with norwegian apple keyboard
http://forum.xda-developers.com/showthread.php?p=11886341#post11886341
I have absolutely no skills in this, but was able to remap some simple buttons with the app Keytest.apk (simply google) and some alterations in the qwerty.kl and others,
i broke a couple of times the file i guess resulting the keyboard stop working but a simple backup put everything back in working order.
Ill try to play some with this in the next couple of days.
will let you know! and post my results!
Yes! If your keyboard is in english and that is also your prefered language, then it seems that all you have to do is alter the .kl-file used by the keyboard in order to get the symbols in proper places according to the scancodes given by "KeyTest.apk"
The phone will probably not be "bricked" in any case. If you make a mistake when editing the .kl-file, you can just use a backup to get it working again (at least if you have a working touch-screen).
Still, some combinations might not work that easily. Then you'll have to alter the .kcm.bin-file in a hex-editor, in my case for "æøå" and others, like for instance to get "7" and "/" on the norwegian keyboard to be on the same button, so that it gives "/" when typing "7" and holding shift (while english keyboards have "7" and "&" with shift if I'm not mistaken..)
i.e. the .kcm.bin-file contains a binary formated layout of the characters and the symbols to show accordingly when pressing normal, with shift, alt or fn, while the .kl-file only decides what scancodes from the keyboard referes to what characters in the .kcm.bin-file.
So editing the .kcm.bin-file, you could make all kinds of fun, for instance make shift+a print "£" in stead of "A". This file decides what symbols will show up on your screen when pressing a function-key like shift, alt, fn etc with a normal key. In this file you cannot alter the places on the keyboard, only existing combinations of characters.
The .kl-file will only let you change the places on the keyboard and not the existing keychars.
So in the .kl-file you cannot put in any foreign letters like german "ü" or french "ç",
but you can change the .kcm.bin-file to make alt+c print "ç" and shift+alt+c print "Ç".
Then just leave the "C" where it belongs in the .kl-file.
The biggest caveats with this solution is that there is no fast way to switch between two languages, for instance some times I write in cyrillic and some times in latin letters. For this I would have to manually change between two .kcm.bin-files, one in latin and one in cyrillic. (I am already planning how to make one in cyrillic)
Sorry for my bad english, don't write much in english hope my writing is understandable
If you cannot use the adb logcat to find out which file to edit, then just try to edit one letter in one .kl file for instance change the "K" to be "P", and see if it makes it print "P". If it doesn't then change it back, and do the same with the next .kl-file until you find the one you have to edit.
I would assume one has to disconnect the keyboard and maybe turn off bluetooth for every try, since the keyboard layout is probably loaded into memory as soon as it is connected, so a change wouldn't have any effect when it is connected.
Biffy said:
On this thread I hope some skilled people will come along and help generate a keymap bin file for this great keyboard so more android users can benefit from it.
Click to expand...
Click to collapse
I'm not so skilled, but I managed to do this with a norwegian keyboard.
I could try the same for english keyboard if I had at least a good picture of the
keyboard with the scancodes for every key, and also the original .kcm.bin / .kl files to alter. And also what combinations to alter. It is not so difficult.
I have created a qwerty.kl file to use the apple wireless keyboard with connectbot in landscape mode. It works great with cyanogenmod on my HTC DHD but should work with other phones / roms.
modifications :
- change arrows directions to match landscape mode (phone bottom on the right)
- map the left "ctrl" key of the keyboard to DPAD_CENTER so that it can be used as ctrl in connectbot as well as escape key (two presses).
modifications I would like to have
- have the escape key work correctly
- have the "tab" key work correctly in connectbot
To install, replace on your phone:
- unzip the file to your computer
- enable USB debugging
- remount partition in read write
Code:
adb remount
- backup the original file somewhere
Code:
adb pull /system/usr/keylayout/qwerty.kl $SAVE_PATH
- copy the new file to the phone
Code:
adb push $NEW_QWERTY.KL_LOCATION /system/usr/keylayout/
- reboot your phone (to remount the system partition read-only)
If you can improve, don't hesitate to publish
The problem hangs boot! Help!
Install android 2.2 for instructions.
Androida stitch boot and reboot the phone vibrates 2 times, there is a white screen with white letters and black penguin after 1-2 seconds stops and load weight. Tried everything possible nbh, who collected himself in atools. In general the white screen with white penguin only works on kernel 2.6.32 with the following parameters polaris-240x320-Froyo-1-2.6.32.
SCREEN: hxtp://i56.tinypic.com/1y3ebt.jpg (hxtp ->http)
Black screen with the penguin got the normal parameters of polaris-240x320-Froyo-3-2.6.32 but the download just hangs like a white screen. At the core of 2.6.25 for all pereprobovanyh me Parameter only color bars. What's the problem? Who knows how to solve it?
Decided to hold a small exeperimental. I had an old build android-1.5-2009-07-09, which run in the past from Presov to small exeperimental. I had an old build android-1.5-2009-07-09, which run in the past out of Haret normal, with a black boot. This assembly contains:
1) with parameters default.tht
(# Alloctest 0x2000
set RAMSIZE 0x08000000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.gz
#
# The following kernel parameters are useful
# Ppp.username - The username used to connect to the network when dialing
# Ppp.password - The password used to connect to the network when dialing
# Ppp.apn - Set apn of your provider
# Ppp.nostart - Set ppp.nostart = 1 to disable starting the ppp connection on boot
# Msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# Pm.sleep_mode - The mode used when the phone is off
# 0 = Power Collapse Suspend, 1 = Power Collapse, 2 = Apps Sleep,
# 3 = Slow Clock and Wait for Interrupt 4 = Wait for Interrupt
# Default is 1, use one for best power savings
# Board-htcpolaris.panel_type - Panel type used to power the panel off and on
# 0 = Don't power off the panel (Default)
# 1 2 = Sony = Topoly 3 = Topoly (probably just the same as 2)
# Lcd.density - Defaults to 160, 128, shows more on screen
#
set cmdline "board-htcpolaris.panel_type = 0 ppp.apn = wxw.vodafone.net.nz ppp.username = none ppp.password = none pm.sleep_mode = 1 mddi.width = 324 mddi.height = 432 no_console_suspend board-htcpolaris -battery.battery_capacity = 1350 mddi_client_vogue.vsync = 0 "
bottles)
2) haret.ehe,
3) initrd.gz,
4) resources.zip,
5) system.img,
6) zImage
Try to start the assembly with diabetes. In the beginning is all fine, black boot, but then hangs up and says: Varning ---
sisten.img not found on the CD.
It's weird, because sisten.img lies on CD.
Poshamaniv to build its atools Fail default with the following parameters:
set RAMSIZE 0x07300000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.lzma
set cmdline "no_console_suspend board-htcpolaris-battery.battery_capacity = 1350 ppp.nostart = 0 hw3d.version = 1 mddi.width = 324 mddi.height = 432 clock-7x00.mddi = 0xa51 board-htcpolaris.panel_type = a board-htcpolaris . no_boot_vibration = 1 mddi_client_vogue.vsync = 0 sys_partition = / sdcard / andboot / system.img data_partition = / sdcard / andboot / data.img fstype = 2 "
boot
Try to run the assembly Froyo [2.2.2] My Modified Fresh Froyo Release 20-2-2011 with these parameters is out of Haret. The loader is still a white background. That's what vydalood Haret. This assembly contains: hxtp://i53.tinypic.com/20z9y8k.jpg (hxtp ->http)
Those who have any ideas? Why download the old version, so good with black boot and Froyo not?
I climbed a lot of forums and for some reason or where there is no answer to this question, although people with the same problem there. I have a broken display and I replaced it with a new one, after that there was such key problems.
On one of the branches of the forum says that they say it is because the display problem and needed origenalny. But after analyzing all available information, I think that probably in problemma HARD-SPL 2.20Olix!!! This SPL does not support the display non-origenalnogo.
I think that this key problems to be solved, because sooner or later and your display may break mashines and I think you do not want to buy origenalny display for $ 50-100 for this old devaysa.
By this I beg you, help me to find someone who could create a new HARD-SPL for HTC Polaris. Maybe someone knows and understands the programming and be able to make himself SPL. Please respond to all!
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.
Great write up
Also found,
Code:
adb shell rm /data/system/gesture.key”
as well as
/data/system/cm_gesture.key (CM based)
/data/system/password.key
/data/system/locksettings.db
Now, if you have root, then you should be able to chmod the dalvik-cache and use keyboard and mouse (not every phone although)
Currently working on the N1 although I have different hurdles.
If anyone could help contribute more to this thread that would be awesome!
Edit: Seen here is a lovely shot of ASC (AndroidScreenCast) working with adb to display CWM Recovery....
Oh man, that is old!
Click to expand...
Click to collapse
I'm struggling with calibration of a touchscreen on Android plataform.
It is an USB Single-Touch Touchscreen from vendor 0dfc and product 0001 as checked with dmesg:
Code:
<6>[ 4118.091541] input: USB Touchscreen 0dfc:0001 as /devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.0/input/input23
I'm pushing the Vendor_0dfc_Product_0001.idc file /data/system/devices/idc/ (following the documentation from android source - IDC)
I got the touch device with all requirements for single touch events:
Code:
[email protected]:/ # getevent -il /dev/input/event3
add device 1: /dev/input/event3
bus: 0003
vendor 0dfc
product 0001
version 0202
name: "USB Touchscreen 0dfc:0001"
location: "usb-usb20_host-1.3/input0"
id: ""
version: 1.0.1
events:
KEY (0001): BTN_TOUCH
ABS (0003): ABS_X : value 540, min 0, max 32767, fuzz 0, flat 0, resolution 0
ABS_Y : value 289, min 0, max 32767, fuzz 0, flat 0, resolution 0
input props:
<none>
I also enabled the Pointer Location option from Developer options (Android settings) in order to debug this stage of calibration.
Setup 1
Code:
touch.deviceType = touchScreen
With this setup (1) all the gestures on the touchscreen take place at the up-left corner - just a few pixels left/right/up/down no matter the gesture (swipe). All the touchscreen get events. All the gestures are reversed - when swipe left the pointer goes right; when swipe up, the pointer goes down.
Setup 2
Code:
touch.deviceType = pointer
touch.gestureMode = pointer
With this setup (2), as expected, it shows a pointer, placed at the position from the last pointer device left (mouse). All the gestures on the touchscreen (no matter the swipe size) keep beaving like setup 1 - move only a few pixels with each swipe event, and with reversed axis.
Setup 3
Code:
touch.deviceType = pointer
touch.gestureMode = spots
With this setup (3) the result is the same as setup 2. I just did that to prove that the IDC file is being interpreted correctly.
At this stage, as you can check by now, I have a working IDC file (setup 1) requiring calibration for this touch device.
I tried a lot of combinations from other IDC files (internet samples) and from android source - IDC - ANY OTHER PROPERTY TOOK EFFECT (NOT A SINGLE ONE) - raw.*, output.*, touch.size.*
Does anyone knows how to calibrate properly a touch screen in Android that could guide me in this process?
Thank you
Hi!
I just got my MXQ Pro S905 android tv box and right out the box, the remote control didn't work. I googled and visited different website and I found a remote.conf file to replace the current one on the box, so I did. Now the remote partially works. I can use the arrows, volume up down, etc... The problem is I still can't get the power button or the mouse to work Any expert help on how to get it to work please?
Here is the new remote.conf file that partially works ( power button and mouse don't work):
#************************************************* ************************************************** ******
#this file is configuration for each factory remote device
# work_mode 0 :software mode 1 :hardware mode
# repeat_enable 0 :disable repeat 1 :enable repeat
#
# factory_code each device has it's unique factory code.
# pattern:custom_code(16bit)+index_code(16bit)
# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
#
# release_delay unit:ms.release will report from kernel to user layer after this period of time
# from press or repeat triggered.
#
# debug_enable 0 :debug disable 1 :debug disable
#
# SW MODE:
# bit_count how many bits in each frame
# tw_leader_act time window for leader active
# tw_bit0 time window for bit0 time.
# tw_bit1 time window for bit1 time
# tw_repeat_leader time window for repeat leader
# REG
# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
# reg_control set value for PREG_IR_DEC_CONTROL
# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
#************************************************* ************************************************** **********
#amlogic NEC remote
factory_code = 0x7f800001
work_mode = 0
repeat_enable = 1
repeat_delay = 40
repeat_peroid = 39
release_delay = 121
debug_enable = 1
fn_key_scancode = 0x15
left_key_scancode = 0x1c
right_key_scancode = 0x48
up_key_scancode = 0x44
down_key_scancode = 0x1d
ok_key_scancode = 0x5c
pageup_key_scancode = 0x04
pagedown_key_scancode = 0x1b
mouse_begin
0 0x1c
1 0x48
2 0x44
3 0x1d
mouse_end
key_begin
0x4d 113
0x56 114
0x4e 115
0x25 105
0x26 103
0x27 106
0x28 108
0x0d 97
0x1b 158
0x53 102
0x51 704
0x49 139
0x52 388
0x31 2
0x32 3
0x33 4
0x34 5
0x35 6
0x36 7
0x37 8
0x38 9
0x39 10
0x30 11
0x58 389
0x44 14
0xbd 122
0xbb 123
0x09 393
0x11 390
0x54 391
0x4f 392
key_end
repeat_key_begin
0x4d 113
0x56 114
0x4e 115
0x25 105
0x26 103
0x27 106
0x28 108
0x0d 28
0x1b 158
0x53 102
0x51 704
0x49 139
0x52 388
0x31 2
0x32 3
0x33 4
0x34 5
0x35 6
0x36 7
0x37 8
0x38 9
0x39 10
0x30 11
0x58 389
0x44 111
0xbd 122
0xbb 123
0x09 164
0x11 390
0x54 391
0x4f 392
repeat_key_end
try a reflash
guide here
http://forum.xda-developers.com/showthread.php?t=3400814
Sent from my SM-G920F using XDA-Developers mobile app