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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-07-2014, 01:57 PM   #1
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Password Protection

I wrote a little password checker for kobo readers. The main idea is to intercept the start up script at a certain point and ask for the password. If the correct password is entered the start up script continues, if a wrong password is entered (you get three chances), the device is powered off.

The security level is rather low.
  • I don't encrypt the password. If anybody has access to your running reader, he can find your password.
  • Anybody can factory reset your reader. (S)he will be able to use your reader as (s)he likes, any personal information however will be deleted.
  • If the device has a removable sd card, anybody with the necessary knowledge can open the device and grap any information from the sd.

As you see the protection level is not very high, but might suffice for some situations. As for the first security loophole, you might consider activating "Automatically power off after" in the Sleep & power settings.The second security loophole (factory reset) might actually be welcomed in case you forget the password.
Attached Thumbnails
Click image for larger version

Name:	KoboPW_01.png
Views:	727
Size:	51.1 KB
ID:	118821   Click image for larger version

Name:	KoboPW_02.png
Views:	674
Size:	51.9 KB
ID:	118822  

Last edited by tshering; 02-09-2014 at 12:58 PM.
tshering is offline   Reply With Quote
Old 02-07-2014, 02:06 PM   #2
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
On installation and usage

It is possible to install this appliction on its own right. For the sake of simplicity, however, I treat it for the time being as part of the Kobo Start Menu. Therefore, install the Kobo Start Menu, and then activate the password protection.

Before activating the password protection, I would recommend, you check it out and get accustomed to its usage.

Testing
from the main menu go to "tools>activate>bouncer>test the bouncer.msh" (in some older versions of KSM: "scripts>activate>bouncer>test the bouncer.msh"); you should see something like the first image of this post.
  • select "new PW"; now you should see something like the first image of the first post (black letters on white keys)
    • type the new password and press enter; you will be ask to repeat the password
      • if you succeeded in typing the same password, you will see the message "new password: YOUR PASSWORD"
      • if you didn't, you will see "FIRST PASSWORD and SECOND PASSWORD do not match"
  • select "check PW"; now you should see something like the second image of the first post (white letters on black keys)
    • type the password and press enter
      • if the password matches, you will see the message "ok"
      • if the password does not match, you will get two other chances; if it still doesn't match, you will see the message "failed"
      • if there wasn't set any password to start with, the password checker will not be launched, and you will see the message "pass without checking"
  • select "delete PW"
    • if you now select "check PW", you should get informed that you can "pass without checking"
Play around with this for some time and see whether it works for you. Only then proceed to the next step.

Activating
from the main menu go to "tools>activate>bouncer>settings.msh (in some older versions of KSM: "scripts>activate>bouncer>settings.msh"); you should see something like the second image of this post. Set a new password and check it as you did while testing. If you set a new password (and you don't delete it), the password protection is activated. After the next reboot, you cannot continue without typing the correct password. You can anytime call settings.msh in order to change or delete the password.
If you forget your password, you will have to factory reset your reader.

Note: the "%" key toggles between masked and un-masked display of the input text.


USE THIS APPLICATION AT YOUR OWN RISK
Attached Thumbnails
Click image for larger version

Name:	01_KoboPW_test.png
Views:	706
Size:	33.1 KB
ID:	118825   Click image for larger version

Name:	02_KoboPW_activation.png
Views:	619
Size:	22.6 KB
ID:	118826  

Last edited by tshering; 05-19-2015 at 05:42 AM.
tshering is offline   Reply With Quote
Advert
Old 02-09-2014, 02:57 PM   #3
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
updated posts one and two
tshering is offline   Reply With Quote
Old 04-06-2014, 12:38 PM   #4
Cecell3000
Enthusiast
Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 303048
Join Date: Feb 2013
Location: Brazil
Device: Kindle Paperwhite 3
lock screen kobo glo
work 3.1.1 , 3.2.0

https://www.youtube.com/watch?v=v912S4I0jl4
Cecell3000 is offline   Reply With Quote
Old 09-29-2015, 01:54 PM   #5
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,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
I tried it and it seems to work, but not in Koreader.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Advert
Old 09-29-2015, 02:41 PM   #6
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Ken Maltby View Post
I tried it and it seems to work, but not in Koreader.

Luck;
Ken
How exactly did you try to use it in Koreader? Did you try to call it from Koreader's suspend shell script? If I am not mistaken this script is not used any longer. One could try to call the password protection from somewhere in the lua code.
tshering is offline   Reply With Quote
Old 09-29-2015, 04:31 PM   #7
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,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
I just used the powerslider flick into suspend. I haven't looked at adding your code to the reader ui, yet. It is not something I am in need of, but I have seen it asked for recently. I just started it in KSM, and checked for it in Koreader. It works fine in KSM and I suspect in Nickel. I'll take a closer look soon.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 09-29-2015, 06:08 PM   #8
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
I tried it. The problem is that the password check executable cannot read touch input while koreader has a lock on it. Since I do not speak lua, I cannot solve this.

EDIT: In case somebody wants to play around with this. This is what I did
Spoiler:
I modified \koreader\frontend\device\kobo\device.lua:
Code:
function Kobo:resume()
    os.execute("echo 0 > /sys/power/state-extended")
    os.execute("/mnt/onboard/.adds/kbmenu_user/scripts/tests/checkpw.sh")
    if self.powerd then
        if KOBO_LIGHT_ON_START and tonumber(KOBO_LIGHT_ON_START) > -1 then
            self.powerd:setIntensity(math.max(math.min(KOBO_LIGHT_ON_START,100),0))
        elseif self.powerd.fl ~= nil then
            self.powerd.fl:restore()
        end
    end

    Generic.resume(self)
end
checkpw.sh
Code:
#!/bin/sh

ksmroot=${ksmroot:-"/adds/kbmenu"}

pwfile="$ksmroot/kbbouncer/bouncerpw.txt"
if [ -e $pwfile ] && [ "$($ksmroot/onstart/checkbouncerinstall.sh)" == "ok" ]; then
  export KBBouncerMode=
  bouncer=$ksmroot/kbbouncer/kbbouncer.sh
  pw=$(cat $pwfile)
  answer=""
  pwcount=0
  while [ "$answer" != "passed" ] && [ $pwcount -lt 3 ]; do
    answer=$($bouncer "$pw")
    let pwcount++
  done
  if [ "$answer" == "failed" ]; then
    $ksmroot/onstart/poweroff.sh
  fi
fi
Be aware that this does NOT work. You will be offered the password check, but you cannot enter the password!

Last edited by tshering; 04-24-2016 at 07:37 AM.
tshering is offline   Reply With Quote
Old 10-01-2015, 09:02 AM   #9
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
hi
tshering you said this patch can run on its own and not as a part of KSM
can u tell how to run it that way ?
barobach_so is offline   Reply With Quote
Old 10-01-2015, 12:30 PM   #10
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by barobach_so View Post
hi
tshering you said this patch can run on its own and not as a part of KSM
can u tell how to run it that way ?
I meant to say that it is possible if you know how to do it and that I do not support it.

I do not recommend to do this, but if you insist:
  • You need the executable kbbouncer (from the KSM package; you will find the executable in kbmenu\kbbouncer\)
  • You need also the Qt libraries provided in this package.
  • Look at kbmenu\kbbouncer\kbbouncer.sh which variables you have to set and export, in order to run kbbouncer (note that you also have to point to a directory containing a usable font)
  • call kbbouncer with the valid password as first argument
  • If you enter the correct password, kbbouncer will print "ok". If you enter a wrong password, it will print "false".

Example (script fragment):
Code:
# ... set here variables and so on
# ...
answer=$(PATHTOEXECUTABLE/kbbouncer MYPASSWORD -qws)
if [ "$answer" == "failed" ]; then
    /bin/busybox poweroff
fi
Depending at which point you start the script, you might have to deal with screen rotation.

Note: Use only a-z, A-Z, 0-9 as part of the password!
Edit: You may also have a look at checkpw.sh in the spoiler of post #8.

Last edited by tshering; 10-02-2015 at 06:52 AM.
tshering is offline   Reply With Quote
Old 04-22-2016, 09:06 AM   #11
mkeles84
Enthusiast
mkeles84 began at the beginning.
 
Posts: 46
Karma: 20
Join Date: Apr 2015
Device: Kobo Aura/Glo/Kindle PW2
Wonderful works!
But I have a little problem. If it was dark and no light in the room, how would I enter the password, I can not see without light and (kobo aura light button doesn't work Start menu 08)
mkeles84 is offline   Reply With Quote
Old 04-22-2016, 04:23 PM   #12
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
@mkeles84
You could configure KSM to switch on the light at every start. To do that you would run (KSM home) configure, and select [general]startwithlighton=true.
tshering is offline   Reply With Quote
Old 05-06-2016, 01:15 AM   #13
hounddog
Banned
hounddog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2016
Device: none
Quote:
Originally Posted by Cecell3000 View Post
lock screen kobo glo
work 3.1.1 , 3.2.0

https://www.youtube.com/watch?v=v912S4I0jl4
I can't get this to work. Then again it's my first attempt installing a mod.

I put the KoboRoot.tar in .kobo and ejected. No restart or anything.
hounddog is offline   Reply With Quote
Old 05-06-2016, 06:16 AM   #14
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
If the file is still there it has the wrong name/is in the wrong location...

If the file is gone something else was wrong with it...
frostschutz is offline   Reply With Quote
Old 05-08-2016, 02:44 PM   #15
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by hounddog View Post
I can't get this to work. Then again it's my first attempt installing a mod.

I put the KoboRoot.tar in .kobo and ejected. No restart or anything.
You are supposed to copy KoboRoot.tgz to .kobo.
tshering 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
Unbreakable password protection? Freakstone Kindle Developer's Corner 0 04-20-2011 02:48 PM
PDF files with password protection juansconnected Kobo Reader 1 01-14-2011 04:48 PM
Any password protection? KlondikeGeoff Amazon Kindle 3 01-20-2008 10:42 AM


All times are GMT -4. The time now is 03:35 PM.


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