![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
utelnetd - yet another remote shell application
It bothers me that I can't get a nice shell using ssh anymore under the newest firmware versions. So I looked around, and found that @reader42 already ported the utelnetd telnet server to PocketBook devices. Very nice! Using his source code, I packaged up versions for the older 3XX and the newer Pro/360+ devices. I've also included a copy of bash in each package. Pick the right zip file for your device, and unzip the contents in /mnt/ext1/.
Instead of using the Inkview application that @reader42 provided for controlling the daemon, I used a couple of shell scripts instead (utelnetd_start.app and utelnetd_stop.app). I did this because they are smaller, platform-independent, and, most importantly, run in the background. Thus, you can do other stuff on the device while logged in via telnet (which makes it nice for debugging). Within the Applications tab, click on utelnetd_start to start the server in the background and connect to the net, and click on utelnetd_stop to disconnect from the net and kill the server. While the server is running, you can telnet to the device via port 10000: Code:
telnet <IP-address> 10000 You can change the port number by editting the applications/utelnetd_start.app script. If you want to put bash somewhere else than /mnt/ext1/system/bin, then you need to rebuild utelnetd for that. Get the sources from: http://sourceforge.net/apps/mediawik...for_PocketBook. I've also uploaded the updated Makefile I used to build utelnetd. You need to change the Makefile if you want to put bash somewhere other than /mnt/ext1/system/bin/. Thanks @reader42 Edit: I should point out that when you exit the telnet session on the PC, the terminal seems to hang until the server is killed on the device. I don't know how to fix that, so please pipe up anyone that does. Edit1: Added /mnt/ext1/system/bin automatically to the PATH for the shell. Edit2: Added pop up dialog that states what IP address and port it is listening to. You have to install sh_ivtool.app (found in the Developer section) and uncomment the line in applications/utelnetd_start.app that starts with "#SH_IVTOOLS=" to see the dialog. Last edited by rkomar; 02-11-2018 at 03:39 PM. |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Oct 2012
Location: Germany
Device: Pro612
|
Thank you very much you guys (reader42, rkomar) - it works great!
![]() If I had the find command available for my Pro612 now too, it would be totally awesome. ![]() Greetings Max |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Actually, most of the utility programs in the Debian Lenny armel distribution are compatible with the recent PocketBook devices. You can pretty much copy them to the device and use them in the terminal. Some of the more complex programs may not have all of the libraries available on the device, but even in those cases you can copy the libraries over and play with LD_LIBRARY_PATH to run them. I know that find works, because that was one of the first programs I copied over myself.
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Oct 2012
Location: Germany
Device: Pro612
|
You are absolutely right - thanks again
![]() You just made my day. ![]() |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I updated the utelnetd daemon to automatically add "/mnt/ext1/system/bin" to the PATH environmental variable.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I added a pop-up dialog that states what the IP address and port are that the daemon is listening to. For this to work, you have to install the sh_ivtool.app program to /mnt/ext1/system/bin, and uncomment the line in the applications/utelnetd_start.app script that starts with "#SH_IVTOOL=...". (uncommenting means removing the "#" character at the start of the line). The sh_ivtool program is available in a thread in the Developers section.
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jun 2015
Device: Pocketbook 626
|
utelnet on Pocketbook 626?
Hi,
will utelnetd work on Pocketbook 626 or does it neet recompiling? |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I think it should work. I use it on my Inkpad with the 5.4 firmware.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jun 2015
Device: Pocketbook 626
|
YES, it works. Thanks. Sometimes very responsive, sometimes not (in the same session)- any clues?
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I've noticed that on my Inkpad with the 5.4 firmware. The devices with the version 2 or 4 firmwares don't show such pauses. I think parts of the device go to sleep, and it takes a few moments to wake back up again. I don't think it has anything to do with the utelnetd program itself, so there's nothing much I can do to fix it.
|
![]() |
![]() |
![]() |
#11 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 199
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Reporting that the -Pro version (+sh_ivtool) works on my HD Touch, except for a typo: a missing ` at the end of line 25 of utelnetd_start.app, which should read
Code:
IP=`ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1` Last edited by EastEriq; 01-19-2018 at 02:23 AM. |
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
You're right. Thanks. I'm surprised it worked before. Perhaps the shell on the older devices is more lenient.
Edit: No, it didn't work on the old devices either. I probably cut and paste those commands from the working sshd script and missed the trailing backtick. I guess nobody used that part of the script (including me). Last edited by rkomar; 01-19-2018 at 04:17 AM. |
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I updated the zip files in the first post with the fix for the missing backtick bug. There is no need to update devices unless you want to use the pop-up dialog to show the IP address of the device.
|
![]() |
![]() |
![]() |
#14 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2012
Device: Cray XK7
|
Hi,
I just tried your utelnetd-Pro.zip on an Inkpad 3 (PB740), Firmware U740.5.17.1392. It works out of the box. Thank you! Login just seems to be to user "reader". Do you know an easy way to get root? Or do I need to cook up some exploit or open the device to access the flash ic or serial interface? |
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,041
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Quote:
To be honest, you can do a lot without needing root, so I don't think there is a much incentive to try to find a crack. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
remote shell access on 90x,60x | review | PocketBook | 9 | 08-08-2020 09:56 AM |
Application remote debugging | X19 | Kindle Developer's Corner | 11 | 12-29-2011 03:46 AM |
Application update: application not installed error | Merischino | Kindle Fire | 4 | 12-01-2011 10:30 PM |
Remote shell auf 60x/90x | wongdong | PocketBook | 7 | 01-12-2011 12:25 PM |
Accessories Remote | Kumabjorn | Amazon Kindle | 20 | 07-19-2010 04:30 PM |