Installing a Custom External Keyboard Layout on Your Nexus 7 Android Using Ubuntu

1. Root Your Nexus 7

Instructions can be found here: http://itsfoss.com/root-nexus-7-2013-ubuntu-linux/
I have a 2012 Nexus, so instead of "CF-Auto-Root-flo-razor-nexus7.img" I needed "CF-Auto-Root-grouper-nakasi-nexus7.img"

An explanation for this is according to this post: http://forum.xda-developers.com/showthread.php?t=2444328
Device "flo" - Firmware "razor" - 2013 N7 WiFi-only
Device "deb" - Firmware "razorg" - 2013 N7 LTE
Device "grouper" - Firmware "nakasi" - 2012 N7 WiFi-only
Device "tilapia" - Firmware "nakasig" - 2012 N7 3G

2. Make Your Keyboard File

Some examples for a variety of layouts including Dvorak are here, my special thanks to these guys:

If you have time, download the Android source so you can check your .kl file/files with the "validatekeymaps" command:

3. Replace Your Generic.kl File

You need to replace your /system/usr/keylayout/Generic.kl with the file you made. I made mine based off of this post http://forum.xda-developers.com/showthread.php?t=1223020 and my original Generic.kl file. You also will need a program that allows you root access through the adb shell so that when you type "adb shell" then "su" in ubuntu you get root to you device. I use https://play.google.com/store/apps/details?id=eu.chainfire.supersu&hl=en

Here's my .kl file: http://themeatyard.blogspot.com/2014/11/dvorak-keyboard-layout-for-nexus-7.html
To replace, run following commands in Ubuntu terminal, the first one saves a backup:

adb pull /system/usr/keylayout/Generic.kl
adb push "your .kl file" /sdcard
adb shell
mount -ro remount,rw /system
cd /sdcard
cp "your .kl file" /system/usr/keylayout
cd /system/usr/keylayout
mv "your .kl file" Generic.kl
chmod 644 Generic.kl

No comments: