[GUIDE][POCO F2 Pro] How to fix weird headset functionality - Xiaomi Poco F2 Pro (Redmi K30 Pro) Guides, News, &

I had a problem where the volume buttons on my headset were being recognized but not for volume, tried clean flashing (CrDroid), tried flashing firmware again etc. Didn't seem to help.
What helped was this thread.
I used the app WhichButton and then clicked the buttons and then saw the result was KEYCODE_BUTTON_2, KEYCODE_BUTTON_3.
After recognizing this I went to /system/usr/keylayout/Generic.kl (Root is needed to access this file, I used MiXplorer)
and changed:
Code:
key 257 BUTTON_2
key 258 BUTTON_3
To
Code:
#key 257 BUTTON_2
#key 258 BUTTON_3
key 257 VOLUME_UP
key 258 VOLUME_DOWN

Related

HKLM\Software\Microsoft\Welcome

This can be valuable for ROM makers only
Bored with welcome screen? Let's play with HKLM\Software\Microsoft\Welcome
Create Key HKLM\Software\Microsoft\Welcome,
create DWORD value Disable, set some values
execute \windows\welcome.exe
and look at the screen names, which doesn't appear
FFFF FF7F - disable everything except 'email setup' screen [WM5 only AKU 3.x]
FFFF FFBF - disable everything except 'password' screen [WM5 only]
FFFF FFDF - disable everything except 'complete' screen and the finishing tap
FFFF FFEF - disable everything except 'location' screen
FFFF FFF7 - disable everything except 'pop-up menus' screen
FFFF FFFB - disable everything except 'stylus' screen
FFFF FFFD - disable everything except 'align' screen
FFFF FFFE - disable everything except tap on the first screen [ignored if any other bit is cleared, the only difference is between FFFF FFFE and FFFF FFFF]
FFFF FFFF - disable everything [displays first 'splash' screen and exits]
Other bits - probably reserved for the future [look at the order of the things above]
There is another value: SystemStart - I have no idea what does it mean
There is another key Software\Microsoft\Shell\Event\Welcome - I have no idea what does it mean
There are references to the files "\Storage Card\Welcome.Not" "welcome.Not" - I have no idea.
Nice work.
V
Great work!
Thank you.
oh!
that is great!
i used another way to delete this entry from inflashfiles.dat and inboj.dat
Directory("\Windows\StartUp"):-File("Welcome.lnk","\Windows\welcome.lnk")
but yours better
and the others tpics,
if just replacing shellres.dll.xxx.mui on RAM
welcome will be come evry boot.
<mainly i used this for testing to make shellress.mui instantly>
i made one cab it can del the welcome.lnk from StartUP folder.
but after hard rest, welcome will come again,
(this is another topic..sorry)
Ok, so i know this post is old and probably out of sight and mind. But I have an issue. This key does not exist in my registry and I only get the alignment and password setup screens. I want the whole thing enabled. Please help a brother out.
FYI, the welcome.not thing skips the entire wizard. We used to use this in the WM2003 days (back then you couldn't skip the stupid Dr's Appointment tutorial). It was handy if you store your touchscreen alignment in the extrom.
You just create a blank text file called welcome.not and put it on the root of your storage card (won't work in extrom, naturally). Then do a hard reset with the card inserted and it will skip the welcome wizard entirely. If you hard reset without the card inserted, the welcome wizard will proceed as normal.
However, the registry entries are far better than that method. Good find!!!
I just wanted to make a little update to this thread for anyone using this information to skip various screens during welcome.
Only the last 8 bits are actually used to select/de-select subroutines when running welcome (at least for WM 6.1).
7F - disable everything except 'email setup' screen [WM5 only AKU 3.x]
BF - disable everything except 'password' screen [WM5 only]
DF - disable everything except 'complete' screen and the finishing tap
EF - disable everything except 'location' screen
F7 - disable everything except 'pop-up menus' screen
FB - disable everything except 'stylus' screen
FD - disable everything except 'align' screen
FE - disable everything except tap on the first screen
FF - disable everything [displays first 'splash' screen and exits]
For my ROM, I wanted to run welcome with align, location & complete screen.
1111 1101 (FD) - align screen
1110 1111 (EF) - location screen
1101 1111 (DF) - complete screen
---------------
1100 1101 (CD) or 205
ends up being....
Code:
<wap-provisioningdoc>
<!--334.05_Welcome-->
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\Welcome">
<parm name="Disable" datatype="integer" value="205" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
also if you want to skip everying just put the file welcome.not in the root of the storage card. **.not is the file extension **
irus said:
also if you want to skip everying just put the file welcome.not in the root of the storage card. **.not is the file extension **
Click to expand...
Click to collapse
Yes indeed, but make sure you apply the alignment settings by another means (provxml, cab, etc). I just spent a few days trying to figure out why endkey.exe was not working in the most recent version of my ROM (I use it to switch between vibrate/ring on long end key press). Turns out that if you don't do the align and you don't apply the settings some other way, endkey.exe does not work when you do a long press of the end key (at least on my Touch Pro).
I'm reviving this old thread since I'm running into an issue.
I usually disable everything in my ROM, thus:
Disable=dword:ff (or ffffffff)
After customization though, I need to tap on the taskbar to lauch the home screen. Otherwise, it just stays on the welcome splash.
Any ideas?
just bumping this up as i'd really appreciate an assist.
i've been trying to change the first boot in my 6.5.x build rom.
all i want is the 'allign screen' working
the current entry is
[HKEY_LOCAL_MACHINE\Software\Microsoft\Welcome]
"Disable" = dword:00000080
i may be thick but i'm really having trouble getting my head round this. i've tried
"Disable" = dword:FD
"Disable" = dword:1111 1101
"Disable" = dword:FFFF FFFD
which are all from this thread but none of these are working.
does anyone know what the entry actually is for 6.5.x? and if so i'd be grateful if someone could help.
many thanks in advance
Chris
I use
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Welcome]
; only doing screen calibrate
"Disable"=dword:fffffffc
RoryB said:
I use
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Welcome]
; only doing screen calibrate
"Disable"=dword:fffffffc
Click to expand...
Click to collapse
cheers for that. will give it a try when i get home
RoryB said:
I use
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Welcome]
"Disable"=dword:fffffffc
Click to expand...
Click to collapse
i must be doing something wrong.. no matter what i try it's not changing the boot setup
it's still going 'tap', 'calibrate', 'time/date', and 'password'....
all i want is Tap and calibrate!!!!
this is doing my head in. i'd appreciate any other ideas???
many thanks to anyone who may be able to help
Chris
I will try to explain how to get any number you need:
1. Put this table in an excel,
2. Find the 8 digits corresponding to EACH of the screens wanted (eg. tap screen is FD or 253 and align screen is FE or 254 )
3. Tap each digit in a column (one line per screen wanted)
4. calculate the minimum of each column and get the 8 digits (in the example, min of 11111101 and 11111110 is 11111100).
5. If you use provxml go the other way round and with the total calculated find the Dec Value (3rd column) corresponding to the 8 digits (in the example 11111100 would be FFFFFFFC for reg/rgu files or 252 for xml/provxml files)
This way you can get whatever combination of screens you want.
My current rom has only tap screen (no alignment, no password, etc) and works fine.
If you do not get the expected results, most probably is not because you did it wrong but rather there is some other code replacing yours. My recommendation is to calculate the hex dec and binary values corresponding to the combination of screens that get loaded and then use the search function included in a visual kitchen to locate the file hindering your intended customization (Or simply look for the reg keys). Most of the roms will have as much as 3 or 4 places where welcome values are define (sys, oem, ext and yours !!). If you are not so patient create and ext package called zzz_whatever and in the files directory place a app.REG file so all values are overwritten. Make sure your reg or xml file does not mix with other non tested code since it may also happen that the file is not executed correctly and its rollbacked. When using provxml files non tested code should be placed behind so you can call mxipupdate_zzz01_tested and mxipupdate_zzz02_nontested to get the expected order. I think the order things get loaded are provxml, rgu, reg, xml and inside each group, package folder name and then file name.
Hope it helps, regards
Code:
Binary Hex Dec
10000000 80 128
10000001 81 129
10000010 82 130
10000011 83 131
10000100 84 132
10000101 85 133
10000110 86 134
10000111 87 135
10001000 88 136
10001001 89 137
10001010 8A 138
10001011 8B 139
10001100 8C 140
10001101 8D 141
10001110 8E 142
10001111 8F 143
10010000 90 144
10010001 91 145
10010010 92 146
10010011 93 147
10010100 94 148
10010101 95 149
10010110 96 150
10010111 97 151
10011000 98 152
10011001 99 153
10011010 9A 154
10011011 9B 155
10011100 9C 156
10011101 9D 157
10011110 9E 158
10011111 9F 159
10100000 A0 160
10100001 A1 161
10100010 A2 162
10100011 A3 163
10100100 A4 164
10100101 A5 165
10100110 A6 166
10100111 A7 167
10101000 A8 168
10101001 A9 169
10101010 AA 170
10101011 AB 171
10101100 AC 172
10101101 AD 173
10101110 AE 174
10101111 AF 175
10110000 B0 176
10110001 B1 177
10110010 B2 178
10110011 B3 179
10110100 B4 180
10110101 B5 181
10110110 B6 182
10110111 B7 183
10111000 B8 184
10111001 B9 185
10111010 BA 186
10111011 BB 187
10111100 BC 188
10111101 BD 189
10111110 BE 190
10111111 BF 191
11000000 C0 192
11000001 C1 193
11000010 C2 194
11000011 C3 195
11000100 C4 196
11000101 C5 197
11000110 C6 198
11000111 C7 199
11001000 C8 200
11001001 C9 201
11001010 CA 202
11001011 CB 203
11001100 CC 204
11001101 CD 205
11001110 CE 206
11001111 CF 207
11010000 D0 208
11010001 D1 209
11010010 D2 210
11010011 D3 211
11010100 D4 212
11010101 D5 213
11010110 D6 214
11010111 D7 215
11011000 D8 216
11011001 D9 217
11011010 DA 218
11011011 DB 219
11011100 DC 220
11011101 DD 221
11011110 DE 222
11011111 DF 223
11100000 E0 224
11100001 E1 225
11100010 E2 226
11100011 E3 227
11100100 E4 228
11100101 E5 229
11100110 E6 230
11100111 E7 231
11101000 E8 232
11101001 E9 233
11101010 EA 234
11101011 EB 235
11101100 EC 236
11101101 ED 237
11101110 EE 238
11101111 EF 239
11110000 F0 240
11110001 F1 241
11110010 F2 242
11110011 F3 243
11110100 F4 244
11110101 F5 245
11110110 F6 246
11110111 F7 247
11111000 F8 248
11111001 F9 249
11111010 FA 250
11111011 FB 251
11111100 FC 252
11111101 FD 253
11111110 FE 254
11111111 FF 255
chrisd1a1 said:
i must be doing something wrong.. no matter what i try it's not changing the boot setup
it's still going 'tap', 'calibrate', 'time/date', and 'password'....
all i want is Tap and calibrate!!!!
this is doing my head in. i'd appreciate any other ideas???
many thanks to anyone who may be able to help
Chris
Click to expand...
Click to collapse
Check the registry after you flash and the ROM is finished setting up. Does it read the values you set? Maybe there is another provxml or rgu setting it to a wrong value.
cruiserrr said:
I will try to explain how to get any number you need:
1. Put this table in an excel,
2. Find the 8 digits corresponding to EACH of the screens wanted (eg. tap screen is FD or 253 and align screen is FE or 254 )
3. Tap each digit in a column (one line per screen wanted)
4. calculate the minimum of each column and get the 8 digits (in the example, min of 11111101 and 11111110 is 11111100).
5. If you use provxml go the other way round and with the total calculated find the Dec Value (3rd column) corresponding to the 8 digits (in the example 11111100 would be FFFFFFFC for reg/rgu files or 252 for xml/provxml files)
This way you can get whatever combination of screens you want.
My current rom has only tap screen (no alignment, no password, etc) and works fine.
If you do not get the expected results, most probably is not because you did it wrong but rather there is some other code replacing yours. My recommendation is to calculate the hex dec and binary values corresponding to the combination of screens that get loaded and then use the search function included in a visual kitchen to locate the file hindering your intended customization (Or simply look for the reg keys). Most of the roms will have as much as 3 or 4 places where welcome values are define (sys, oem, ext and yours !!). If you are not so patient create and ext package called zzz_whatever and in the files directory place a app.REG file so all values are overwritten. Make sure your reg or xml file does not mix with other non tested code since it may also happen that the file is not executed correctly and its rollbacked. When using provxml files non tested code should be placed behind so you can call mxipupdate_zzz01_tested and mxipupdate_zzz02_nontested to get the expected order. I think the order things get loaded are provxml, rgu, reg, xml and inside each group, package folder name and then file name.
Hope it helps, regards
Code:
Binary Hex Dec
10000000 80 128
10000001 81 129
10000010 82 130
10000011 83 131
10000100 84 132
10000101 85 133
10000110 86 134
10000111 87 135
10001000 88 136
10001001 89 137
10001010 8A 138
10001011 8B 139
10001100 8C 140
10001101 8D 141
10001110 8E 142
10001111 8F 143
10010000 90 144
10010001 91 145
10010010 92 146
10010011 93 147
10010100 94 148
10010101 95 149
10010110 96 150
10010111 97 151
10011000 98 152
10011001 99 153
10011010 9A 154
10011011 9B 155
10011100 9C 156
10011101 9D 157
10011110 9E 158
10011111 9F 159
10100000 A0 160
10100001 A1 161
10100010 A2 162
10100011 A3 163
10100100 A4 164
10100101 A5 165
10100110 A6 166
10100111 A7 167
10101000 A8 168
10101001 A9 169
10101010 AA 170
10101011 AB 171
10101100 AC 172
10101101 AD 173
10101110 AE 174
10101111 AF 175
10110000 B0 176
10110001 B1 177
10110010 B2 178
10110011 B3 179
10110100 B4 180
10110101 B5 181
10110110 B6 182
10110111 B7 183
10111000 B8 184
10111001 B9 185
10111010 BA 186
10111011 BB 187
10111100 BC 188
10111101 BD 189
10111110 BE 190
10111111 BF 191
11000000 C0 192
11000001 C1 193
11000010 C2 194
11000011 C3 195
11000100 C4 196
11000101 C5 197
11000110 C6 198
11000111 C7 199
11001000 C8 200
11001001 C9 201
11001010 CA 202
11001011 CB 203
11001100 CC 204
11001101 CD 205
11001110 CE 206
11001111 CF 207
11010000 D0 208
11010001 D1 209
11010010 D2 210
11010011 D3 211
11010100 D4 212
11010101 D5 213
11010110 D6 214
11010111 D7 215
11011000 D8 216
11011001 D9 217
11011010 DA 218
11011011 DB 219
11011100 DC 220
11011101 DD 221
11011110 DE 222
11011111 DF 223
11100000 E0 224
11100001 E1 225
11100010 E2 226
11100011 E3 227
11100100 E4 228
11100101 E5 229
11100110 E6 230
11100111 E7 231
11101000 E8 232
11101001 E9 233
11101010 EA 234
11101011 EB 235
11101100 EC 236
11101101 ED 237
11101110 EE 238
11101111 EF 239
11110000 F0 240
11110001 F1 241
11110010 F2 242
11110011 F3 243
11110100 F4 244
11110101 F5 245
11110110 F6 246
11110111 F7 247
11111000 F8 248
11111001 F9 249
11111010 FA 250
11111011 FB 251
11111100 FC 252
11111101 FD 253
11111110 FE 254
11111111 FF 255
Click to expand...
Click to collapse
RoryB said:
Check the registry after you flash and the ROM is finished setting up. Does it read the values you set? Maybe there is another provxml or rgu setting it to a wrong value.
Click to expand...
Click to collapse
looks like you guys are right about something messing with this.
i set it to FC as advised but when i checked the reg on the build it's showing AC. i'm going to try a variation to see what happens..
i really appreciate the advice, just wish i could figure the fix
thanks for the help i appreciate it
Chris
hi,
try to search in the rgu of your OEMDrivers.
maybe there is a registry entry that is replacing your registry.
regards,
twisted
i really appreciate the advice, just wish i could figure the fix
Click to expand...
Click to collapse
What are you using for building the rom? I am pretty familiar with Ervius Visual Kitchen and it is quite straigth forward to use the search tool. Even if you use another kitchen you can download evk, put your files in the ext folder and do the search. Good luck!
I find Agent Ransack is a handy tool for searching the contents of files.
As a test you can set the registry the way you like and then run welcome.exe to see if the behaviour is the way you expect.

Dvorak keylayout in usb host mode...

I enabled usb host mode, but I would prefer to use dvorak. I tried http://forum.xda-developers.com/showthread.php?t=1336114 but it didn't work. It may just be for Bluetooth keyboards. I'll keep looking, though it may be time to just get a hard dvorak usb keyboard.
That thread does have the correct way to change any keyboard layout.
The file you want is probably /system/usr/keylayout/qwerty.kl if this is the only keyboard you will ever use.
qwerty.kl is the default.
Using the actual device-specific file is a better way to do this.
If you will look at a logcat when you plug in a keyboard you will see something similar.
Code:
W/KeyCharacterMap( 8641): Error loading keycharmap file '/system/usr/keychars/HID_04d9:1203.kcm.bin'. hw.keyboards.65539.devname='HID 04d9:1203'
Although this will tell you the keychar mapping file (which you don't need to change)
it also will tell you what keylayout file to make, in this case HID_04d9:1203.kl
Done/Works
It took a while to find that. qtADB puts all warnings in hard to read yellow/orange.
Code:
09:15:08.038 Warning KeyCharacterMap 9044 Can't open keycharmap file
09:15:08.038 Warning KeyCharacterMap 9044 Error loading keycharmap file '/system/usr/keychars/Chicony_USB_Gaming_Keyboard_Pro.kcm.bin'. hw.keyboards.196611.devname='Chicony USB Gaming Keyboard Pro'
09:15:08.038 Warning KeyCharacterMap 9044 Using default keymap: /system/usr/keychars/qwerty.kcm.bin
Yeah, I wouldn't have guessed that one. I was trying USB vendor and product ids. I copied 'qwerty.kcm.bin' to 'Chicony_USB_Gaming_Keyboard_Pro.kcm.bin', and changed the 'Vendor_06a3_Product_8000.kl' to 'Chicony_USB_Gaming_Keyboard_Pro.kl'.
Code:
09:47:58.831 Error KeyLayoutMap 1004 /system/usr/keylayout/Chicony_USB_Gaming_Keyboard_Pro.kl:57: expected keycode, got 'CTRL_LEFT'
At least errors are in bright red, easy to spot. Aparently, there is no "CTRL_LEFT". Changed to "SYM" like in qwerty.kl.
Here's the file in case anybody else wants to avoid changing "CTRL_LEFT" to "SYM".
Code:
key 1 BACK # ESCAPE
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 12 LEFT_BRACKET
key 13 RIGHT_BRACKET
key 14 DEL
key 15 TAB
key 16 APOSTROPHE
key 17 COMMA
key 18 PERIOD
key 19 P
key 20 Y
key 21 F
key 22 G
key 23 C
key 24 R
key 25 L
key 26 SLASH
key 27 EQUALS
key 28 ENTER
key 29 SYM # CONTROL_LEFT
key 30 A
key 31 O
key 32 E
key 33 U
key 34 I
key 35 D
key 36 H
key 37 T
key 38 N
key 39 S
key 40 MINUS
key 41 GRAVE
key 42 SHIFT_LEFT
key 43 BACKSLASH
key 44 SEMICOLON
key 45 Q
key 46 J
key 47 K
key 48 X
key 49 B
key 50 M
key 51 W
key 52 V
key 53 Z
key 54 SHIFT_RIGHT
key 55 STAR # NUMPAD_MULTIPLY
key 56 ALT_LEFT
key 57 SPACE
# key 58 # CAPS_LOCK
# key 59 # F1
# key 60 # F2
# key 61 # F3
# key 62 # F4
# key 63 # F5
# key 64 # F6
# key 65 # F7
# key 66 # F8
# key 67 # F9
# key 68 # F10
# key 69 # NUM_LOCK
# key 70 # SCROLL_LOCK
key 71 7 # NUMPAD_7
key 72 8 # NUMPAD_8
key 73 9 # NUMPAD_9
key 74 MINUS # NUMPAD_SUBTRACT
key 75 4 # NUMPAD_4
key 76 5 # NUMPAD_5
key 77 6 # NUMPAD_6
key 78 PLUS # NUMPAD_ADD
key 79 1 # NUMPAD_1
key 80 2 # NUMPAD_2
key 81 3 # NUMPAD_3
key 82 0 # NUMPAD_0
key 83 PERIOD # NUMPAD_DOT
# key 87 # F11
# key 88 # F12
key 96 ENTER # NUMPAD_ENTER
key 97 SYM # CONTROL_RIGHT
key 98 SLASH # NUMPAD_DIVIDE
# key 99 # SYSRQ
key 100 ALT_RIGHT
key 102 HOME
key 103 DPAD_UP # UP_ARROW
key 104 LEFT_NEXTPAGE # PAGE_UP
key 105 DPAD_LEFT # LEFT_ARROW
key 106 DPAD_RIGHT # RIGHT_ARROW
# key 107 # END
key 108 DPAD_DOWN # DOWN_ARROW
key 109 LEFT_PREVPAGE # PAGE_DOWN
# key 110 # INSERT
# key 111 # DELETE
key 113 MUTE
key 114 VOLUME_DOWN
key 115 VOLUME_UP
# key 119 # BREAK
# key 125 # LEFT_WINDOWS
# key 126 # RIGHT_WINDOWS
key 127 MENU # APPLICATION
# key 128 # BOOKMARK
key 129 POWER
# key 130 # SLEEP
# key 131 # WAKE
key 155 ENVELOPE
key 164 MEDIA_PLAY_PAUSE
# key 171 # MUSIC
key 172 HOME
key 217 SEARCH
Yup, that is correct.
The PgUp => LEFT_NEXTPAGE and PgDn => LEFT_PREVPAGE
That way the keyboard buttons work like you'd expect on regular apps.
Then you need to remap the side buttons.
You want whatever key you want to go to the next page to be using LEFT_PREVPAGE.
You want whatever key you want to go to the previous page to be using LEFT_NEXTPAGE.
See: http://forum.xda-developers.com/showpost.php?p=24632564&postcount=7
If you want to prevent the arrow keys from getting all funny when you put the Nook in landscape,
then you can modify services.jar
Load the patch from the sig to somewhere, remount /system, ADB pull system/framework/services.jar
Code:
apktool d services.jar \services
mergesmali \services\smali\com\android\server\KeyInputQueue.smali \somewhere\KeyInputQueue.smali
apktool b \services services.jar
ADB push it back, reboot

Hardware Keyboard Error with FN + Key

Windows Mobile 6.5, device - Touch PRO 2 (Rhod500)
Error key, which write error symbol:
FN + B = (_) FN + N = (!) FN + I = (=)
FN + H = ( ; ) FN + J = (/)
FN + Y = (\) FN + U = (+)
Not working FN + Space (Comm Manager)
How i can fix this problem ???

[Q] color settings in init.d not working properly

This is probably a rather kernel/rom specific question, but since I'm a newly registered member I can't post in the specific thread.
Kernel: _motley b35
ROM: Xylon Nightly Feb08
The issue I'm having is that a color correction script gives a different result when placed inside init.d as opposed to running it as su in a terminal.
The script I'm using the one posted in the _motley thread, minus the last lines used only to display the already written values.
I've set the permissions to the same as the other scripts in the init.d folder.
Am I missing something?
The script:
Code:
#!/system/bin/sh
#Setting rgb
color_r=248
color_g=248
color_b=248
echo "$color_r $color_g $color_b" > /sys/devices/platform/kcal_ctrl.0/kcal
echo 1 > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
#Setting gamma
g_white=114 #Whitepoint, LG=0x72, GOOG=0x40,40,20 Low values=extreme whites, risk of blown out highlights
g_mids=21
g_black=118 #Blackpoint, LG=0x76, GOOG=0x76,76,74 Low values=cut out, banding in the shadows
g_unknown1=0
g_contrast=0 #Contrast, LG=0x00, GOOG=0x00,00,1F
g_brightness=0 #Brightness, LG=0x00, GOOG=0x00,00,10
g_saturation=80 #Saturation, LG=0x50, GOOG=0x30,30,50
g_greys=48
g_unknown2=2
#Tweak red gamma values here if needed
gr_white=`expr $g_white + 0`
gr_mids=`expr $g_mids + 0`
gr_black=`expr $g_black + 0`
gr_unknown1=`expr $g_unknown1 + 0`
gr_contrast=`expr $g_contrast + 10`
gr_brightness=`expr $g_brightness + 4`
gr_saturation=`expr $g_saturation + 0`
gr_greys=`expr $g_greys + 0`
gr_unknown2=`expr $g_unknown2 + 0`
gr_cksummotley=`expr $gr_white + $gr_mids + $gr_black + $gr_unknown1 + $gr_contrast + $gr_brightness + $gr_saturation + $gr_greys + $gr_unknown2`
#Tweak green gamma values here if needed
gg_white=`expr $g_white + 0`
gg_mids=`expr $g_mids + 0`
gg_black=`expr $g_black + 0`
gg_unknown1=`expr $g_unknown1 + 0`
gg_contrast=`expr $g_contrast + 7`
gg_brightness=`expr $g_brightness + 4`
gg_saturation=`expr $g_saturation + 0`
gg_greys=`expr $g_greys + 0`
gg_unknown2=`expr $g_unknown2 + 0`
gg_cksummotley=`expr $gg_white + $gg_mids + $gg_black + $gg_unknown1 + $gg_contrast + $gg_brightness + $gg_saturation + $gg_greys + $gg_unknown2`
#Tweak blue gamma values here if needed
gb_white=`expr $g_white + 0`
gb_mids=`expr $g_mids + 0`
gb_black=`expr $g_black + 0`
gb_unknown1=`expr $g_unknown1 + 0`
gb_contrast=`expr $g_contrast + 5`
gb_brightness=`expr $g_brightness + 1`
gb_saturation=`expr $g_saturation + 0`
gb_greys=`expr $g_greys + 0`
gb_unknown2=`expr $g_unknown2 + 0`
gb_cksummotley=`expr $gb_white + $gb_mids + $gb_black + $gb_unknown1 + $gb_contrast + $gb_brightness + $gb_saturation + $gb_greys + $gb_unknown2`
echo "$gr_cksummotley $gr_white $gr_mids $gr_black $gr_unknown1 $gr_contrast $gr_brightness $gr_saturation $gr_greys $gr_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_red
echo "$gg_cksummotley $gg_white $gg_mids $gg_black $gg_unknown1 $gg_contrast $gg_brightness $gg_saturation $gg_greys $gg_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_green
echo "$gb_cksummotley $gb_white $gb_mids $gb_black $gb_unknown1 $gb_contrast $gb_brightness $gb_saturation $gb_greys $gb_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_blue
No one has an idea?
I've now verified the color differences using Display Tester.
When color settings are applied through the terminal I'm close to gamma 2.2, as is my want.
When those same settings are put in init.d and given 755 permissions (and the phone is rebooted) my gamma is at 3.0.
From what I've been able to discern, 755 should be the correct permission setting. I've even tried changing owner to root, but with no difference.
For those that are curious, below is the updated script I'm using.
Its based on acer73's settings, but with changes done to RGB and g_mids to reduce blowout and raise the gamma closer to 2.2.
Code:
#!/system/bin/sh
#Setting rgb
color_r=235
color_g=235
color_b=235
echo "$color_r $color_g $color_b" > /sys/devices/platform/kcal_ctrl.0/kcal
echo 1 > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
#Setting gamma
g_white=114 #Whitepoint, LG=0x72, GOOG=0x40,40,20 Low values=extreme whites, risk of blown out highlights
g_mids=31
g_black=118 #Blackpoint, LG=0x76, GOOG=0x76,76,74 Low values=cut out, banding in the shadows
g_unknown1=0
g_contrast=0 #Contrast, LG=0x00, GOOG=0x00,00,1F
g_brightness=0 #Brightness, LG=0x00, GOOG=0x00,00,10
g_saturation=80 #Saturation, LG=0x50, GOOG=0x30,30,50
g_greys=48
g_unknown2=2
#Tweak red gamma values here if needed
gr_white=`expr $g_white + 0`
gr_mids=`expr $g_mids + 0`
gr_black=`expr $g_black + 0`
gr_unknown1=`expr $g_unknown1 + 0`
gr_contrast=`expr $g_contrast + 10`
gr_brightness=`expr $g_brightness + 4`
gr_saturation=`expr $g_saturation + 0`
gr_greys=`expr $g_greys + 0`
gr_unknown2=`expr $g_unknown2 + 0`
gr_cksummotley=`expr $gr_white + $gr_mids + $gr_black + $gr_unknown1 + $gr_contrast + $gr_brightness + $gr_saturation + $gr_greys + $gr_unknown2`
#Tweak green gamma values here if needed
gg_white=`expr $g_white + 0`
gg_mids=`expr $g_mids + 0`
gg_black=`expr $g_black + 0`
gg_unknown1=`expr $g_unknown1 + 0`
gg_contrast=`expr $g_contrast + 7`
gg_brightness=`expr $g_brightness + 4`
gg_saturation=`expr $g_saturation + 0`
gg_greys=`expr $g_greys + 0`
gg_unknown2=`expr $g_unknown2 + 0`
gg_cksummotley=`expr $gg_white + $gg_mids + $gg_black + $gg_unknown1 + $gg_contrast + $gg_brightness + $gg_saturation + $gg_greys + $gg_unknown2`
#Tweak blue gamma values here if needed
gb_white=`expr $g_white + 0`
gb_mids=`expr $g_mids + 0`
gb_black=`expr $g_black + 0`
gb_unknown1=`expr $g_unknown1 + 0`
gb_contrast=`expr $g_contrast + 5`
gb_brightness=`expr $g_brightness + 1`
gb_saturation=`expr $g_saturation + 0`
gb_greys=`expr $g_greys + 0`
gb_unknown2=`expr $g_unknown2 + 0`
gb_cksummotley=`expr $gb_white + $gb_mids + $gb_black + $gb_unknown1 + $gb_contrast + $gb_brightness + $gb_saturation + $gb_greys + $gb_unknown2`
echo "$gr_cksummotley $gr_white $gr_mids $gr_black $gr_unknown1 $gr_contrast $gr_brightness $gr_saturation $gr_greys $gr_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_red
echo "$gg_cksummotley $gg_white $gg_mids $gg_black $gg_unknown1 $gg_contrast $gg_brightness $gg_saturation $gg_greys $gg_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_green
echo "$gb_cksummotley $gb_white $gb_mids $gb_black $gb_unknown1 $gb_contrast $gb_brightness $gb_saturation $gb_greys $gb_unknown2" > /sys/devices/platform/mipi_lgit.1537/kgamma_blue
If you copied and pasted in word pad or something, it usually don't work as an init.d script, for me anyway.
I usually open it up on my phone with es file explorer, delete all the # lines and make sure 'enter/return' is pressed at the end of every command line. Save then set permissions to all on, because they will change after saving.
meangreenie said:
If you copied and pasted in word pad or something, it usually don't work as an init.d script, for me anyway.
I usually open it up on my phone with es file explorer, delete all the # lines and make sure 'enter/return' is pressed at the end of every command line. Save then set permissions to all on, because they will change after saving.
Click to expand...
Click to collapse
I've only used the text editor within ES File Explorer for my editing, and since the same script works when pasting it into Terminal, there shouldn't be any weird formatting.
I'll try removing the #-lines and setting 777 permissions.
A small correction to my previous post:
Naturally I meant I've tried changing Group to root, the owner has always stayed as root.
use this flashable zip and edit the numbers however you like
http://forum.xda-developers.com/showpost.php?p=37854974&postcount=365
your problem may be an extra space after a line
DynamicRam said:
use this flashable zip and edit the numbers however you like
http://forum.xda-developers.com/showpost.php?p=37854974&postcount=365
your problem may be an extra space after a line
Click to expand...
Click to collapse
Thanks for the cleaned up script. It certainly is a lot more efficient than mine.
Sadly though, it made no difference. Gamma was still at 3.0 after reboot.
I read somewhere that "dmesg" could be used to verify that a script had been properly run, and true enough it displays all the correct values once I've run the color script inside the terminal. But when I run it directly after a reboot it shows no color values at all, in fact I'm pretty sure no init.d scripts are shown.
Of course I'm not entirely sure how it works, but shouldn't it display all the set values?

[Q] [help] I am trying to edit keylayout but no use

I am trying to edit keylayout for my PS3 bluetooth keyboard in my HTC HD2 Android 4.0.4 using tytung NexusHD2 ROM v2.9a
due to the Fn keys are simulate PS3 controler buttoms, i want to set the Fn+up, down, left, right as pgup, pgdn, home, end
i get the scancode as the code below using Testkey.apk
i write a file "Vendor_054c_Product_05af" according to my bluetooth keyboard in /proc/bus/input/devices
and i paste in /system/usr/keylayout and set permission -rw-r--r--
but it never works no matter i change
the keycode still catch the build-in Logitech, PS3 and XBOX controller keylayout
is anyone can help me out
Code:
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Sony Playstation(R)3 Bluetooth Wireless Keyboard with Pointing Stick
#
# key 0x124 DPAD_UP
# key 0x125 DPAD_RIGHT
# key 0x126 DPAD_DOWN
# key 0x127 DPAD_LEFT
key 0x124 PAGE_UP
key 0x125 MOVE_END
key 0x126 PAGE_DOWN
key 0x127 MOVE_HOME
# key 304 Square
# key 305 Cross
# key 306 Circle
# key 307 Triangle
# key 308 L1
# key 309 R1
# key 310 L2
# key 311 R2
# key 312 Select
# key 313 Start
# key 314 L3
# key 315 R3
# key 316 BUTTON_MODE
re
daviking222 said:
I am trying to edit keylayout for my PS3 bluetooth keyboard in my HTC HD2 Android 4.0.4 using tytung NexusHD2 ROM v2.9a
due to the Fn keys are simulate PS3 controler buttoms, i want to set the Fn+up, down, left, right as pgup, pgdn, home, end
i get the scancode as the code below using Testkey.apk
i write a file "Vendor_054c_Product_05af" according to my bluetooth keyboard in /proc/bus/input/devices
and i paste in /system/usr/keylayout and set permission -rw-r--r--
but it never works no matter i change
the keycode still catch the build-in Logitech, PS3 and XBOX controller keylayout
is anyone can help me out
Code:
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Sony Playstation(R)3 Bluetooth Wireless Keyboard with Pointing Stick
#
# key 0x124 DPAD_UP
# key 0x125 DPAD_RIGHT
# key 0x126 DPAD_DOWN
# key 0x127 DPAD_LEFT
key 0x124 PAGE_UP
key 0x125 MOVE_END
key 0x126 PAGE_DOWN
key 0x127 MOVE_HOME
# key 304 Square
# key 305 Cross
# key 306 Circle
# key 307 Triangle
# key 308 L1
# key 309 R1
# key 310 L2
# key 311 R2
# key 312 Select
# key 313 Start
# key 314 L3
# key 315 R3
# key 316 BUTTON_MODE
Click to expand...
Click to collapse
FpseCE
http://www.youtube.com/watch?v=mH_NBKtj0R8

Categories

Resources