All credit to this thread for figuring out how to do this, I'm just documenting it more thoroughly.
Tested on Nova Air C with firmware 3.5 (2023-11-20).
Handwriting optimisation makes the pen usable in apps installed from the play store. By default it's only available for OneNote, Evernote and WPS -- they have a 'handwriting' tab in the optimisation settings, other apps don't -- but can be enabled for any app by editing the file /onyxconfig/eac_config
as root.
Note: whenever you edit eac_config
, you have to reboot the device for the changes to take effect. Just restarting the app isn't enough.
-
Root the device. For the Nova Air C, the instructions are here. For other devices, you'll find instructions on MobileRead.
-
Open the file
/onyxconfig/eac_config
(only visible as root), and find the entry for your app.-
This is a json file with a structure like:
{ "appConfigMap": { "<app name>": ... } }
where
<app name>
is the package name of the app. Take a look at the entries for OneNote (com.microsoft.office.onenote
) or Evernote (com.evernote
) for examples with handwriting optimisation. -
If there is no entry for your app, open the app and change one of the optimisation settings -- doesn't matter which one, and you can change it back later, this is just to force creation of an entry in
eac_config
. -
All optimisation settings are stored in
eac_config
, not just handwriting settings.
-
-
To enable handwriting optimisation, look for the following settings under your app:
"noteConfig": { ... "enable": false, "globalStrokeStyle": { "enable": false, ... }, ... "supportNoteConfig": false ... }
and change them as follows:
"noteConfig": { ... "drawViewKey": "<your app's view name>", "enable": true, "globalStrokeStyle": { "enable": true, ... }, ... "supportNoteConfig": true ... }
where
<your app's view name>
is different for different apps. Figuring out what this should be is the hard part, see below. -
Reboot the device. Now, when you open the app, the 'handwriting' tab should appear in the optimisation settings.
Maybe there's a better way to do this, but the way I do it is:
-
Download the app's apk from the device, as described here.
-
Open the apk in Android Studio using 'File -> Profile or Debug APK'
-
Look through the xml files in 'res/layout' until I find a class name that looks drawing-related.
-
Try that class as the
drawViewKey
ineac_config
, reboot the device, and if that doesn't work, keep trying other classes.
This is very trial-and-error, though.
Once optimisation is enabled, some settings can be changed in the 'handwriting' tab in the optimisation settings. Others can only be changed by editing eac_config
.
repaintLatency
: how quickly the preview line changes to a real line when you stop drawing. 'Refresh time after lifting stylus' in the 'handwriting' tab.globalStrokeStyle
-
strokeWidth
: 'Stroke width' in the 'handwriting' tab. -
strokeStyle
: values of 0, 1 and 2 used in the default config? Not sure what the difference is.- OneNote uses
1
for pens and2
for highlighters.
- OneNote uses
-
strokeColor
: two's complement of the ARGB colour, where A is always 255. To generate in python:int.from_bytes(((255<<24) + (r<<16) + (g<<8) + b).to_bytes(4, byteorder=sys.byteorder, signed=False), byteorder=sys.byteorder, signed=True)
-
strokeParams
andstrokeExtraArgs
: don't know. OneNote and Evernote don't set these.
-
styleMap
: somehow allows different pen styles in the app to appear differently when drawing the preview line. OneNote sets these, and the different pens there draw the preview line in different colours. But I don't know how to find the names to use as the keys, e.g.pen_1
in OneNote.type: 0
appears to be the style -- different for pen and highlighter.type: 2
appears to be the colour.
- DrawNote:
com.dragonnest.app.view.DrawingContainerView
- Ibis Paint:
jp.ne.ibis.ibispaintx.app.glwtk.IbisPaintView
- Joplin 'Drawing' plugin:
com.reactnativecommunity.webview.RNCWebView
- MediBang Paint:
com.medibang.android.paint.tablet.ui.widget.CanvasView
- Obsidian Excalidraw:
com.getcapacitor.CapacitorWebView
- Squid:
com.steadfastinnovation.android.projectpapyrus.ui.widget.PageViewContainer
- Xodo:
com.pdftron.pdf.PDFViewCtrl
If you find the view keys for any other apps, please let me know.
Thanks for very useful information. I would like to add two keys:
"drawViewKey":"com.pdftron.pdf.PDFViewCtrl"