SQLite Forum

Why WAL file (-wal) may disappear?
One test I can think of is to have your App close the SQLite database at some point in the procedure and reopen it again.  Does this make the WAL file magically appear ?  This is just for diagnostic purposes, to investigate the problem.  You should not need to do this in production code.

Another test would be to run your test code on a desktop computer, rather than the Android hardware.  Do you get the same behaviour ?

A recent question to this forum about the Android platform leads me to believe that Android does some sort of internal caching, and doesn't show files on disk until they get big (and the cache busts) or they are closed.

The person who started that thread was unable to reproduce their problem on their computer: on computer the WAL and shm files showed up when expected.  On Android they were sometimes visible and sometimes not visible.

The App running SQLite ran correctly until the App was killed, accessing the data correctly.  It's just that a directory listing didn't show any actual file.  It caused a problem only when the SQLite App was terminated by lost power, or by being killed by the operating system.  If the Android App was allowed to quit normally, the WAL file appeared at that time.

Since you are using a smart terminal and not a mobile phone, perhaps you won't have a problem with this.  Your users are less likely to run out of power.