SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
My first ebook reader
                                            Tal
                                               kC
                                            NO onta
                                                DR ins
   J esse Vincent                                 M

   jesse@fsck.com


   The content of this talk
   does not necessarily        I bought the Kindle 2 to
   reflect the views of my
   employer.                  read books, but I couldn’t
                               leave well-enough alone.
Some quick Kindle facts
ARM 1136JF-S             Linux 2.6, glibc 2.5, DBus, busybox

2Gb flash (4 on the DX)   Most of /sbin is in sh

128 Mb RAM               2.0 shipped with a USB-
                         Networking debug mode
3G Modem
                         GUI is Java (Obfuscated)
USB OTG
                         Browser and JVM provided by
600x800 16 grey screen   ACCESS

Great battery
Things not to do
Don’t steal books
Don’t use your Kindle as a 3G modem
Don’t crack Amazon’s Topaz DRM
Don’t crack Amazon’s .mobi DRM
Think twice before you
    h4xx0r your Kindle
Amazon knows where you are
Amazon knows who you are
Amazon has your credit card number
Your syslog gets sent to Amazon
You might brick your Kindle
Why hack the Kindle?
I like to read. A lot. I love the Kindle’s 3G modem.

The Kindle has limited format support:

    No ePub. No PDF. No .lit. No .chm.

...so I couldn’t read a lot of stuff I wanted to read.

The Kindle does support .prc (Mobipocket)
and .cbz (Comic books)
(Open Formats)++
ePub is just zipped HTML and images
PDF is... PDF
.prc (Mobipocket) is HTML 3.2 +
extensions + glue
.cbz is just zipped .pngs and .jpgs
Calibre
http://calibre.kovidgoyal.net
Calibre is free and open
It runs on the desktop
That kind of defeats the purpose
of the Kindle
Early Hackery
Perl app to convert ePub to Mobipocket


Web-based document conversion system
http://kindle.fsck.com/http://some.com/foo.epub


Custom Kindle book to automate delivery
Then I found the USB
    Network mode
:debug
`usbNetowk
`usbQa


192.168.15.244 ➨ 192.168.15.200
Now I didn’t need the 3G modem
What next?
The Kindle 1 software update format
was based on tar, sh and MD5

Reverse engineered (by somebody
else) - see http://igorsk.blogspot.com

The Kindle 2 and DX use the exact
same updater format
Getting in the first time
Amazon’s busybox is built without telnetd
ARM Linux is pretty standard these days
A statically linked busybox is just fine
Early discoveries:
   /proc/config.gz
   Kernel built with NFS
   User-data partition NOT mounted noexec
   Undocumented support for .cbz files
Buildfarm on an N810
Cross-compiling is ... not reliable
Linux 2.6, glibc 2.5 and gcc
Built nfsmount, screen, and everything else
           needed to get some “work” done
Building Calibre on Kindle

 Qt, Python
 (unladen swallow)
 PyQt
 Took 12 hours to
 convert a book...after I built
 swaptools and gave it 256M
Savory for Kindle
Hacked Calibre down to size
Poppler-based .pdf ➨.cbz engine
inotify and DBus based daemon
Kindle updater that adds an init script
ext2 disk image with Savory runtime
That was good enough...
...until I got DX envy.
The Kindle 2 is codenamed ‘turing’
Test scripts on the device talked about
‘nell’ (and about a turing with a trackball)


When the DX came out, I wanted a real PDF
reader...with zoom, search and indexes
This should be easy!

1. Figure out how to paint the screen
2. Figure out how to read the keyboard and
   fiveway controller
3. Build a custom PDF reader for the Kindle
Screen and Keyboard
/dev/fb0 - Virtual framebuffer
   echo “{1,2,3}” > /proc/eink_fb/update_display

/dev/input/event{0,1} - Keyboard and Keyboard
   The 5-way is just another keyboard

Drivers in GPL Kernel release
Like everything else, bog-standard linux
Ubuntu
Ubuntu Jaunty Jackalope - ported to ARM
Installed on qemu
Tarred up the root image
NFS mounted on the Kindle


chroot /tmp/kindle sh
X.org

X.org needs a TTY or VT to start up
The Kindle’s Kernel is built without CONFIG_VT
I did awful (but small) things to X.org
Xfbdev “just works”
What’s next?
Polish
Documentation
Publication
Fixing X.org’s colormap
Building a useful user experience

Mais conteúdo relacionado

Destaque

Qiang 羌 references in the book of han 汉书 part 1
Qiang 羌 references in the book of han 汉书 part 1Qiang 羌 references in the book of han 汉书 part 1
Qiang 羌 references in the book of han 汉书 part 1qianghistory
 
Quran in Hindi Part-30
Quran in Hindi Part-30Quran in Hindi Part-30
Quran in Hindi Part-30Sharaz Ahmed
 
Ciclo basico diurno vigencia 2009 scp
Ciclo basico diurno vigencia 2009 scpCiclo basico diurno vigencia 2009 scp
Ciclo basico diurno vigencia 2009 scpRuth Santana
 
Zeus superior k w export manual tehnic - st-zkw ed 12-07 (en)
Zeus superior k w export   manual tehnic - st-zkw ed 12-07 (en)Zeus superior k w export   manual tehnic - st-zkw ed 12-07 (en)
Zeus superior k w export manual tehnic - st-zkw ed 12-07 (en)Costel Sirghi
 
Nc verification and re processing for collaborative machining
Nc verification and re processing for collaborative machiningNc verification and re processing for collaborative machining
Nc verification and re processing for collaborative machiningLiu PeiLing
 
ニコニコ動画でのHTML5
ニコニコ動画でのHTML5ニコニコ動画でのHTML5
ニコニコ動画でのHTML5Sho KUSANO
 
Writing jQuery that doesn't suck - London jQuery
Writing jQuery that doesn't suck - London jQueryWriting jQuery that doesn't suck - London jQuery
Writing jQuery that doesn't suck - London jQueryRoss Bruniges
 
ELT Pedagogy (Teaching Producyive Skills)
ELT Pedagogy (Teaching Producyive Skills)ELT Pedagogy (Teaching Producyive Skills)
ELT Pedagogy (Teaching Producyive Skills)Rismi Rismi
 
4-31 NTC Information Sheet SEP 2012
4-31 NTC Information Sheet SEP 20124-31 NTC Information Sheet SEP 2012
4-31 NTC Information Sheet SEP 2012Tracey Jones
 
P pt keys for good and happy life.
P pt keys for good and happy life.P pt keys for good and happy life.
P pt keys for good and happy life.Rajasekhar Dasari
 

Destaque (15)

Qiang 羌 references in the book of han 汉书 part 1
Qiang 羌 references in the book of han 汉书 part 1Qiang 羌 references in the book of han 汉书 part 1
Qiang 羌 references in the book of han 汉书 part 1
 
Quran in Hindi Part-30
Quran in Hindi Part-30Quran in Hindi Part-30
Quran in Hindi Part-30
 
Excample
ExcampleExcample
Excample
 
aplication gogogo
aplication gogogoaplication gogogo
aplication gogogo
 
Ciclo basico diurno vigencia 2009 scp
Ciclo basico diurno vigencia 2009 scpCiclo basico diurno vigencia 2009 scp
Ciclo basico diurno vigencia 2009 scp
 
Zeus superior k w export manual tehnic - st-zkw ed 12-07 (en)
Zeus superior k w export   manual tehnic - st-zkw ed 12-07 (en)Zeus superior k w export   manual tehnic - st-zkw ed 12-07 (en)
Zeus superior k w export manual tehnic - st-zkw ed 12-07 (en)
 
Nc verification and re processing for collaborative machining
Nc verification and re processing for collaborative machiningNc verification and re processing for collaborative machining
Nc verification and re processing for collaborative machining
 
Cmmi1.3
Cmmi1.3Cmmi1.3
Cmmi1.3
 
ニコニコ動画でのHTML5
ニコニコ動画でのHTML5ニコニコ動画でのHTML5
ニコニコ動画でのHTML5
 
Rxpay-sepa-germany-01
Rxpay-sepa-germany-01Rxpay-sepa-germany-01
Rxpay-sepa-germany-01
 
Writing jQuery that doesn't suck - London jQuery
Writing jQuery that doesn't suck - London jQueryWriting jQuery that doesn't suck - London jQuery
Writing jQuery that doesn't suck - London jQuery
 
ELT Pedagogy (Teaching Producyive Skills)
ELT Pedagogy (Teaching Producyive Skills)ELT Pedagogy (Teaching Producyive Skills)
ELT Pedagogy (Teaching Producyive Skills)
 
4-31 NTC Information Sheet SEP 2012
4-31 NTC Information Sheet SEP 20124-31 NTC Information Sheet SEP 2012
4-31 NTC Information Sheet SEP 2012
 
P pt keys for good and happy life.
P pt keys for good and happy life.P pt keys for good and happy life.
P pt keys for good and happy life.
 
sdfghjk
sdfghjksdfghjk
sdfghjk
 

Mais de Jesse Vincent

Building a keyboard from scratch
Building a keyboard from scratchBuilding a keyboard from scratch
Building a keyboard from scratchJesse Vincent
 
So, I made a keyboard
So, I made a keyboardSo, I made a keyboard
So, I made a keyboardJesse Vincent
 
Dancing App Stores - Android Open 2011
Dancing App Stores - Android Open 2011Dancing App Stores - Android Open 2011
Dancing App Stores - Android Open 2011Jesse Vincent
 
Perl 5.16 and Beyond - YAPC::Asia 2011
Perl 5.16 and Beyond - YAPC::Asia 2011Perl 5.16 and Beyond - YAPC::Asia 2011
Perl 5.16 and Beyond - YAPC::Asia 2011Jesse Vincent
 
Perl 5.16 and beyond
Perl 5.16 and beyondPerl 5.16 and beyond
Perl 5.16 and beyondJesse Vincent
 
OSCON 2011 - Perl 5.16 and beyond
OSCON 2011 - Perl 5.16 and beyondOSCON 2011 - Perl 5.16 and beyond
OSCON 2011 - Perl 5.16 and beyondJesse Vincent
 
RT4 - The whole sordid story
RT4 - The whole sordid storyRT4 - The whole sordid story
RT4 - The whole sordid storyJesse Vincent
 
K-9 Mail for Android
K-9 Mail for AndroidK-9 Mail for Android
K-9 Mail for AndroidJesse Vincent
 
P2P Bug Tracking with SD
P2P Bug Tracking with SDP2P Bug Tracking with SD
P2P Bug Tracking with SDJesse Vincent
 
SD - A peer to peer issue tracking system
SD - A peer to peer issue tracking systemSD - A peer to peer issue tracking system
SD - A peer to peer issue tracking systemJesse Vincent
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopJesse Vincent
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 
A brief introduction to RTIR
A brief introduction to RTIRA brief introduction to RTIR
A brief introduction to RTIRJesse Vincent
 
An introduction to RTIR
An introduction to RTIRAn introduction to RTIR
An introduction to RTIRJesse Vincent
 
Prophet: a path out of the Cloud
Prophet: a path out of the CloudProphet: a path out of the Cloud
Prophet: a path out of the CloudJesse Vincent
 
Web 2.0 is Sharecropping
Web 2.0 is SharecroppingWeb 2.0 is Sharecropping
Web 2.0 is SharecroppingJesse Vincent
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
Prophet - A peer to peer replicated disconnected database
Prophet - A peer to peer replicated disconnected databaseProphet - A peer to peer replicated disconnected database
Prophet - A peer to peer replicated disconnected databaseJesse Vincent
 

Mais de Jesse Vincent (20)

Building a keyboard from scratch
Building a keyboard from scratchBuilding a keyboard from scratch
Building a keyboard from scratch
 
So, I made a keyboard
So, I made a keyboardSo, I made a keyboard
So, I made a keyboard
 
Dancing App Stores - Android Open 2011
Dancing App Stores - Android Open 2011Dancing App Stores - Android Open 2011
Dancing App Stores - Android Open 2011
 
Perl 5.16 and Beyond - YAPC::Asia 2011
Perl 5.16 and Beyond - YAPC::Asia 2011Perl 5.16 and Beyond - YAPC::Asia 2011
Perl 5.16 and Beyond - YAPC::Asia 2011
 
Perl 5.16 and beyond
Perl 5.16 and beyondPerl 5.16 and beyond
Perl 5.16 and beyond
 
OSCON 2011 - Perl 5.16 and beyond
OSCON 2011 - Perl 5.16 and beyondOSCON 2011 - Perl 5.16 and beyond
OSCON 2011 - Perl 5.16 and beyond
 
RT4 - The whole sordid story
RT4 - The whole sordid storyRT4 - The whole sordid story
RT4 - The whole sordid story
 
K-9 Mail for Android
K-9 Mail for AndroidK-9 Mail for Android
K-9 Mail for Android
 
Perl 5.12.0
Perl 5.12.0Perl 5.12.0
Perl 5.12.0
 
P2P Bug Tracking with SD
P2P Bug Tracking with SDP2P Bug Tracking with SD
P2P Bug Tracking with SD
 
SD - A peer to peer issue tracking system
SD - A peer to peer issue tracking systemSD - A peer to peer issue tracking system
SD - A peer to peer issue tracking system
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl Workshop
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 
A brief introduction to RTIR
A brief introduction to RTIRA brief introduction to RTIR
A brief introduction to RTIR
 
An introduction to RTIR
An introduction to RTIRAn introduction to RTIR
An introduction to RTIR
 
Prophet: a path out of the Cloud
Prophet: a path out of the CloudProphet: a path out of the Cloud
Prophet: a path out of the Cloud
 
Web 2.0 is Sharecropping
Web 2.0 is SharecroppingWeb 2.0 is Sharecropping
Web 2.0 is Sharecropping
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Prophet - A peer to peer replicated disconnected database
Prophet - A peer to peer replicated disconnected databaseProphet - A peer to peer replicated disconnected database
Prophet - A peer to peer replicated disconnected database
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Hacking your Kindle (OSCON Lightning Talk)

  • 1. My first ebook reader Tal kC NO onta DR ins J esse Vincent M jesse@fsck.com The content of this talk does not necessarily I bought the Kindle 2 to reflect the views of my employer. read books, but I couldn’t leave well-enough alone.
  • 2. Some quick Kindle facts ARM 1136JF-S Linux 2.6, glibc 2.5, DBus, busybox 2Gb flash (4 on the DX) Most of /sbin is in sh 128 Mb RAM 2.0 shipped with a USB- Networking debug mode 3G Modem GUI is Java (Obfuscated) USB OTG Browser and JVM provided by 600x800 16 grey screen ACCESS Great battery
  • 3. Things not to do Don’t steal books Don’t use your Kindle as a 3G modem Don’t crack Amazon’s Topaz DRM Don’t crack Amazon’s .mobi DRM
  • 4. Think twice before you h4xx0r your Kindle Amazon knows where you are Amazon knows who you are Amazon has your credit card number Your syslog gets sent to Amazon You might brick your Kindle
  • 5. Why hack the Kindle? I like to read. A lot. I love the Kindle’s 3G modem. The Kindle has limited format support: No ePub. No PDF. No .lit. No .chm. ...so I couldn’t read a lot of stuff I wanted to read. The Kindle does support .prc (Mobipocket) and .cbz (Comic books)
  • 6. (Open Formats)++ ePub is just zipped HTML and images PDF is... PDF .prc (Mobipocket) is HTML 3.2 + extensions + glue .cbz is just zipped .pngs and .jpgs
  • 7. Calibre http://calibre.kovidgoyal.net Calibre is free and open It runs on the desktop That kind of defeats the purpose of the Kindle
  • 8. Early Hackery Perl app to convert ePub to Mobipocket Web-based document conversion system http://kindle.fsck.com/http://some.com/foo.epub Custom Kindle book to automate delivery
  • 9. Then I found the USB Network mode :debug `usbNetowk `usbQa 192.168.15.244 ➨ 192.168.15.200 Now I didn’t need the 3G modem
  • 10. What next? The Kindle 1 software update format was based on tar, sh and MD5 Reverse engineered (by somebody else) - see http://igorsk.blogspot.com The Kindle 2 and DX use the exact same updater format
  • 11. Getting in the first time Amazon’s busybox is built without telnetd ARM Linux is pretty standard these days A statically linked busybox is just fine Early discoveries: /proc/config.gz Kernel built with NFS User-data partition NOT mounted noexec Undocumented support for .cbz files
  • 12. Buildfarm on an N810 Cross-compiling is ... not reliable Linux 2.6, glibc 2.5 and gcc Built nfsmount, screen, and everything else needed to get some “work” done
  • 13. Building Calibre on Kindle Qt, Python (unladen swallow) PyQt Took 12 hours to convert a book...after I built swaptools and gave it 256M
  • 14. Savory for Kindle Hacked Calibre down to size Poppler-based .pdf ➨.cbz engine inotify and DBus based daemon Kindle updater that adds an init script ext2 disk image with Savory runtime
  • 15. That was good enough... ...until I got DX envy. The Kindle 2 is codenamed ‘turing’ Test scripts on the device talked about ‘nell’ (and about a turing with a trackball) When the DX came out, I wanted a real PDF reader...with zoom, search and indexes
  • 16. This should be easy! 1. Figure out how to paint the screen 2. Figure out how to read the keyboard and fiveway controller 3. Build a custom PDF reader for the Kindle
  • 17. Screen and Keyboard /dev/fb0 - Virtual framebuffer echo “{1,2,3}” > /proc/eink_fb/update_display /dev/input/event{0,1} - Keyboard and Keyboard The 5-way is just another keyboard Drivers in GPL Kernel release Like everything else, bog-standard linux
  • 18. Ubuntu Ubuntu Jaunty Jackalope - ported to ARM Installed on qemu Tarred up the root image NFS mounted on the Kindle chroot /tmp/kindle sh
  • 19. X.org X.org needs a TTY or VT to start up The Kindle’s Kernel is built without CONFIG_VT I did awful (but small) things to X.org Xfbdev “just works”
  • 20. What’s next? Polish Documentation Publication Fixing X.org’s colormap Building a useful user experience