title: Installing a keylayout file (.kl) with android app (.apk)
body: <p>i have tried and searched for days and was unable to come up with any solution for my problem:</p>
  
  <p>I am trying to install a .kl file in /system/usr/keylayout to remap some keyboard keys for my app. I have the proper .kl file in the right format: Vender_XXXX_Product_XXXX.kl and it works if i copy it by using root explorer.</p>
  
  <p>But I want it to be install (without root) by installing my app. Which means it has to be include in the .apk file and copied during installation!?</p>
  
  <p>My approach so far was either with using a receiver and the QUERY_KEYBOARD_LAYOUTS intent. 
  For that a .kcm file is needed. That did not work with my phone (Galaxy S3). I do not know why but it does not show the PHYSICAL_KEYBOARD settings item in settings :(</p>
  
  <p>Anyways i think/hope the better way is by NDK:
  I tried using the ndk and was able to integrate some native c into my application but no "source" files like my .kl file.
  I was hoping that a device.mk file would somehow be able to copy my .kl file to /system like so:
  device.mk
     PRODUCT_COPY_FILES += 
          $(LOCAL_PATH)/Vendor_XXXX_Product_XXXX.kl:system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl</p>
  
  <p>Is that at all possible? To use the NDK to "install" a file to /system automatically while installing the actual apk?
  And if so how do you do that? I am confused about the whole makefile thing and NDK. Never use that before and I am quite bad with c.</p>
  
  <p>If any of you guys know how to do what I am asking ... please let me know. It would be greatly appreciated!</p>