[bug] SQLite fails when -journal
file is 0 bytes
#554
Labels
freshissue
Default label for new, untriaged issues.
-journal
file is 0 bytes
#554
Describe the bug
When trying to view or edit SQLite databases within the Android system, I was getting error messages. A temporary fix is described below.
To Reproduce
Steps to reproduce the behavior:
objection -g com.android.phone explore
sqlite connect /data/user/0/com.android.providers.telephony/databases/mmssms.db
Expected behavior
When there's a
mmssms.db-journal
or other-journal
file on the target but it is 0 bytes, instead of copying 0 bytes (invalid size) from the target to the host, the file should either be ignored or an empty file should be created on the host.Evidence / Logs / Screenshots
I changed the
agent.js
script to print the file size inreadFileSync
. As you can see, for themmssms.db
the file size is 118784 bytes, but for the-journal
, it is 0 bytes.The issue can be fixed by patching
commands/sqlite.py
and removing the lines that request the-journal
file. However, I don't know how important the role of the-journal
file is, so just removing this seems a bad fix to me. Should a 0 byte-journal
file still be created or can it be ignored?The text was updated successfully, but these errors were encountered: