UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Changing the Layout of a Physical Keyboard in anbox on a Nexus 5

    Scheduled Pinned Locked Moved Off topic
    5 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • B Offline
        BodoW
        last edited by BodoW

        I use a Bluetooth keyboard for my Nexus 5 and as long as it is in Ubuntu everything is fine. However, since it has a German layout, things get messy when you use it in anbox as there is only an English layout available.

        So, here is what I did:

        • Own a Ubuntu PC.
        • Copy /home/phablet/anbox-data/android.img to your desktop system
        • Mount the image (if you transferred it to your desktop's Download folder a simple double click might do the trick)
        • Copy the content to an empty directory (lets call it newandroid_img)
        • Go to newandroid_img/system/usr/keychars
        • Delete all .kcm files except virtual.kcm
        • Download the appropriate .kcm file from here and put it in the system/usr/keychars directory and rename it to Generic.kcm
        • Do a "chown -R 100000:100000 newandroid_img
        • Create a new image by "mksquashfs newandroid_img/* newandroid.img"
        • Copy newandroid.img to /home/phablet/anbox-data/ on the phone.
        • Reboot your phone into recovery mode
        • Connect your phone via "adb shell"
        • Go to /data/user-data/phablet/anbox-data/
        • Do "mv android.img oldandroid.img" (Just in case)
        • Do "mv newandroid.img android.img"
        • Reboot

        That should be it.
        It could be that you can replace the images in a freshly rebooted system as well, but the revovery method appeared to be the safest to me.
        Have fun with your äöüßs! (or çs if you feel like it😏 )

        1 Reply Last reply Reply Quote 1
        • D Offline
          doniks
          last edited by

          nice! thanks for sharing. is there an adb push missing in your instructions?

          1 Reply Last reply Reply Quote 0
          • B Offline
            BodoW
            last edited by

            I didn't specify the way I copied the files. You can do it by adb push, or, as I did, copy to/from the Nexus' Download directory via drag-and-drop and shell commands.

            Or did I miss something?

            1 Reply Last reply Reply Quote 0
            • D Offline
              doniks
              last edited by doniks

              ah, sure, either way, What I mean is, you explicitly mention

              Copy /home/phablet/anbox-data/android.img to your desktop system

              to tell people to get the img from the phone to the desktop, but I don's see a step when people should get it back onto the phone

              1 Reply Last reply Reply Quote 0
              • B Offline
                BodoW
                last edited by

                Thanks for the hint. I changed

                • Copy newandroid.img to /home/phablet/anbox-data/

                to

                • Copy newandroid.img to /home/phablet/anbox-data/ on the phone.

                That should make it clear.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post