Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 03-05-2019, 02:32 PM   #1
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
Feature request: Lock screen / padlock

Hi,

One thing i really miss is a way to lock my device.
Something like this Click image for larger version

Name:	askpin.png
Views:	43
Size:	401.9 KB
ID:	170027

But a blank screen with an inputbox and keyboard would be great.
Writing the sha256sum to a file, reading from it when checking it.

I tried to program something myself in lua but quickly found out that that is not a skill i can pickup easily.
BloodRagg is offline   Reply With Quote
Old 03-05-2019, 03:20 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,309
Karma: 10777901
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
IIRC, there's a really, really, really old FR on GH for that, that was stalled for fairly sensible reasons (at the time).

Stuff might have evolved since then, but it's not something anyone's been overly bothered about.
NiLuJe is offline   Reply With Quote
Advert
Old 03-05-2019, 03:21 PM   #3
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 102
Karma: 10628
Join Date: Apr 2014
Device: BQ Cervantes 4
It won't help most users security-wise (which run KOReader through KSM and/or KFMon), and where KOReader runs inside a partition exportable via usb.

If you want to implement you own software you're not tied to lua. You can write your own code to deal with the input device and use FBInk to write stuff to the framebuffer.
pazos is offline   Reply With Quote
Old 03-06-2019, 05:54 AM   #4
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
IIRC, there's a really, really, really old FR on GH for that, that was stalled for fairly sensible reasons (at the time).

Stuff might have evolved since then, but it's not something anyone's been overly bothered about.
Thanks ill take a look. (nobody wants to lock their device ?)

Quote:
Originally Posted by pazos View Post
It won't help most users security-wise (which run KOReader through KSM and/or KFMon), and where KOReader runs inside a partition exportable via usb.

If you want to implement you own software you're not tied to lua. You can write your own code to deal with the input device and use FBInk to write stuff to the framebuffer.
Its more like prying eyes and toddler protection than anything else.
I thought of going that route, but i figured this would be like 20 mins for a pro

Any idea on approaching grabbing those coordinates ?
BloodRagg is offline   Reply With Quote
Old 03-06-2019, 08:02 AM   #5
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 102
Karma: 10628
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by BloodRagg View Post
Its more like prying eyes and toddler protection than anything else.
It can be defeated rebooting the device.


Quote:
Originally Posted by BloodRagg View Post
Any idea on approaching grabbing those coordinates ?

You need to parse /dev/input/event1, please read:
https://www.kernel.org/doc/Documenta...nput/input.txt
http://who-t.blogspot.com/2016/09/un...ing-evdev.html

Since the Aura HD is using a single touch driver you will need to grab only ABS_X and ABS_Y. You can differenciate between finger-down and finger-up with ABS_PRESSURE.

You will probably need to make a few adjustments on the code since in some models X values are mirrored and/or X/Y values swaped.

Last edited by pazos; 03-06-2019 at 08:07 AM.
pazos is offline   Reply With Quote
Advert
Old 03-08-2019, 10:39 AM   #6
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
Got it working, written in standard posix shell script, how about that

If there is an gfx artist out there reading this: lockscreen image 1080x1440 png would be really appreciated

But im stuck after loading koreader, i need to enable the lock when going to sleep.
I tried everything but i cannot find what events control the power button.

Also i need to enable to light by default, still looking into that.

Need some more though
BloodRagg is offline   Reply With Quote
Old 03-08-2019, 04:11 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,309
Karma: 10777901
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
Going to need more details .

We grab event1 exclusively, so you won't be able to rely on that outside of KOReader to listen for Power button presses.
NiLuJe is offline   Reply With Quote
Old 03-09-2019, 12:16 AM   #8
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,327
Karma: 6272771
Join Date: Dec 2009
Location: The Heart of Texas
Device: JetBook Lite (retired), AuraHD, PDA,
I seem to remember tshering having a little password routine for KSM.
Ken Maltby is offline   Reply With Quote
Old 03-09-2019, 02:53 PM   #9
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
Going to need more details .

We grab event1 exclusively, so you won't be able to rely on that outside of KOReader to listen for Power button presses.
I looked but the Power button presses dont register on event1, its only the z-ForceTouchIR for me on that device node.

Quote:
Originally Posted by Ken Maltby View Post
I seem to remember tshering having a little password routine for KSM.
I juggled something together, but i will certainly take a look


All awesomeness aside, here I present to you: https://streamable.com/ajqrx
Proof of concept code : see below

Its awesome
Attached Files
File Type: zip padlock_v0.1c.zip (16.4 KB, 9 views)

Last edited by BloodRagg; 03-10-2019 at 06:17 AM.
BloodRagg is offline   Reply With Quote
Old 03-09-2019, 03:57 PM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,309
Karma: 10777901
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@BloodRagg: Whoops, I meant event0, my bad -_-". In any case, hard to make use of, since both Nickel & KOReader grab it exclusively.

The usual caveat with dealing with raw input events is the usual crap with the three of four different variants used by various Kobo models :/.

Last edited by NiLuJe; 03-09-2019 at 04:01 PM.
NiLuJe is offline   Reply With Quote
Old 03-10-2019, 06:15 AM   #11
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
@BloodRagg: Whoops, I meant event0, my bad -_-". In any case, hard to make use of, since both Nickel & KOReader grab it exclusively.

The usual caveat with dealing with raw input events is the usual crap with the three of four different variants used by various Kobo models :/.
At that point neither of them are loaded. Still cant grab anything from event0 for some odd reason. Even when nothing is running...
ps |grep -v '\['
PID USER TIME COMMAND
1 root 0:00 init
830 root 0:00 inetd -f /tmp/inetd.conf
834 root 0:00 {busybox} telnetd -i
835 root 0:00 -sh
23044 root 0:00 ps

** found it, was using evtest instead of raw dev **

Also found that event2 is the g_sensor and can be used for screen rotation.
When I picked up my device and it started puking all kinds coordinates. xyz

But most important is to turn on /off the frontlight, i started looking through github but i could not find a /dev or /sys to write to. Any ideas on that ? I feel like a real dumbass here..

Last edited by BloodRagg; 03-10-2019 at 06:21 AM.
BloodRagg is offline   Reply With Quote
Old 03-10-2019, 08:34 AM   #12
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 102
Karma: 10628
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by BloodRagg View Post

Also found that event2 is the g_sensor and can be used for screen rotation.
When I picked up my device and it started puking all kinds coordinates. xyz

But most important is to turn on /off the frontlight, i started looking through github but i could not find a /dev or /sys to write to. Any ideas on that ? I feel like a real dumbass here..

Aura HD doesn't have g_sensor AFAIK.

For turning on/off the frontlight: https://github.com/pazos/kobo-clock/...ight.c#L20-L26
pazos is offline   Reply With Quote
Old 03-10-2019, 10:06 AM   #13
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,327
Karma: 6272771
Join Date: Dec 2009
Location: The Heart of Texas
Device: JetBook Lite (retired), AuraHD, PDA,
The SOC (System On Chip) may include an interface for the sensor, but I don't think there is the actual hardware.

The old password thread: https://www.mobileread.com/forums/sh...d.php?t=233262 (found searching the developer's corner forum)

Luck;
Ken

Last edited by Ken Maltby; 03-10-2019 at 10:52 AM.
Ken Maltby is offline   Reply With Quote
Old 03-10-2019, 03:52 PM   #14
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
@pazos @ken

Quote:
Originally Posted by pazos View Post
Aura HD doesn't have g_sensor AFAIK.

For turning on/off the frontlight: https://github.com/pazos/kobo-clock/...ight.c#L20-L26
Unless mine is different then all others, its in there.
/dev/input/event2

Input driver version is 1.0.0
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "mma7660abs"
Supported events:
Event type 0 (Sync)
Event type 3 (Absolute)
Event code 0 (X)
Value 1
Min 0
Max 0
Event code 1 (Y)
Value 19
Min 0
Max 0
Event code 2 (Z)
Value 0
Min 0
Max 0
Event code 40 (Misc)
Value 25
Min 0
Max 0
Testing ... (interrupt to exit)
>> "PORTRAIT"
Event: time 1552293573.090151 ------- Report Sync ------ x: 2 y: 21 p: 36728 ------------
Event: time 1552293573.590137 ------- Report Sync ------ x: 0 y: 21 p: 36728 ------------
Event: time 1552293574.590117 ------- Report Sync ------ x: 1 y: 20 p: 36728 ------------
Event: time 1552293575.090122 ------- Report Sync ------ x: 0 y: 19 p: 36728 ------------
Event: time 1552293575.590128 ------- Report Sync ------ x: 1 y: 22 p: 36728 ------------
Event: time 1552293576.090148 ------- Report Sync ------ x: 1 y: 20 p: 36728 ------------
Event: time 1552293576.590149 ------- Report Sync ------ x: 0 y: 22 p: 36728 ------------
>> -90 TURN to "LANDSCAPE"
Event: time 1552293577.090123 ------- Report Sync ------ x: -10 y: 18 p: 36728 ------------
Event: time 1552293577.590130 ------- Report Sync ------ x: -13 y: 15 p: 36728 ------------
Event: time 1552293578.090118 ------- Report Sync ------ x: -17 y: 11 p: 36728 ------------
Event: time 1552293578.590126 ------- Report Sync ------ x: -18 y: 7 p: 36728 ------------
>> LANDSCAPE
Event: time 1552293579.090125 ------- Report Sync ------ x: -19 y: 6 p: 36728 ------------
Event: time 1552293579.590147 ------- Report Sync ------ x: -19 y: 2 p: 36728 ------------
Event: time 1552293580.090124 ------- Report Sync ------ x: -20 y: 1 p: 36728 ------------
Event: time 1552293580.590124 ------- Report Sync ------ x: -19 y: 1 p: 36728 ------------
Event: time 1552293581.590164 ------- Report Sync ------ x: -18 y: 0 p: 36728 ------------
Event: time 1552293582.090137 ------- Report Sync ------ x: -20 y: 0 p: 36728 ------------
>> +90 TURN to "PORTRAIT"
Event: time 1552293582.590153 ------- Report Sync ------ x: -18 y: 7 p: 36728 ------------
Event: time 1552293583.090165 ------- Report Sync ------ x: -13 y: 14 p: 36728 ------------
Event: time 1552293583.590168 ------- Report Sync ------ x: -12 y: 17 p: 36728 ------------
Event: time 1552293584.090167 ------- Report Sync ------ x: -10 y: 17 p: 36728 ------------
Event: time 1552293584.590181 ------- Report Sync ------ x: -5 y: 19 p: 36728 ------------
Event: time 1552293585.090155 ------- Report Sync ------ x: -3 y: 20 p: 36728 ------------
Event: time 1552293585.590139 ------- Report Sync ------ x: -2 y: 20 p: 36728 ------------
Event: time 1552293586.090145 ------- Report Sync ------ x: -1 y: 21 p: 36728 ------------
>> "PORTRAIT"
Event: time 1552293586.590136 ------- Report Sync ------ x: 0 y: 21 p: 36728 ------------
Event: time 1552293587.090151 ------- Report Sync ------ x: -1 y: 20 p: 36728 ------------
Event: time 1552293587.590140 ------- Report Sync ------ x: -1 y: 21 p: 36728 ------------
Event: time 1552293588.590141 ------- Report Sync ------ x: -2 y: 20 p: 36728 ------------
Event: time 1552293589.090144 ------- Report Sync ------ x: -1 y: 21 p: 36728 ------------
Event: time 1552293589.590165 ------- Report Sync ------ x: 2 y: 20 p: 36728 ------------
Event: time 1552293590.090159 ------- Report Sync ------ x: -1 y: 20 p: 36728 ------------



Added a proof of concept, it works like expected
Attached Files
File Type: zip g_sensor.zip (520.5 KB, 7 views)

Last edited by BloodRagg; 03-11-2019 at 10:32 AM. Reason: Added proof of concept
BloodRagg is offline   Reply With Quote
Old 03-11-2019, 10:41 AM   #15
BloodRagg
Enthusiast
BloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-booksBloodRagg has learned how to read e-books
 
Posts: 44
Karma: 766
Join Date: Feb 2019
Device: none
For the frontlight I had hoped that i could just print some data into /dev/ntx.

But it is more complicated than that unfortunately. Its a struct with some data in it.
I tried to replicate it but i failed horribly:

printf 'fl\x0\xf1\x0\x32\x0\x0\x0' > /dev/ntx_io
(00000000 66 6c 00 f1 00 32 00 00 00 |fl...2...|)

I tried hacking the lua script to /tmp/ntx_io as a file, hoping it would just dump its data in there,
so i could do a replay from script. But that did not work *sigh*

Does anyone know what data is send exactly ?
I just need to turn on and off the frontlight, nothing fancy.
BloodRagg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request: Lock Column CRussel Calibre 31 02-11-2018 03:25 AM
Screen Lock sherbearjt08 Nook Developer's Corner 1 06-17-2011 03:57 PM
Feature Request: Touch Screen Usage ghostyjack EPUBReader 3 08-03-2010 07:29 AM
Feature Request: Lock Metadata carpii Calibre 3 02-27-2010 04:34 PM
PRS-300 Who uses the lock feature? icemncmth Sony Reader 11 01-23-2010 11:42 AM


All times are GMT -4. The time now is 01:37 AM.


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