At least the required set of commands a script would need are now working:
(I have added blank lines to make this a bit more readable.)
Code:
[root@kindle local]# cat /etc/prettyversion.txt
Kindle 5.3.7.3 (~~otaVersion~~)
[root@kindle local]# find . -type f -a -name '*.db' 2>/dev/null
./appreg.db
./reg/prereg.db
./reg/ServerConfig.db
./cc.db
./mesquite/store/resource/appcache/ApplicationCache.db
[root@kindle local]# echo $PATH
/mnt/us/esys/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/python/bin
[root@kindle local]# sqlite3 --version
3.21.0 2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de4alt2
root@kindle local]# sqlite3 -line cc-test.db
SQLite version 3.21.0 2017-10-24 18:55:49
Enter ".help" for usage hints.
sqlite> .header off
sqlite> .load libfixup
sqlite> SELECT * FROM Locale;
locale = en_US.utf8
sqlite> SELECT icu_load_collation('en_US.utf8', 'icu');
sqlite> SELECT p_uuid, p_location, p_thumbnail FROM Entries WHERE p_location LIKE '%KUAL-KDK-2.0.azw2';
p_uuid = 36f27e44-af05-4675-8771-ae80158e0c39
p_location = /mnt/us/documents/KUAL-KDK-2.0.azw2
p_thumbnail = /mnt/us/developer/KUAL/metadata/thumbnail.jpg
sqlite> SELECT p_location, p_thumbnail FROM Entries WHERE p_uuid IN ('36f27e44-af05-4675-8771-ae80158e0c39');
p_location = /mnt/us/documents/KUAL-KDK-2.0.azw2
p_thumbnail = /mnt/us/developer/KUAL/metadata/thumbnail.jpg
sqlite> DELETE FROM Entries WHERE p_uuid IN ('36f27e44-af05-4675-8771-ae80158e0c39');
sqlite> SELECT p_location, p_thumbnail FROM Entries WHERE p_uuid IN ('36f27e44-af05-4675-8771-ae80158e0c39');
sqlite> .quit
root@kindle local]# rm -f /mnt/us/documents/KUAL-KDK-2.0.azw2 /mnt/us/developer/KUAL/metadata/thumbnail.jpg
root@kindle local]#
Next - investigate changes (additions mostly) to the databases for the firmware versions from 5.3.7.3 (above) to 5.9.2.
Then - invent a script to handle all cases of "Can not delete the KUAL document".
Hmm - and maybe even include deleting the KUAL booklet as an option to the script.
And then - back to the new 'bridge code' (I needed a working, interactive, kSQLite3 for that project).
= = = =
WARNING:
Attached is a 'unzip to top of visible USB storage' archive of what I used above (for those who just can't wait to get rid of the KUAL thumbnail).
BUT IT WILL CONFLICT with the files from my ARMHF example (because this build is soft float, to enable it to use some of the Kindle's libraries).
I will have that conflict fixed by the time I release a script for this purpose.
Hmm...
That name should be: 01_26_2018 not 01_26_2017
I'll fix that in the final version also
Update:
I pulled the attachment, hfpop found a problem with the build.
Will repost with I get it fixed