{"id":13719077,"url":"https://github.com/NiLuJe/KindleTool","last_synced_at":"2025-05-07T11:30:51.503Z","repository":{"id":3126670,"uuid":"4154404","full_name":"NiLuJe/KindleTool","owner":"NiLuJe","description":"A tool for creating \u0026 extracting Kindle updates and more","archived":false,"fork":true,"pushed_at":"2025-01-17T19:40:21.000Z","size":2166,"stargazers_count":439,"open_issues_count":3,"forks_count":45,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-01-17T20:32:20.996Z","etag":null,"topics":["kindle","packager","update"],"latest_commit_sha":null,"homepage":"https://www.mobileread.com/forums/showthread.php?t=187880","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yifanlu/KindleTool","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiLuJe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-04-27T02:38:13.000Z","updated_at":"2025-01-17T19:40:23.000Z","dependencies_parsed_at":"2023-07-06T12:45:56.853Z","dependency_job_id":null,"html_url":"https://github.com/NiLuJe/KindleTool","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiLuJe%2FKindleTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiLuJe%2FKindleTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiLuJe%2FKindleTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiLuJe%2FKindleTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiLuJe","download_url":"https://codeload.github.com/NiLuJe/KindleTool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252868657,"owners_count":21816904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kindle","packager","update"],"created_at":"2024-08-03T01:00:41.990Z","updated_at":"2025-05-07T11:30:51.485Z","avatar_url":"https://github.com/NiLuJe.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# KindleTool\n[![License](https://img.shields.io/github/license/NiLuJe/KindleTool.svg)](/LICENSE) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/15d7ef43d2e046f998668960d4a65ae6)](https://www.codacy.com/app/NiLuJe/KindleTool?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=NiLuJe/KindleTool\u0026amp;utm_campaign=Badge_Grade) [![Latest tag](https://img.shields.io/github/tag-date/NiLuJe/KindleTool.svg)](https://github.com/NiLuJe/KindleTool/releases/)\n\n## Usage\n-   KindleTool md [ \u0026lt;\u003cb\u003einput\u003c/b\u003e\u0026gt; ] [ \u0026lt;\u003cb\u003eoutput\u003c/b\u003e\u0026gt; ]\n\n\u003e Obfuscates data using Amazon's update algorithm.  \n\u003e If no input is provided, input from stdin  \n\u003e If no output is provided, output to stdout\n\n-   KindleTool dm [ \u0026lt;\u003cb\u003einput\u003c/b\u003e\u0026gt; ] [ \u0026lt;\u003cb\u003eoutput\u003c/b\u003e\u0026gt; ]\n\n\u003e Deobfuscates data using Amazon's update algorithm.  \n\u003e If no input is provided, input from stdin  \n\u003e If no output is provided, output to stdout\n\n-   KindleTool convert [\u003ci\u003eoptions\u003c/i\u003e] \u0026lt;\u003cb\u003einput\u003c/b\u003e\u0026gt;...\n\n\u003e Converts a Kindle update package to a gzipped tar archive file, and delete input.\n\n\tOptions:\n\t\t-c, --stdout                Write to standard output, keeping original files unchanged.\n\t\t-i, --info                  Just print the package information, no conversion done.\n\t\t-s, --sig                   OTA V2, Recovery V2 \u0026 Recovery FB02 with header rev 2 updates only. Extract the payload signature.\n\t\t-k, --keep                  Don't delete the input package.\n\t\t-u, --unsigned              Assume input is an unsigned \u0026 mangled userdata package.\n\t\t-w, --unwrap                Just unwrap the package, if it's wrapped in an UpdateSignature header (especially useful for userdata packages).\n\n-   KindleTool extract [\u003ci\u003eoptions\u003c/i\u003e] \u0026lt;\u003cb\u003einput\u003c/b\u003e\u0026gt; \u0026lt;\u003cb\u003eoutput\u003c/b\u003e\u0026gt;\n\n\u003e Extracts a Kindle update package to a directory.\n\n\tOptions:\n\t\t-u, --unsigned              Assume input is an unsigned \u0026 mangled userdata package.\n\n-   KindleTool create \u0026lt;\u003cb\u003etype\u003c/b\u003e\u0026gt; \u0026lt;\u003cb\u003edevices\u003c/b\u003e\u0026gt; [\u003ci\u003eoptions\u003c/i\u003e] \u0026lt;\u003cb\u003edir\u003c/b\u003e|\u003cb\u003efile\u003c/b\u003e\u0026gt;... [ \u0026lt;\u003cb\u003eoutput\u003c/b\u003e\u0026gt; ]\n\n\u003e Creates a Kindle update package.  \n\u003e You should be able to throw a mix of files \u0026amp; directories as input without trouble.  \n\u003e Just keep in mind that by default, if you feed it absolute paths, it will archive absolute paths, which usually isn't what you want!  \n\u003e If input is a single gzipped tarball (\".tgz\" or \".tar.gz\") file, we assume it is properly packaged (bundlefile \u0026amp; sigfile), and will only convert it to an update.  \n\u003e Output should be a file with the extension \".bin\", if it is not provided, or if it's a single dash, outputs to standard output.  \n\u003e In case of OTA updates, all files with the extension \".ffs\" or \".sh\" will be treated as update scripts.\n\n\tType:\n\t\tota                         OTA V1 update package. Works on Kindle 3 and older.\n\t\tota2                        OTA V2 signed update package. Works on Kindle 4 and newer.\n\t\trecovery                    Recovery package for restoring partitions.\n\t\trecovery2                   Recovery V2 package for restoring partitions. Works on FW \u003e= 5.2 (PaperWhite) and newer\n\t\tsig                         Signature envelope. Use this to build a signed userdata package with the -U switch (FW \u003e= 5.1 only, but device agnostic).\n\n\tDevices:\n\t\tOTA V1 \u0026 Recovery packages only support one device. OTA V2 \u0026 Recovery V2 packages can support multiple devices.\n\n\t\t-d, --device k1             Kindle 1\n\t\t-d, --device k2             Kindle 2 US\n\t\t-d, --device k2i            Kindle 2 International\n\t\t-d, --device dx             Kindle DX US\n\t\t-d, --device dxi            Kindle DX International\n\t\t-d, --device dxg            Kindle DX Graphite\n\t\t-d, --device k3w            Kindle 3 WiFi\n\t\t-d, --device k3g            Kindle 3 WiFi+3G\n\t\t-d, --device k3gb           Kindle 3 WiFi+3G Europe\n\t\t-d, --device k4             Silver Kindle 4 (Non-Touch) (2011)\n\t\t-d, --device k4b            Black Kindle 4 (Non-Touch) (2012)\n\t\t-d, --device kindle2        Alias for k2 + k2i\n\t\t-d, --device kindledx       Alias for dx + dxi + dxg\n\t\t-d, --device kindle3        Alias for k3w + k3g + k3gb\n\t\t-d, --device legacy         Alias for kindle2 + kindledx + kindle3\n\t\t-d, --device kindle4        Alias for k4 + k4b\n\t\t-d, --device touch          Includes all known Kindle Touch variants\n\t\t-d, --device paperwhite     Includes all known Kindle PaperWhite 1 variants\n\t\t-d, --device paperwhite2    Includes all known Kindle PaperWhite 2 variants\n\t\t-d, --device basic          Includes all known Kindle Basic 1 variants\n\t\t-d, --device voyage         Includes all known Kindle Voyage variants\n\t\t-d, --device paperwhite3    Includes all known Kindle PaperWhite 3 variants\n\t\t-d, --device oasis          Includes all known Kindle Oasis 1 variants\n\t\t-d, --device basic2         Includes all known Kindle Basic 2 variants\n\t\t-d, --device oasis2         Includes all known Kindle Oasis 2 variants\n\t\t-d, --device paperwhite4    Includes all known Kindle PaperWhite 4 variants\n\t\t-d, --device basic3         Includes all known Kindle Basic 3 variants\n\t\t-d, --device oasis3         Includes all known Kindle Oasis 3 variants\n\t\t-d, --device paperwhite5    Includes all known Kindle PaperWhite 5 variants\n\t\t-d, --device basic4         Includes all known Kindle Basic 4 variants\n\t\t-d, --device scribe         Includes all known Kindle Scribe variants\n\t\t-d, --device basic5         Includes all known Kindle Basic 5 variants\n\t\t-d, --device paperwhite6    Includes all known Kindle PaperWhite 6 variants\n\t\t-d, --device scribe2        Includes all known Kindle Scribe 2 variants\n\t\t-d, --device colorsoft      Includes all known Kindle ColorSoft variants\n\t\t-d, --device kindle5        Alias for touch + paperwhite + paperwhite2 + basic + voyage + paperwhite3 + oasis + basic2 + oasis2 + paperwhite4 + basic3 + oasis3 + paperwhite5 + basic4 + scribe + basic5 + paperwhite6 + scribe2 + colorsoft\n\t\t-d, --device none           No specific device (Recovery V2 \u0026 Recovery FB02 with header rev 2 only, default).\n\t\t-d, --device auto           The current device (Obviously, has to be run from a Kindle).\n\n\tPlatforms:\n\t\tRecovery V2 \u0026 Recovery FB02 with header rev 2 updates only. Use a single platform per package.\n\n\t\t-p, --platform unspecified  Don't target a specific platform.\n\t\t-p, --platform mario        Mario (mostly devices shipped on FW 1.x?) [Deprecated].\n\t\t-p, --platform luigi        Luigi (mostly devices shipped on FW 2.x?).\n\t\t-p, --platform banjo        Banjo (devices shipped on FW 3.x?).\n\t\t-p, --platform yoshi        Yoshi (mostly devices shipped on FW \u003c= 5.1).\n\t\t-p, --platform yoshime-p    Yoshime (Prototype).\n\t\t-p, --platform yoshime      Yoshime (Also known as Yoshime3, mostly devices shipped on FW \u003e= 5.2).\n\t\t-p, --platform wario        Wario (mostly devices shipped on FW \u003e= 5.4).\n\t\t-p, --platform duet         Duet (mostly devices shipped on FW \u003e= 5.7).\n\t\t-p, --platform heisenberg   Heisenberg (mostly devices shipped on FW \u003e= 5.8).\n\t\t-p, --platform zelda        Zelda (mostly devices shipped on FW \u003e= 5.9).\n\t\t-p, --platform rex          Rex (mostly devices shipped on FW \u003e= 5.10).\n\t\t-p, --platform bellatrix    Bellatrix (mostly devices shipped on FW \u003e= 5.14).\n\t\t-p, --platform bellatrix3   Bellatrix3 (mostly devices shipped on FW \u003e= 5.16).\n\t\t-p, --platform bellatrix4   Bellatrix4 (mostly devices shipped on FW \u003e= 5.18).\n\n\tBoards:\n\t\tRecovery V2 \u0026 Recovery FB02 with header rev 2 updates only. Use a single board per package.\n\n\t\t-B, --board unspecified     Don't target a specific board, skip the device check.\n\t\t-B, --board tequila         Tequila (Kindle 4)\n\t\t-B, --board whitney         Whitney (Kindle Touch)\n\n\tOptions:\n\t\tAll the following options are optional and advanced.\n\t\t-k, --key \u003cfile\u003e            PEM file containing RSA private key to sign update. Default is popular jailbreak key.\n\t\t-b, --bundle \u003ctype\u003e         Manually specify package magic number. May override the value dictated by \"type\", if it makes sense. Valid bundle versions:\n                                      FB01, FB02 = recovery; FB03 = recovery2; FC02, FD03 = ota; FC04, FD04, FL01 = ota2; SP01 = sig\n\t\t-s, --srcrev \u003culong|uint\u003e   OTA updates only. Source revision. OTA V1 uses uint, OTA V2 uses ulong.\n                                      Lowest version of device that package supports. Default is 0.\n                                      Also acccepts min for 0.\n\t\t-t, --tgtrev \u003culong|uint\u003e   OTA, Recovery V2 \u0026 Recovery FB02 with header rev 2 updates only. Target revision. OTA V1 \u0026 Recovery V1H2 uses uint, OTA V2 \u0026 Recovery V2 uses ulong.\n                                      Highest version of device that package supports. Default is ulong/uint max value.\n                                      Also acccepts max for the appropriate maximum value for the chosen update package type.\n\t\t-h, --hdrrev \u003cuint\u003e         Recovery V2 \u0026 Recovery FB02 updates only. Header Revision. Default is 0.\n\t\t-1, --magic1 \u003cuint\u003e         Recovery updates only. Magic number 1. Default is 0.\n\t\t-2, --magic2 \u003cuint\u003e         Recovery updates only. Magic number 2. Default is 0.\n\t\t-m, --minor \u003cuint\u003e          Recovery updates only. Minor number. Default is 0.\n\t\t-c, --cert \u003cushort\u003e         OTA V2 \u0026 Recovery V2 updates only. The number of the certificate to use (found in /etc/uks on device). Default is 0.\n                                      0 = pubdevkey01.pem, 1 = pubprodkey01.pem, 2 = pubprodkey02.pem\n\t\t-o, --opt \u003cuchar\u003e           OTA V1 updates only. One byte optional data expressed as a number. Default is 0.\n\t\t-r, --crit \u003cuchar\u003e          OTA V2 updates only. One byte optional data expressed as a number. Default is 0.\n\t\t-x, --meta \u003cstr\u003e            OTA V2 updates only. An optional string to add. Multiple \"--meta\" options supported.\n                                      Format of metastring must be: key=value\n\t\t-X, --packaging             OTA V2 updates only. Adds PackagedWith, PackagedBy \u0026 PackagedOn metastrings, storing packaging metadata.\n\t\t-a, --archive               Keep the intermediate archive.\n\t\t-u, --unsigned              Build an unsigned \u0026 mangled userdata package.\n\t\t-U, --userdata              Build an userdata package (can only be used with the sig update type).\n\t\t-O, --ota                   Build a versioned OTA bundle (can only be used with the ota2 update type).\n\t\t-C, --legacy                Emulate the behaviour of yifanlu's KindleTool regarding directories. By default, we behave like tar:\n                                      every path passed on the commandline is stored as-is in the archive. This switch changes that, and store paths\n                                      relative to the path passed on the commandline, like if we had chdir'ed into it.\n\n-   KindleTool info \u0026lt;\u003cb\u003eserialno\u003c/b\u003e\u0026gt;\n\n\u003e Get the default root password.  \n\u003e Unless you changed your password manually, the first password shown will be the right one.  \n\u003e (The Kindle defaults to DES hashed passwords, which are truncated to 8 characters).  \n\u003e If you're looking for the recovery MMC export password, that's the second one.\n\n-   KindleTool version\n\n\u003e Show some info about this KindleTool build.\n\n-   KindleTool help\n\n\u003e Show this help screen.\n\n### Notices\n1.  If the variable KT_WITH_UNKNOWN_DEVCODES is set in your environment (no matter the value), some device checks will be relaxed with the create command.\n2.  If the variable KT_PKG_METADATA_DUMP is set in your environment, convert will dump header info in a shell-friendly format in the file this variable points to.\n3.  Updates with meta-strings will probably fail to run when passed to \"Update Your Kindle\".\n4.  Currently, even though OTA V2 supports updates that run on multiple devices, it is not possible to create an update package that will run on both FW 4.x (Kindle 4) and FW 5.x (Basically everything since the Kindle Touch).\n\n### Building\n\nSee [COMPILING](/COMPILING).\n\n\u003c!-- kate: indent-mode cstyle; indent-width 4; replace-tabs on; remove-trailing-spaces none; --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiLuJe%2FKindleTool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNiLuJe%2FKindleTool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiLuJe%2FKindleTool/lists"}