Enhance Kindle Disk Filler Utility with improved device detection and MTP support - #7
Enhance Kindle Disk Filler Utility with improved device detection and MTP support#7vinaooo wants to merge 2 commits into
Conversation
|
I tested with 7th gen Kindle I also did some changes to better handle older kindles |
|
@vinaooo thanks for the improved script! |
can you be more specific? what exactly is going on? by running the script twice the second time it is recreating each file? is this filling up the host storage? is there any abnormal behavior associated with this? |
|
After running the script myself, I first noticed in the logs that it was creating a 100-MB temp file each time. That initially made me wonder whether it might be more efficient to create that file only once on the host. I also suspected that the file might not be getting cleaned up after the transfer, which could eventually fill up the host storage. After taking a closer look at the code again, I realized that the temporary file is actually removed after each copy. Because of that, the host filesystem won’t accumulate leftover data, so there’s no risk of it filling up. And given that the script also supports dynamically sizing the temp file based on the remaining available space, managing a single persistent file would add more complexity than benefit. Keeping the current behavior is probably the simplest and cleanest approach. So, apologies for the false alert — everything is working as intended. |
|
I apologize for the inactivity; I'll work on this today and figure out how to simulate this to test it properly. |
|
Thanks for this @vinaooo , worked as expected in paperwhite 12th gen in linux |
Pull Request: Add MTP Support for Modern Kindle Devices
PROBLEM
The original script only worked with older Kindles that mount as Mass Storage Devices. Modern Kindles use MTP protocol, making the tool incompatible with newer devices.
SOLUTION
Added automatic detection and support for both Mass Storage and MTP protocols while maintaining full backward compatibility.
KEY CHANGES
Automatic Protocol Detection
lsusbto detect Amazon devices (Vendor ID 1949)Enhanced File Transfer Strategy
/tmp/first, then transfers to KindleMTP Support Implementation
giocommands for MTP file operationsImproved Robustness
TECHNICAL DETAILS
detect_kindle(), enhanceddetect_connection_type(), protocol-aware file operationsgioand GVFS MTP support for modern devicesTESTING
✅ Tested on: Amazon Kindle Colorsoft Signature Edition (MTP mode)
COMPATIBILITY
BENEFITS