![]() |
#1 |
Kindle Bricker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 120
Karma: 862606
Join Date: Sep 2022
Location: Why do you want to know?
Device: PW6, PW6(dead), PW5 (brick), PW5 (brick), PW4 (brick)
|
![]()
I'm working on some web-browser based JS stuff, and looking at the Kindle's USB partition, I can see a folder called .active_content_sandbox
In there, there is are cached Kindle store files, such as index.html, secondaryStore.html, e.t.c. Most of them are obfuscated, but I can see some code that is related to a custom window.kindle property: Code:
if(!kindle || typeof kindle === 'undefined') { var kindle = window.kindle || top.kindle; } var host = kindle; if (host.dev.webkitLog) { host.dev.webkitLog('on'); } var Locale = window.Locale || top.Locale; var DateTimeFormat = window.DateTimeFormat || top.DateTimeFormat; var NumberFormat = window.NumberFormat || top.NumberFormat; Code:
kindle.dev.loadResource&&(kindle.dev.loadResource(window.frameElement?window.frameElement.id:"externalPage","jquery"),kindle.dev.setSensitivity(!0,1500)),kindle&&(kindle.chrome.setTitleBar("",pageTitle) However, when I try to observer window.kindle from the browser, it merely shows up as undefined, running the following code: Code:
for (prop in window) { log(prop); } Does anyone know anything about how this works??? Thanks Last edited by HackerDude; 09-24-2022 at 10:55 AM. |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 99
Karma: 909418
Join Date: Aug 2021
Location: Germany
Device: PW4+Fire 7", Onyx Boox Nova Air
|
i'm not really experienced that much in kindle hacking, but i know a bit of javascript (the code you posted here is js). and my guess is that window.kindle gets defined inside the application self (main kindle UI?), so if you try to access it outside of that context of the application where it is used, it isn't defined as a variable (window.kindle).. so it's undefined.
if i where you, i would try if i somehow could inject code into that main application where that code you posted is used to learn more about window.kindle and what exactly it contains. on a windows pc i would do something like "console.log(window.kindle);" but on a kindle you would need to save it somehow in a logfile i guess. edit: maybe you could use the KindleTool to extract a kindle update to maybe find more of the code of the main application where the window.kindle gets defined that you can't normally access (in the filesystem of the kindle)? Last edited by Kusuri; 09-25-2022 at 04:26 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Historically, you'd have to look into a factory image and the diags partition to have a look at un (or less-) obfuscated code. But that was a hell of a lot of FW versions ago (and, like, 6 UI iterations ago?
![]() TL;DR: No idea how this shit works since the React stuff. |
![]() |
![]() |
![]() |
#4 |
Kindle Bricker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 120
Karma: 862606
Join Date: Sep 2022
Location: Why do you want to know?
Device: PW6, PW6(dead), PW5 (brick), PW5 (brick), PW4 (brick)
|
My bad! It turns out, upon further investigation, that merely checking if window.kindle exists defined it (JS be like). It appears to be defined only when viewing the Kindle's "store" app, as the store app is basically just a glorified webview
I have also discovered that the Kindle's browser is the equivalent of Safari 5, so I can now locally test HTML and JS code Unfortunately, as a result of this, it doesn't seem to be that useful to me Last edited by HackerDude; 09-27-2022 at 01:29 PM. Reason: update the text |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 87
Karma: 25608
Join Date: Sep 2022
Device: PW3, PW2, KT2, 2xKT, 2xK3G
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Kindle Bricker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 120
Karma: 862606
Join Date: Sep 2022
Location: Why do you want to know?
Device: PW6, PW6(dead), PW5 (brick), PW5 (brick), PW4 (brick)
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reverse Engineering Conversion | Conday | Conversion | 6 | 09-16-2021 10:11 AM |
K4 sync reverse engineering | xifer | Kindle Developer's Corner | 3 | 10-16-2020 10:03 AM |
reverse engineering azw3r? | blaenk | Kindle Developer's Corner | 6 | 04-17-2016 03:53 AM |
Reverse Engineering Whispersync | Fmstrat | Kindle Developer's Corner | 3 | 01-02-2013 03:59 PM |
Introduction to Reverse Engineering Software | Colin Dunstan | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 05-25-2004 11:31 AM |