Thank you for your help with this. On the bright side you can now use Joplin on your phone again without issues.
There is another way that the test can be done again from a slightly different angle, if you're happy to install some other custom apks. I won't send you uninstalling and reinstalling Joplin again as I know that is a pain. I've created 2 modified apks from Joplin 3.2.6, both of which I have given different package names (so they can be installed in parallel with official Joplin) and different app names, so they can be distinguished from each other in the app drawer.
JoplinHack (uses device sqlite): Release 1736794968 ยท mrjo118/joplin ยท GitHub
JoplinHackBundled (uses bundled sqlite): Release 1736795176 ยท mrjo118/joplin ยท GitHub
The code changes deviating from the dev branch can be viewed by clicking the hash next to the green tick on each release
If you install both of those on your device, then open the top note from the default notebook, the result will determine whether the cursor size is / is not set correctly. Basically both apps set the CursorWindow size to 1kb via the 'workaround' code, so if the limit is being enforced, it should hit an error. When this is the case, opening the note will open a white screen only, without the note contents. And if you go to Settings, Tools, Logs, you will see the CursorWindow error in the logs.
Additionally, can you attempt to import the following jex file on both apps and then attempt to open the 'Over 4mb note', and report back on the results (note that as it is a very big note, please allow up to 5 minutes for the note to render - if it still does not render by then, then just check the log if there are any errors):
big.jex (4.7 MB)
I limited the note to 4.8mb because it is already very slow to open on Android, and importing a 50mb note literally crashes Joplin, even on desktop
Further analysis:
So what I discovered is that when using the bundled sqlite binary of the react-native-sqlite-storage library, the 'workaround' which was implemented by the Joplin devs does not actually work. I think the reason for that is because the CursorWindow limit is something specific to the Android implementation of sqlite, so the react native implementation I suspect does not enforce any limit at all, hence why it appeared to work previously when I switched to the bundled version and tested syncing a 4.8mb note with this implementation, and there was no error. That would make sense because there is no such limitation with sqlite on Windows, Linux, Mac or IOS.
The workaround which was implemented is targeted to change the CursorWindow limit for the Android implementation only, and I still suspect the cause of the issue is that certain phones do not make use of the overridden class, to determine the limit to use.
I made these conclusions from the following results when testing on an Android 15 emulator:
JoplinHack - note fails to open due to CursorWindow error. When importing big.jex, opening the 'Over 4mb note' fails
JoplinHackBundled - note opens successfully with no error. When importing big.jex, opening the 'Over 4mb note' works successfully
@t0dd To confirm my theory is correct, the default welcome notes will open without error in both apps, while opening the big note imported via big.jex will fail on JoplinHack (due to override being ignored, but system limit being under 4mb) and succeed on JoplinHackBundled