Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2023, 04:57 AM   #1
kindler
Junior Member
kindler began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite 5
Question Porting linux applications for Kindle PW5

Hi,

I have a jailbroken Kindle Paperwhite 5, and I require access to the BLE stack in order to use some commands. My goal is to find a way to build and install packages like BlueZ to get access to hciconfig, hcitool, and bluetoothctl.

Although there are resources on creating development environment VMs for Kindles, I would appreciate receiving any tips or advice that you may have before investing days of time and effort in them to port on my SoC.

Additionally, I noticed that "devcap-get-feature -a bluetooth" returns a value of "1", indicating that Bluetooth functionality is available. However, I do not have access to Bluetooth in the menu. How can I enable the Bluetooth feature on the UI so that I can connect to Bluetooth audio devices?


Thanks
kindler is offline   Reply With Quote
Old 03-11-2023, 06:42 AM   #2
shamanNS
Guru
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 886
Karma: 10113994
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5 [bricked], Kindle PW1
You must register / login the device to an Amazon account only then it will show all the options in Settings and also that BT on/off toggle.
shamanNS is offline   Reply With Quote
Advert
Old 03-11-2023, 12:14 PM   #3
kindler
Junior Member
kindler began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite 5
Oh, good point, thanks

What about porting/building C applications for Kindle kernel, or adding to busybox.
kindler is offline   Reply With Quote
Old 03-12-2023, 09:47 AM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
For CLI or systems stuff, just cross-compile to the right target and you're done?

(i.e., https://github.com/koreader/koxtoolchain [Use the binaries right now, the latest gnu make release breaks the glibc build. Updating those TCs, which will also fix this issue, is at the top of my TODO list]).
NiLuJe is offline   Reply With Quote
Old 03-12-2023, 11:35 AM   #5
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
Quote:
Originally Posted by kindler View Post
Hi,
I require access to the BLE stack in order to use some commands. My goal is to find a way to build and install packages like BlueZ to get access to hciconfig, hcitool, and bluetoothctl.
Minor point of distinction - BlueZ is an entire BT stack that happens to include tools to interact with that stack.

If things are similar to the other Kindles with Bluetooth, the BT stack on the device is an entirely different one provided by the chip vendor and is very limited /essentially a pile of shit. You'd need to swap it out with BlueZ entirely for the other tools to work IIRC.

Quote:
Originally Posted by kindler View Post
Although there are resources on creating development environment VMs for Kindles, I would appreciate receiving any tips or advice that you may have before investing days of time and effort in them to port on my SoC.
Weeks is probably more accurate if not more. First step is probably to stop thinking of it as a Kindle and start thinking of it more generically as a small ARM board running Linux - you'll find a lot more information and resources this way.

This book is a great starting point: https://www.oreilly.com/library/view...ux/059600222X/

As for actually building stuff, the easiest way would be to do everything within buildroot to make compiling dependencies etc slightly less painful.
katadelos is offline   Reply With Quote
Advert
Old 03-12-2023, 07:07 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yup, buildroot will probably save you a good amount of hair-pulling, and has the added benefit of being (fairly) straight-forward, given the huge complexity of the task at hand .
NiLuJe is offline   Reply With Quote
Old 03-12-2023, 07:21 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
TWIMC: perhaps this thread should be moved to the Kindle Developer's Corner?
DNSB is offline   Reply With Quote
Old 03-13-2023, 12:30 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@DNSB: Oops, indeed, missed that fact .

Done.
NiLuJe is offline   Reply With Quote
Old 03-17-2023, 04:22 PM   #9
kindler
Junior Member
kindler began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite 5
Quote:
Originally Posted by NiLuJe View Post
For CLI or systems stuff, just cross-compile to the right target and you're done?

(i.e., https://github.com/koreader/koxtoolchain [Use the binaries right now, the latest gnu make release breaks the glibc build. Updating those TCs, which will also fix this issue, is at the top of my TODO list]).
Thank you for your help. After conducting some tests with the koxtoolchain, I cooked a new toolchain using crosstool-NG. This new toolchain worked well with a simple program that printed "hello world"!

I then proceeded to build Bluez along with its dependencies such as dbus, readline, and glib. Finally, I was able to obtain the necessary binaries and libraries.

While investigating kernel compatibility and ensuring the Kindle was enabled for Bluetooth in the UI, I, unfortunately, made a mistake. This resulted in an auto-upgrade and I lost my jailbreak. I had previously looked into preventing auto-upgrades based on information from various threads, but I mistakenly assumed that my workaround was successful. However, it turned out that device registration triggered the upgrade process. now it upgraded to 5.15.1.1
kindler is offline   Reply With Quote
Old 03-17-2023, 05:52 PM   #10
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Had you done the JB prior to the update? You might be able to apply the latest hotfix and recover from this.

Dave
dhdurgee is offline   Reply With Quote
Old 03-17-2023, 07:14 PM   #11
kindler
Junior Member
kindler began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite 5
Yes, it was jailbroken on 5.14.2 for a while and after registering the device it just got a new OTA upgrade.
Which patch exactly? I don't have SSH access also unlike here.
kindler is offline   Reply With Quote
Old 03-17-2023, 07:24 PM   #12
kindler
Junior Member
kindler began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite 5
I tried this hotfix and it was rejected as an invalid update file.

K5 JailBreak Hotfix | JailBreak-1.16.N-FW-5.x-hotfix.zip | 2023-Jan-04 23:53:15 | 150.2K | 165a5e72bd9bb0de099459b96339f3cf | JB Hotfix
kindler is offline   Reply With Quote
Old 03-17-2023, 07:30 PM   #13
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by kindler View Post
I tried this hotfix and it was rejected as an invalid update file.

K5 JailBreak Hotfix | JailBreak-1.16.N-FW-5.x-hotfix.zip | 2023-Jan-04 23:53:15 | 150.2K | 165a5e72bd9bb0de099459b96339f3cf | JB Hotfix
You might want to check with NiLuJe as I seem to recall that the latest firmware update required an update to the hotfix.

Dave
dhdurgee is offline   Reply With Quote
Old 03-18-2023, 10:39 AM   #14
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'm not in a position to check and/or rebuild anything at the moment; but, as a rule, if the snapshot's thread timestamp at the bottom predates a FW release date, the hotfix will obviously not work .

On the upside, you don't need to run the hotfix at all, just reboot a couple of times.
NiLuJe is offline   Reply With Quote
Old 03-18-2023, 12:39 PM   #15
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
I'm not in a position to check and/or rebuild anything at the moment; but, as a rule, if the snapshot's thread timestamp at the bottom predates a FW release date, the hotfix will obviously not work .

On the upside, you don't need to run the hotfix at all, just reboot a couple of times.
My recollection is that the latest firmware release relocated the keystore and as such would require changes to the code to recover from an update of the firmware to that release. Unfortunately I don't recall what level incorporated that change, so I am unsure if he is being bit by it or not. I hope that you are correct and that the bridge code can recover things for him with a few reboots.

Dave

PS: from the Open Sesame Thread:

WARNING: FW >= 5.15.1.1 INTRODUCED A BREAKING CHANGE. DO NOT UPDATE!

Last edited by dhdurgee; 03-19-2023 at 06:49 PM.
dhdurgee is offline   Reply With Quote
Reply

Tags
bluetooth, development, kindle


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Kindle PW5 Gen 11 wont turn on (Help!) symondo Amazon Kindle 5 03-07-2023 01:36 PM
New Kindle PW5 unable to be jailbroken JSWolf Amazon Kindle 6 01-30-2023 05:33 AM
Kindle screenshots & PW5 latest firmware(s) ? valparizzo Amazon Kindle 2 09-05-2022 04:47 AM
PW5 Kindle pw5 firmware update 5.14.3.0.1 vansontv Kindle Developer's Corner 4 06-28-2022 06:56 PM
Touch porting tinycore linux to touch tom_a_sparks Kobo Developer's Corner 0 07-04-2015 09:55 AM


All times are GMT -4. The time now is 03:54 PM.


MobileRead.com is a privately owned, operated and funded community.