Xiaomi Piston v3 keys - Moto G General

Just a quick info for people with Xiaomi Piston v3 headset, nothing new either:
As root you can assign all three keys in the file
Code:
/system/usr/keylayout/msm8226-tapan9302-snd-card_Button_Jack.kl
Buttons in order top->bottom when you wear the headset
Upper button: Keycode 115
Middle button: Keycode 226
Lower button: Keycode 217
(at least on Cyanogenmod 13)
For example:
Code:
key 226 HEADSETHOOK
key 115 VOLUME_UP
key 217 VOLUME_DOWN
You can get some inspiration on what actions are available in the "Generic.kl" file in the same folder
Todo: Write a little script in /persist so it stays accross system updates.

so how i'm supposed to enable those actions? please explain the process step by step
Thank you

cameravala said:
so how i'm supposed to enable those actions? please explain the process step by step
Thank you
Click to expand...
Click to collapse
Hope this works on your ROM.
First the /system parition needs to be writeable, you need root for that.
In a terminal emulator or in "adb shell" on your PC do:
Code:
mount -o remount,rw /system
Then you can edit it, for example go to the location with a root-explorer and open it from there in a text editor (most comfortable)
or you can transfer it to your PC and edit it there:
On the phone:
Code:
cp /system/usr/keylayout/msm8226-tapan9302-snd-card_Button_Jack.kl /sdcard
Then edit the file that is now in your internal storage that shows up on PCs over usb.
To put it back, on the phone:
Code:
cp /sdcard/msm8226-tapan9302-snd-card_Button_Jack.kl /system/usr/keylayout/msm8226-tapan9302-snd-card_Button_Jack.kl
chmod 644 /system/usr/keylayout/msm8226-tapan9302-snd-card_Button_Jack.kl
You need to reboot it after that. You can ask if you have other questions.

This won't work if your kernel doesn't include this patch: https://github.com/CyanogenMod/andr...mmit/9aecde9a7aaa7362ef7b4c04ad92d3873a90d8eb

fonz93 said:
This won't work if your kernel doesn't include this patch: https://github.com/CyanogenMod/andr...mmit/9aecde9a7aaa7362ef7b4c04ad92d3873a90d8eb
Click to expand...
Click to collapse
Damn, I was hoping this is universal.
Thanks for the clarification

fonz93 said:
This won't work if your kernel doesn't include this patch: https://github.com/CyanogenMod/andr...mmit/9aecde9a7aaa7362ef7b4c04ad92d3873a90d8eb
Click to expand...
Click to collapse
Thanks you guy

Will this work with CM13?

tiagp said:
Will this work with CM13?
Click to expand...
Click to collapse
Yes

I can't find msm8226-tapan9302-snd-card_Button_Jack.kl on root/system/usr/keylayout
Should i make that file named msm8226-tapan9302-snd-card_Button_Jack.kl on that location?
I'm on Cm13 with latest build.

giboto91 said:
I can't find msm8226-tapan9302-snd-card_Button_Jack.kl on root/system/usr/keylayout
Should i make that file named msm8226-tapan9302-snd-card_Button_Jack.kl on that location?
I'm on Cm13 with latest build.
Click to expand...
Click to collapse
Yeah, you'll need to create it in that location. Your keycodes might differ from the OP (mine did) so you might need to use the keytest.apk to make sure your mappings are correct. Other than that, you'll be fine.

Works me perfect
I didn't create the file, instead of that i modified the "Generic.kñ" file and after a fast reboot worked fine
Sent from my Moto G using XDA-Developers mobile app

Related

Just installed 2.1

I just rooted my Sprint Hero and used the 2.1 rom. I love it except i was wondering if anyone has the same trouble i am.
1- when making a call...proximity error and i have to hit the back key to get the phone screen.
2- not saving new contacts to my gmail account but will save under the phone.
3- my temp one the clock widget and weather widget for some reason is about 30 degrees off
on a side note. I am good with following directions. so rooting the phone wasnt bad.
i would like to understand what the hell i was typing in for commands and what each was doing. im kinda nervous now to install anything else because of this.
ive been on these boards all day, and have done my fair share of searching. modding this phone has been harder to do than my iphone and pre when they first came out.
Which commands did you type. If you share them, I will translate what it actually did.
well, don't expect to have a working ROM that's 2.1 for now even. the problem is, most people come into the forum and just install 2.1 cause they get excited and don't realize that its a beta. its not final. if you want a real working ROM, just use 1.5 for now and add modaco's custom kernel to make it go faster.
Also stlsinger, please tell me you didn't flash with this ROM. Because that ROM is for the G1, NOT the Hero...
gu1dry said:
Which commands did you type. If you share them, I will translate what it actually did.
Click to expand...
Click to collapse
I used all of them from this link
http://forum.xda-developers.com/showthread.php?t=583291
if you could explain that way since they are numbered, that would be alot of help.
and do i backup every time before i install a new one and save that nandroid foler each time? will this enable me to go back to each time before and reinstall whats in the folder?
so if i install 1.5. i wipe and install that. then how do you install a custom kernel.
i know im asking alot of noob questions. please be patient with me. i just want a deeper explination to doing these things.
Thanks for the quick respons guys.
gu1dry said:
Also stlsinger, please tell me you didn't flash with this ROM. Because that ROM is for the G1, NOT the Hero...
Click to expand...
Click to collapse
haha, no. but i would have if i didnt do alot of searching. i only found two versions of 2.1 at first. then i looked a little further and found my phone was cdma. typical noob. Ill catch on sooner or later, haha!
stlsinger said:
I used all of them from this link
http://forum.xda-developers.com/showthread.php?t=583291
if you could explain that way since they are numbered, that would be alot of help.
and do i backup every time before i install a new one and save that nandroid foler each time? will this enable me to go back to each time before and reinstall whats in the folder?
so if i install 1.5. i wipe and install that. then how do you install a custom kernel.
i know im asking alot of noob questions. please be patient with me. i just want a deeper explination to doing these things.
Thanks for the quick respons guys.
Click to expand...
Click to collapse
check out the ROM wiki that's stickied. but for beginners, you might just wanna go with fresh 1.1 or modaco's 2.2 custom rom. if you install modaco's rom, you'll automatically get the custom kernel with all the enhancements like compcache, etc.
if you go fresh 1.1, which is what i use, you should download the update.zip of the custom kernel (also in the rom wiki), and apply that as an update.zip
either way, if you want to enable compcache, you'll have to use adb pull /system/init.db/compcache.sh and uncomment(remove the '#'s) from the scripts. or you can just do it from a file explorer like ES.
you said something about your weather being off? maybe, just maybe its in celsius, not Fahrenheit. as for the proximity sensor, its a app that trys to copy the proximity sensor using the light sensor I think.. Mine didnt work either lol. And I agree, go to fresh, modaco, or ttg with the 1.2 modaco kernel.
1:
Code:
cd C:\android-sdk-windows\tools
Click to expand...
Click to collapse
"cd" means change directory, so all you did here was changed where you were.
2:
Code:
adb devices
Click to expand...
Click to collapse
"adb" is telling your computer to communicate to your android phone.
"devices" just tells us what's connected.
3:
Code:
adb push asroot2 /data/local/
Click to expand...
Click to collapse
"push" means move from the computer to the phone.
So in this command you copied asroot2 from your computer to /data/local/ on your phone.
4:
Code:
adb shell
Click to expand...
Click to collapse
"shell" allows you to run Linux commands on the phone.
5:
Code:
chmod 0755 /data/local/asroot2
Click to expand...
Click to collapse
"chmod" stands for change mode. In essence your changing the permissions.
The four numbers following, means which class. First number being "all", second number being "user", third number being "group" & the last number being "other".
The actual number corresponds to what permissions that class has.
0: being no access
1: being execute, but no write or read access
2: being write, but no read or execute
3: being execute & write, but no read
4: being read, but no execute or write
5: being execute & read, but no write
6: being read & write, but no execute
7: being read, write & execute (aka full access)​So what you did there was provide no access to "all", full access to "user", execute & read access to "group" & "other".
6:
Code:
/data/local/asroot2 /system/bin/sh
Click to expand...
Click to collapse
Not really sure here.
7:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
"mount" tells the computer to that the partition is ready to be accessed.
"remount" tells the computer to remount the partition.
"rw" as in read & write.
/dev/block/mtdblock3 being the partition that is being mounted.
8:
Code:
cd /system/bin
Click to expand...
Click to collapse
Changing directory to /system/bin on the phone.
9:
Code:
cat sh > su
Click to expand...
Click to collapse
This is what "cat" does.
10:
Code:
chmod 4755 su
Click to expand...
Click to collapse
Changing mode/permission of "su" to, read only to "all", full access to "user", execute & read access to "group" & "other".
11:
Code:
exit
Click to expand...
Click to collapse
"exit" terminates the program or shell.
12:
Code:
exit
Click to expand...
Click to collapse
13:
Code:
adb push recovery-RA-heroc-v1.5.2.img /sdcard
Click to expand...
Click to collapse
Your "pushing" recovery-RA-heroc-v1.5.2.img from the computer to /sdcard on the phone.
14:
Code:
adb shell reboot
Click to expand...
Click to collapse
Your telling the phone to reboot.
15:
Code:
adb shell
Click to expand...
Click to collapse
Going back into the shell.
16:
Code:
su
Click to expand...
Click to collapse
"su" tells the computer to running the following commands as the root user.
17:
Code:
cd /sdcard/
Click to expand...
Click to collapse
Changing directory to /sdcard/ on the phone.
18:
Code:
flash_image recovery recovery-RA-heroc-v1.5.2.img
Click to expand...
Click to collapse
"flash-image" means we are flashing/replacing an image.
The second item is which image.
The third item is what image is replacing the aforementioned image.
So here we are flashing/replacing the recovery.img with recovery-RA-heroc-v1.5.2.img.
19:
Code:
reboot recovery
Click to expand...
Click to collapse
We are rebooting the phone into the recovery image.
justinisyoung said:
check out the ROM wiki that's stickied. but for beginners, you might just wanna go with fresh 1.1 or modaco's 2.2 custom rom. if you install modaco's rom, you'll automatically get the custom kernel with all the enhancements like compcache, etc.
if you go fresh 1.1, which is what i use, you should download the update.zip of the custom kernel (also in the rom wiki), and apply that as an update.zip
either way, if you want to enable compcache, you'll have to use adb pull /system/init.db/compcache.sh and uncomment(remove the '#'s) from the scripts. or you can just do it from a file explorer like ES.
Click to expand...
Click to collapse
I just enabled compcache by removing all of the # using es file explorer, just curious what this does ?
It compresses an area of RAM and uses it as cache.
Com(pressed)cache
sweet glad I did that thanks
"chmod" stands for change mode. In essence your changing the permissions.
The four numbers following, means which class. First number being "all", second number being "user", third number being "group" & the last number being "other".
The actual number corresponds to what permissions that class has.
0: being no access
1: being execute, but no write or read access
2: being write, but no read or execute
3: being execute & write, but no read
4: being read, but no execute or write
5: being execute & read, but no write
6: being read & write, but no execute
7: being read, write & execute (aka full access)​So what you did there was provide no access to "all", full access to "user", execute & read access to "group" & "other".
Click to expand...
Click to collapse
Almost right but not quite. In the chmod 0755 notation the first digit is for setuid, setgid, or stickybit, the second is for user, the third for group, the fourth for world. There is no other. You could use chmod 755 and have the same effect. The numbers are literally right but the actual permissions are additions.
Octal notation
Another common method for representing Unix permissions is octal notation. Octal notation consists of a three- or four-digit base-8 value.
With three-digit octal notation, each numeral represents a different component of the permission set: user class, group class, and "others" class respectively.
Each of these digits is the sum of its component bits (see also Binary numeral system). As a result, specific bits add to the sum as it is represented by a numeral:
The read bit adds 4 to its total (in binary 100),
The write bit adds 2 to its total (in binary 010), and
The execute bit adds 1 to its total (in binary 001).
So read/write is 4+2 which equals 6
Read/write/execute is 4+2+1 which equals 7
I know it's pedantic but 6 and 7 don't actually mean r/w and r/w/x by themselves. They are additions of the distinct permission states.
So what he did was grant the following
0755
0 = No setuid, no setgid, no stickybit
7 = Read/Write/Execute (4+2+1) for the UID (user) that owns the file
5 = Read/Execute (4+1) for the GID (group) that owns the file
5 = Read/Execute (4+1) for anyone who can access the file at all (world)
Other, World, Everyone; they mean exactly the same. Just different terminology for the same thing.
In OS X, which is FreeBSD based, X00 is defined as system (root), 0X0 is defined as admin & 00X is defined as everyone. Like I said before differnt terms for the same thing.
gu1dry said:
Other, World, Everyone; they mean exactly the same. Just different terminology for the same thing.
In OS X, which is FreeBSD based, X00 is defined as system (root), 0X0 is defined as admin & 00X is defined as everyone. Like I said before differnt terms for the same thing.
Click to expand...
Click to collapse
I was mostly referring to the first number which in the post was listed as "all"
"...provided no access too all" which is incorrect. There are only three digits for user/group/(other,all,world) and you are correct that they mean the same thing. However 0755 is the exact same as 755 and the 0 is not "all" it is used for setuid, setgid, and the sticky bit. To get technical "all" is not the same on a Linux based system. "All" refers to the combination of user/group/other so chmod a+rw is the same as chmod 666 as "a" is "all" and changes the permissions of all the pieces of the triplet.
justinisyoung said:
check out the ROM wiki that's stickied. but for beginners, you might just wanna go with fresh 1.1 or modaco's 2.2 custom rom. if you install modaco's rom, you'll automatically get the custom kernel with all the enhancements like compcache, etc.
if you go fresh 1.1, which is what i use, you should download the update.zip of the custom kernel (also in the rom wiki), and apply that as an update.zip
either way, if you want to enable compcache, you'll have to use adb pull /system/init.db/compcache.sh and uncomment(remove the '#'s) from the scripts. or you can just do it from a file explorer like ES.
Click to expand...
Click to collapse
Which custom kernel are you suggesting be installed? All I see is the one from Modoco..which is said to be for his rom, will it work for fresh also?
romeosidvicious said:
I was mostly referring to the first number which in the post was listed as "all"
"...provided no access too all" which is incorrect. There are only three digits for user/group/(other,all,world) and you are correct that they mean the same thing. However 0755 is the exact same as 755 and the 0 is not "all" it is used for setuid, setgid, and the sticky bit. To get technical "all" is not the same on a Linux based system. "All" refers to the combination of user/group/other so chmod a+rw is the same as chmod 666 as "a" is "all" and changes the permissions of all the pieces of the triplet.
Click to expand...
Click to collapse
Ok, I think there was a just misinterpretation on my end on your original post.
I'm not too familiar with the first digit on a the four digit expression & I got my info on that digit from Wikipedia. So I have a question on this since I'm a little confused, what does "setuid", "setgid" & "the sticky bit" actually do?
laramiebates said:
Which custom kernel are you suggesting be installed? All I see is the one from Modoco..which is said to be for his rom, will it work for fresh also?
Click to expand...
Click to collapse
He is suggesting MoDaCo's custom kernel be installed. The MoDaCo kernel works with Fresh 1.1, at least for me. Note that I did NOT have to Wipe Data before I installed it.
mrinehart93 said:
He is suggesting MoDaCo's custom kernel be installed. The MoDaCo kernel works with Fresh 1.1, at least for me. Note that I did NOT have to Wipe Data before I installed it.
Click to expand...
Click to collapse
Thank you. Worked great and no wipe required here either.
stlsinger said:
3- my temp one the clock widget and weather widget for some reason is about 30 degrees off
Click to expand...
Click to collapse
Celcius maybe?? Whats the conversion rate on that? lol I was never any good with math...bad career path I chose

enable some hidden system setting

root gen8
create a file "local.prop" at /data/
add follow line.
ro.board.light_sensor=yes
(enable light sensor again!)
ro.board.has_buttonbar=no
(hidden button bar!all button will go to notification bar and "button mode" still work! can solve some touch problem when playing game)
connection.concurrent=90
(internet connect?.)
ro.HOME_APP_ADJ=1
(fix home lag)
ro.FOREGROUND_APP_MEM=1536
(solve some auto-close problem)
dalvik.vm.execution-mode=int:fast
(i try to close jit.flash play more smooth.you can try it)
some danger setting
ro.board.has_soft_keys
(if you say "yes",touch screen will wrong and all button disappear)
ro.board.desktop_experience
(if it set no,system will slower)
(some unknown setting)
ro.board.display_portrait
ro.board.rotation_landscape
ro.board.rotation_portrait
ro.board.touchpad_press_thresh
ro.board.touchpad_click_thresh
need reboot to make it works
have you tested any of these?
yes. i can hidden button bar now~
jerry101 said:
ro.board.has_buttonbar=no
(hidden button bar!all button will go to notification bar and "button mode" still work! can solve some touch problem when playing game)
Click to expand...
Click to collapse
Nice one this works it's pitty the notification bar increased it size to double height.
But yeah it could solve some problems.
What device do you have? Mine is an A101IT
These I don't have
ro.board.rotation_landscape
ro.board.rotation_portrait
from init.A101IT.rc
Code:
# rotation values are (anticlockwise) :
# 0 for 0 degree
# 1 for 90
# 2 for 180
# 3 for 270
# (must be in sync with frameworks/base/core/java/android/view/Surface.java)
setprop ro.board.display_portrait 3
If the notification bar was the same size as it was before, I would root my device and enable that in a heartbeat!
wdl1908 said:
What device do you have? Mine is an A101IT
These I don't have
ro.board.rotation_landscape
ro.board.rotation_portrait
from init.A101IT.rc
Code:
# rotation values are (anticlockwise) :
# 0 for 0 degree
# 1 for 90
# 2 for 180
# 3 for 270
# (must be in sync with frameworks/base/core/java/android/view/Surface.java)
setprop ro.board.display_portrait 3
Click to expand...
Click to collapse
i find it from other rc file,but i don't know how it work
I tried the hidden buttons but when I booted Terminal everything was covered haha, NooOooOoo I liked the hidden buttons
portrait mode by default???
(some unknown setting)
ro.board.display_portrait
Seems like setting this to =yes may give us default portrait mode.
Sometimes when i do reading i want to lock the rotation... but by doing so i'll be forced to be in landscape.
I'll root my Archos70 when i get home from work and test these settings out...
I'm really interested in putting the menu to the top instead of the side...
I wonder how it looks like when u put the archos in portrait...
wow, can't wait to hide that soft buttons when I get home....thank you.
WORKS
Hidden buttons works great....now just gotta get the notification bar moved to the bottom....
Note...need someway to "show" buttons or taskbar...button savior works, but not perfectly....
Thanks for this, really great !
I'm searching how to be able to modify this bar, that's a good start
i rooted with archangel.. put the local.prop inside the "data" folder of the internal storage
doesn't work. for me.. do i have to root with SDE?
A70IT
nam265 said:
i rooted with archangel.. put the local.prop inside the "data" folder of the internal storage
doesn't work. for me.. do i have to root with SDE?
A70IT
Click to expand...
Click to collapse
Nope archangel is fine maybe this only works on A101IT
jerry101 said:
yes. i can hidden button bar now~
Click to expand...
Click to collapse
can you explain how to obtain this?
I made a txt file and add the two command lines like u said
rename the .txt file to local.prop
dropped it in /data/
rooted my A70IT with archangel
reboot and not working... please help
my steps are firstly create a text file with notepad in windows and save as local.prop then copy it to somewhere of ur sd card, and move into /data of internal storage by using root exporer
Sent from my A101IT using Tapatalk
that sux.. i went ahead and root with archangel hoping that i can finally move that side menu to the top...
can some other user with A70IT confirm this?
ohh pleae check my post above and see if i followed the steps correctly
takashi_tann said:
my steps are firstly create a text file with notepad in windows and save as local.prop then copy it to somewhere of ur sd card, and move into /data of internal storage by using root exporer
Sent from my A101IT using Tapatalk
Click to expand...
Click to collapse
Ohh ok i'll try that
I have the file in SD and copied to internal space using Files app from archos.. let me try root explorer
nam265 said:
can you explain how to obtain this?
I made a txt file and add the two command lines like u said
rename the .txt file to local.prop
dropped it in /data/
rooted my A70IT with archangel
reboot and not working... please help
Click to expand...
Click to collapse
You can't drop anything in /data before you root your device. SO how did you manage that?
takashi_tann said:
my steps are firstly create a text file with notepad in windows and save as local.prop then copy it to somewhere of ur sd card, and move into /data of internal storage by using root exporer
Sent from my A101IT using Tapatalk
Click to expand...
Click to collapse
THANKSSS NOW IT WORKS
also thanks fuzzer for the button savior option
**I've never rooted my A70 so I didn't know i needed to use Root Explorer to drop the file in /data
sorry for the noob move

[GUIDE][DOCK][Updated] Disable popup and autoenable foreign layouts when docking

Using a soft keyboard different than the Asus one, when the dock is connected an annoying message pop up telling us that if we don't change the soft keyboard to the asus one, the dock keyboard could not function well.
This is mostly important for non US users, as when the soft keyboard isn't the Asus one, the layout used for the dock is the standard US one.
Root needed
Using Autostarts we can disable the popup when the dock is connected:
Download autostarts from the market, open the app, let it load all the the way, then click on Asus Keyboard under "Docking changed" and disable it
or in terminal
adb shell
su
pm disable com.nuance.xt9.input/.DockEventReceiver
For permanently change the standard layout of the dock keyboard:
Locate your national keychars in /system/usr/xt9/keychars
mine is qwerty-it_IT.kcm
The first 2 character after the - is the language of the keyboard, in my case Italian, the 2 characher after the _ is the country of the keyboard, Italy in my case.
copy this file in /system/usr/keychars
rename the standard one asusec.kcm in asusec.kcm.old for backup purpose.
then rename the one you copied in asusec.kcm
Locate your national layout in /system/usr/xt9/keylayout
mine is qwerty-it_IT.kl
copy this file in /system/usr/keylayout
rename the standard one asusec.kl in asusec.kl.old for backup purpose.
then rename the one you copied in asusec.kl
reboot and you are all done
P.S.
you can use root explorer to copy and rename those files, or you can do it with adb.
If you don't know how to use those, maybe is better to learn before messing around in the system files.
P.P.S.
If anyone know a free app that can replace autostarts, let me know so I can update the guide.
Great guide, thx a lot! If we mess with keychars and keylayout, we could also remap specific keys, right?
For example, I don't really need the three brightness buttons on the dock, i barely change brightness, and if i have to sometimes, i don't mind browsing to settings-->display.
Can we remap these to different keys OR specific apps, OR even better: to key combinations? Would be cool to have cut, copy and paste on the brightness buttons. What do you think?
Plus, one more off topic thing, I think you could know: Is there a file which could change mouse button mapping and perhaps enable additional mouse buttons (thumb mouse buttons for example)? I though of setting the "menu" key to the right mouse button instead of "back" for example.
Regards
qwer23
qwer23 said:
Great guide, thx a lot! If we mess with keychars and keylayout, we could also remap specific keys, right?
For example, I don't really need the three brightness buttons on the dock, i barely change brightness, and if i have to sometimes, i don't mind browsing to settings-->display.
Can we remap these to different keys OR specific apps, OR even better: to key combinations? Would be cool to have cut, copy and paste on the brightness buttons. What do you think?
Plus, one more off topic thing, I think you could know: Is there a file which could change mouse button mapping and perhaps enable additional mouse buttons (thumb mouse buttons for example)? I though of setting the "menu" key to the right mouse button instead of "back" for example.
Regards
qwer23
Click to expand...
Click to collapse
You can remap any key you want, I've seen a guide somewhere in the forums.
For the mouse I don't think you can do anything without some serious hacking, the dock trackpad follow the standard rules for mouses in android: left click = click, right click = back, whell button click = menu.
I also hate how they have implemented the 2 finger scrolling, when you scroll actually the trackpad long click where the cursor is, and invert the axis of the trackpad, so when you scroll down you are in fact long pressing and scrolling the cursor up, and so on.
It messes so many apps, as this simulated long click can be registered by the app
Updated on the first post how to disable permanently the asus keyboad popup when docking
qwer23 said:
Would be cool to have cut, copy and paste on the brightness buttons. What do you think?
Click to expand...
Click to collapse
You can do it with ctrl+x ctrl+c and ctrl+v
I can't see the Thank You button, but I thought I'd just say thanks!
This is an excellent guide and worked perfectly for my UK keyboard!
Much appreciated
I found an alternative to Autostarts, fire this commands in a terminal:
Code:
adb shell
su
pm disable com.nuance.xt9.input/.DockEventReceiver
These are the "cut&paste" commands for changing the layout:
Code:
adb remount
adb shell
mv /system/usr/keychars/asusec.kcm /system/usr/keychars/asusec.kcm.old
mv /system/usr/keylayout/asusec.kl /system/usr/keylayout/asusec.kl.old
cp /system/usr/xt9/keychars/qwerty-it_IT.kcm /system/usr/keychars/asusec.kcm
cp /system/usr/xt9/keylayout/qwerty-it_IT.kl /system/usr/keylayout/asusec.kl
I found my own solution for disabling the dock connected popup.
I modified the XT9IME.apk so that the popup is not displayed and posted it here before stumbling upon this thread.
Would it be possible to make a update zip, to do this in clockwork, ive just insalled a new rom, now i need to redo the fix.
jambo89liam said:
Would it be possible to make a update zip, to do this in clockwork, ive just insalled a new rom, now i need to redo the fix.
Click to expand...
Click to collapse
I could script this and have update.zips for it.
Perhaps someone else could create an app that does it via a menu system to select your country.
Fixed?
Over on http://forum.xda-developers.com/archive/index.php/t-1152317.html the last post says:
"The warning message has now been fixed, after the latest update 8.4.11. It now gives you the option of 'Do not show this again."
So maybe it's now fixed? (Don't have my Transformer at work to check for myself.)
You can use this as an executable (755) script file if you want to use another keyboard with another language
Code:
#!/system/bin/bash
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mv /system/usr/keychars/asusec.kcm /system/usr/keychars/asusec.kcm.orig
cp /system/usr/xt9/keychars/qwerty-de_DE.kcm /system/usr/keychars/asusec.kcm
mv /system/usr/keylayout/asusec.kl /system/usr/keylayout/asusec.kl.orig
cp /system/usr/xt9/keylayout/qwerty-de_DE.kl /system/usr/keylayout/asusec.kl
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
Just replace the "de_DE" parts with your language code.
Just wanted to bump this b/c of the ICS release.
While those ADB commands give me a "segmentation fault"...
Azhad said:
adb shell
su
pm disable com.nuance.xt9.input/.DockEventReceiver
Click to expand...
Click to collapse
the following procedure still works like a charm on ICS!
Azhad said:
Locate your national keychars in /system/usr/xt9/keychars
mine is qwerty-it_IT.kcm
The first 2 character after the - is the language of the keyboard, in my case Italian, the 2 characher after the _ is the country of the keyboard, Italy in my case.
copy this file in /system/usr/keychars
rename the standard one asusec.kcm in asusec.kcm.old for backup purpose.
then rename the one you copied in asusec.kcm
Locate your national layout in /system/usr/xt9/keylayout
mine is qwerty-it_IT.kl
copy this file in /system/usr/keylayout
rename the standard one asusec.kl in asusec.kl.old for backup purpose.
then rename the one you copied in asusec.kl
reboot and you are all done
Click to expand...
Click to collapse
Thanks again for working this out!
can anyone please make the dock keyboard work with latvian? i hate anysoftkeyboard, it stops working and its craching all the time.
i want to use dock like on a normal computer.
Does latvia have its own keyboard layout or do you use one that another country uses as well? Which county abbreviation would it be (like en for English and de for German)?
Doesn't work ?!
modmatt said:
the following procedure still works like a charm on ICS!
Click to expand...
Click to collapse
Doens' work for me, in fact, if I'm copying the de_DE files from Revolver 4 over to my EOS AOSP rom build and put the keychars (asusec.kcm) and the keylayout (asusec.kl) in their respective folders and reboot afterwards, nothing happens to the dock input. Still stays the same old QWERTY like before.
But I can see in file manager that the copying was successfull. New asusec.kl and asusec.kcm are there.
Someone help me ?
You already mentioned the reason yourself, I think. As you are using an AOSP ROM it means that you're using a plain vanilla android basis, which - correct me if I'm wrong - obviously doesn't know anything about asus*.* keyboard files. Just copying some files somewhere is not enough to let the system know what to do with it.
You probably have to deal with some scripts, that are run at every start up, that give proper instructions for the operating system. Unfortunately this is way beyond my knowledge.
modmatt said:
You already mentioned the reason yourself, I think. As you are using an AOSP ROM it means that you're using a plain vanilla android basis, which - correct me if I'm wrong - obviously doesn't know anything about asus*.* keyboard files. Just copying some files somewhere is not enough to let the system know what to do with it.
You probably have to deal with some scripts, that are run at every start up, that give proper instructions for the operating system. Unfortunately this is way beyond my knowledge.
Click to expand...
Click to collapse
What are you going on about? This works just fine on ICS with Revolver, just changed my dock back to azerty. rayman33 just did something wrong.
Please read that rayman33 uses an AOSP ROM that has nothin to do with Asus. You are using Revolver, which is bases on Asus' original ROM - that is why it works for you but not for him.
i just found this post as i'm having the very same issues using my transformer tf300 - currently running official stable CM10
the bad thing about it is only, in my CM10 i don't even have a /system/usr/xt9/ directory and when looking into the backup of my stock ASUS rom, I do have /system/usr/xt9/ and even subdirs keychars and keylayout, but without any content.
it would be lovely if someone would be so kind to suck out the de_CH files for me and could post them here!

[HOWTO]:Recover QWERTZ layout for Milestone 2 after MOD

Hey folks !
I was seriously annoyed by the qwerty layout and the missing Umlaut's like äöü and so on, moreover it was hard to produce french accents. If it helps somebody PLEASE hit the thanks button ! Thanks ;-)
(I know it's all possible by holding down the respective key for 10^6 years and to choose the respective character, but what can I say ... 10^6 years are way to long !).
So here is how I fixed it:
Prerequisites (besides a rooted phone) :
1. Download the attached keymap from original 2.2.2 Froyo
2. Unzip the file
3. Copy it to your SD Card in your mobile phone
4. Check if you have a file called "umts_milestone2-keypad.kcm.bin" in the folder /sdcard on your phone. If so continue, if not, try to figure out how to get the first three steps done !
Now we will backup your original keymap file and copy over the new one.
5. Connect either via adb or open up a terminal directly on your phone.
6. Type
Code:
su
. (Probably you have to hit "allow" in SU message popping up on the telephone's screen).
7. Make sure you now have a
Code:
#
in the beginning of the current comand line. (If not, you don't have superuser privileges, so the next steps won't work).
8. Execute the following lines :
Code:
mount -o rw,remount /dev/block/mmcblk1p21 /system
cd /system/usr/keychars/
dd if=/sdcard/qwerty.kcm.bin of=qwerty.kcm.bin.origi.bak
dd if=/sdcard/umts_milestone2-keypad.kcm.bin of=qwerty.kcm.bin
mount -o ro,remount /dev/block/mmcblk1p21 /system
exit
exit
9. Enjoy your changed keyboard layout, changes should effect instantly !
If something is messed up you can try to copy back the backup file we created in step 8, it's called qwerty.kcm.bin.origi.bak and you could try dd'ing it back to dd if=/sdcard/qwerty.kcm.bin.
The code would be
Code:
dd if=/sdcard/qwerty.kcm.bin.origi.bak of=qwerty.kcm.bin
Remember that you'll have to be root for this as well.
I take no liability for any damage caused by this guide !
p.s. : Please remove the #+)(&$/&/% limitation of not beeing able to post to DEV forums !
p.p.s. : If you find any typos you can keep them
p.p.p.s : By #+)(&$/&/% I want to express something nice, of course !
But where is the /sdcard/qwerty.kcm.bin coming from?
carpet55 said:
But where is the /sdcard/qwerty.kcm.bin coming from?
Click to expand...
Click to collapse
1. Download the attached keymap from original 2.2.2 Froyo
Click to expand...
Click to collapse
As mentioned in the first post it is from the official 2.2.2 version of the Milestone 2.
There is just the file umts_milestone2-keypad.kcm.bin.zip, not the qwerty.kcm.bin - or am I blind? oO *kopfkratz*
---------- Post added at 09:59 PM ---------- Previous post was at 09:37 PM ----------
I copied the qwerty.kcm.bin-file from the CM7 folder /usr/keychars to /sdcard, then followed your guide.
Result: the üöaß is working again!
BUT the y and z were on the swapped. Then I swapped them in all the keylayout-files. Now it is qwertz again.
Alright ... now we can do that step by step or you just follow the guide, in this case step 2:
2. Unzip the file
Click to expand...
Click to collapse
Now you have the umts_milestone2-keypad.kcm.bin
Theeeeeeeeen, while carrying out step 8 you kind of rename to qwerty.kcm.bin :
Code:
dd if=/sdcard/umts_milestone2-keypad.kcm.bin of=qwerty.kcm.bin
.
Just do it step by step and it should work...
Cheers mate. Worked fine.
Three things:
1. I'm using Cyangenmod 7 from this forum and there is already a qwertz.kcm.bin in the /system/usr/keychars/ folder. Just copy/rename/move the file qwertz.kcm.bin to qwerty.kcm.bin
2. Isn't there an easier way to to do all this? I had the same isues with my G1 and now with the Milestone 2.
3. Where is the thanks button?

[HOW TO] Disable Capacitive Buttons and Enable REAL android onscreen buttons

With this procedure you will be able to disable the capacitive buttons and enable the real android onscreen buttons, NOT PIE.
This has been tested in a Tab Pro 8.4 with the latest CM build. If you follow the instructions correctly you shouldn't have any issues, however make a backup just in case. If anyone wants to try it with a stock rom please let me know if it works.
Requisites: Root access and a root explorer.
1. With your preferred root explorer open your build prop and add the following line all the way to the end:
qemu.hw.mainkeys=0
Save and exit.
2. Navigate to system/usr/keylayout and open sec_touchkey.kl as text.
You should have two lines. Add a # at the beginning of each line as follows:
#key 158 BACK
#key 254 APP_SWITCH
Save and exit.
3. Exit the file explorer and go to settings, buttons and turn off the buttons light.
4. Reboot and voila!!!
I hope this helps.
I'm wondering if someone got the chance to test this and if it work for everybody else as it works for me.
I managed to get the soft keys showing via step 1.
However, I do not find a file called sec_touchkey.kl in step 2.
Any advice?
I have atmel_mkt_ts.kl, gpio_keys.kl and synaptics_rmi4_i2c.kl instead.
uPDATE - managed to do step 2 by editing generic.kl instead
All works great now!
It works fine in portrait but broken in landscape. Keys dont show up at all. Any fix for this?
burshturs said:
I'm wondering if someone got the chance to test this and if it work for everybody else as it works for me.
Click to expand...
Click to collapse
I have the same problem with stock ROM.
aeron16 said:
I managed to get the soft keys showing via step 1.
However, I do not find a file called sec_touchkey.kl in step 2.
Any advice?
I have atmel_mkt_ts.kl, gpio_keys.kl and synaptics_rmi4_i2c.kl instead.
uPDATE - managed to do step 2 by editing generic.kl instead
All works great now!
Click to expand...
Click to collapse
Are you trying it in stock or CM?
Hi am using Stock
Hi guys i tried on CM 11 and i dont find #key 254 APP_SWITCH , i rebooted my TAB and Hardware button still works , and appear Software button too , any clue?
Works like a sharme on cm11. The only thing is that the file isn't named 'sec_touchkey.kl' but 'sec_touchscreen.kl' (newest nightly 9-9-2014)
Thanks, works great for me on cm11, too
Works like a charm.
But it's annoying to do this every time I flash a new nightly - so I made a recovery zip-file that does the trick in recovery. Just flash it after you flashed a new ROM.
It's tested on CM11. The script is quite generic and maybe also works on other ROMs.
It first deletes the line with qemu.hw.mainkeys in build.prop if there is one (to avoid duplicates) and then inserts the command at the end of the file.
After that it removes all "#" in front of key assignment in sec_touchscreen.kl (again to avoid duplicates) and then adds "# " in front of every key assignment in this file.
@burshturs: Feel free to post this zip in the OP, if you want to.
The code of the shellscript, if someone is interested:
Code:
#!/sbin/sh
sed -i '/qemu\.hw\.mainkeys/d' /system/build.prop
echo "qemu.hw.mainkeys=0" >> /system/build.prop
sed -i 's/\# *key/key/gI' /system/usr/keylayout/sec_touchscreen.kl
sed -i 's/key/\# key/gI' /system/usr/keylayout/sec_touchscreen.kl
Good stuff. Thank you ! So I guess the way to undo the process I is simply to flash a CM update?
Just flash the ROM again without reset and everything will be as before. Or edit the files as described in the OP and revert the changes.
Nice!
I tried this om my sm-t520 and it works.
I did not phase out the Samsung bar, because in portait mode the bar is gone.
Is there a solution for the Andoid bar in portrait mode?
Sorry if this sounds like a dumb question but you said to open the build prop and add that line to the bottom and my question is where, exactly? I'm using solid explorer and am in the system root folder but to which file do I add that line? Is it in system>usr>keylayout>Generic.kl like I navigated to to disable the capacitive buttons?
I found how to do that in another post and then enabled Pie, but I'd rather have the normal buttons instead.
Sent from my SAMSUNG-SM-N900A using XDA Free mobile app
@baldwyn: build.prop is a file in /system.
Does anybody know the key for the home-button? I have already disabled #172 but that's not working.
petty500 said:
Nice!
I tried this om my sm-t520 and it works.
I did not phase out the Samsung bar, because in portait mode the bar is gone.
Is there a solution for the Andoid bar in portrait mode?
Click to expand...
Click to collapse
You can use this app instead of the build.prop edit. That works just great, The Pro version even allows many customizations incl. behaviour like auto hide or not or custom icons. Important - it works both portrait and landscape,
https://play.google.com/store/apps/details?id=com.mrbimc.udn.lite&hl=de
Working in CM12?
hypophysis said:
Works like a charm.
But it's annoying to do this every time I flash a new nightly - so I made a recovery zip-file that does the trick in recovery. Just flash it after you flashed a new ROM.
It's tested on CM11. The script is quite generic and maybe also works on other ROMs.
It first deletes the line with qemu.hw.mainkeys in build.prop if there is one (to avoid duplicates) and then inserts the command at the end of the file.
After that it removes all "#" in front of key assignment in sec_touchscreen.kl (again to avoid duplicates) and then adds "# " in front of every key assignment in this file.
@burshturs: Feel free to post this zip in the OP, if you want to.
The code of the shellscript, if someone is interested:
Code:
#!/sbin/sh
sed -i '/qemu\.hw\.mainkeys/d' /system/build.prop
echo "qemu.hw.mainkeys=0" >> /system/build.prop
sed -i 's/\# *key/key/gI' /system/usr/keylayout/sec_touchscreen.kl
sed -i 's/key/\# key/gI' /system/usr/keylayout/sec_touchscreen.kl
Click to expand...
Click to collapse
Has anyone tried this in CM12? Or perhaps CM12 has a built-in setting that accomplishes the same thing?
Thanks,
Ron

			
				
kingofcomedy said:
Click to expand...
Click to collapse
Thank you for this. With this setting are the capacitive buttons disabled? I would prefer that they were.
Sent from my SM-T320 using Tapatalk

Categories

Resources