ZenMTP is a tool to enter/exit USB MTP mode on newer Kindles. I have a Kindle scriptlet that you can run as a standalone tool. If you use KOReader, there is also an included KOReader plugin that installs the Kindle scriptlet for you and switches newer MediaTek Kindles (Scribe, 11th gen, etc.) into MTP file-transfer mode, then restores KOReader when the MTP session is disconnected.
This allows you to trigger USB MTP mode on newer kindles without having to plug/unplug the device each time. Simply tap the ZenMTP button to trigger usb file transfer when a usb cable is already connected.
Three components work together:
- Registers a "Zen MTP" action in KOReader (gestures, menus)
- On init: deploys payload files to the Kindle if missing or outdated (hash-verified)
- On run: launches
ZenMTP.shin the background, then quits KOReader so the native Kindle MTP UI takes over - Monkey-patches
AutoSuspend._schedule_kindleat require-time to guard against negative t1 delay crashes after KOReader relaunch
- Deployed to
/mnt/us/documents/ZenMTP/ZenMTP.sh(alongsidezen.pngsplash) - Saves frontlight brightness, writes restore flag, launches the watcher, shows splash
- Stops usbnet jobs, restarts the
mtpupstart job, binds the USB gadget UDC - After healthy MTP is confirmed, writes a setup-done flag so the watcher knows MTP is fully ready
- Deployed to
/mnt/us/.ZenMTP/zen_mtpd.sh(separate dir, outside documents/) - Launched by
ZenMTP.shvia upstart eventzenmtp-restore(with double-fork fallback) - Two-phase poll:
- Phase 1 (up to 120s): waits for MTP to come online (tizen-mtp process + functionfs mount + UDC bound)
- Phase 2 (up to 6h): heartbeat-polls MTP health every 2s; when MTP goes inactive for 4s, triggers restore
- On restore: kills splash daemon, draws splash via
eips, launches KOReader, restores frontlight brightness - Aborts if KOReader is already running (manual launch during MTP session)
- Uses lockfile
/tmp/zenmtp_watcher.lockto prevent duplicate instances
Newer MediaTek Kindles using libcomposite/configfs USB gadget framework (2023+). Specifically using the Kindle's mtp upstart job and tizen-mtp binary. Not intended for older models using g_ether or g_ffs.
- Copy
zen_mtp.koplugininto KOReader'splugins/directory - Restart KOReader or enable the plugin in plugin settings
- On first init, the payload is automatically installed to the Kindle
Make sure you can see hidden files and folders on your computer. You should see .ZenMTP after unzipping
- Download
ZenMTP.zipfrom the latest release - Unzip it
- Drag the extracted
.ZenMTPfolder anddocumentsfolder into the Kindle USB storage root (/mnt/base-uson the Kindle)
This installs the daemon at /mnt/base-us/.ZenMTP/ and the scriptlet at /mnt/base-us/documents/ZenMTP/.
- Open KOReader > Gestures manager
- Pick a gesture > Actions > "Zen MTP"
- Trigger the gesture to switch to MTP mode