SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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
 

Plus 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
 

Plus 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
 

Dernier

Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 

Dernier (20)

Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 

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