Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-13-2023, 11:57 AM   #1
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,250
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Solved - PocketBook reboot command?

Non-root and firmware above v5
This simple command seems to work:
Code:
iv2sh reboot
Rooted devices should also be able to run:
Code:
/mnt/secure/su reboot

Non-root and firmware below v5 (and older devices?)
A reboot script that piggybacks off Koreader's restart option:

Code:
#!/bin/sh

koreader=/mnt/ext1/applications/koreader
picview=/ebrmain/cramfs/bin/picviewer.app
bootlogo=/ebrmain/logo/bootlogo/PocketBook.bmp

cd $koreader

# create reboot.lua within applications/koreader dir
if [ ! -e "reboot.lua" ]; then
  echo "#!./luajit" >> reboot.lua
  echo "require(\"setupkoenv\")" >> reboot.lua
  echo "local DataStorage = require(\"datastorage\")" >> reboot.lua
  echo "G_reader_settings = require(\"luasettings\"):open(" >> reboot.lua
  echo "DataStorage:getDataDir()..\"/settings.reader.lua\")" >> reboot.lua
  echo "local Device = require(\"device\")" >> reboot.lua
  echo "Device:reboot()" >> reboot.lua
fi

# opens the default pocketbook logo to act as restart splash screen
$picview "$bootlogo" & ./reboot.lua

Last edited by neil_swann80; 04-17-2023 at 08:27 AM.
neil_swann80 is online now   Reply With Quote
Old 04-13-2023, 01:08 PM   #2
dmalinovsky
Enthusiast
dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.
 
Posts: 28
Karma: 381994
Join Date: Aug 2022
Location: USA
Device: Pocketbook Inkpad Color 3
Pockebook is a Linux, so simple `reboot` should work.
dmalinovsky is offline   Reply With Quote
Advert
Old 04-13-2023, 01:10 PM   #3
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,250
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by dmalinovsky View Post
Pockebook is a Linux, so simple `reboot` should work.
Needs root, can't be used under standard user 'reader'.

If you have a rooted device this may work:
Code:
/mnt/secure/su reboot

Last edited by neil_swann80; 04-15-2023 at 02:22 AM.
neil_swann80 is online now   Reply With Quote
Old 04-13-2023, 01:18 PM   #4
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
If you look in the PocketBook::reboot() function, they make a call into the Inkview library to initiate the reboot. You could write your own trivial Inkview application that just makes the same call and run that. Whatever you do, you will probably need to go through the Inkview interface because you don't have the root privileges required to change the run level from the command line.

In case you don't have the code, here is the call:

inkview.iv_ipc_request(C.MSG_REBOOT, 1, nil, 0, 0)

That is written in LUA, in C it would probably be:

iv_ipc_request(MSG_REBOOT, 1, NULL, 0, 0);

Last edited by rkomar; 04-13-2023 at 01:21 PM.
rkomar is offline   Reply With Quote
Old 04-13-2023, 01:28 PM   #5
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,250
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Lovely! Thanks again rkomar

EDIT:
This alone should work:
Code:
iv2sh reboot

Last edited by neil_swann80; 04-13-2023 at 11:40 PM.
neil_swann80 is online now   Reply With Quote
Advert
Old 04-14-2023, 01:12 AM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Nice find! It looks to be the simple Inkview program that I was suggesting, already installed on the system. It does seem to have a strange selection of supported functions, though. I guess that those were the ones needed by some shell scripts written for the system.

It isn't available on my older devices. It seems to be a newer addition to the system.
rkomar is offline   Reply With Quote
Old 04-14-2023, 02:21 AM   #7
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,250
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by rkomar View Post
It isn't available on my older devices. It seems to be a newer addition to the system.
I think "iv2sh" may only appear from firmware version 5 onwards?

My initial koreader fudge-fix *should* still work with older devices.
neil_swann80 is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to execute a non-root command without access to command line Galunid Kindle Developer's Corner 4 05-15-2018 07:50 PM
Command to reboot the PocketBook ? Chris_77 PocketBook Developer's Corner 1 12-29-2015 07:40 PM
Cannot reboot - help! khalleron Nook Color & Nook Tablet 0 05-05-2011 09:42 PM
Have to reboot often Karinfhd Nook Color & Nook Tablet 2 11-29-2010 01:20 PM
Why I need to reboot the Dr so often? physics@war iRex 3 06-03-2009 04:55 PM


All times are GMT -4. The time now is 12:15 PM.


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