View Single Post
Old 11-30-2021, 08:00 AM   #1
MrTick
Enhtusiast
MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.MrTick ought to be getting tired of karma fortunes by now.
 
MrTick's Avatar
 
Posts: 51
Karma: 2332557
Join Date: Dec 2018
Device: K3 DxG PW1 KV PW4
Kindle Voyage - disable touch screen in native way

Sooo I've just got a second-hand Voyage and I love the device already.
The screen quality leaves my PW4 waaay behind.

Anyway: KV have this pressure-something semi-physical page-turn button-thingies.
But it also has a touch screen, so there's no real difference if I press the edge of screen or the pressure button... so let's disable the touchscreen.

There are some hacks for that available:
http://www.fabiszewski.net/kindle-untouchable/
https://www.mobileread.com/forums/sh...d.php?t=279209

But PW4 and Oasis family have this neat feature when reading a book (introduced around 5.12 maybe earlier [see EDIT2]):


So I've started digging in the OS of PW4 and eventually found a solution:
This option appears only for waterproof devices, and is internally called "Bath Mode" - probably implemented mostly for preventing accidental page turns from water drops.
So the solution is simple - we need to make our Kindle waterproof

!WARNING! FOLLOWING GUIDE WILL NOT MAKE YOUR VOYAGE WATERPROOF DESPITE WHAT IT SAYS!

The waterproofness (waterproofability?) (waterprooficiency??) is determined by output of
Code:
> devcap-get-feature -a waterproof
Devcap uses an encrypted configuration file /etc/deviceConfig.conf:
Code:
> md5sum /etc/deviceConfig.conf
ecc8818ba367fd199a227d386b8f70f3  /etc/deviceConfig.conf
Fortunately eureka has found a solution way back in 2013
https://www.mobileread.com/forums/sh...d.php?t=200294
There is devcap-encrypt tool available, that performs symmetric encryption/decryption of the configuration file:
Code:
> devcap-encrypt -i /etc/deviceConfig.conf /tmp/deviceConfigDecrypted.conf
Successfully encrypted file=/tmp/deviceConfigDecrypted.conf 
> md5sum /tmp/deviceConfigDecrypted.conf 
4cb16f866dc3ee5b5d407d1240877aa1  /tmp/deviceConfigDecrypted.conf
Spoiler:
Code:
[root@kindle root]# cat /tmp/deviceConfigDecrypted.conf 
# Groups are started by a header line containing the group name enclosed in '[' and ']',
# and ended implicitly by the start of the next group or the end of the file.
# The group common contains features common to all devices, the remaining groups are devices associated with the platform.
# If feature.available=value does not exist its value will be assumed as false by default.
# For example audio.available key not existing means that there is no audio available.
[common]
screen.available=true
screen.inverted=1
touch.available=true
touch.proc=/proc/touch
wifi.available=true
hall.available=true
adtcp.available=true
oobe.available=true
usb.available=true
usbaudio.available=true
chapterflashing.available=true
prime.available=true
odot.available=true
kdk.capability.path=/res/pinot.capability.json
bookerly.available=true
futura.available=true
battery.no_of_supported_batt=1
chargecover.available=false
publicnotes.available=true
[icewine]
frontlight.available=true
frontlight.fl_default_intensity=18
frontlight.max_smooth_intensity=24
frontlight.led_type=wario_6led
als.available=true
button.keypad.available=true
button.keypad.fsr=1
touch.gripsuppr.available=true
touch.multitouch.available=true
haptics.available=true
wan.available=true
wan.display_type=3G
odot.topic=dtcp.iw
screenreader.available=true
bookerly.dialog.available=true
otg.available=true
fastmetrics.available=true
[icewine_wfo]
frontlight.available=true
frontlight.fl_default_intensity=18
frontlight.max_smooth_intensity=24
frontlight.led_type=wario_6led
als.available=true
button.keypad.available=true
button.keypad.fsr=1
touch.gripsuppr.available=true
touch.multitouch.available=true
haptics.available=true
odot.topic=dtcp.iw
screenreader.available=true
bookerly.dialog.available=true
otg.available=true
fastmetrics.available=true
[pinot]
touch.multitouch.available=true
frontlight.available=true
frontlight.fl_default_intensity=22
frontlight.max_smooth_intensity=25
frontlight.led_type=wario_4led
frontlight.turbobrightness.available=true
frontlight.turbobrightness.intensity_levels=1
wan.available=true
wan.display_type=3G
activecontent.available=true
odot.topic=dtcp.pi
bookerly.dialog.available=true
[pinot_wfo]
touch.multitouch.available=true
frontlight.available=true
frontlight.fl_default_intensity=22
frontlight.max_smooth_intensity=25
frontlight.led_type=wario_4led
frontlight.turbobrightness.available=true
frontlight.turbobrightness.intensity_levels=1
activecontent.available=true
odot.topic=dtcp.pi
bookerly.dialog.available=true
[wario]
als.available=true
[bourbon]
odot.topic=dtcp.bb
bookerly.dialog.available=true
[muscat_wfo]
odot.topic=dtcp.mu
frontlight.available=true
frontlight.fl_default_intensity=22
frontlight.max_smooth_intensity=25
frontlight.led_type=wario_4led
frontlight.turbobrightness.available=true
frontlight.turbobrightness.intensity_levels=1
screenreader.available=true
touch.multitouch.available=true
otg.available=true
fastmetrics.available=true
device.name=Kindle Paperwhite
[muscat_wan]
odot.topic=dtcp.mu
frontlight.available=true
frontlight.fl_default_intensity=22
frontlight.max_smooth_intensity=25
frontlight.led_type=wario_4led
frontlight.turbobrightness.available=true
frontlight.turbobrightness.intensity_levels=1
screenreader.available=true
touch.multitouch.available=true
wan.available=true
wan.display_type=3G
otg.available=true
fastmetrics.available=true
device.name=Kindle Paperwhite
[muscat_mme]
odot.topic=dtcp.mu
frontlight.available=true
frontlight.fl_default_intensity=22
frontlight.max_smooth_intensity=25
frontlight.led_type=wario_4led
frontlight.turbobrightness.available=true
frontlight.turbobrightness.intensity_levels=1
screenreader.available=true
touch.multitouch.available=true
otg.available=true
deregistration.deletecontent.available=true
multifolder.available=true
fastmetrics.available=true
device.name=Kindle Paperwhite

All we need is to add following property:
Code:
waterproof.available=true
to [icewine] (Voyage 3G+WiFI) or [icewine-wfo] (Voyage WiFi) or [common] sections:
Code:
# adding to common section because why not:
> sed -i 's/\[common\]/\[common\]\nwaterproof.available=true/g' /tmp/deviceConfigDecrypted.conf
> md5sum /tmp/deviceConfigDecrypted.conf 
7193d166a3d235cb3b01043981c1830f  /tmp/deviceConfigDecrypted.conf
And encrypt again:
Code:
> devcap-encrypt -i /tmp/deviceConfigDecrypted.conf /tmp/deviceConfigNew.conf
Successfully encrypted file=/tmp/deviceConfigNew.conf 
> md5sum /tmp/deviceConfigNew.conf 
35f97ecdbb3fa07da14df965f4a309dd  /tmp/deviceConfigNew.conf
Now CAREFULY (as probably Kindle will brick if we mess this config) copy it back:
Code:
> mntroot rw
> cp /etc/deviceConfig.conf /etc/deviceConfig.conf.bak
> cp /tmp/deviceConfigNew.conf /etc/deviceConfig.conf
And after reboot new menu item should show up... but it will not work yet.

Disabling screen via menu triggers lipc daemon event com.lab126.kaf->startXBath.
From /etc/lipc-daemon-events.conf
Code:
## This file defines what evetns are handled by lipc-daemon
## The format of the file is 
##<event name>   <event publisher>   <command to execute when event is received>
(...)
startXBath        com.lab126.kaf        start xbath;
(...)
So we need an upstart rule for xbath
Option 1: Copy it from PW4 firmware:
  1. get PW4 firmware 5.13.6
  2. extract it with kindletool extract <fw_file>
  3. decompress rootfs: gzip -d rootfs.img.gz
  4. mount rootfs somewhere, e.g.: mount -o loop,ro,noload rootfs.img rootfs/
  5. copy /etc/upstart/xbath.conf and /usr/bin/xbath from rootfs to Voyage
Option 2: No need to copy anything from PW but will also disable swipe page flip.
Create /etc/upstart/xbath.conf with following content:
Code:
stop on stopping x

env LIBC_FATAL_STDERR_=1
env STDERR=/tmp/xbath.err

script
    source /etc/upstart/env
    lipc-set-prop com.lab126.deviced enable_touch 0
end script
Now reboot and you should have disable-touchscreen option available and working
I'll try to create an update file, but I've never done it, so maybe later

EDIT:
Update files in the attachment -> touchblock_1.0.zip
(it uses "option 2" as we can't share amazon-copyrighted files)
Everything was tested on KV running 5.13.6, packages were installed through MRPI.

EDIT2:
I went through Voyage update files and prepared touchblock_1.1.zip.
It should work on any 5.10.2+ firmware (5.10.2 is the exact version, where bath mode was introduced).

EDIT3:
Fix for FW 5.12.1 - 5.13.5 -> touchblock_1.2.zip
Attached Thumbnails
Click image for larger version

Name:	screenshot_2021_11_30T12_54_19+0100.png
Views:	943
Size:	15.3 KB
ID:	190537   Click image for larger version

Name:	screenshot_2021_11_30T12_54_23+0100.png
Views:	925
Size:	26.8 KB
ID:	190538  
Attached Files
File Type: zip touchblock_1.0.zip (17.4 KB, 126 views)
File Type: zip touchblock_1.1.zip (17.7 KB, 142 views)
File Type: zip touchblock_1.2.zip (18.1 KB, 143 views)
File Type: zip touchblock_1.3.zip (18.3 KB, 183 views)

Last edited by MrTick; 12-03-2021 at 02:28 PM. Reason: Fix for FW 5.12.1 - 5.13.5
MrTick is offline   Reply With Quote