|
|
Thread Tools | Search this Thread |
11-29-2019, 02:40 PM | #1 |
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
PB6xx/7xx/8xx: root + sshd, ftpd, smbd, iptables, usbnet, fw fixes (needs testers)
This tutorial & tools is meant for power users who can make use of configuring the device in fancy ways, such as running custom stuff for linux, development and troubleshooting. Note that you DON'T need root just for *running* standard apps such as coolreader or koreader.
As of v8, this package does:
Devices supported Known to work on/tested by users in this thread:
Essentially if your firmware version ends like 5.xx.yyyy (FW5) or 6.xx.yyyy (FW6), *it should run* - these images are all nearly identical. However I have no way to verify that for a fact, other people should just try it. The kit takes a lot of effort to fail as gracefully as possible, but you might want to start slowly only with jailbreak su and nothing else on older devices, as bugs in older kernels can introduce nasty boot crashes, especially when configuring for combined usbnet. How to install Extract the 2 app files from pbjb*.zip release on github into applications folder of your device. Then from app menu: * Launch @Jailbreak. If it succeeds, it will install root su. It does nothing else. Running it again will undo root. * Launch @Services. This will install the system services, kernel modules, settings menus etc. su must be installed. If jailbreak is missing, the app will silently fail to run. Running it again will undo the install. Once the device boots after Services install, new menu entry 'Rooted device settings' should appear in settings menu. In it, it will show generated root password, you can change it to your own too. With that, ssh into root@169.254.0.1 when you connect usbnet. All other services expect same root/password pair. If usbnet is not working for you for some reason, you can navigate Settings->Rooted Device Settings->System Status and it will show you current wifi ip you can use to access the device. Samba/WebDAV share Spoiler:
Troubleshoot Spoiler:
Low level internals Spoiler:
Last edited by ezdiy; 09-26-2020 at 11:48 PM. Reason: v8 |
11-29-2019, 08:08 PM | #2 |
Guru
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Thank you for including the source code. This will save me so much time! I am looking forward to reading the code.
|
Advert | |
|
11-29-2019, 09:56 PM | #3 |
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
Released v3
Changes from v1: * Samba shares are now network neighborhood discoverable (added nmbd) * Added packet filter if you need to firewall something (iptables) * A lot of cosmetics for source code because people are apparently looking at it (eep) * Added frequency scaling When updating from past versions, simply run Services.app from the zip file, it will just copy over the past one. I've cleaned up the Makefile to be slightly more humane, and added the output binaries of cross compile if you don't want to go through that (make clean will wipe em and go through cross compiler though). Last edited by ezdiy; 11-30-2019 at 04:09 AM. Reason: v3 |
11-30-2019, 07:27 AM | #4 |
Guru
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Nice!
Yes, I remember setting up cross-compilation for the Kobo with arm hard float cross compiler. It was quite a job. Could you give me a few pointers/links for the setup of the cross-compilation? |
11-30-2019, 10:52 AM | #5 |
Guru
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
I installed your apps on my PB740-2. Ran them and after that they disappeared from the app section. Using pbterm I see 'su' in /mnt/secure.
However, cannot connect to it yet using USBnet. 'ip link' does register a extra connection. Gnome keeps complaining that the connection failed. Connecting to the PC, choosing PC-link, disconnecting, connecting, choosing Charging, disconnecting, etc.: dmesg.log So something failed, could be my Arch Linux setup: I sometimes have trouble with USBnet on my Kobo H2O, too. The pocketbook also doesn't register with my router when I use the WiFi, so I can't try it through that IP, too. EDIT: arp-scan found it! It's working: ================================================== == PocketBook services v2, http://github.com/ezdiy/pbjb ================================================== == root password can be set by saving password.txt in top folder of storage (/mnt/ext1/password.txt) root@192.168.2.47's password: I looked the password up by using pbterm and the command cat /mnt/ext1/password.txt. Quite an improvement in typing in the ssh shell instead of using pbterm! Last edited by Markismus; 11-30-2019 at 02:19 PM. |
Advert | |
|
11-30-2019, 02:58 PM | #6 | ||
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
Quote:
The reason why it's done like this is that on windows it works out of the box (it automatically enables the ethernet interface, configures ip on it...), while on linux you have to add custom udev rule: https://wiki.archlinux.org/index.php...#USB_tethering Within same udev rule you can also add script to auto-mount the samba share, so you can get rid of hogging mass storage. Quote:
|
||
12-01-2019, 08:28 AM | #7 | |
Connoisseur
Posts: 55
Karma: 8430
Join Date: Mar 2016
Device: PW3, Clara HD, PB740
|
Hi ezdiy,
I'm ABSOLUTELY baffled as to how sending a buffer to a seemingly random IPC queue can grant you root privesc! ▄█▀█● My config (OS is Win10 1809): Quote:
- about the jailbreak process, I like the fact it doesn't mandate using /mnt/ext1/applications - SSH USBnet works like a charm - USBnet Samba shares are fine - but the passworded shares take awfully long to show the credential prompt, causing the action to sometimes time out in Explorer I haven't tried via wifi yet,do you have a sample iptables ruleset we can use to prevent communication with obreey/pocketbook? - Not sure if it's possible, can you keep the device alive (prevent sleep) while there's activity in the services? - This one is a quality-of-life convenience, can you create /mnt/ext1/.ssh if it doesn't exist? Also, I'm trying to get dropbear to accept pubkey authentication to no avail - scp works fine, not sftp (probably a dropbar limitation). If it's not too complicated, can you include rsync as well? - Generally in PBTerm /mnt/secure/su command works, any idea why /bin/sh doesn't return control? Great work mate |
|
12-01-2019, 07:49 PM | #8 |
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
v4 released:
|
12-01-2019, 08:01 PM | #9 | ||||||
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Last edited by ezdiy; 12-01-2019 at 08:18 PM. |
||||||
12-04-2019, 07:18 PM | #10 |
Connoisseur
Posts: 55
Karma: 8430
Join Date: Mar 2016
Device: PW3, Clara HD, PB740
|
Hmm, I had to uninstall the kit for now.
Not too sure why, it prevented showing micro-sd contents (ext2) in PC link mode. Drive would appear in explorer, but not browseable (like an SD card reader when no card is inserted) whereas the internal storage's letter was fine. Edit: will try with v4 Edit2: OK, after the 'Rooted device settings' reboot in v4, selecting "PC Link", the problem is still there. I turned USBnet off, rebooted, plugged USB back in, PC Link, SD contents show up again Last edited by Marco77; 12-04-2019 at 07:31 PM. |
12-04-2019, 08:19 PM | #11 | |
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
Quote:
Try version 4.2: https://github.com/ezdiy/pbjb/releas...2-g69594f2.zip (just reinstall Services.app from there). Last edited by ezdiy; 12-04-2019 at 08:34 PM. |
|
12-05-2019, 03:43 PM | #12 | ||||
Connoisseur
Posts: 55
Karma: 8430
Join Date: Mar 2016
Device: PW3, Clara HD, PB740
|
Quote:
^C[1011] Dec 06 01:13:27 Early exit: Terminated by signal /mnt/secure # ls -ald /mnt/secure/.ssh /mnt/ext1/.ssh drwxrwxrwx 2 root root 4096 Dec 1 13:07 /mnt/ext1/.ssh lrwxrwxrwx 1 root root 14 Dec 5 23:09 /mnt/secure/.ssh -> /mnt/ext1/.ssh So yeah, it doesn't like the mode. And chmod has no effect, because of its mount mode: Quote:
Quote:
does not give a root shell. Maybe because of not having a pty for non-root, not too sure. Quote:
Last edited by Marco77; 12-05-2019 at 03:45 PM. |
||||
12-07-2019, 04:12 PM | #13 |
Guru
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
@ezdiy Is it feasible to run an OpenVPN client on the pocketbook?
(Apparently, you have to root the iPhone to have a chance get it to allow tethered connections over the VPN, ..... ) What crosscompiler should I use. The processor on the Inkpad3Pro is sun8iw10, B288, 2xCortex-A7. Does this mean that the same packages compiled for Raspberry pi2 will work on the B288, too? I am looking at PiVPN which should be lightweight enough and works on the RaspberryPi2. Last edited by Markismus; 12-07-2019 at 05:17 PM. |
12-08-2019, 06:11 PM | #14 | ||
Zealot
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
|
v5 released
https://github.com/ezdiy/pbjb/releases/tag/v5 * fixed terminfo breakage (ie readline now works properly in things like lftp or gdb) * added lftp (universal client for sftp, ftp(s), torrent, http(s) opendir) * added nano, htop, powertop (text editor, fancy system/power diagnostics) * added sftp server, and device can be now browsed as such * fixed pubkey authenticatoin, just put your .ssh/authorized_keys on main storage * added http server, autoindex folder serving, but also configured for ssi, cgi * http also does webdav transfers (shares named/passworded the same as on smb) * added 'system status' settings menu entry to show some basic diagnostics, running services, device's IP etc Quote:
Quote:
Last edited by ezdiy; 12-09-2019 at 05:51 PM. |
||
12-10-2019, 06:22 AM | #15 |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2019
Device: PocketBook Touch HD 3
|
This is amazing. I'm getting my PocketBook Touch HD 3 today and I'm very tempted to test this out.
|
Tags |
root |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paperwhite 2 usbnet asks for root password | cokolokolo | Kindle Developer's Corner | 2 | 09-07-2014 05:51 PM |
/etc/sysconfig/iptables from 3.0.1 | wahlis | Amazon Kindle | 1 | 08-14-2011 11:10 AM |
iLiad Samba/smbd/shared folder access to iLiad | ajnorth | iRex Developer's Corner | 12 | 02-29-2008 10:02 AM |