SlideShare a Scribd company logo
1 of 20
Download to read 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

More Related Content

Viewers also liked

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
 

Viewers also liked (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
 

More from 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
 

More from 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
 

Recently uploaded

LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameKapil Thakar
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsDianaGray10
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
Introduction - IPLOOK NETWORKS CO., LTD.
Introduction - IPLOOK NETWORKS CO., LTD.Introduction - IPLOOK NETWORKS CO., LTD.
Introduction - IPLOOK NETWORKS CO., LTD.IPLOOK Networks
 

Recently uploaded (20)

LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First Frame
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
Introduction - IPLOOK NETWORKS CO., LTD.
Introduction - IPLOOK NETWORKS CO., LTD.Introduction - IPLOOK NETWORKS CO., LTD.
Introduction - IPLOOK NETWORKS CO., LTD.
 

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