Ok, I finally figured it out. For future reference here is roughly what you need to do:
1) Create a new file at /var/local/java/prefs/ColorInversion.preferences that should contain the following:
Code:
#User preferences for ColorInversionPreferences
#Fri Apr 29 15:29:20 GMT+01:55 2022
currentTreatment=T1
isUserInteracted=true
isTutorialShown=true
2) Make it read only by running:
Code:
# chmod 0444 /var/local/java/prefs/ColorInversion.preferences`
3) Now the tricky part... No matter what you did with pref file, system will use value from `/var/local/KWISClient.db` instead. So what you need to do is to extract that file, open it using some sqlite editor and insert the following row:
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('KINDLE_EINK_DARK_MODE', 'KINDLE_EINK_DARK_MODE_249201', 'T1');
Voila, Dark mode button is back on your 5.13.6's Quick Settings screen without logging in.
These steps could be automated via custom KUAL package, but frankly I've lost way too much time figuring this out and crawling through obfuscated source code. Also I haven't fixed missing bluetooth button, but since it depends on Audible connection it wouldn't be of much use anyway.