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 11-13-2023, 02:56 AM   #1
ShdHrzn
Junior Member
ShdHrzn began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2023
Device: kindle pw5
the browser in 5.16.4 is chromium

today i notice the news about update 5.16.4 and the browser html5 support update.
then i found some info about chromium files and exec commandline param things after download update_kindle_all_new_paperwhite_11th_5.16.4.bin and extract it .

SOME INFO:
  1. important file path in rootfs.img.gz is : /usr/bin/browser, /usr/bin/chromium, /usr/bin/chromium.sqsh
  2. /usr/bin/browser is a bash script.
    • where is the official ui call it? the ui java code?
    • when chromuim.sqsh mount to /usr/bin/chromium ?
    • and what is this name with ipc command "lipc-set-prop" do about launch chromium process?
    • its different with browser process ps output in 5.16.2.1.1 like "/usr/bin/mesquite -l com.lab126.browser -c file:///var/local/mesquite/browser/ -j" . can i just put these files in 5.16.2.1.1 and run the script to use modern browser? if yes, Is there anything I need to be careful about?

    Code:
    #!/bin/bash
    
    lipc-set-prop -s "com.lab126.chromebar" "activityIndicator" "{   \"activityIndicator\": {\"clientId\": \"com.lab126.browser\",\"action\": \"start\",\"text\": \"\",\"timeout\": 30000}}"
    
    export XDG_CONFIG_HOME="/mnt/us/system/browser/"
    if [ -d $XDG_CONFIG_HOME ]
    then
        CACHE_SIZE=`du -s /mnt/us/system/browser/ | awk -F '[/ ]' '{print $1}'`
        CACHE_LIMIT=65536
        if [ $CACHE_SIZE -gt $CACHE_LIMIT ]
        then
            rm -rf /mnt/us/system/browser/*
        fi
    fi
    
    export LD_LIBRARY_PATH="/usr/bin/chromium/lib:/usr/bin/chromium/usr/lib:/usr/lib/"
    
    exec chroot /chroot /usr/bin/chromium/bin/kindle_browser --no-zygote --no-sandbox --single-process --skia-resource-cache-limit-mb=64 \
         --disable-gpu --in-process-gpu --disable-gpu-sandbox --disable-gpu-compositing \
         --enable-dom-distiller --enable-distillability-service --force-device-scale-factor=2 --js-flags="jitless" \
         --content-shell-hide-toolbar --content-shell-host-window-cord=0,215 \
         --force-gpu-mem-available-mb=40 --enable-low-end-device-mode --enable-low-res-tiling --disable-site-isolation-trials \
         --user-agent="Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+"
  3. /usr/bin/chromium is a empty directory and browser executable files in chromium.sqsh:
    Code:
    usr/bin/chromium.sqsh: Squashfs filesystem, little endian, version 4.0, zlib compressed, 47645206 bytes, 53 inodes, blocksize: 131072 bytes, created: Fri Oct  6 11:42:21 2023
  4. after "unsquashfs chromium.sqsh" , here is file tree in it:
    Code:
    √ squashfs-root % tree
    .
    ├── bin
    │** ├── icudtl.dat
    │** ├── kindle_browser
    │** ├── kindle_browser.pak
    │** ├── natives_blob.bin
    │** └── v8_context_snapshot.bin
    ├── etc
    │** └── fonts
    │**     ├── conf.avail -> /etc/fonts/conf.avail
    │**     ├── conf.d
    │**     │** ├── 20-fix-globaladvance.conf -> ../conf.avail/20-fix-globaladvance.conf
    │**     │** ├── 20-unhint-small-vera.conf -> ../conf.avail/20-unhint-small-vera.conf
    │**     │** ├── 30-metric-aliases.conf -> ../conf.avail/30-metric-aliases.conf
    │**     │** ├── 30-urw-aliases.conf -> ../conf.avail/30-urw-aliases.conf
    │**     │** ├── 40-nonlatin.conf -> ../conf.avail/40-nonlatin.conf
    │**     │** ├── 45-latin.conf -> ../conf.avail/45-latin.conf
    │**     │** ├── 48-chromium-local.conf
    │**     │** ├── 49-sansserif.conf -> ../conf.avail/49-sansserif.conf
    │**     │** ├── 50-user.conf -> ../conf.avail/50-user.conf
    │**     │** ├── 51-local.conf -> ../conf.avail/51-local.conf
    │**     │** ├── 60-latin.conf -> ../conf.avail/60-latin.conf
    │**     │** ├── 65-fonts-persian.conf -> ../conf.avail/65-fonts-persian.conf
    │**     │** ├── 65-nonlatin.conf -> ../conf.avail/65-nonlatin.conf
    │**     │** ├── 69-unifont.conf -> ../conf.avail/69-unifont.conf
    │**     │** ├── 80-delicious.conf -> ../conf.avail/80-delicious.conf
    │**     │** └── 90-synthetic.conf -> ../conf.avail/90-synthetic.conf
    │**     ├── fonts.conf -> /etc/fonts/fonts.conf
    │**     └── fonts.dtd -> /etc/fonts/fonts.dtd
    ├── files
    │** └── fonts
    │**     ├── NotoSansJP-Medium.ttf
    │**     └── system_fonts -> /usr/java/lib/fonts/
    ├── lib
    │** ├── ld-linux-armhf.so.3
    │** ├── libc.so.6
    │** ├── libdl.so.2
    │** ├── libnss_compat.so.2
    │** ├── libnss_db.so.2
    │** ├── libnss_dns.so.2
    │** ├── libpthread.so.0
    │** ├── libresolv.so.2
    │** ├── librt.so.1
    │** └── libSegFault.so
    └── usr
        └── lib
            ├── libatk-bridge-2.0.so.0
            ├── libatspi.so.0
            ├── libgio-2.0.so.0
            ├── libglib-2.0.so.0
            ├── libgmodule-2.0.so.0
            ├── libgobject-2.0.so.0
            └── libgthread-2.0.so.0
    
    11 directories, 42 files
  5. exec binary file :
    Code:
    √ squashfs-root % file bin/kindle_browser
    bin/kindle_browser: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /usr/bin/chromium/lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=60011b78f6e48771982578609636ea71e9b714c4, stripped
    √ squashfs-root % ldd bin/kindle_browser
            not a dynamic executable


then i got a silly question than can we just pack this for other system version , like 5.16.2.1.1 ?
cause i just jailbreak my kpw5 in this version
and the binary executable file "kindle_browser" ldd result said not dynamic
and some lib file like LD_LIBRARY_PATH env variable in /usr/bin/browser bash script.

i don't want to copy and try to run it directly in my device before i got some advice in here , because some chroot word in browser script file and i'm not familiar with kindle system (just got jailbreak and thanks you guys work)

Last edited by ShdHrzn; 11-13-2023 at 02:58 AM. Reason: fix word
ShdHrzn is offline   Reply With Quote
Old 11-15-2023, 11:11 AM   #2
escalion
Junior Member
escalion began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Device: Kindle PW4
You won't be able to copy over and execute the binary as the new firmware is using a hard float ABI and the old firmware wasn't.

Last edited by escalion; 11-15-2023 at 11:14 AM.
escalion is offline   Reply With Quote
Advert
Old 11-15-2023, 01:39 PM   #3
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 chromium squash ships with a full glibc chroot though, so assuming it's set-up as intended, that's less of an issue than it could be.
NiLuJe is offline   Reply With Quote
Old 11-16-2023, 06:49 AM   #4
escalion
Junior Member
escalion began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Device: Kindle PW4
Quote:
Originally Posted by NiLuJe View Post
The chromium squash ships with a full glibc chroot though, so assuming it's set-up as intended, that's less of an issue than it could be.

True, although I'm unaware if there was a kernel update and if the old kernel had CONFIG_VFP enabled. If it does, then there shouldn't be much of a reason for it not to work, assuming it doesn't try to load any dynamic libraries from outside of the squashfs.

No harm in giving it a go.
escalion is offline   Reply With Quote
Old 11-16-2023, 02:47 PM   #5
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
I remember @knc1 shipping a hardfp chroot ages ago, so that shouldn't be an issue .
NiLuJe is offline   Reply With Quote
Advert
Old 11-16-2023, 04:09 PM   #6
Marek
Zealot
Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.
 
Marek's Avatar
 
Posts: 109
Karma: 104960
Join Date: Jul 2023
Device: PW4 :(, KT5, PB628
Quote:
Originally Posted by escalion View Post
True, although I'm unaware if there was a kernel update and if the old kernel had CONFIG_VFP enabled. If it does, then there shouldn't be much of a reason for it not to work, assuming it doesn't try to load any dynamic libraries from outside of the squashfs.

No harm in giving it a go.
Bricked my kindle while trying it, i probably did something really dumb somewhere (?) even tho to me it seemed i only mounted and symlinked a few files into a new folder i made.
Marek is offline   Reply With Quote
Old 11-17-2023, 05:14 AM   #7
escalion
Junior Member
escalion began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Device: Kindle PW4
Quote:
Originally Posted by Marek View Post
Bricked my kindle while trying it, i probably did something really dumb somewhere (?) even tho to me it seemed i only mounted and symlinked a few files into a new folder i made.
You shouldn't have had to symlink anything - just mount the squash and enable the chroot.

By symlinking you have introduced that ABI issue I spoke about.

You might be able to get into recovery from u-boot and reinstall the rootfs or undo the damage (requires some disassembly and soldering).
escalion is offline   Reply With Quote
Old 11-17-2023, 05:32 AM   #8
escalion
Junior Member
escalion began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Device: Kindle PW4
Quote:
Originally Posted by escalion View Post
You shouldn't have had to symlink anything - just mount the squash and enable the chroot.

By symlinking you have introduced that ABI issue I spoke about.

You might be able to get into recovery from u-boot and reinstall the rootfs or undo the damage (requires some disassembly and soldering).
Are you able to attach a serial cable and provide the boot logging output?
escalion is offline   Reply With Quote
Old 11-17-2023, 11:57 AM   #9
Marek
Zealot
Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.
 
Marek's Avatar
 
Posts: 109
Karma: 104960
Join Date: Jul 2023
Device: PW4 :(, KT5, PB628
Quote:
Originally Posted by escalion View Post
Are you able to attach a serial cable and provide the boot logging output?
I will need to get a soldering iron but i will see what I can do
Marek is offline   Reply With Quote
Old 11-18-2023, 05:25 AM   #10
Marek
Zealot
Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.
 
Marek's Avatar
 
Posts: 109
Karma: 104960
Join Date: Jul 2023
Device: PW4 :(, KT5, PB628
Quote:
Originally Posted by escalion View Post
Are you able to attach a serial cable and provide the boot logging output?
From the logs it seems that /sbin/init is gone
Marek is offline   Reply With Quote
Old 11-18-2023, 08:41 PM   #11
escalion
Junior Member
escalion began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Device: Kindle PW4
Quote:
Originally Posted by Marek View Post
From the logs it seems that /sbin/init is gone
That's pretty wild, what commands did you run?
Can you drop a paste in of a boot log?
escalion is offline   Reply With Quote
Old 11-26-2023, 05:58 PM   #12
Kass401
Junior Member
Kass401 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2023
Device: Kindle Paperwhite 10th Gen
So, is there any way to put the new browser onto an older firmware version, then?
Kass401 is offline   Reply With Quote
Old 12-07-2023, 10:02 PM   #13
frawang
Junior Member
frawang began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2023
Device: PW4
Quote:
Originally Posted by Marek View Post
From the logs it seems that /sbin/init is gone
so are there any ways to do jailbreak for this version
frawang is offline   Reply With Quote
Old 12-10-2023, 04:11 PM   #14
ArchGryphon9362
Junior Member
ArchGryphon9362 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: PW4 (G0016T)
Quote:
Originally Posted by Marek View Post
From the logs it seems that /sbin/init is gone
How do you even- This man just deleted System32
ArchGryphon9362 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PW3 Can run full blown Chromium browser on up-to-date Alpine Linux schuhumi Kindle Developer's Corner 58 11-18-2023 07:03 PM
Chrome/Chromium-based browsers for Android e-Ink devices qtw Android Devices 7 03-25-2020 07:59 AM
Tablet (The Chromium Projects) kjk News 0 02-01-2010 11:20 PM
Google Chromium OS Released Moejoe Lounge 10 11-22-2009 02:28 PM


All times are GMT -4. The time now is 06:24 AM.


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