Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-29-2022, 08:07 AM   #1
lazanet
Junior Member
lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.
 
Posts: 3
Karma: 9032
Join Date: Apr 2022
Device: Kindle PW4
Unhappy Enable Dark mode widget without registering

Hi, I've managed to successfully JB my PW4 running 5.13.6 FW using new technique. I installed KUAL with "Helper", "FakeRegister", and "Remove OTA binaries" packages.

It all works, but since factory reset step my device isn't properly registered and that results in missing Bluetooth and Dark Mode buttons in Quick Settings. I'm not comfortable with connecting to the internet and risking automatic updates just in case some previous step wasn't sufficient.

During debugging, I extracted the firmware using `kindletool`, then mounted the rootfs image locally and decompiled the entire classpath from `/opt/amazon/ebook/lib` using JetBrains Fernflower decompiler.

I'm fairly new to the whole Kindle hacking scene, but it seems to me that my main issue originates from ColorInversionProperties not being populated since `/var/local/java/prefs/ColorInversion.preferences` is missing from my system. Can someone who has their device properly registered and jailbroken upload their ColorInversion.preferences file for me to test this theory?

Other idea that I have is to patch bytecode for QuickSettingsPanel class in order to skip checks for instantiating ColorInversionWidgetController and BluetoothWidgetController, but this seems really messy and I would prefer to avoid it if someone jumps in with a better suggestion.

Thanks in advance!
lazanet is offline   Reply With Quote
Old 04-29-2022, 12:52 PM   #2
lazanet
Junior Member
lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.lazanet can eat soup with a fork.
 
Posts: 3
Karma: 9032
Join Date: Apr 2022
Device: Kindle PW4
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.

Last edited by NiLuJe; 04-29-2022 at 06:05 PM. Reason: Merged duplicate posts and fixed bbcode -- NiLuJe
lazanet is offline   Reply With Quote
Advert
Old 05-29-2022, 09:01 PM   #3
tinycrabman6
Member
tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.tinycrabman6 ought to be getting tired of karma fortunes by now.
 
Posts: 15
Karma: 1000000
Join Date: May 2022
Location: United States
Device: Kindle Voyage, Paperwhite, Scribe
Thank you lazanet for this. I was able to follow your instructions successfully on a PW5 on 5.14.1.1 with the UI reverted to the 5.13.6 style.

For some reason in addition to missing the dark mode toggle, I had two other settings that were absent, but can be reactivated using the same files.


To enable the "display book cover" option in the settings menu:

1) Create a file at /var/local/java/prefs/BookCover.preference containing the following:
Code:
#User preferences for Book Cover Preferences
#Sun May 29 18:17:30 GMT-06:00 2022
BookCoversEnabled=false
isBCSettingAccessed=true
2) And for `/var/local/KWISClient.db` insert this SQLite row:
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('CuratorBookCovers', 'EREADER_CURATOR_BOOK_COVERS_307723', 'T2');

To enable indicators for the last viewed locations in the pagenav, insert these three SQLite lines into KWISClient.db:

1) Ereader Unified Sync
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('EreaderUnifiedSync', 'EREADER_UNIFIED_SYNC_MILESTONE2_319553', 'C');
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('EreaderUnifiedSync', 'EREADER_UNIFIED_SYNC_MILESTONE1_308341', 'C');
2)Page Flip View
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('PageFlipViewDialogRevamp', 'PAGE_FLIP_VIEW_REVAMP_267001', 'T1');
tinycrabman6 is offline   Reply With Quote
Old 05-31-2022, 10:37 PM   #4
Gandulf
Addict
Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.Gandulf ought to be getting tired of karma fortunes by now.
 
Gandulf's Avatar
 
Posts: 210
Karma: 4491791
Join Date: Jul 2020
Location: South Africa
Device: Kindle PW4
I saw a post that said if you full your storage that will prevent an update if you logon to register.

What do you do about a Dictionary? I didn't know when you reset the kindle you would also loose it.
Gandulf is offline   Reply With Quote
Old 06-01-2022, 01:41 AM   #5
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,506
Karma: 5000046
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
Quote:
Originally Posted by Gandulf View Post

What do you do about a Dictionary? I didn't know when you reset the kindle you would also loose it.
Try to find dictionaries in your Amazon account - Content and Devices
mergen3107 is offline   Reply With Quote
Advert
Old 06-02-2022, 04:02 PM   #6
cearp
Member
cearp will become famous soon enoughcearp will become famous soon enoughcearp will become famous soon enoughcearp will become famous soon enoughcearp will become famous soon enoughcearp will become famous soon enough
 
cearp's Avatar
 
Posts: 17
Karma: 512
Join Date: May 2022
Device: 📚
Quote:
Originally Posted by tinycrabman6 View Post
for `/var/local/KWISClient.db` insert this SQLite row:
Code:
INSERT INTO "main"."experiments" ("extra_identifier", "experiment", "treatment") VALUES ('CuratorBookCovers', 'EREADER_CURATOR_BOOK_COVERS_307723', 'T2');
Thank you! On my PW4, dark mode is enabled already, but the book cover option is not. Not unless I register and go online.
I didn't have to create the preference file, I simply added the entry to the database file, rebooted, and that was enough.

I did this after a reset, and did not even register or go online this time - so that is cool.


Regarding the dictionaries, it is possible to de-DRM all of the dictionaries you need from a device that has them, and then simply place them in /documents/dictionaries.
(I'm not sure if it was necessary to remove the DRM, I assume they are protected.)
But I took a dictionary from a registered PW5, removed the DRM, and placed it on my unregistered PW4 - worked fine!
cearp is offline   Reply With Quote
Reply

Tags
dark mode, kwisclient


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug: Dark Mode (Windows) Book Details Pop-Up Cover Background Not Changing to Dark cgrapski Calibre 7 05-03-2021 11:45 PM
What uses more juice, default mode or dark mode? Luffy Amazon Kindle 38 09-28-2020 02:49 PM
Calibre 4.10 night mode/dark mode likeaghost Calibre 11 05-03-2020 05:43 PM
Is it possible to enable full screen mode on H2O and One? greens Kobo Reader 15 04-17-2017 11:18 PM
How to enable landscape mode for epubs on Aura One SimonT Kobo Reader 6 11-12-2016 03:12 PM


All times are GMT -4. The time now is 05:46 AM.


MobileRead.com is a privately owned, operated and funded community.