Debugging SqLite databases

Ok this is a subject i want to face because more often than not, i get errors that doesn’t happens in web, but it does in device related to the database, we need a way to debug the SqLite databases “generated” by the Cordova SqLitePlugin.

So far the only 2 methods i have found is either create a hidden form in your app that accepts a query string and params, then execute that query and show the result to the screen, or Rooting the device to gain access to the SqLite db file created by the plugin, downloading it to pc and debugging the file there, or querying directly to that file through an adb shell.

I consider the first approach a big security flaw since we would have to use some type of password big enough to resist brute force attacks for a century or 2.

The second one can’t be standardised since the device rooting process change from device to device, and from Android version to version, as well as with security patches to the Android software.

Also if you happen to need to unroot the device, the process might be as complex as the rooting process.

What’s your opinion of this matter?