Enable emoji keyboard in build via GAIA_KEYBOARD_LAYOUTS
https://github.com/mozilla-b2g/gaia/blob/master/Makefile#L449
Use $ APP=keyboard make install-gaia
to only build+install Keyboard app
If you get "failed to copy" messages like these...
failed to copy '/projects/gaia/profile/webapps/keyboard.gaiamobile.org/manifest.webapp' to '//system/b2g/webapps/keyboard.gaiamobile.org/manifest.webapp': Read-only file system
failed to copy '/projects/gaia/profile/webapps/keyboard.gaiamobile.org/application.zip' to '//system/b2g/webapps/keyboard.gaiamobile.org/application.zip': Read-only file system
β¦ then you need to remount via $ adb remount
If remounting doesnβt do the trick youβll need to $ adb reboot
and then $ adb remount
You should see the emoji keyboard item and checkbox under "Settings > Keyboards > Select Keyboards"
If itβs not there but it is listed under "Settings > Keyboards > Built-in Keyboard | Installed Keyboards" β¦ the mozApp API may need refreshing.
To refresh the mozApp API we want to invalidate the device profile's prefs.js gecko.buildID
by pulling prefs.js from the device profile, editing it, and pushing it back.
$ adb shell stop b2g # to stop b2g process
$ adb shell ls /data/b2g/mozilla/ # find the profile dictionary
$ adb pull /data/b2g/mozilla/XXXX.default/prefs.js # get the js file locally
Then edit it (we simply changed 2015 to 2099) and push it back with
$ adb push /local/path/to/prefs.js /data/b2g/mozilla/XXXX.default/prefs.js
Restart b2g:
If our custom emoji font isnβt on the device image yet. You need to remove the current emoji font and install ours.
$ adb pull /system/fonts/NotoColorEmoji.ttf # backup the device font
$ adb shell # enter device shell
$ rm /system/fonts/NotoColorEmoji.ttf # delete emoji font
$ exit # exit device shell
Download our font and rename it something better like FirefoxEmoji.ttf
.
Now we just need to push it to the device:
$ adb push /local/path/to/FirefoxEmoji.ttf /system/fonts/ # push new emoji font
Restart b2g:
$ adb shell stop b2g
$ adb shell start b2g