![]() |
#1 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Collection of runme scripts
The current jailbreak process that installs the ";log mrpi" search bar command also installs a ";log runme" search bar command.
Entering the: ;log runme command runs a (user supplied) script in the topmost visible level of USB storage that is named: RUNME.sh (Duh..., currently must be the mixed case shown) It was meant to be a handy way to fix things that go wrong. Except there has never been any example usages. So here is a thread in which to collect runme scripts. |
![]() |
![]() |
![]() |
#2 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Unable to login as root after an Amazon update
Which sort of makes having serial port access useless until you fix it via 'diags'.
Instead, use this script at the top of visible USB storage and call it with: ;log runme File must be named: RUNME.sh (case is important, at least for now) an MUST use *nix line endings, not Windows line endings. Code:
#!/bin/sh # Disable passwd for 'root' cp /etc/passwd /mnt/us/passwd-frm sed "s/^root:[^:]*:/root::/" </mnt/us/passwd-frm >/mnt/us/passwd-to mntroot rw cp /mnt/us/passwd-to /etc/passwd mntroot ro Just in case the result of this script needs trouble shooting. (So how bad can things get? You can't log in now, at the worst you can't log in afterward. ![]() When faced with the login prompt, for user enter: root If asked for the password, just enter: enter (return key, a blank line). Edit: Worked just fine on my PW3-5.9.2 Before: Code:
root:x:0:0:root:/tmp/root:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:100:sync:/bin:/bin/sync operator:x:37:37:Operator:/var:/bin/sh sshd:x:103:99:Operator:/var:/bin/sh messagebus:x:92:92:messagebus:/bin/false nobody:x:99:99:nobody:/tmp:/bin/sh default:x:1000:1000:Default non-root user:/dev/null:/bin/sh framework:x:9000:150:Framework User:/tmp/framework:/bin/sh guestuser:x:1002:1001:Guest user:/tmp/guestuser:/bin/sh Code:
root::0:0:root:/tmp/root:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:100:sync:/bin:/bin/sync operator:x:37:37:Operator:/var:/bin/sh sshd:x:103:99:Operator:/var:/bin/sh messagebus:x:92:92:messagebus:/bin/false nobody:x:99:99:nobody:/tmp:/bin/sh default:x:1000:1000:Default non-root user:/dev/null:/bin/sh framework:x:9000:150:Framework User:/tmp/framework:/bin/sh guestuser:x:1002:1001:Guest user:/tmp/guestuser:/bin/sh Last edited by knc1; 11-22-2017 at 12:50 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Install a fake registration to enable disk export
Some firmware versions do not allow the USB storage area to be accessible over USB unless the Kindle is registered.
A particular PITA is the firmware versions currently shipping on the KOA2 - You have to be able to put the blocker directory name on USB storage to prevent an OTA update before you let the Kindle call home to register it. But you can't put anything on the USB storage until it is registered. ![]() A significant problem with Kindles purchased as "gifts" during the up coming gift giving season. This is one legitimate use of a fake registration file. Use this RUNME.sh script (with *nix line endings, not Windows line endings) to install a temporary registration information file. Note: This file will be removed anytime you contact with Amazon, so it should not interfere with registering the Kindle for real. This also enables all menu entries, both main menu tree and settings menu tree. Code:
#!/bin/sh # If present, save current registration info file [ -f /var/local/java/prefs/reginfo ] && cp /var/local/java/prefs/reginfo /mnt/us/reginfo.bak || true # Add a fake registration file, format as for 5.9.2 and earlier cat > '/var/local/java/prefs/reginfo' << EOF givenName=Hacker userId=amzn1.account.XXXXXXXX3AAA587YYYYYYYYYYYYY deviceName=FakeReg userName=Hacker deviceEmailAddress=hacker@kindle.com EOF Which results in (this is a PW3, fm 5.9.2): Notice the device name above and in the upper left of the home screen: Last edited by knc1; 11-22-2017 at 02:16 PM. |
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() Posts: 72
Karma: 10
Join Date: Jun 2016
Device: PW3
|
Thanks knc1
Quote:
![]() |
|
![]() |
![]() |
![]() |
#5 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
(so we know it can be done) We will try for something a little more elegant for the general release. ![]() We may need a "fixup" for KPVbooklet also. And one to get rid of broken RP/CRP installs on the KOA2 - Those depend on having a 'Diags' partition and the KOA2 does not have a 'Diags' partition. It went bye-bye in the re-organization to support Android. Last edited by knc1; 11-24-2017 at 02:41 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2017
Device: Kindle basic 8th Gen
|
Script for launching koreader? KUAL broken in 5.9.2 😔
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 96
Karma: 10
Join Date: Jan 2014
Location: Scotland
Device: KT4 5.13.6
|
|
![]() |
![]() |
![]() |
#8 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Just copy the one used by KUAL. But if you or anyone else has time to do that, they should share their work by posting here. |
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2017
Device: Kindle basic 8th Gen
|
![]() |
![]() |
![]() |
![]() |
#10 |
moddedmad
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,120
Karma: 3911694
Join Date: Jan 2018
Device: none
|
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() Posts: 96
Karma: 10
Join Date: Jan 2014
Location: Scotland
Device: KT4 5.13.6
|
Writing scripts for beginners
Thanks - I have read the thread from the beginning and I do appreciate that this is an evolving area.
However, as a Kindle user, with no programming experience, I don't understand the detail of the script examples shown in this thread. They deal (I think) with fake registrations and logging at the root, but I can't extrapolate from that how to vary them to do anything else. I would be grateful for signposting to how I can learn enough of the language to write one that would let me run LibrarianSync, in the absence of KUAL. One poster helpfully suggested copying the KUAL script - unfortunately I think they've overestimated my ability to (a) find the KUAL script (b) modify it. It may turn out that all this needs more programming experience than I have, in which case I'll sit tight until either KUAL is updated or Amazon collections are integrated with Calibre. Thanks in advance for any advice. |
![]() |
![]() |
![]() |
#12 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Viewed over the USB cable:
/ Viewed from the command line: /mnt/us/ So here shown as: */ */extensions/<add-in name>/menu.json <<-- this file lists the association between menu label and script that performs the action */extensions/<add-in name>/config.xml <<-- configuration info for the menu, not for the add-in */extensions/<add-in name>/bin/*.sh <<-- the script(s) that perform the menu action Rather than call that script with KUAL, copy it and call it with ;log runme About the only thing you **might** have to do is add a: cd /mnt/us/extensions/<add-in name> to the script (something that KUAL does, sets the current directory) All of which is fully documented in the Wiki. How to find the Wiki entry. As usuall, we hide it behind some writing to be read: First post of the KUAL release thread, section titled; "KUAL extensions", open spoiler, read text which includes the link to the KUAL/Extensions/documentation. Computer information is stored in either a single tree (*nix, including linux on your kindle) or a tree per storage device (win*). This forum is organized more like windows (which should not be too hard for most users, the *nix users put up with it). The top of each information tree is always the first post of the tread dedicated to the introduction/release of the subject. So like on Windows, when you want to find something, you start where it might be stored (say: F:\) or KUAL Read what you find there (either under F:\ or forum\KUAL) to find the next level towards what you want. Always read the first post, including opening any spoilers and reading the information there. Keep a sharp eye out for any links (say to: F:\<more specific info> or Site\<first post>\<topic section>\<more specific info> It really isn't rocket science (it is instead, computer science). Last edited by knc1; 02-02-2018 at 07:25 AM. |
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4
Karma: 50492
Join Date: Oct 2017
Device: Kindle Voyage
|
Hi
Quick and dirty serial console to kindle: 1. Create RUNME.sh with following content: Code:
#!/bin/sh # Unload Mass Storage Gadget Module modprobe -r g_file_storage # Load Serial Gadget Module modprobe g_serial # Infinite Loop for getty while true; do getty -L 115200 -i -n -l /bin/bash /dev/ttyGS0 sleep 1 done 3. run ;log runme 4. Connect USB-Port to Computer, it is now recognised as new Serial Device 5. Open devmgmt.msc on Windows, Search for Serial Port Number in Ports (e.g. COM8) 6. Connect with Putty to Serial COM8 Speed 115200 7. After use you have to kill the RUNME.sh script in Terminal because it loops itself the getty process 8. If you want Mass Storage again, reboot kindle Greetings from Austria rola25 Last edited by rola25; 03-14-2018 at 07:20 AM. |
![]() |
![]() |
![]() |
#14 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 765432
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
Quote:
One note: if you have usbnetwork enabled, you have to disable it before (device must be in "usb mode" status) Thanks for sharing ![]() |
|
![]() |
![]() |
![]() |
#15 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,016
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Nifty! Thanks for sharing.
Last edited by PoP; 03-14-2018 at 09:17 PM. |
![]() |
![]() |
![]() |
Tags |
fake registration, runme |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 3 sysvinit scripts | Feathers_McGraw | Kindle Developer's Corner | 11 | 03-10-2021 02:05 AM |
Firmware upgrade scripts | davidfor | Kobo Developer's Corner | 29 | 04-29-2014 04:34 PM |
My Kindle 4 NT does not execute RUNME.sh! | HariSeldon85 | Kindle Developer's Corner | 15 | 09-03-2012 01:52 PM |
is it possible to run k5 launchpad scripts on k5 | techiemonkey | Kindle Developer's Corner | 3 | 07-30-2012 09:10 AM |
Network Control Scripts | synerr | iRex | 3 | 01-13-2008 06:54 AM |