Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2025, 05:51 AM   #1
dpecos
Junior Member
dpecos began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2025
Device: Kindle Paperwhite
Kindle Paperwhite not recognized as "Kindle device"

Hi!

I just got a new Kindle, the latest Paperwhite, and I was struggling to get the page numbers working (no APNX file was being generated, although it was configured to, and no errors appeared in the log.

After some digging, and comparing the logs with an export to my old kindle, I saw that (most probably) the issue is that the new Paperwhite is being detected as an standard MTP_DEVICE, thus the settings regarding page numbers not applying.

These are the details of my device (I've masked the serial number):

Spoiler:
Kindle Paperwhite
Serial number:
Manufacturer: Amazon
Model: Kindle Paperwhite
ids: (1, 11, 6473, 39297, 'xxxxxxxxxx')
Device version:
Storage:
[{'capacity': 12349591552,
'freespace_bytes': 11806294016,
'freespace_objects': 4294967295,
'id': 65537,
'name': 'Internal Storage',
'removable': False,
'rw': True,
'volume_id': '-10001'}]


Quote:
These are the logs of the export to the Paperwhite (no APNX generation):
Spoiler:

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre_plugins.count_pages.statistics:415: SyntaxWarning: invalid escape sequence '\D'
calibre_plugins.count_pages.statistics:416: SyntaxWarning: invalid escape sequence '\D'
calibre Debug log
calibre 8.5 embedded-python: False
Linux-6.15.5-arch1-1-x86_64-with-glibc2.41 Linux ('64bit', 'ELF')
('Linux', '6.15.5-arch1-1', '#1 SMP PREEMPT_DYNAMIC Sun, 06 Jul 2025 11:14:36 +0000')
Python 3.13.5
Interface language: None
EXE path: /usr/bin/python3
Successfully initialized third party plugins: Count Pages (1, 13, 6) && Goodreads (1, 8, 3)
calibre 8.5 embedded-python: False
Linux-6.15.5-arch1-1-x86_64-with-glibc2.41 Linux ('64bit', 'ELF')
('Linux', '6.15.5-arch1-1', '#1 SMP PREEMPT_DYNAMIC Sun, 06 Jul 2025 11:14:36 +0000')
Python 3.13.5
Interface language: None
EXE path: /usr/bin/python3
Successfully initialized third party plugins: Count Pages (1, 13, 6) && Goodreads (1, 8, 3)
QPA platform: wayland
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 141.7674418604651 x 141.4020618556701
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Regular.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Regular.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Regular.ttf No module named 'fontTools'
[0.00] Starting up...
[0.00] Showing splash screen...
[1.04] splash screen shown
[1.04] Initializing db...
[1.12] db initialized
[1.12] Constructing main UI...
[1.47] GUI main window shown
[1.49] main UI initialized...
[1.49] Hiding splash screen
[1.49] splash screen hidden
[1.49] Started up in 1.49 seconds with 243 books
MTP: Loading filesystem metadata...
MTP: Ignored object: system/preloader
MTP: Ignored object: system/vocabulary
MTP: Ignored object: system/Search Indexes
MTP: Ignored object: system/cmm
MTP: Ignored object: system/CloudIndices
MTP: Ignored object: system/grok_thumbnails
MTP: Ignored object: system/ksdk
MTP: Ignored object: system/acw
MTP: Ignored object: system/freetime
MTP: Ignored object: system/version.txt
MTP: Ignored object: system/fonts
MTP: Ignored object: system/pdf
MTP: Ignored object: system/fmcache
MTP: Ignored object: system/btlogs
MTP: Ignored object: system/startactions
MTP: Ignored object: system/recommendation
MTP: Ignored object: system/kll
MTP: Ignored object: system/readingstreams
MTP: Ignored object: system/userannotlogsDir
MTP: Ignored object: system/AudibleActivation.sys
MTP: Ignored object: system/AudibleJit.sys
MTP: Ignored object: documents/Downloads/Items01/tmp_Shadows That Hunt_ A Fantasy Short Story_B0D8QTYX7Z.sdr
MTP: Ignored object: documents/Downloads/Items01/Dragonlance_background.pdf-cdeKey_Z2FWFEWQ3W6TY5WUO7BNVRLQPMR6NNDN.sdr
MTP: Ignored object: documents/Downloads/Items01/Dragonlance_background.pdf_Z2FWFEWQ3W6TY5WUO7BNVRL QPMR6NNDN.sdr
MTP: Ignored object: documents/Downloads/Items01/Shadows That Hunt_ A Fantasy Short Story_B0D8QTYX7Z.sdr
MTP: Ignored object: documents/Project Hail Mary_17861f07-3f86-459f-80d2-2187570c5e8d.sdr
MTP: Ignored object: documents/dictionaries/The_New_Oxford_American_Dictionary.sdr
MTP: Ignored object: documents/dictionaries/Oxford_Dictionary_of_English.sdr
MTP: Ignored object: documents/Project Hail Mary - Andy Weir.sdr
MTP: Ignored object: fonts
MTP: Ignored object: screenshots
MTP: Filesystem metadata loaded in 0.245066 seconds (164 objects)
MTP: Syncing cover thumbnails to workaround amazon cover bug
MTP: Restored 0 cover thumbnails that were destroyed by Amazon
Job: 0 Get device information started
DeviceJob: 0 Get device information done, calling callback
DeviceJob: 0 Get device information callback returned
Job: 1 Set library information started
DeviceJob: 1 Set library information done, calling callback
DeviceJob: 1 Set library information callback returned
Job: 2 Get list of books on device started
MTP: Using cached metadata for Internal Storage/system/version.txt
MTP: Using cached metadata for Internal Storage/documents/Downloads/Items01/Shadows That Hunt_ A Fantasy Short Story_B0D8QTYX7Z.kfx
MTP: Using cached metadata for Internal Storage/documents/Downloads/Items01/Dragonlance_background.pdf-cdeKey_Z2FWFEWQ3W6TY5WUO7BNVRLQPMR6NNDN.pdf
MTP: Using cached metadata for Internal Storage/documents/dictionaries/The_New_Oxford_American_Dictionary.azw
MTP: Using cached metadata for Internal Storage/documents/dictionaries/Oxford_Dictionary_of_English.azw
MTP: Using cached metadata for Internal Storage/documents/Project Hail Mary - Andy Weir.azw3
DeviceJob: 2 Get list of books on device done, calling callback
DEBUG: 0.0 DeviceJob: metadata_downloaded: Starting set_books_in_library
DEBUG: 0.0 DeviceJob: set_books_in_library: books to process= 6
DEBUG: 0.0 DeviceJob: set_books_in_library finished: time= 0.002789020538330078
DEBUG: 0.0 DeviceJob: metadata_downloaded: updating views
DEBUG: 0.0 DeviceJob: metadata_downloaded: syncing
DEBUG: 0.0 DeviceJob: metadata_downloaded: refreshing ondevice
DEBUG: 0.0 DeviceJob: metadata_downloaded: sending metadata_available signal
DeviceJob: 2 Get list of books on device callback returned
Job: 3 Send metadata to device started
MTP: sync_booklists() called
MTP: sync_booklists() ended
DeviceJob: 3 Send metadata to device done, calling callback
DeviceJob: 3 Send metadata to device callback returned
Job: 0 Get device information finished
No details available.
Job: 3 Send metadata to device finished
No details available.
Job: 2 Get list of books on device finished
No details available.
Job: 1 Set library information finished
No details available.
Job: 4 Delete books from device started
DeviceJob: 4 Delete books from device done, calling callback
DEBUG: 46.2 DeviceJob: set_books_in_library: books to process= 5
DEBUG: 46.2 DeviceJob: set_books_in_library finished: time= 0.000728607177734375
DeviceJob: 4 Delete books from device callback returned
Job: 5 Send metadata to device started
MTP: sync_booklists() called
MTP: sync_booklists() ended
DeviceJob: 5 Send metadata to device done, calling callback
DeviceJob: 5 Send metadata to device callback returned
Job: 4 Delete books from device finished
No details available.
Job: 5 Send metadata to device finished
No details available.
Job: 6 Upload one book to the device: Project Hail Mary started
Device using plugboard mobi MTP_DEVICE None
Setting metadata in: Project Hail Mary at: /tmp/calibre-6zy97fu4/10n0zzt6caltmpfmt.mobi
MTP: upload_books() called
MTP: upload_books() ended
DeviceJob: 6 Upload one book to the device: Project Hail Mary done, calling callback
MTP: add_books_to_metadata() called
MTP: add_books_to_metadata() ended
DEBUG: 60.5 DeviceJob: set_books_in_library: books to process= 6
DEBUG: 60.5 DeviceJob: set_books_in_library finished: time= 0.0006241798400878906
DeviceJob: 6 Upload one book to the device: Project Hail Mary callback returned
Job: 7 Send metadata to device started
MTP: sync_booklists() called
MTP: sync_booklists() ended
DeviceJob: 7 Send metadata to device done, calling callback
DeviceJob: 7 Send metadata to device callback returned
Job: 6 Upload one book to the device: Project Hail Mary finished
No details available.
Job: 7 Send metadata to device finished
No details available.
Job: 8 Delete books from device started
DeviceJob: 8 Delete books from device done, calling callback
DEBUG: 78.6 DeviceJob: set_books_in_library: books to process= 5
DEBUG: 78.6 DeviceJob: set_books_in_library finished: time= 0.0007796287536621094
DeviceJob: 8 Delete books from device callback returned
Job: 9 Send metadata to device started
MTP: sync_booklists() called
MTP: sync_booklists() ended
DeviceJob: 9 Send metadata to device done, calling callback
DeviceJob: 9 Send metadata to device callback returned
Job: 8 Delete books from device finished
No details available.
Job: 9 Send metadata to device finished
No details available.
Job: 10 Upload one book to the device: Project Hail Mary started
Device using plugboard azw3 MTP_DEVICE None
Setting metadata in: Project Hail Mary at: /tmp/calibre-6zy97fu4/593z9pn8caltmpfmt.azw3
MTP: upload_books() called
MTP: upload_books() ended
DeviceJob: 10 Upload one book to the device: Project Hail Mary done, calling callback
MTP: add_books_to_metadata() called
MTP: add_books_to_metadata() ended
DEBUG: 84.9 DeviceJob: set_books_in_library: books to process= 6
DEBUG: 84.9 DeviceJob: set_books_in_library finished: time= 0.0004916191101074219
DeviceJob: 10 Upload one book to the device: Project Hail Mary callback returned
Job: 11 Send metadata to device started
MTP: sync_booklists() called
MTP: sync_booklists() ended
DeviceJob: 11 Send metadata to device done, calling callback
DeviceJob: 11 Send metadata to device callback returned
Job: 10 Upload one book to the device: Project Hail Mary finished
No details available.
Job: 11 Send metadata to device finished
No details available.
[123.29] Shutdown starting...
[125.54] Shutdown complete, quitting...
Device 0 (VID=1949 and PID=9981) is a Amazon Kindle Scribe 32GB.



And these are from the old kindle:

Spoiler:
ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre_plugins.count_pages.statistics:415: SyntaxWarning: invalid escape sequence '\D'
calibre_plugins.count_pages.statistics:416: SyntaxWarning: invalid escape sequence '\D'
calibre Debug log
calibre 8.5 embedded-python: False
Linux-6.15.5-arch1-1-x86_64-with-glibc2.41 Linux ('64bit', 'ELF')
('Linux', '6.15.5-arch1-1', '#1 SMP PREEMPT_DYNAMIC Sun, 06 Jul 2025 11:14:36 +0000')
Python 3.13.5
Interface language: None
EXE path: /usr/bin/python3
Successfully initialized third party plugins: Count Pages (1, 13, 6) && Goodreads (1, 8, 3)
calibre 8.5 embedded-python: False
Linux-6.15.5-arch1-1-x86_64-with-glibc2.41 Linux ('64bit', 'ELF')
('Linux', '6.15.5-arch1-1', '#1 SMP PREEMPT_DYNAMIC Sun, 06 Jul 2025 11:14:36 +0000')
Python 3.13.5
Interface language: None
EXE path: /usr/bin/python3
Successfully initialized third party plugins: Count Pages (1, 13, 6) && Goodreads (1, 8, 3)
QPA platform: wayland
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 141.7674418604651 x 141.4020618556701
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Regular.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Regular.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Italic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Bold.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf No module named 'fontTools'
Failed to read metadata from font file: /usr/share/calibre/fonts/liberation/LiberationSerif-Regular.ttf No module named 'fontTools'
[0.00] Starting up...
[0.00] Showing splash screen...
[1.05] splash screen shown
[1.05] Initializing db...
[1.11] db initialized
[1.11] Constructing main UI...
[1.46] GUI main window shown
[1.48] main UI initialized...
[1.48] Hiding splash screen
[1.48] splash screen hidden
[1.48] Started up in 1.48 seconds with 243 books

Found device nodes: /dev/sdb1 None None
Syncing cover thumbnails to workaround amazon cover bug
Job: 0 Get device information started
DeviceJob: 0 Get device information done, calling callback
DeviceJob: 0 Get device information callback returned
Job: 1 Set library information started
DeviceJob: 1 Set library information done, calling callback
DeviceJob: 1 Set library information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
DEBUG: 0.0 USBMS: dirs are: /run/media/dani/Kindle/ documents
DEBUG: 0.0 USBMS: scan from root False /run/media/dani/Kindle/documents
DEBUG: 0.0 USBMS: count found in cache: 183, count of files in metadata: 183, need_sync: False
DEBUG: 0.0 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
DEBUG: 0.0 DeviceJob: metadata_downloaded: Starting set_books_in_library
DEBUG: 0.0 DeviceJob: set_books_in_library: books to process= 183
DEBUG: 0.0 DeviceJob: set_books_in_library finished: time= 0.009224653244018555
DEBUG: 0.0 DeviceJob: metadata_downloaded: updating views
DEBUG: 0.1 DeviceJob: metadata_downloaded: syncing
DEBUG: 0.1 DeviceJob: metadata_downloaded: refreshing ondevice
DEBUG: 0.1 DeviceJob: metadata_downloaded: sending metadata_available signal
DeviceJob: 2 Get list of books on device callback returned
Job: 3 Send metadata to device started
DEBUG: 0.1 USBMS: starting sync_booklists
Job: 0 Get device information finished
No details available.
Job: 2 Get list of books on device finished
No details available.
Job: 1 Set library information finished
No details available.
DEBUG: 1.0 USBMS: finished sync_booklists
DeviceJob: 3 Send metadata to device done, calling callback
DeviceJob: 3 Send metadata to device callback returned
Job: 3 Send metadata to device finished
No details available.
Job: 4 Upload one book to the device: Project Hail Mary started
Device using plugboard azw3 KINDLE2 None
Setting metadata in: Project Hail Mary at: /tmp/calibre-6ip1fpbv/t_l7d51kcaltmpfmt.azw3
DEBUG: 29.1 USBMS: uploading 1 books
APNX META: guid: 3aa2c300
APNX META: ASIN: 17861f07-3f86-459f-80d2-2187570c5e8d
APNX META: CDE: EBOK
APNX META: format: MOBI_8
APNX META: Name: Project_Hail_Mary
APNX Content Header: {"contentGuid":"3aa2c300","asin":"17861f07-3f86-459f-80d2-2187570c5e8d","cdeType":"EBOK","format":"MOBI_8"," fileRevisionId":"1","acr":"Project_Hail_Mary"}
DEBUG: 31.0 USBMS: finished uploading 1 books
DeviceJob: 4 Upload one book to the device: Project Hail Mary done, calling callback
DEBUG: 31.0 USBMS: adding metadata for 1 books
DEBUG: 31.0 USBMS: finished adding metadata
DEBUG: 31.0 DeviceJob: set_books_in_library: books to process= 184
DEBUG: 31.0 DeviceJob: set_books_in_library finished: time= 0.008871078491210938
DeviceJob: 4 Upload one book to the device: Project Hail Mary callback returned
Job: 5 Send metadata to device started
DEBUG: 31.0 USBMS: starting sync_booklists
Job: 4 Upload one book to the device: Project Hail Mary finished
No details available.
DEBUG: 32.1 USBMS: finished sync_booklists
DeviceJob: 5 Send metadata to device done, calling callback
DeviceJob: 5 Send metadata to device callback returned
Job: 5 Send metadata to device finished
No details available.
[46.76] Shutdown starting...
[49.01] Shutdown complete, quitting...


Is there anyway I can force Calibre to use the "plugboard"?

Regards,

Dani.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20250711_113557.png
Views:	24
Size:	87.6 KB
ID:	216845  

Last edited by theducks; 07-11-2025 at 11:08 AM. Reason: Please use SPOILER for all Logs
dpecos is offline   Reply With Quote
Old 07-11-2025, 08:06 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes amazon changed kindles to be mtp based. And no apnx generation is not supported for mtp devices. And you can use MTP_DEVICE in your plugboard in your config.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-11-2025, 10:42 AM   #3
dpecos
Junior Member
dpecos began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2025
Device: Kindle Paperwhite
Why is the APNX generation not supported for MTP devices?

I transferred one of the APNX files generated for my old kindle to the new one (within the Sidecar directory) using Dolphin (plasma’s file explorer) and its MTP plugin, and it worked fine with my new Paperwhite.

So it should be possible to transfer this file using MTP from calibre. I understand APNX generation does not happen on device, right?

Happy to raise a PR if you could point me to the file where this should happen 🤓
dpecos is offline   Reply With Quote
Old 07-11-2025, 11:10 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dpecos View Post
Why is the APNX generation not supported for MTP devices?

I transferred one of the APNX files generated for my old kindle to the new one (within the Sidecar directory) using Dolphin (plasma’s file explorer) and its MTP plugin, and it worked fine with my new Paperwhite.

So it should be possible to transfer this file using MTP from calibre. I understand APNX generation does not happen on device, right?

Happy to raise a PR if you could point me to the file where this should happen 🤓
MTP use blocks the access needed. This is DELBERATE by Amazon.
theducks is offline   Reply With Quote
Old 07-11-2025, 11:32 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by dpecos View Post
Happy to raise a PR if you could point me to the file where this should happen 🤓
Sure feel free to do so. Relevant code is in mtp/driver.py
kovidgoyal is offline   Reply With Quote
Advert
Old 07-11-2025, 12:23 PM   #6
dpecos
Junior Member
dpecos began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2025
Device: Kindle Paperwhite
Quote:
Originally Posted by theducks View Post
MTP use blocks the access needed. This is DELBERATE by Amazon.
But that would mean that i should not have been able to upload the APNX file using Dolphin with MTP either, but i did, so there has to be a way.

I’ll check what Dolphin is doing in term of MTP and will try to replicate.
dpecos is offline   Reply With Quote
Old 07-11-2025, 01:43 PM   #7
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,070
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by theducks View Post
MTP use blocks the access needed. This is DELBERATE by Amazon.
That applies to cover thumbnail images, not APNX files.
jhowell is offline   Reply With Quote
Old 07-15-2025, 02:02 AM   #8
dpecos
Junior Member
dpecos began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2025
Device: Kindle Paperwhite
I have a working piece of code that generates APNX files and uploads them when sending books to MTP devices, you can see the diff here:

https://github.com/kovidgoyal/calibr...calibre:master

I have a few questions:
- I haven't worked on the UI to configure this feature yet, and given how different the dialog for MTP is from the kindle one, I was wondering what would be your preference in terms of UX: maybe a new tab with the 3 extra settings for APNX?
- I'm not a python dev, so please let me know if there is anything wrong with my code
- This is the first time I code for calibre, and I may had made some incorrect assumptions in terms of the supported devices (or other things). I've tried to limit this functionality to MTP Kindles, would that be ok?

Looking forward to your feedback!

Dani.
dpecos is offline   Reply With Quote
Old 07-15-2025, 09:44 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Looks generally fine. Couple of minor notes:
1) Use PersistentTemporaryFile from calibre.ptemfile rather than the stdlib tempfile module
2) Instead of except: use except Exception: other you catch things like keyboardinterrupts and so on
3) use with rather than try..finally

Yes a separate tab is fine. And yes this is MTP only, the USBMS based kindle driver already handles apnx itself.
kovidgoyal is offline   Reply With Quote
Old 07-15-2025, 04:34 PM   #10
dpecos
Junior Member
dpecos began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2025
Device: Kindle Paperwhite
I just raised a PR with my changes

I've tested a few books with my device, and so far so good.
dpecos is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Subset of books that were sent to device are not recognized as "on device" mst Devices 14 09-29-2022 02:08 PM
Get "USB Device not recognized" error on PC redraider1972 Nook Color & Nook Tablet 2 10-28-2011 10:29 AM
PRS-350 "USB Device not recognized" ardeegee Sony Reader 5 05-04-2011 01:19 PM
New PRS-700: "USB Device Not Recognized" -- HELP! Cyrusx7 Sony Reader 13 09-10-2009 12:38 AM
"USB device not recognized" Indyrm03 Sony Reader 2 02-28-2009 09:05 PM


All times are GMT -4. The time now is 10:21 AM.


MobileRead.com is a privately owned, operated and funded community.