Just from a theoric point, I wonder if this would solve the problem without need of special actions taken by the customer
You need to build 2 apps (a nearly-empty transition one, and the "normal"one)
First app, "A": still with the not all lowercased package name. The "nearly empty" one. Will be needed only for the transition and will only perform only some actions
Second app "B": the fully functional app already with the lowercased package name, which has the normal functionality (plus a transition routine '*')
User downloads "A", as a regular upgrade of the existing app.
Once "A" is installed and launched, this new version will perform the following operations
Make (if it does not exist yet) a copy of the database to an external safe "backup" folder (it will have access to the working directory)
Once this is done and checked, app "A" downloads and installs the new all-lowercased package "B" (with the needed permissions)
Once done, "a" launches the new one "B" and finishes itself
The new app "B" (the fully working lowercase name app) does a first check at start.
If the old app (not lowercased) exists, uninstalls it (permissions)
Only if the database does not exist in the working directory and can be found in the "backup" directory, copy it, check everything is correct, and delete the backup
Then work normally
Possibly I am missing something, that's why I just wonder if it could be.