Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-27-2015, 03:04 PM   #1
Micky Wicky
Junior Member
Micky Wicky began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2014
Device: Kindle PW2
Some apps failing after 5.6.5 update

Hi all,

So I've updated my jailbroken KPW2 to 5.6.5 a couple of days ago...

Has anyone had issues with jailbreak apps not working after the 5.6.5 upgrade?
- KUAL, KOReader, SkipStone, Kindle Explorer, Leafpad still work without reinstall
- some like kpvbooklet, linkss, etc. required a reinstall as always after an upgrade
- KTerm, Gargoyle, eboard chess just fail silently on launch (KUAL exits, then nothing happens), even after a reinstall and reboot

In the case of Gargoyle, I noticed that the keyboard came up briefly and then vanished, presumably as the app crashed.

Anyone else with this, or ideas of where I can look to figure this out?


Thanks,
MW
Micky Wicky is offline   Reply With Quote
Old 08-27-2015, 03:21 PM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Micky Wicky View Post
Hi all,

So I've updated my jailbroken KPW2 to 5.6.5 a couple of days ago...

Has anyone had issues with jailbreak apps not working after the 5.6.5 upgrade?
- KUAL, KOReader, SkipStone, Kindle Explorer, Leafpad still work without reinstall
- some like kpvbooklet, linkss, etc. required a reinstall as always after an upgrade
- KTerm, Gargoyle, eboard chess just fail silently on launch (KUAL exits, then nothing happens), even after a reinstall and reboot

In the case of Gargoyle, I noticed that the keyboard came up briefly and then vanished, presumably as the app crashed.

Anyone else with this, or ideas of where I can look to figure this out?


Thanks,
MW
kterm has been reported here (it is looking for an older libpng (or some such) than what is installed in 5.6.5).

They may just have to be re-built by their authors.
(Which is a shame, I use kterm myself.)
knc1 is offline   Reply With Quote
Advert
Old 08-27-2015, 03:46 PM   #3
Micky Wicky
Junior Member
Micky Wicky began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2014
Device: Kindle PW2

Aha, makes sense - I've just spotted that all of the broken apps are from the same author.
Worringly, he seems to have stopped working on them 2 years ago...
I'll see if we can find a fix for kterm, there's a chance the same fix can do the trick for the other apps.
Micky Wicky is offline   Reply With Quote
Old 08-27-2015, 03:54 PM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Micky Wicky View Post

Aha, makes sense - I've just spotted that all of the broken apps are from the same author.
Worringly, he seems to have stopped working on them 2 years ago...
I'll see if we can find a fix for kterm, there's a chance the same fix can do the trick for the other apps.
search /lib and /usr/lib for libpng*
you should find a libpng16* there
if it is a sym-link, find the file it points to
then: ln -s <whatever name> libpng12.so (in the same directory)
then: try kterm again

Note:
ELF symbols are versioned, and the '16' library **should** include the '12' symbols.
**should**

If not, we need to pull the '12' library out of an Amazon Update_*.bin file (with KindleTool) and add it /lib (or /usr/lib) as the case may be.

What we really need here, are a few people with the time to look into the various technical problems that keep showing up.
Myself, I hardly find enough free time to feed myself.

Last edited by knc1; 08-27-2015 at 03:59 PM.
knc1 is offline   Reply With Quote
Old 08-27-2015, 06:43 PM   #5
normanr
Junior Member
normanr began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2015
Device: Kindle PW2
Kterm debugging is also happening over here: https://www.mobileread.com/forums/sho....php?p=3159374, latest update is that libpng12 and libpng16 don't seem to be binary compatible
normanr is offline   Reply With Quote
Advert
Old 08-27-2015, 07:07 PM   #6
Micky Wicky
Junior Member
Micky Wicky began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2014
Device: Kindle PW2
Yes, I've just found that out a few minutes ago on my Kindle.

The libpng12 -> libpng16 definitely breaks eboard and gargoyle as well as kterm.

Gargoyle also breaks because libjpeg_7 was upgraded to libjpeg_8 and they are just as incompatible.

I even tried to copy libpng12 from a Debian armhf install, but got:

"error while loading shared libraries: /usr/lib/libpng12.so.0: internal error"
Micky Wicky is offline   Reply With Quote
Old 08-27-2015, 07:20 PM   #7
Micky Wicky
Junior Member
Micky Wicky began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2014
Device: Kindle PW2
SUCCESS!
Copying the libs from an earlier version (5.6.2.1 in my case) fixed the issue.
So here's what I did in a nutshell

1. extracted libpng12.so.0.39.0 and libjpeg.so.7.0.0 from the old rootfs image
2. scp'ed them across to the Kindle
3. moved them to /usr/lib/ on the Kindle
4. ln'd them to libpng12.so.0 and libjpeg.so.7 respectively

Everything started working immediately.
Attached Files
File Type: gz libpng12.tar.gz (58.8 KB, 360 views)

Last edited by Micky Wicky; 08-27-2015 at 07:27 PM. Reason: attached libpng12
Micky Wicky is offline   Reply With Quote
Old 08-28-2015, 08:40 AM   #8
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Micky Wicky View Post
- - - -
I even tried to copy libpng12 from a Debian armhf install, but got:

"error while loading shared libraries: /usr/lib/libpng12.so.0: internal error"
Translation: Wrong ABI.
Kindles original firmware is still soft float.

So far, I am the only one to report on how to use hard float (concurrently with the native soft float) on the Kindles.
See: https://www.mobileread.com/forums/sho...d.php?t=240616

I am planning an update to that project thread, with a new set of (expanded) base libraries RSN. Which **may** include support for the series 2 (K2, DX, DXG) devices.
Def, RSN: Within the next couple of months.

- - - - -

Note:
Amazon can not (currently) use any software licensed GPLv3 (and a lot of modern software is) until they change their packaging so that the end-user can build their own update_*.bin package.

Translation:
They have to reveal their pub/private key pair (never going to happen)
or
Make provision for the end-user to load the end-user's own key pair (when hell freezes over, maybe).

Choice #2 above - that is what our "jail break" does - loads the Mobileread key pair certificate to the device's key store.

I write "maybe" above because the staff of lab126 has been successfully infiltrated with Open Source / Open Hardware minded people on several occasions.

Last edited by knc1; 08-28-2015 at 08:52 AM.
knc1 is offline   Reply With Quote
Old 08-28-2015, 03:38 PM   #9
voidling
Junior Member
voidling began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2015
Device: kindle pw2
Quote:
Originally Posted by Micky Wicky View Post
1. extracted libpng12.so.0.39.0 and libjpeg.so.7.0.0 from the old rootfs image
Hi Micky!
Could you please also provide the libjpeg file?
I just copied and symlinked the libpng and kterm still crashes on me.
It would be worth to do another try with both libraries.

Thanks!

P.S.: There is also a libpng.so-symlink. I left that pointing to libpng16 or should I rather point it to the libpng12.so.0.50.0 you provided?
P.P.S.: Once everything works again I will do my own backup
voidling is offline   Reply With Quote
Old 08-28-2015, 04:21 PM   #10
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,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Shipping the right libs w/ an rpath or LD_LIBRARY_PATH tweak with the affected apps might be the best course of action here (that, or rebuilding everything. I don't build gtk, though, so I'll leave that to someone who does ).
NiLuJe is offline   Reply With Quote
Old 08-28-2015, 05:06 PM   #11
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
Shipping the right libs w/ an rpath or LD_LIBRARY_PATH tweak with the affected apps might be the best course of action here (that, or rebuilding everything. I don't build gtk, though, so I'll leave that to someone who does ).
Anyone who downloads Buildroot can build gtk3webkit-2.0 if they have an Intel powered PC.
The next stable release will be within a week (the 2015.08 release).
knc1 is offline   Reply With Quote
Old 08-28-2015, 06:48 PM   #12
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,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The issue being you'll probably need to build a god-awfully old version of gtk, since, IIRC, you *have* to rely on the patched? bundled copy for things to work properly? Or am I imagining things and everything's implemented in awesome?
NiLuJe is offline   Reply With Quote
Old 08-28-2015, 08:41 PM   #13
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by voidling View Post
- - - -
P.S.: There is also a libpng.so-symlink.
- - - -
That is a build-time reference, not run-time.

I forgot to mention that when I was taking apart the various 5.6.x firmwares - Lab126 is now shipping with the build-time sym-links.
knc1 is offline   Reply With Quote
Old 08-29-2015, 04:08 AM   #14
Micky Wicky
Junior Member
Micky Wicky began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2014
Device: Kindle PW2
I set up the symlinks as below:

Code:
[root@kindle root]# cd /usr/lib
[root@kindle lib]# ls -l libpng*
lrwxrwxrwx    1 root     root            11 Aug  1 00:52 libpng.so -> libpng16.so
lrwxrwxrwx    1 root     root            18 Aug 28 00:15 libpng12.so.0 -> libpng12.so.0.39.0
-rwxr-xr-x    1 root     root        118812 Aug 28 00:14 libpng12.so.0.39.0
lrwxrwxrwx    1 root     root            19 Aug  1 00:52 libpng16.so -> libpng16.so.16.15.0
lrwxrwxrwx    1 root     root            19 Aug  1 00:52 libpng16.so.16 -> libpng16.so.16.15.0
-rwxr-xr-x    1 root     root        158032 Aug  1 00:49 libpng16.so.16.15.0
Code:
[root@kindle lib]# ls -l libjpeg*
lrwxrwxrwx    1 root     root            16 Aug  1 00:52 libjpeg.so -> libjpeg.so.8.0.2
lrwxrwxrwx    1 root     root            16 Aug 28 00:16 libjpeg.so.7 -> libjpeg.so.7.0.0
-rwxr-xr-x    1 root     root        171124 Aug 28 00:16 libjpeg.so.7.0.0
lrwxrwxrwx    1 root     root            16 Aug  1 00:52 libjpeg.so.8 -> libjpeg.so.8.0.2
-rwxr-xr-x    1 root     root        188748 Aug  1 00:50 libjpeg.so.8.0.2
-rwxr-xr-x    1 root     root        212480 Aug  1 00:49 libjpegXR.so

libjpeg attached.
Kterm does not use it, so if it still fails, the problem is with the libpng symlinks.

Note that this will not survive an update, NiLuJe's suggestion of tweaking LD_LIBRARY_PATH is probably the best way short of recompiling.
Attached Files
File Type: gz libjpeg7-libpng12.tar.gz (126.2 KB, 250 views)
Micky Wicky is offline   Reply With Quote
Old 08-29-2015, 05:09 AM   #15
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Micky Wicky View Post
Note that this will not survive an update.

NiLuJe's suggestion of tweaking LD_LIBRARY_PATH is probably the best way short of recompiling.
I vote for second best, but if your going to do it ...

Put your modification inside of: */extensions/kterm/bin/kterm.sh
Where '*/' is either: "/mnt/us/" or "Kindle:/" depending on from where your viewing USBstorage.

= = = =

First best, include the library location in the executable's header instead of the wrapper script.
Note that there are two executables:
kterm and matchbox-keyboard (whose keycaps are *.png images).

Combining the above with including protection from updates while not running out of room in /lib:

There is a provision in the ELF format to make the dynamic loader's search order act the same as that used by Windows.
I.E: Libraries are searched for first in the same directory as the executable (or other requester).

The dynamic loader recognizes a special wildcard in the DT_RUNPATH (DT_RPATH is obsolete), which is:
$ORIGIN
exactly as printed above.
The tool to do this with is: patchelf

Going from a combination of memory and "man patchelf" (and presumes you have a backup of the kterm install) - - -
Code:
cd /mnt/us/extensions/kterm/bin

patchelf --print-rpath kterm
patchelf --print-rpath matchbox-keyboard

# patchelf edits in-place and does not have a prepend option, so
# on your scratch pad, prepend whatever was printed above by:
# $ORIGIN:</whatever/rpath/was:/already/here.so>
# Note that it IS a path, using the ':' separator.

patchelf --set-rpath $ORIGIN<:whatever> kterm
patchelf --set-rpath $ORIGIN<:whatever> matchbox-keyboard

# Copy any required libraries that are missing from the Amazon image
# into the same directory that the executables are in (*/extensions/kterm/bin).

# Now shrink the rpath to the minimum while checking if all things
# tagged as DT_NEEDED can be found:

patchelf --shrink-rpath kterm
patchelf --shrink-rpath matchbox-keyboard
The above **should** work to 'fix' kterm after Amazon 'fixed' the graphic libraries.

= = = = =

References:
Code:
bin $ objdump -x kterm | grep 'NEEDED'
  NEEDED               libgtk-x11-2.0.so.0
  NEEDED               libgdk-x11-2.0.so.0
  NEEDED               libatk-1.0.so.0
  NEEDED               libgio-2.0.so.0
  NEEDED               libpangoft2-1.0.so.0
  NEEDED               libgdk_pixbuf-2.0.so.0
  NEEDED               libpangocairo-1.0.so.0
  NEEDED               libcairo.so.2
  NEEDED               libpango-1.0.so.0
  NEEDED               libfreetype.so.6
  NEEDED               libfontconfig.so.1
  NEEDED               libgobject-2.0.so.0
  NEEDED               libgmodule-2.0.so.0
  NEEDED               libgthread-2.0.so.0
  NEEDED               librt.so.1
  NEEDED               libglib-2.0.so.0
  NEEDED               libgcc_s.so.1
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
  NEEDED               libX11.so.6
  NEEDED               libm.so.6
Code:
bin $ objdump -x matchbox-keyboard | grep 'NEEDED'
  NEEDED               libX11.so.6
  NEEDED               libXtst.so.6
  NEEDED               libXft.so.2
  NEEDED               libexpat.so.1
  NEEDED               libpng12.so.0
  NEEDED               libc.so.6
  NEEDED               libXrender.so.1
= = = = =

Corrections and/or confirmations of the above - - - -
Just post them here, in this thread.

Last edited by knc1; 08-29-2015 at 05:25 AM.
knc1 is offline   Reply With Quote
Reply

Tags
solved

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firmware Update Kindle 3 (keyboard) update failing. "Specialists" unable to help. Can you? jimmythesaint Amazon Kindle 8 03-09-2016 02:00 AM
Update apps el.jeffe58 Kindle Fire 0 02-15-2014 04:33 PM
Color v1.4 Update - Sideloading apps? (No) Nate the great Nook Color & Nook Tablet 6 12-12-2011 05:38 PM
Classic Apps update after softroot 1.3 caveboy Nook Developer's Corner 3 06-18-2010 06:04 PM
Update 2.3 failing geekraver Kindle Developer's Corner 7 11-28-2009 05:40 PM


All times are GMT -4. The time now is 10:20 PM.


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