GitHub - sindhusp/kindle-mdns-rcvr: An mdns receiver for your jailbroken kindle · GitHub
/" data-turbo-transient="true" />
Skip to content
Type / to search
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
sindhusp
kindle-mdns-rcvr
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
master
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>11 Commits<br>11 Commits
.idea
.idea
README.md
README.md
go.mod
go.mod
kindle-mdns-rcvr
kindle-mdns-rcvr
main.go
main.go
parse_test.go
parse_test.go
View all files
Repository files navigation
kindle-mdns-rcvr
Connect to your kindle with just kindle.local No IPs, no usbNet!
An mDNS responder for a jailbroken Kindle, written in Go with no dependencies<br>outside the standard library.
To ssh into a jailbroken kindle, we need its IP or usbNet. But the IP can change. We need a way to connect our kindle with a domain such as kindle.local. This receiver solves that problem.
You have to look up the IP on your router every time you want to<br>ssh in. You can set a static IP on your router but not everyone has access to their router. Besides where is the fun in that!
Kindles don't run the standard mdns libraries such as Avahi or Bonjour. This binary runs on the Kindle, listens on the mDNS multicast group,<br>and answers any query for kindle.local with the device's current IPv4 address.<br>After that, ssh root@kindle.local just works.
Building
You need a Go toolchain on your dev env, not on the Kindle. Cross<br>compile a static ARM binary:
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 go build -o kindle-mdns-rcvr .
CGO_ENABLED=0 produces a fully static binary. Without it the Go runtime<br>links against the host's libc for DNS and user lookups, and the Kindle's<br>glibc is far too old to satisfy it.
GOARM=5 targets soft-float ARMv5, the safe floor across Kindle models. Look<br>up your own model and adjust (run uname -m on your kindle to find out): a binary built for a higher ARM version will<br>fail to start on older hardware.
If you manage Go through gvm (because the newer go versions do not support the kindle's linux versions), point at that toolchain explicitly:
GOROOT=~/.gvm/go CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 \<br>~/.gvm/go/bin/go build -o kindle-mdns-rcvr .
I recommend Go16 for Kindle K4. You can choose a version by looking up the kindle's linux version and checking if your Go version supports that version.
Then copy it over and run it (you'll need the IP the first time and every time you reboot):
Running
:/mnt/us/<br>ssh root@
cd /mnt/us/<br>chmod +x kindle-mdns-rcvr<br>./kindle-mdns-rcvr">scp kindle-mdns-rcvr root@kindle-ip>:/mnt/us/<br>ssh root@kindle-ip>
cd /mnt/us/<br>chmod +x kindle-mdns-rcvr<br>./kindle-mdns-rcvr
Voila! you are ready to ssh or find your kindle's IP with:
ssh root@kindle.local<br>ping kindle.local
Configuration
If you run multiple kindles on your network, or wish to change the domain name being broadcast, you can pass the domain as a flag to the receiver binary. To do this, build using the instructions above. While running, do
./kindle-mdns-rcvr -domain=whatevernameyouwant.local
Gotchas
The interface name is hardcoded to wlan0. Run ifconfig on your Kindle<br>first; if the wifi interface is called wlan0, you can run the binary as is. Otherwise, if the WiFi interface has a different name, you'll need to pass a flag to the binary with your interfaceName.<br>Find your network by running ifconfig. Your local network will be listed an inet address starting "192.168". Find its name. It's usually en0. Pass that with -interface=en0 to the binary like
./kindle-mdns-rcvr -interface=en0
Unicast queries are ignored for now. Also this is an mdns receiver, it doesn't announce itself unless queried.
Make it a daemon
make your kindle writable - mntroot rw
move binary - mv /mnt/usr/kindle-mdns-rcvr /usr/local/bin
Make it a daemon with kindle's start-stop
/mnt/us/usbnet/bin/busybox start-stop-daemon -S -b -m \
-p /var/run/kindle-mdns.pid \
-x /usr/local/bin/kindle-mdns-rcvr
To kill, ps ax. Find pid. then run kill pid
Release
Here's a binary built for my jailbroken kindle K4 running 4.1.4 firmware. If you are on the same device, download it and move it over to your kindle. Follow the instructions here
Extra
A note on integration: It's tricky for android browsers to connect to this domain kindle.local if you are running a server on your kindle as .local mdns resolution was recently introduced natively to android. It's straightforward on ios, go to your Safari browser and type http://kindle.local:/ to connect
About<br>An mdns receiver for your jailbroken kindle<br>Resources<br>Readme<br>Activity<br>Stars<br>2...