Skip to content

Instantly share code, notes, and snippets.

@estysdesu
Last active Aug 25, 2021
Embed
What would you like to do?
[Kindle 4: Jailbreak and SSH] #kindle #ssh #jailbreak

Following this guide: https://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH.
Using Kindle 4.1 and macOS 10.14.

Jailbreak

  1. Connect the Kindle. It should be recognized as a USB Mass Storage Device.
  2. Download the jailbreak archive
  3. Copy data.tar.gz, ENABLE_DIAGS, and diagnostic_logs to the Kindle folder.
  4. Restart the Kindle into Diagnostics Mode.
  5. Reboot the Kindle from the Diagnostics Mode. Reboot screen should show jailbroken screensaver.

SSH

  1. Download the USBNetwork archive needed to enable SSH over network access.
  2. Edit the usbnet/etc/config file if needed. I changed:
    1. K3_WIFI="true"
    2. USE_OPENSSH="true"
    3. (Optional) K3_WIFI_SSHD_ONLY="true" (only after first time connecting via SSH and setting up auto-enabled USBNetwork)
  3. (Optional) rename usbnet/DISABLED_auto to usbnet/auto to enable USBNetwork Utility start on device startup.
  4. Enable the USBNetwork Utility from the Kindle (enable the keyboard if needed); type:
    1. ;debugOn
    2. ~usbNetwork
    3. ;debugOff
  5. Connect the Kindle again.
  6. Manually configure the device IPv4:
    • IP Address: 192.168.15.201
    • Subnet: 255.255.255.0
  7. Obtain the Kindle root user password:
  8. SSH into the Kindle: ssh root@192.168.15.244 and enter password from previous step
@Inc0n

This comment has been minimized.

Copy link

@Inc0n Inc0n commented Apr 27, 2020

Hi do you know how to get kindle ssh over usb to work?

@estysdesu

This comment has been minimized.

Copy link
Owner Author

@estysdesu estysdesu commented Apr 29, 2020

It's in the guide. Follow the steps:

  1. Jailbreak 1-5
  2. SSH 1-2.i-ii (skip 2.iii for now)
  3. SSH 4-8.

These steps work for me on the Kindle 4. If this doesn't work for you, I need more info. It's been a while since I did this to mine, but provide me more context and maybe I can help. What is your: OS, Kindle version, etc.? This really isn't for the faint of heart. Took my roommate and I a few days to figure all of this out for both of our kindles.

@Inc0n

This comment has been minimized.

Copy link

@Inc0n Inc0n commented Apr 29, 2020

Thanks for the reply!
My kindle is PW3
I am using Manjaro linux OS
ssh over network works, but i am not sure for ssh over usb.

Now you have mentioned do step SSH 2.ii, I haven't done that yet, beside this option.
For example on sshing from my host machine, what IP do i use, is it the IP like u said here:

Manually configure the device IPv4:

Also, a slightly off topic one, my machines doesn't quite recognize my kindle on some occasions, would that affect the ssh over usb connection? (I should not burden u with fixing the issue of unable to recognize my kindle, however)

Should there be more information supplied, please tell me

@estysdesu

This comment has been minimized.

Copy link
Owner Author

@estysdesu estysdesu commented Apr 30, 2020

I'm not sure all the steps for other Kindles. I followed multiple sources with the source of truth being mainly this guide. That contains both the jailbreak files and the USBNetwork files.

Now you have mentioned do step SSH 2.ii, I haven't done that yet, beside this option.

I think you need SSH 2.ii.

For example on sshing from my host machine, what IP do i use, is it the IP like u said here:

Manually configure the device IPv4:

You definitely need to do this. You need to grab the kindle-usbnetwork-<version>-<kindle version>.zip from the link I posted above in this comment and unzip it and read the readme_first.txt and readme.txt. Those docs will probably help you understand this issue better.

Essentially you need to:

  1. Plug in your Kindle.
  2. Move the Kindle USBNetwork binary (update_usbnetwork_*_install.bin) to the root of your device (SSH 1).
  3. Update your Kindle (same as when you install the jailbreak).
  4. Change the file in usbnet/etc/config (while the kindle is plugged into your computer as a normal usb device) (SSH 2).
  5. Activate USBNetwork on Kindle (SSH 4).
  6. You have to change the IP address associated with that USB/Ethernet device. On macOS, that looks something like this. On linux, you can use ifconfig I believe and it looks something like this ifconfig usb0 192.168.15.201 with usb0 being the port the usb is plugged into. The IP can be different depending on the kindle device. That is why you need to read the readme*.txts for USBNetwork. (SSH 6). Note, when you do this (at least on macOS), I don't think I was able to use my other network interfaces to connect to the internet anymore until the Kindle was unplugged; this seems like it prioritizes over your computers network say with a router (I assume this is an expected behavior of network interfaces with a computer and not a bug).
  7. SSH into the Kindle using the root password obtained from the Kindle root password tool (SSH 7-8).

Also, a slightly off topic one, my machines doesn't quite recognize my kindle on some occasions, would that affect the ssh over usb connection? (I should not burden u with fixing the issue of unable to recognize my kindle, however)

Seems like a hardware issue if it's still in USB mode. I'm not an expert, but mine wasn't really finicky like that. All the more reason to get the SSH working properly so you can then enable SSH over wifi.

@banagale

This comment has been minimized.

Copy link

@banagale banagale commented Jun 5, 2021

@estydesu How are you able to turn off airplane mode and not have the device update to 5.13.15? I made a mistake thinking that the hotfix in the main guide did this, and during testing of the USBnetwork binary had the device update to 5.13.5. :(

@estysdesu

This comment has been minimized.

Copy link
Owner Author

@estysdesu estysdesu commented Aug 25, 2021

@banagale Can you elaborate your issue? I haven't done anything new to my Kindle in a while, but still actively use it and connect it to WiFi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment