旧 Kindle 变身动态电子墨水相框:从越狱到视频播放全攻略Turning an Old Kindle into a Dynamic E-Ink Photo Frame: Jailbreak to Video Playback Guide


AI free token/AI免费积分
旧 Kindle 变身动态电子墨水相框:从越狱到视频播放全攻略

1. 项目概述与核心思路

几年前,我手头有几个闲置的老款Kindle,型号是Kindle 4 No Touch和Kindle Keyboard 3G。它们除了吃灰,似乎没什么大用场。直到有一天,我重温《哈利·波特》,看到电影里那些会动的魔法肖像画,一个念头冒了出来:能不能用Kindle的电子墨水屏,做一个现实版的“动态肖像画”?

电子墨水屏(E-ink)和普通液晶屏(LCD/OLED)是两码事。它不是靠背光发光,而是利用微胶囊里带正负电的黑白粒子,在电场作用下上下移动来“绘制”图像。一旦画面形成,即使断电,粒子也会保持位置,图像也就一直显示着。这就带来了两个核心优势:第一,它看起来和纸一样,是反射环境光的,所以在阳光下反而更清晰,完全没有普通屏幕那种刺眼的反光或亮度不足的问题;第二,功耗极低,只在刷新画面(即粒子移动)时耗电,静态显示时几乎为零。这简直是做常亮显示设备的绝佳材料,比如一个挂在墙上、能循环播放动画的相框。

这个项目的本质,是把一个封闭的、功能单一的阅读器,变成一个开放的、可编程的Linux小电脑。Kindle底层运行的是基于Linux的定制系统,通过“越狱”(Jailbreak),我们可以获得root权限,安装第三方软件包,甚至通过SSH登录进去直接操作。我们的目标就是写一个脚本,让Kindle在开机后自动循环播放一段我们处理好的黑白动画视频。听起来复杂,但拆解开来,无非是几个关键步骤:给Kindle越狱并安装必要的工具、建立与电脑的通信渠道(SSH)、将普通视频转换成Kindle屏幕能识别的特殊格式、最后写个脚本让它自动播放。下面,我就把整个从零开始的过程,包括我踩过的所有坑和总结的技巧,毫无保留地分享出来。

2. 前期准备与设备确认

工欲善其事,必先利其器。在动手之前,有几样东西你必须准备好,并且要非常清楚自己手里的设备型号,这直接决定了后续操作的步骤和文件选择。2.1 所需材料与工具清单

首先,是硬件部分:

· Kindle电子阅读器:这是核心。经过我的测试,Kindle 4 Non-Touch (K4NT)和Kindle Keyboard 3G (K3G)是成功案例。理论上,同世代或更早的型号(如Kindle 3, Kindle 5)也可能可行,但越狱方法和细节可能有差异。注意:较新的Paperwhite、Voyage、Oasis等触摸屏型号,其系统和安全机制完全不同,本教程的方法大概率不适用。请务必使用闲置的旧款Kindle,因为越狱有变砖(无法开机)的风险。

· USB数据线:用于连接电脑,进行文件传输、充电以及后续的SSH连接。

· 电脑:一台运行macOS、Linux或Windows的电脑,用于操作。本教程的命令行操作以macOS/Linux环境为例,Windows用户可以使用WSL(Windows Subsystem for Linux)或Git Bash来获得类似的终端环境。

· 网络环境:一个可用的Wi-Fi网络,用于Kindle联网和后续的无线SSH。

其次,是软件与固件准备:

· Kindle最新固件:在越狱前,建议先将Kindle升级到官方最新固件。这能确保系统的稳定性,并且一些越狱方法对固件版本有要求。去亚马逊官网根据你的Kindle型号下载对应的.bin更新文件。

· 越狱工具包:我们需要从著名的移动阅读社区MobileRead Forum获取资源。这是整个项目的基石,所有可靠的越狱方法和工具都来自那里热心的开发者。你需要根据你的Kindle型号,找到对应的越狱文件。

· 视频处理工具:主要是ffmpeg,一个强大的音视频处理命令行工具。macOS用户可以通过Homebrew (brew install ffmpeg)安装,Linux用户用包管理器(如apt install ffmpeg或yum install ffmpeg),Windows用户可以去官网下载编译好的可执行文件。

· 代码编辑器:用于编写简单的Shell脚本,任何文本编辑器都可以,如VS Code、Sublime Text,甚至系统自带的记事本(保存时注意扩展名)。2.2 确认你的Kindle型号

这是至关重要的一步,用错了越狱文件会导致失败甚至变砖。最准确的方法是查看Kindle的序列号。

· 进入你的Kindle,点击菜单(Menu) -> 设置(Settings)。

· 再次点击菜单(Menu) -> 设备信息(Device Info)。

· 在显示的页面中,找到序列号(Serial Number)。 序列号的前几位通常标识了型号。例如:

· B00A开头很可能对应Kindle Keyboard 3G (K3)。

· B00E或900A开头可能对应Kindle 4 Non-Touch (K4NT)。

· 更稳妥的方法是,将你的序列号前几位在MobileRead论坛或通过搜索引擎查询,以确认具体型号。

记下你的型号昵称(如K3, K4NT),在后续下载文件时严格对应。我的两台设备分别是K4NT和K3G,所以下面的操作会以它们为参考,其他型号请务必查找对应教程。

3. Kindle系统越狱与基础环境搭建

拿到设备并确认型号后,我们就要开始“解放”它了。越狱的目的是突破亚马逊系统的限制,获得安装第三方软件和运行自定义脚本的能力。3.1 越狱操作详解

警告:越狱有风险,操作需谨慎。虽然变砖后可能有救砖工具(如Kubrick),但并非百分百成功。请确保你对手动操作命令行有一定了解,并严格按照步骤进行。

升级官方固件:如果Kindle不是最新系统,先升级。把从亚马逊下载的.bin文件直接拷贝到Kindle连接电脑后出现的磁盘根目录(不要放进任何文件夹)。安全弹出Kindle,在设备上进入设置 -> 菜单 -> 更新您的Kindle。等待更新完成重启。

寻找并执行越狱:

· 访问 MobileRead Forum 的 “Kindle Developer’s Corner” 板块,找到名为 “Kindle Jailbreak” 的帖子。帖子内通常会有一个根据型号分类的下载链接列表。

· 找到对应你型号的越狱包(通常是一个.bin文件)。仔细阅读该越狱包帖子一楼的所有说明!不同型号的越狱方法差异很大。

· 对于K3 (Kindle Keyboard 3G):越狱过程通常和普通系统更新一样简单。将下载的越狱.bin文件放入Kindle根目录,然后通过“更新您的Kindle”来安装。重启后即完成越狱。

· 对于K4NT (Kindle 4 Non-Touch):操作不同!K4NT的越狱可能需要一个特殊的“诊断模式”。通常步骤是:将越狱.bin文件改名为一个特定的名称(如UPDATE.bin),然后通过同时按住某些按键(如“Home”键)再开机的方式进入诊断模式进行安装。这一步必须严格遵循你下载的越狱包内的具体说明,一字一句地看。

我的踩坑记录:我第一次给K4NT越狱时,想当然地用了和K3一样的方法,直接更新,结果导致设备卡在启动画面。后来就是用了Kubrick救砖工具才恢复。所以,“确认型号,阅读说明”这八个字请刻在脑子里。救砖过程耗时耗力,且充满不确定性。

· 验证越狱成功:越狱成功后,系统本身看起来不会有任何变化。成功的标志是你可以安装接下来的两个核心软件包。3.2 安装核心软件包:MKK与KUAL

越狱只是打开了大门,我们还需要两个工具来装修房间和打开窗户。

安装MKK:MKK(MobileRead Kindle Kit)是许多Kindle第三方应用的基础依赖,可以理解为一种运行环境。下载对应你型号和固件版本的MKK安装包(同样是.bin文件)。使用“标准更新流程”(即��件放根目录,在Kindle上选择更新)进行安装。

安装KUAL:KUAL(Kindle Unified Application Launcher)是神器。它是一个启动器,安装后会在你的书籍列表里出现一个名为“KUAL”的书。点击它,就能进入一个菜单界面,运行各种扩展功能。这对于我们后续切换USB模式、管理后台任务至关重要。同样,下载KUAL的.bin文件并用标准更新流程安装。

注意事项:安装这些包时,如果反复失败,提示“更新错误”,可以尝试先将Kindle注册到你的亚马逊账户(在设置里操作),然后再进行安装。虽然文档不一定写明,但这有时是必要的验证步骤。

· 安装Helper扩展:这是一个KUAL的插件,能方便地实现一些实用功能,比如禁用屏保和阻止自动OTA更新。后者非常重要,因为亚马逊的系统更新可能会覆盖掉我们的越狱。下载Helper扩展的ZIP包,解压后,你会看到一个extensions文件夹。将整个extensions文件夹(或者里面的helper文件夹)拷贝到Kindle磁盘的根目录。这样,在KUAL里就会多出一个“Helper”的选项。

至此,你的Kindle已经从一个单纯的阅读器,变成了一个拥有应用启动器和系统管理工具的“准开发设备”。

4. 建立SSH连接与网络配置

为了能像操作服务器一样在电脑上控制Kindle,我们需要建立SSH连接。这让我们能直接执行命令、上传文件,是自动化播放的关键。4.1 安装并启用USBNetwork

SSH连接需要网络通道。我们将使用一个叫“USBNetwork”的扩展,它能让Kindle通过USB线虚拟成一个网络设备。

· 安装USBNetwork:在MobileRead论坛找到USBNetwork扩展包,通常也是一个可通过标准更新安装的.bin文件。安装后,它会在KUAL中新增一个菜单项。

· 切换USB模式:

· 在Kindle上打开KUAL,进入“USB Network”。

· 查看状态(Status),初始状态应为“usbms, sshd down”。usbms模式即USB Mass Storage,此时Kindle连接电脑是一个U盘。

· 确保Kindle没有连接电脑,然后在USB Network菜单里选择“Toggle USBNetwork”。状态应变为“usbnetwork, sshd up”。这表示Kindle现在是一个网络设备,并且SSH服务已开启。4.2 配置电脑网络并连接SSH

现在用USB线连接Kindle和电脑。此时,电脑应该不会弹出Kindle的磁盘。

对于macOS用户:

· 打开系统偏好设置 -> 网络。你会看到一个新的网络设备,名称类似“RNDIS/Ethernet Gadget”或“USB Ethernet”。

· 选中它,点击右下角**“高级”**。

· 切换到“TCP/IP”标签页。

· 将“配置IPv4”改为“手动”。

· 根据你的Kindle型号输入IP地址:

· K3 (Kindle Keyboard 3G):设置电脑的IP地址为192.168.2.1

· K4NT (Kindle 4 Non-Touch):设置电脑的IP地址为192.168.15.201

· 子网掩码保持255.255.255.0,路由器/网关留空。点击“好”并应用设置。

对于Windows/Linux用户:原理类似,需要在网络连接设置中,为识别出的这个USB网络适配器手动设置一个静态IP地址,网段与上述对应。

配置完成后,打开你的终端(Terminal)。

· 对于K3,在终端输入:ssh root@192.168.2.2

· 对于K4NT,在终端输入:ssh root@192.168.15.244

系统会询问密码。由于USBNetwork默认禁用了密码,你可以直接按回车(空密码),或者尝试输入mario。如果都不行,你可能需要根据你的Kindle序列号计算密码(在USBNetwork的发布帖里通常有计算工具或说明)。

连接成功后,你会看到类似root@kindle:~$的命令行提示符。输入eips hello并回车,如果看到屏幕左上角显示“hello”,恭喜你,SSH连接成功!4.3 配置SSH密钥与Wi-Fi连接(可选但推荐)

每次连接都要输密码很麻烦,我们可以配置SSH密钥实现免密登录。同时,通过USB连接虽然稳定,但毕竟要拖着根线。配置Wi-Fi SSH后,就可以无线操作了。

生成SSH密钥对(在电脑上操作):

# 检查是否已有密钥 ls ~/.ssh/id_rsa.pub # 如果没有,生成新的(一路回车,不设密码) ssh-keygen -t rsa

将公钥上传到Kindle:

# 将_KINDLE_IP_替换为你刚才SSH连接时用的IP,如192.168.2.2 scp ~/.ssh/id_rsa.pub root@_KINDLE_IP_:/mnt/us/usbnet/etc/authorized_keys

之后SSH连接就不再需要密码了。

启用Wi-Fi SSH:

· 在Kindle的KUAL中,先切换回usbms模式,然后断开USB线。

· 进入KUAL的USB Network扩展,翻到第二页,选择“Allow ssh over wifi”。

· 回到第一页,再次启用“Toggle USBNetwork”。

· 重新用USB线连接电脑并SSH登录(用之前的USB网络IP)。

· 在SSH会话里输入ifconfig命令,找到wlan0部分,你会看到一个类似192.168.1.xxx的IP地址。这就是Kindle在你家Wi-Fi里的地址。记下它。

· 断开USB线,现在你可以直接在终端用ssh root@192.168.1.xxx(替换成你看到的IP)通过Wi-Fi连接Kindle了,更加方便。

重要提示:Kindle的SSH服务只在设备活跃(Active)、屏保(Screen Saver)或准备休眠(Ready to Suspend)状态下运行。一旦进入深度休眠(Suspend),SSH会断开且无法连接。所以,如果连不上,先按一下Kindle的电源键唤醒它。

5. 视频播放扩展的安装与测试

环境搭好了,现在来安装能让Kindle播放视频的核心引擎。5.1 安装Video Player扩展

这个扩展由开发者geekmaster制作,包含一个视频播放器gmplay和一个示例视频。

· 在MobileRead论坛找到并下载Videos-KUAL-EXTENSION.zip。

· 将Kindle切换回usbms模式(在KUAL里操作),连接电脑。

· 解压ZIP包,把里面的Videos文件夹,整个拖到Kindle磁盘根目录下的extensions/文件夹里。(这个文件夹在安装Helper扩展时已经存在)。

· 安全弹出Kindle。

理论上,现在KUAL里会出现一个“Videos”菜单。但根据我和许多网友的经验,这个菜单按钮经常点不响。没关系,我们直接通过命令行来驱动它。5.2 通过SSH测试播放

· 将Kindle切换回usbnetwork模式,并通过SSH连接(USB或Wi-Fi均可)。

· 在SSH终端里,输入以下命令来播放示例视频:

zcat -f /mnt/us/extensions/videos/gmvid.gmv.gz | /mnt/us/extensions/videos/gmplay

· zcat -f:用于解压并输出.gz压缩文件的内容。

· |:管道符,将前一个命令的输出作为后一个命令的输入。

· gmplay:视频播放器程序。

· 如果一切正常,你应该会看到Kindle屏幕上开始播放一段示例动画(可能是一些几何图形)。播放完成后(约40秒),程序会自动退出。你也可以随时按Ctrl+C来中断播放。

成功看到动画,是里程碑式的一步!这证明你的越狱环境、SSH连接和视频播放器全部工作正常。接下来,就是制作我们自己的内容了。

6. 自制视频内容的生成与转换

Kindle的电子墨水屏刷新率低(通常1-2Hz)���且是黑白两色。因此,不是任何视频都能直接播放。我们需要将普通视频转换成它专用的.gmv.gz格式,这是一个经过高度优化的、灰度(黑白)的、特定分辨率的原始视频流格式。6.1 视频处理流程详解

我们的目标:将一段彩色视频(如MP4、GIF)转换为600x800分辨率、灰度、循环播放的.gmv.gz文件。为什么是600x800?因为大多数老款Kindle的屏幕分辨率是600x800像素,但gmplay播放器要求输入的视频原始数据是800x600(横向),它会在播放时自动旋转90度变为竖屏显示。这个细节很重要。

假设我们从一个GIF动图开始(比如我用的邓布利多办公室的GIF)。

GIF转MP4,并统一格式:

ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4

· -movflags faststart:优化MP4文件,便于网络流式播放。

· -pix_fmt yuv420p:确保颜色格式兼容性最广。

· -vf "scale=...":将视频尺寸缩放为偶数宽高(某些编码器要求)。

旋转与裁剪:我们需要一个竖屏(600x800)的视频,但原始素材可能是横屏。我们可以用ffmpeg命令行处理,但为了直观,我推荐使用在线工具如EZGif.com的“视频裁剪与调整大小”功能。上传output.mp4,将其旋转90度(取决于你的素材方向),然后精确裁剪或缩放到600像素宽,800像素高。下载处理后的视频,命名为cropped.mp4。

实操心得:在EZGif上,你可以实时预览裁剪效果,确保主体人物在画面中的位置合适。命令行虽然强大,但调整参数和预览需要反复尝试,对于不熟悉ffmpeg复杂滤镜语法的人来说,图形界面更友好。

(可选)添加边框:如果你希望视频不是全屏,而是像一幅有留白的画,可以添加白色边框。例如,在600x800的视频四周各加100像素白边,最终视频会变成800x1000,但我们最后会再缩放到播放器需要的800x600输入格式。

# 先加边框 ffmpeg -i cropped.mp4 -filter_complex "[0]pad=w=800:ih+200:x=100:y=100:color=white" bordered.mp4 # 再缩放为800x600 (注意:这里宽高是反的,因为播放器会旋转) ffmpeg -i bordered.mp4 -vf scale=800:600 final_input.mp4

关键点:gmplay需要的输入视频尺寸是800宽 x 600高。我们最终要准备一个800x600的MP4文件。而我们想要在竖屏Kindle上看到的有效画面,是这个800x600视频经旋转90度后,中间那部分600x800的区域。所以添加边框时,需要反向计算。

循环视频:为了让动画持续播放,我们需要将短视频循环多次。

ffmpeg -stream_loop 20 -i final_input.mp4 -c copy looped.mp4

-stream_loop 20表示循环20次。如果原视频5秒,循环后就是100秒。你可以根据需要调整循环次数。

常见问题:某些版本的ffmpeg对MP4文件循环支持不好。如果上述命令报错,可以先将MP4转成MKV格式再循环:

ffmpeg -i final_input.mp4 -c copy temp.mkv ffmpeg -stream_loop 20 -i temp.mkv -c copy looped.mp46.2 转换为Kindle专用格式 (.gmv)

这是最核心的一步,需要用到开发者提供的转换工具raw2gmv。

获取并编译raw2gmv:在Video Player扩展的帖子中,通常会提供一个raw2gmv.c的C语言源代码文件。下载它。

在你的电脑上,用C编译器编译它:

gcc raw2gmv.c -o raw2gmv

这会在当前目录生成一个名为raw2gmv的可执行文件(Windows下是raw2gmv.exe)。

执行最终转换:

ffmpeg -i looped.mp4 -pix_fmt gray -f rawvideo -s 800x600 - | ./raw2gmv > my_video.gmv

· -pix_fmt gray:将视频转换为灰度(黑白)。

· -f rawvideo:输出为原始的、未压缩的视频帧数据。

· -s 800x600:指定输出分辨率,必须严格是800x600。

· -:表示将输出写到标准输出(stdout)。

· | ./raw2gmv:将ffmpeg输出的原始数据,通过管道传递给raw2gmv程序进行处理。

· > my_video.gmv:将raw2gmv处理后的结果保存为.gmv文件。

命令解释:这行命令是一个经典的Unix管道操作。ffmpeg负责将MP4视频解码成一帧帧800x600的灰度原始数据流,raw2gmv则将这些数据流编码成Kindle播放器能识别的专用格式。任何一个环节分辨率不对,都会导致转换失败或播放异常。

压缩文件:为了节省Kindle上的存储空间,我们用gzip压缩一下。

gzip my_video.gmv

最终得到my_video.gmv.gz文件。这就是我们的成品。

7. 部署视频与实现自动循环播放

制作好视频文件后,我们需要把它放到Kindle上,并写一个脚本让它不停地循环播放。7.1 上传视频文件

· 将Kindle切换回usbms模式,连接电脑。

· 把制作好的my_video.gmv.gz文件(比如我的是dumbledore.gmv.gz)拷贝到Kindle磁盘的/extensions/videos/目录下。

· 或者,通过SCP命令在Wi-Fi环境下无线传输(更优雅):

scp dumbledore.gmv.gz root@192.168.1.xxx:/mnt/us/extensions/videos/(将192.168.1.xxx替换为你的Kindle Wi-Fi IP)7.2 创建循环播放脚本

手动输入长命令来播放太麻烦,我们需要一个脚本。

通过SSH连接到Kindle。

进入视频目录并创建脚本文件:

cd /mnt/us/extensions/videos vi loopvideo.sh

(也可以用nano或echo命令来创建和编辑文件)

在loopvideo.sh中输入以下内容:

#!/bin/sh # 循环播放脚本,参数为视频文件名(不含.gmv.gz后缀) while true; do zcat /mnt/us/extensions/videos/$1.gmv.gz | /mnt/us/extensions/videos/gmplay done

这个脚本是一个无限循环(while true),每次循环都解压并播放指定的视频文件。$1代表脚本的第一个参数。

给脚本添加执行权限:

chmod +x loopvideo.sh

测试脚本:在SSH中运行(例如播放名为dumbledore的视频):

./loopvideo.sh dumbledore

你应该会看到视频开始播放,播完后会自动重新开始。按Ctrl+C可以终止脚本。7.3 解决休眠问题与后台运行

Kindle为了省电,一段时间不操作后会进入深度休眠(Suspend)。在休眠状态下,所有用户进程(包括我们的播放脚本)都会被冻结。

禁用屏保/防止休眠:在Kindle设备上,打开KUAL,进入Helper扩展,选择“Prevent Screensaver”。这个选项会阻止系统进入深度休眠状态,让Kindle保持在“活跃”或“屏保”状态,从而保证脚本持续运行。注意:这会显著增加耗电。

让脚本在后台运行:我们不想一直开着SSH窗口。在SSH中,使用&符号让脚本在后台运行:

./loopvideo.sh dumbledore &

命令会立即返回,并给出一个进程ID(PID)。现在你可以关闭SSH窗口,视频会在Kindle后台循环播放。

停止后台播放:如果需要停止(比如想换一个视频),重新SSH连接到Kindle,使用pkill命令:

pkill -f loopvideo

如果pkill不工作,可以用ps aux | grep loopvideo找到进程的PID,然后用kill PID命令结束它。

至此,你的Kindle已经成为一个能够自动循环播放自定义动画的电子墨水屏相框了。把它插上电源,它就能一直工作下去。

8. 相框组装与供电优化建议

技术部分完成后,我们来让它看起来更像一个装饰品,而不是一个粘在墙上的电子设备。8.1 相框选择与内部固定

· 相框选择:选择一个深度足够的“shadow box”(深景框)或立体相框。因为Kindle本身有一定厚度,普通相框的玻璃会压到屏幕��我用的是一款宜家RIBBA 8x10英寸的框,深度刚好。

· 衬垫(Matte)改造:相框自带的衬垫开口通常不符合Kindle屏幕比例。我的做法是:

· 用一张米白色或白色的硬卡纸(建筑图纸或厚素描纸),裁成衬垫大小。

· 在卡纸中央,用美工刀精确地裁出一个比Kindle屏幕可视区域略小(比如四周各留出2-3mm边)的矩形窗口。这样装上后,Kindle的黑边会被卡纸遮住,只露出屏幕。

· 将这张自制卡纸用双面胶贴在原装衬垫上。

· 固定Kindle:这是为了美观和可维护性。既要固定牢靠,又要在需要充电或取下来时比较方便。

· 底部支撑:在相框背板底部,粘上几个有一定厚度的小方块(如乐高积木、木块、或厚海绵胶)。高度要计算好,使得Kindle放上去后,其屏幕中心能与衬垫窗口中心对齐。

· 侧面固定:不建议用胶水直接粘死Kindle。我用的是博物馆蓝丁胶,捏几小块粘在Kindle背面和相框背板之间,既能提供足够的固定力,日后取下时也不会留痕。或者,可以在衬垫背面(靠近顶部)横着贴一条魔术贴(勾面),在Kindle背面相应位置贴魔术贴(毛面),这样既能固定,也方便拆卸。

· 走线考虑:在背板底部或侧面开一个小孔,让USB充电线可以穿出来。这样相框挂上墙后,电线可以隐蔽地向下连接插座。8.2 供电方案与功耗管理

让Kindle一直播放视频,功耗比待机阅读大得多。原装电池可能只能支撑一两天。

· 长期供电方案:最稳妥的方法是使用5V 1A 或 5V 1.5A 的USB电源适配器持续供电。Kindle的充电电路设计得很好,长期插电使用没有问题。

· 电池保护考虑:如果你担心长期满电对电池寿命有影响,可以尝试一些“软”技巧。但请注意,Kindle的充电管理芯片本身就有保护机制。一个更实用的方法是:使用带定时开关的智能插座。设定每天只在你想展示的时间段(例如早上8点到晚上10点)通电,其他时间断电。这样既能省电,也能让设备休息。

· 未来优化思路(软件层面):

· 定时播放脚本:可以编写更复杂的脚本,利用Kindle的cron定时任务,只在特定时间段启动播放循环,其他时间让Kindle进入休眠。

· 低电量警告:可以写一个监控脚本,定期检查电池电量(通过解析/proc/usbs/或/sys/下的某些文件),当电量低于10%时,在屏幕上用eips命令显示一个警告文字,然后安全地停止播放并关机。

· 开机自启:最理想的是让loopvideo.sh脚本在Kindle启动时自动运行。对于较新系统,可以放在/etc/upstart/目录下。但对于K3/K4,这个目录可能不存在。可以研究使用Kite(另一个Kindle后台服务管理器)或修改系统初始化脚本来实现,但这需要更深入的探索,也有更高风险。

这个项目最大的乐趣,在于将一件即将被淘汰的电子产品,通过软件和创意,赋予了全新的生命和艺术价值。看着邓布利多在电子墨水屏里静静地、循环地动着,那种魔法照进现实的感觉,正是DIY精神的精髓。希望这份超详细的指南,能帮你绕过我踩过的所有坑,顺利创造出属于你自己的“魔法肖像”。

本文来源:http://www.mfbz.cn/news/625027
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

A few years ago, I had a couple of idle older Kindles, the Kindle 4 No Touch and the Kindle Keyboard 3G. They didn't seem to be very useful except for eating ash. Until one day, I revisited Harry Potter and saw those moving magical portraits in the film, and a thought came up: Can I use the Kindle's electronic ink screen to make a realistic "dynamic portrait"?

E-ink and LCD/OLED are two different things. Instead of glowing from the backlight, it uses black and white particles with positive and negative electricity in the microcapsule to move up and down under the action of the electric field to "draw" the image. Once the picture is formed, even if the power is turned off, the particles will remain in position, and the image will always be displayed. This brings two core advantages: first, it looks like paper and reflects ambient light, so it is clearer in sunlight, and there is no problem of dazzling reflection or insufficient brightness of ordinary screens; second, the power consumption is extremely low, it only consumes power when refreshing the screen (that is, the particles move), and it is almost zero when it is displayed statically. It's a great material for steady-light displays, like a photo frame that hangs on a wall and loops through animations.

The essence of this project is to turn a closed, single-function reader into an open, programmable Linux computer. The underlying Kindle runs a custom Linux-based system, and through Jailbreak, we can get root privileges, install third-party packages, and even log in directly through SSH. Our goal is to write a script that lets the Kindle automatically cycle through a black-and-white animated video that we've processed after booting up. Sounds complicated, but disassembling it is just a few key steps: jailbreaking the Kindle and installing the necessary tools, establishing a communication channel with the computer (SSH), converting ordinary video into a special format that the Kindle screen can recognize, and finally writing a script for it to play automatically. Next, I will share the whole process from scratch, including all the pits I have stepped on and the techniques of summary, without reservation.

Workers who want to do good deeds must first benefit from their tools. Before you get started, there are a few things you have to be prepared for and be very clear about the device model in your hand, which directly determines the steps and file selection for the next steps. 2.1 List of materials and tools required

First, the hardware part:

· Kindle e-reader: This is the core. After my testing, the Kindle 4 Non-Touch (K4NT) and Kindle Keyboard 3G (K3G) are success stories. In theory, models of the same generation or earlier (e.g. Kindle 3, Kindle 5) may also work, but jailbreak methods and details may differ. Note: Newer touchscreen models such as Paperwhite, Voyage, Oasis, etc., have completely different systems and security mechanisms, and there is a high probability that the methods in this tutorial do not apply. Be sure to use an old Kindle that is not available, as there is a risk of jailbreaking (no boot).

· USB cable: Used to connect the computer for file transfer, charging, and subsequent SSH connections.

· Computer: A computer running macOS, Linux, or Windows for operation. This tutorial takes the macOS/Linux environment as an example, and Windows users can use WSL (Windows Subsystem for Linux) or Git Bash to get a similar terminal environment.

· Network environment: An available Wi-Fi network for Kindle networking and subsequent wireless SSH.

Second, software and firmware preparation:

· Latest firmware for Kindle: It is recommended to upgrade your Kindle to the latest official firmware before jailbreaking. This ensures system stability and some jailbreaking methods require firmware versions. Go to the Amazon website to download the corresponding .bin update file according to your Kindle model.

· Jailbreak Toolkit: We need resources from the famous MobileRead Forum, a mobile reading community. This is the cornerstone of the entire project, and all reliable jailbreak methods and tools come from enthusiastic developers there. Depending on your Kindle model, you'll need to find the appropriate jailbreak document.

· Video processing tools: Mainly ffmpeg, a powerful audio and video processing command-line tool. macOS users can install through Homebrew (brew install ffmpeg), Linux users can use a package manager (such as apt install ffmpeg or yum install ffmpeg), Windows users can go to the official website to download the compiled executable file.

· Code Editor: Used to write simple shell scripts, any text editor can be used, such as VS Code, Sublime Text, or even the system's own notepad (pay attention to the extension when saving). 2.2 Confirm your Kindle model

This is a crucial step, and using the wrong jailbreak file can lead to failure and even bricking. The most accurate way to do this is to look at your Kindle's serial number.

· Go to your Kindle and click Menu - > Settings.

· Tap Menu - > Device Info again.

· On the displayed page, locate the Serial Number. The first few digits of the serial number usually identify the model. For example:

· The beginning of the B00A most likely corresponds to the Kindle Keyboard 3G (K3).

· The beginning of the B00E or 900A may correspond to the Kindle 4 Non-Touch (K4NT).

· It is safer to include the first few digits of your serial number in the MobileRead forums or through search engines to confirm the specific model.

Write down your model nickname (such as K3, K4NT), and strictly correspond to it when downloading files later. My two devices are K4NT and K3G, so the following operations will refer to them, please be sure to find the corresponding tutorials for other models.

Once we have the device and confirm the model, we will begin to “liberate” it. The purpose of jailbreaking is to break through the limitations of Amazon's systems and gain the ability to install third-party software and run custom scripts. 3.1 Details of jailbreaking operations

Warning: Jailbreak is risky and should be handled with caution. Although there may be brick-saving tools (such as Kubrick) after changing bricks, it is not 100% successful. Make sure you have a good understanding of the manual command line and follow the steps strictly.

Upgrade official firmware: If your Kindle isn't up to date, upgrade first. Copy the .bin file downloaded from Amazon directly to the root directory of the disk that appears after the Kindle is connected to the computer (do not put it in any folder). Safely pop up your Kindle and go to Settings - > Menus - > Update your Kindle on your device. Wait for the update to finish restarting.

Find and execute a jailbreak:

· Visit the Kindle Developer's Corner section of the MobileRead Forum and find the post called "Kindle Jailbreak". Posts usually have a list of download links categorized by model.

· Locate the jailbreak bag corresponding to your model (usually a .bin file). Read through all the instructions on the first floor of this Jailbreak Pack post! Different models of jailbreak methods vary greatly.

· For K3 (Kindle Keyboard 3G): The jailbreak process is usually as simple as a regular system update. Place the downloaded jailbreak .bin file in the Kindle root directory and install it via Update your Kindle. Reboot to complete the jailbreak.

· For K4NT (Kindle 4 Non-Touch): The operation is different! Jailbreaking for K4NT may require a special 'diagnostic mode'. The usual steps are: rename the jailbroken .bin file to a specific name (such as UPDATE.bin), and then enter diagnostic mode for installation by simultaneously holding down certain buttons (such as the “Home” button) before powering on. This step must strictly follow the specific instructions in the jailbreak kit you downloaded, word for word.

My crash record: The first time I gave K4NT a jailbreak, I took it for granted to use the same method as K3, and directly updated it, resulting in the device stuck on the startup screen. It was later restored using the Kubrick brick-saving tool. Therefore, the eight words "confirm the model, read the instructions" should be engraved in your mind. The brick rescue process is time-consuming, labor-intensive, and fraught with uncertainty.

· Verify jailbreak success: The system itself does not appear to change after a successful jailbreak. The mark of success is that you can install the next two core packages. 3.2 Install the core packages: MKK and Kual

The escape just opens the door and we need two more tools to decorate the room and open the windows.

Installing MKK: The MKK (MobileRead Kindle Kit) is a fundamental dependency of many Kindle third-party apps and can be understood as a runtime environment. Download the MKK installation package (also a .bin file) for your model and firmware version. Install using the Standard Update Process (i.e. root of the widget, select Update on Kindle).

Install Kual: Kual (Kindle Unified Application Launcher) is an artifact. It is a launcher and when installed a book named "Kual" will appear in your books list. Clicking on it will bring you to a menu interface where you can run various extensions. This is crucial for us to continue switching USB modes and managing background tasks. Similarly, download Kual's .bin file and install it using the standard update process.

Note: When installing these packages, if you repeatedly fail, prompting "Update error", you can try to register the Kindle to your Amazon account (in the settings) before installing. While not necessarily documented, this is sometimes a necessary verification step.

· Installing the Helper Extension: This is a plugin for Kual that makes it easy to implement useful features such as disabling screensavers and blocking automatic OTA updates. The latter is important because Amazon's system updates could override our jailbreaks. Download the zip package of the Helper extension, and after unzipping, you will see an extensions folder. Copy the entire extensions folder (or the helper folder inside) to the root of your Kindle disk. This will result in an additional “Helper” option in Kual.

So far, your Kindle has gone from a simple reader to a “quasi-development device” with an app launcher and system management tools.

In order to be able to control the Kindle on the computer like a working server, we need to establish an SSH connection. This allows us to execute commands directly, upload files and is the key to automated playback. 4.1 Install and enable USBNetwork

An SSH connection requires a network channel. We will use an extension called “USBNetwork” that allows the Kindle to be virtualized as a network device over a USB cable.

· Install USBNetwork: Locate the USBNetwork expansion package in the MobileRead forum, which is also a .bin file that can usually be installed with a standard update. Once installed, it adds a menu item in Kual.

· Switch USB mode:

· Open Kual on your Kindle and go to “USB Network”.

· Check the status (Status), the initial status should be "usbms, sshd down". The usbms mode is USB Mass Storage, and the Kindle connection computer is a USB drive.

· Make sure that the Kindle is not connected to the computer, then select "Toggle USBNetwork" from the USB Network menu. The state should change to "usbnetwork, sshd up". This means that the Kindle is now a network device and the SSH service is on. 4.2 Configure the computer network and connect to SSH

Now connect your Kindle to your computer with a USB cable. At this point, the computer should not eject the Kindle's disk.

For macOS users:

· Open System Preferences - > Network. You will see a new network device with a name similar to "RNDIS/Ethernet Gadget" or "USB Ethernet".

· Select it and click * * Advanced * * in the bottom right corner.

· Switch to the TCP/IP tab.

· Change "Configure IPv4" to "Manual".

· Enter an IP address based on your Kindle model:

· K3 (Kindle Keyboard 3G): Set the IP address of the computer to 192.168.2.1

· K4NT (Kindle 4 Non-Touch): Set the IP address of the computer to 192.168.15.201

· The subnet mask remains at 255.255.255.0 and the router/gateway is left blank. Click OK and apply the settings.

For Windows/Linux users: The principle is similar, you need to manually set a static IP address for the identified USB network adapter in the network connection settings, and the network segment corresponds to the above.

Once the configuration is complete, open your Terminal.

· For K3, enter in terminal: ssh root @ 192.168.2.2

· For K4NT, enter in terminal: ssh root @ 192.168.15.244

The password will be asked. Since USBNetwork disables passwords by default, you can press Enter (blank password) directly, or try entering mario. If not, you may need to calculate the password based on your Kindle serial number (there are usually calculation tools or instructions in the USBNetwork post).

After the connection is successful, you will see a command line prompt like root @ kindle: ~ $. Enter eips hello and enter the car. If you see "hello" in the upper left corner of the screen, congratulations, SSH connection is successful! 4.3 Configure the SSH key to connect to Wi-Fi (optional but recommended)

It is cumbersome to enter the password every time you connect, we can configure the SSH key to achieve password-free login. At the same time, although the connection through USB is stable, it is necessary to drag the root cable after all. Once the Wi-Fi SSH is configured, it can be operated wirelessly.

Generate SSH key pair (on computer):

# Check if the key ls ~/.ssh/id_rsa.pub already exists # If not, generate a new (return all the way, no password) ssh-keygen -t rsa

Upload public key to Kindle:

# Replace_Kindle_IP_with the IP you just used for SSH connection, such as 192.168.2.2 scp ~/.ssh/id_rsa.pub root @_Kindle_IP_:/mnt/us/usbnet/etc/authorized_keys

After that, the password is no longer required for SSH connections.

To enable Wi-Fi SSH:

· In Kindle Kual, switch back to usbms mode and disconnect the USB cable.

· Go to Kual's USB Network extension, turn to the second page and select "Allow ssh over wifi".

· Go back to the first page and enable Toggle USBNetwork again.

· Reconnect the computer with the USB cable and log in with SSH (using the previous USB network IP).

· Enter the ifconfig command in the SSH session, find the wlan0 section, and you will see an IP address similar to 192.168.1.xxx. This is the address of the Kindle on your home Wi-Fi. Write it down.

· Disconnect the USB cable, and now you can connect the Kindle via Wi-Fi directly at the terminal with ssh root@192.168.1.xxx (replaced with the IP you see), which is more convenient.

Important: The Kindle's SSH service only runs when the device is Active, Screen Saver, or Ready to Suspend. Once in Suspend, SSH is disconnected and unable to connect. So if you can't connect, press the power button on your Kindle to wake it up first.

The environment is set up, now install the core engine that allows the Kindle to play videos. 5.1 Install the Video Player extension

This extension is made by the developer geekmaster and contains a video player gmplay and a sample video.

· Locate and download Videos-KUAL-EXTENSION.zip on the MobileRead forum.

· Switch the Kindle back to usbms mode (operating in Kual) and connect the computer.

· Unzip the zip package and drag the Videos folder inside it to the extensions/folder under the root of the Kindle disk. (This folder already exists when the Helper extension is installed).

· Safely eject the Kindle.

Theoretically, a “Videos” menu will now appear in Kual. But in my experience and the experience of many netizens, this menu button often does not click. It doesn't matter, we drive it directly through the command line. 5.2 Playing through SSH tests

· Switch the Kindle back to usbnetwork mode and connect via SSH (either USB or Wi-Fi).

· In the SSH terminal, enter the following command to play the sample video:

zcat -f /mnt/us/extensions/videos/gmvid.gmv.gz | /mnt/us/extensions/videos/gmplay

· zcat -f: Used to extract and output the contents of the .gz compressed file.

Turning an Old Kindle into a Dynamic E-Ink Photo Frame: Jailbreak to Video Playback Guide

· |: A pipe character that takes the output of the previous command as the input to the next command.

· gmplay: video player program.

· If all goes well, you should see a sample animation (possibly some geometry) start playing on your Kindle screen. After the playback is completed (about 40 seconds), the program will automatically exit. You can also press Ctrl + C at any time to interrupt playback.

Successfully seeing the animation is a milestone step! This proves that your jailbreak environment, SSH connection, and video player are all working properly. The next step is to create our own content.

The Kindle's electronic ink screen has a low refresh rate (usually 1-2Hz) and is black and white. As a result, not all videos can be played directly. We need to convert normal video to its dedicated .gmv.gz format, which is a highly optimized, grayscale (black and white), resolution-specific raw video streaming format. 6.1 Video Processing Flow Details

Our goal: to convert a color video (e.g. MP4, GIF) to a 600x800 resolution, grayscale, looping .gmv.gz file. Why 600x800? Because most older Kindles have a screen resolution of 600x800 pixels, but the gmplay player requires the input video raw data to be 800x600 (landscape), which automatically rotates 90 degrees to portrait display when playing. This detail is important.

Let's say we start with a GIF (like my GIF from Dumbledore's office).

GIF to MP4 and unified format:

ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4

· -movflags faststart: Optimizes MP4 files for web streaming.

· -pix_fmt yuv420p: ensures maximum color format compatibility.

· -vf "scale =...": Scales the video size to an even width and height (required by some encoders).

Rotate and crop: We need a portrait (600x800) video, but the original footage may be landscape. We can do it with the ffmpeg command line, but for intuition, I recommend using online tools such as EZGif.com's “Video Crop and Resize” feature. Upload output.mp4, rotate it 90 degrees (depending on your element orientation) and precisely crop or scale it to 600px wide and 800px high. Download the processed video and name it cropped.mp4.

What you need to know: On EZGif, you can preview the cropping effect in real time to ensure that the main character is in the right position in the picture. The command line is powerful, but tweaking parameters and previews requires repeated attempts, and the graphical interface is more friendly for those unfamiliar with the complex filter syntax of ffmpeg.

(Optional) Add a border: If you want your video to be not full screen, but like a picture with a blank space, you can add a white border. For example, if you add 100 pixels of white edge around a 600x800 video, the final video will become 800x1000, but we will finally zoom to the 800x600 input format required by the player.

# Border first ffmpeg -i cropped.mp4 -filter_complex "[0] pad = w = 800: ih +200: x = 100: y = 100: color = white" bordered.mp4 # Scale to 800x600 (Note: width and height are reversed here because the player will rotate) ffmpeg -i bordered.mp4 -vf scale = 800: 600 final_input.mp4

Key Point: The input video size required for gmplay is 800 W x 600 H. We end up with an 800x600 MP4 file. And the effective image we want to see on the portrait Kindle is the 600x800 area in the middle of this 800x600 video after rotating 90 degrees. So when you add a border, you need to calculate in reverse.

Loop Video: In order for the animation to continue playing, we need to loop the short video multiple times.

ffmpeg -stream_loop 20 -i final_input.mp4 -c copy looped.mp4

-stream_loop 20 means 20 cycles. If the original video is 5 seconds, the loop is 100 seconds. You can adjust the number of cycles as needed.

Frequently Asked Questions: Some versions of ffmpeg do not support MP4 file looping well. If the above command reports an error, you can first convert MP4 to MKV format and recirculate:

ffmpeg -i final_input.mp4 -c copy temp.mkv ffmpeg -stream_loop 20 -i temp.mkv -c copy looped.mp46.2 Convert to Kindle proprietary format (.gmv)

This is the core step and requires the raw2gmv conversion tool provided by the developer.

Get and compile raw2gmv: In a Video Player extension post, a C source code file for raw2gmv.c is usually provided. Download it.

On your computer, compile it with the C compiler:

gcc raw2gmv.c -o raw2gmv

This generates an executable named raw2gmv in the current directory (raw2gmv.exe under Windows).

Perform final conversion:

ffmpeg -i looped.mp4 -pix_fmt gray -f rawvideo -s 800x600 - | ./raw2gmv > my_video.gmv

· -pix_fmt gray: Converts video to grayscale (black and white).

· -f rawvideo: Outputs raw, uncompressed video frame data.

· -s 800x600: Specifies the output resolution, which must be exactly 800x600.

· -: Indicates that the output is written to standard output (stdout).

· |./raw2gmv: The raw data output by ffmpeg is piped to the raw2gmv program for processing.

· > my_video.gmv: Save the raw2gmv processed results as a .gmv file.

Command Explanation: This line of commands is a classic Unix pipeline operation. ffmpeg is responsible for decoding MP4 videos into a frame of 800x600 grayscale raw data streams, which raw2gmv encodes into a proprietary format recognized by the Kindle player. Incorrect resolution of any link can result in conversion failures or abnormal playback.

Compressed files: To save storage space on the Kindle, let's compress it with gzip.

gzip my_video.gmv

The final result is the my_video.gmv.gz file. This is our finished product.

Once the video file is created, we need to put it on the Kindle and write a script to keep it looping. 7.1 Upload the video file

· Switch the Kindle back to usbms mode and connect the computer.

· Copy the created my_video.gmv.gz file (for example, mine is dumbledore.gmv.gz) to the/extensions/videos/directory on the Kindle disk.

· Alternatively, wireless transmission over Wi-Fi via SCP commands (more elegant):

scp dumbledore.gmv.gz root@192.168.1.xxx:/mnt/us/extensions/videos/(replace 192.168.1.xxx with your Kindle Wi-Fi IP) 7.2 Create a looping playback script

Entering long commands manually to play is too cumbersome, we need a script.

Connect to your Kindle via SSH.

Go to the video directory and create a script file:

cd /mnt/us/extensions/videos vi loopvideo.sh

(You can also create and edit files with nano or echo commands)

Enter the following in loopvideo.sh:

#!/bin/sh # Loop playback script with video file name (without .gmv.gz suffix) while true; do zcat/mnt/us/extensions/videos/$ 1.gmv.gz |/mnt/us/extensions/videos/gmplay done

This script is an infinite loop (while true) that unzips and plays the specified video file each time. $1 represents the first argument of the script.

To add execute permissions to a script:

chmod +x loopvideo.sh

Test script: run in SSH (e.g. play a video named dumbledore):

./loopvideo.sh dumbledore

You should see the video start to play and automatically restart when it's done. Press Ctrl + C to terminate the script. 7.3 Troubleshooting hibernation issues and running in the background

In order to save power, the Kindle will enter deep sleep (Suspend) after a period of inactivity. In hibernation, all user processes, including our playback scripts, are frozen.

Disable Screensaver/Prevent Hibernation: On your Kindle device, open Kual, enter the Helper extension, and select Prevent Screensaver. This option prevents the system from going into deep hibernation and keeps the Kindle "active" or "screensaver" to keep the script running. Note: This can significantly increase power consumption.

Let the script run in the background: We don't want to keep the SSH window open all the time. In SSH, use the & symbol to run the script in the background:

./loopvideo.sh dumbledore &

The command returns immediately and gives a process ID (PID). Now you can close the SSH window and the video will loop in the Kindle background.

Stop background playback: If you need to stop (for example, if you want to change a video), reconnect SSH to the Kindle, use the pkill command:

pkill -f loopvideo

If pkill does not work, you can use ps aux | grep loopvideo to find the PID of the process and end it with the kill PID command.

At this point, your Kindle has become an electronic ink screen frame that can automatically cycle through custom animations. Plug it in and it will work all the time.

When the technical part is done, let's make it look more like an ornament than an electronic device glued to the wall. 8.1 Photo Frame Selection with Interior Fixation

· Frame selection: Choose a sufficiently deep “shadow box” or stereoscopic frame. Because the Kindle itself has a certain thickness, the glass of the ordinary photo frame will be pressed to the screen. I use an IKEA Ribba 8x10 inch frame with just the right depth.

· Matte retrofit: Frames often come with padded openings that are not proportional to the Kindle screen. My approach is to:

· Cut a piece of hard cardstock (architectural drawings or thick sketch paper) in off-white or white to size the liner.

· In the center of the paper jam, use an art knife to precisely cut out a rectangular window that is slightly smaller than the viewing area of the Kindle screen (for example, 2-3mm sides on each side). When fitted this way, the black edge of the Kindle is obscured by the jam and only reveals the screen.

· Apply this homemade cardstock double-sided adhesive to the original liner.

· Fixed Kindle: This is for aesthetics and maintainability. Both securely and conveniently when charging or removing is required.

· Bottom support: At the bottom of the frame back plate, glue a few small squares with a certain thickness (such as Lego bricks, wooden blocks, or thick sponge glue). Calculate the height so that the center of the screen is aligned with the center of the padded window when the Kindle is placed.

· Side fixation: Direct gluing of the Kindle is not recommended. I use museum lantern glue and pinch a few small pieces between the back of the Kindle and the back of the photo frame to provide enough fastening force and no marks when removed later. Alternatively, a velcro sticker (hook) can be placed horizontally on the back of the pad (near the top), and a velcro sticker (fur) can be placed in the corresponding position on the back of the Kindle, which is both fixed and easy to remove.

· Cabling considerations: Make a small hole in the bottom or side of the backplane so that the USB charging cable can be worn out. In this way, after the frame is hung on the wall, the wires can be concealed down to the socket. 8.2 Power supply scheme and power consumption management

Let the Kindle play video all the time, consuming much more power than standby reading. The original battery may only last for a day or two.

· Long-term power supply plan: The most secure method is to use a 5V 1A or 5V 1.5A USB power adapter for continuous power supply. The charging circuit of the Kindle is well designed, and there is no problem with long-term plug-in use.

· Battery protection considerations: If you are concerned about the impact of prolonged full charge on battery life, try some “soft” tricks. Note, however, that the Kindle's charging management chip itself has a protective mechanism. A more practical approach is to use a smart socket with a timing switch. Set the power on for the time of day you want to show (for example, 8am to 10pm) and power off for the rest of the day. This saves power and allows the device to rest.

· Future optimization ideas (software level):

· Scheduled playback scripts: You can write more complex scripts, use the Kindle's cron timing task to start the playback loop only for a certain period of time, and let the Kindle go to sleep at other times.

· Low Battery Warning: It is possible to write a monitoring script that periodically checks the battery level (by parsing some files under/proc/usbs/or/sys/), displays a warning text on the screen with an eips command when the battery level is below 10%, and then safely stops playing and shuts down.

· Autostart: Ideally, let the loopvideo.sh script run automatically when the Kindle starts. For newer systems, you can place them in the/etc/upstart/directory. But for K3/K4, this directory may not exist. You can study using Kite (another Kindle background service manager) or modify the system initialization script to do so, but this requires more in-depth exploration and is also more risky.

The greatest joy of this project is to give new life and artistic value to an electronic product that is about to be eliminated through software and creativity. Watching Dumbledore quietly and cyclically move in the electronic ink screen, that sense of magic reflected in reality was the essence of the DIY spirit. I hope that this super detailed guide will help you bypass all the pits I have stepped on and create your own "magic portrait".

This article is from: http://www.mfbz.cn/news/625027 For copyright issues, please write to: 13951431913#139.com or submit a review on the right.

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry