View Single Post
Old 01-12-2025, 06:24 PM   #20
Trender22
Member
Trender22 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2025
Device: Note Air 4C
Quote:
Originally Posted by Renate View Post
No, the mmkv files are the actual "database".
So you have 18 copies of the same thing, one copy marked as active.
It's pretty common pattern in non-SQL DBs these days to just keep adding snapshots of values as it results in better write performance. And reading in this case is probably only done once during initialization and then whole set of active values is kept in memory.
While experimenting with onyx_config file I ended up with setup when my custom file was there, but was owned by 'root' rather than 'system' and was not witeable. After reboot in this setup dmesg showed error while starting 'init_onyx_config' service.

Since then I rectified my mistake and now all handwriting optimizations listed here (https://gist.github.com/calliecamero...ent_id=4993606) are enabled.

I had to download onyx_config along with crc file to a laptop and use mmkv-cli to extract configs of apps in question, edit them according to the article linked above and then set back into the DB file using mmkv-cli again. Note: when setting I had to 'escape' all double quotes of the JSON with backslash so that it worked properly in command line.

Then I transferred updated file back to the device and replaced original with it.
To avoid system applications overriding my version of the file I renamed original (mv command) - they kept their file handles pointing to that renamed original until reboot.
Once I placed my version in /onyxconfig/mmkv I also had to chmod it to 777 and chown/chgrp it to system. After reboot all apps that I touched in the config had the Handwriting tab in the Optimization popup.

I suppose it'd be nicer to port mmkv-cli to android shell or write an app using mmkv lib natively, but I've never developed or even just compiled anything for android so was happy to use mmkv-cli as suggested above.
Trender22 is offline   Reply With Quote