Fix stale jar in /opt breaking KUAL install after factory reset - #12
Open
cakirefekan wants to merge 1 commit into
Open
Fix stale jar in /opt breaking KUAL install after factory reset#12cakirefekan wants to merge 1 commit into
cakirefekan wants to merge 1 commit into
Conversation
Fixes KindleTweaks#11 ## Problem `KUAL.sh` decides whether to install based solely on whether `/opt/amazon/ebook/booklet/KUALBooklet.jar` exists. A factory reset wipes `appreg.db` but does not remove this jar (it lives in the rootfs overlay), so after a factory reset + re-jailbreak, KUAL is left in a broken state: jar present, no registry entry, and no way to trigger reinstall since the source jar in `documents/` gets deleted unconditionally either way. ## Fix Extend the install check to also verify the `appreg.db` registration exists, not just the jar file: ```sh if [ ! -f /opt/amazon/ebook/booklet/KUALBooklet.jar ] || [ "$(sqlite3 /var/local/appreg.db "SELECT COUNT(*) FROM handlerIds WHERE handlerId='com.mobileread.ixtab.kindlelauncher';" 2>/dev/null)" != "1" ]; then ``` One-line change, everything else untouched. ## Tested - Fresh install (no jar, no registry entry) — installs and launches correctly, same as before - Stale jar + wiped registry (the actual bug, reproduced without a real factory reset) — now correctly reinstalls and launches - Already installed (jar + registry both present) — correctly skips install and launches directly, no unnecessary writes
Contributor
|
I have a suspicion this is LLM generated due to use of em-dash but LGTM. I'll double check on desktop and then merge. |
|
@cakirefekan you are the goat! i had this problem after factory reset and re-jailbreak could not install kual again. |
|
Thanks a lot , i had the same issue. |
Fdiaz96
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11
Problem
KUAL.shdecides whether to install based solely on whether/opt/amazon/ebook/booklet/KUALBooklet.jarexists. A factory reset wipesappreg.dbbut does not remove this jar (it lives in the rootfs overlay), so after a factory reset + re-jailbreak, KUAL is left in a broken state: jar present, no registry entry, and no way to trigger reinstall since the source jar indocuments/gets deleted unconditionally either way.Fix
Extend the install check to also verify the
appreg.dbregistration exists, not just the jar file:One-line change, everything else untouched.
Tested