Workaround for Application Database is Full error 38
This tip should work on any devices running webOS 2.0 and higher
If you have been a victim of the "Application database is full" error on your webOS device, you know what a devastating issue this can be. If you have not seen this error, consider yourself lucky. The "application database" that is referenced here is not the USB drive on your device, but rather the internal database that was introduced in webOS 2.0 that manages a lot of data on your device. And if it gets full, there is no place to store any more data. You may get some advance warnings that will tell you to try deleting calendar entries, reducing the number of emails you save and even trying remove music, movies or documents from your USB drive, but most likely none of that will work and you will eventually be alerted that the database is full and you need to restart your device. And unfortunately, it doesn't make it clear that it will essentially perform an "erase apps and data" and log you out of your profile, requiring you to reactivate your device and log back in, also losing your application data and settings. And to add insult to injury, you may log back in to your profile and still get that error once you activate it again.
Although there is no official fix from Palm/HP on this, you can always count on the homebrew community to get your back. In this case, it's Donald Kirker, webOS developer and former Intern for both HP and Palm. The problem stems from the fact that the internal partition that the database is saved to is only 135 MB big so it doesn't take a lot of data to fill this up. Donald's solution is to increase this partition by reducing the space available on the USB drive. To ensure that you don't run into this issue again, we will show you how you can extend this partition by 512 MB, but you can adjust that number up or down as needed. But be warned, you are messing around the underlying Operating System here and can cause some major problems on your device if something goes awry . You will also need to have Novacom installed on your computer and be familiar with using the Command Line. If you don’t have the webOS SDK installed on your computer to access the command line, you can always use webOS Quick Install and select "Tools" and then "Linux Commandline" to get access to it. Note that this is has only been tested on a Pre3 (including by this writer), but should work on any webOS 2.x device and possibly the TouchPad. However, before performing any actions, back up all of your data, both on your USB as well as any application data by using Save/Restore.
Please read through all of the steps and comments below before proceeding to make sure you understand exactly what will be required. Donald has also documented these steps on the WebOS Internals wiki as well, so you can also check that out to see if there have been any changes or updates to this fix.
Finally, before you begin, there are a few things that you need to check on. Access the linux commandline and type in "df -h" (without the quotes). Take note of the following information:
- Total "Size" of /dev/mapper/store-media.
- The "Used" size of /dev/mapper/store-media
- The "Size" of /dev/mapper/store-cryptodb
- The "Use%" of /dev/mapper/store-cryptodb
For the purposes on this tutorial, assume the total size of "store-media" is 12.8G. If it is different, make a note of that number because you will need to adjust the directions below. Also, ensure that you have at least 600 MB free in "store-media", although I would recommend having at least a full gigabyte available before proceeding. Finally, the total size of store-cryptodb should show as something around 135M, and the Use% will probably be very close to 100% if you are getting this error. This is what we will be updating and that use% should be much smaller when completed.
These first set of steps will shrink the media partition (your USB drive). You will want to take the total size of the "store-media" above and subtract 0.6G (which is the same as 600M). So, if you had 12.8G above, you will want to reduce it to 12.2G. If the number is different, adjust the directions below with that new number. Also, you may be asked to confirm one or more of the steps below, so make sure you type in "y" when asked:
pkill -SIGUSR1 cryptofs
resizefat -v /dev/mapper/store-media 12.2G
lvreduce -L 12.2G /dev/mapper/store-media
pkill -SIGUSR2 cryptofs
The final set of steps will increase the size of the database which should cause your database full error to go away. Once again, be sure to type in these steps exactly as is and confirm any actions if prompted
lvextend -L 512M /dev/mapper/store-mojodb
cryptsetup resize /dev/mapper/store-cryptodb
resize2fs -f -p /dev/mapper/store-cryptodb
Do a full reboot of your device (not just a luna restart). Once it is reloaded, open up the linux commandline again and run another "df -h". You should now see much larger total size of /dev/mapper/store-cryptodb and the Use% should be much smaller. If it was done correctly, you should also no longer see the "Database full" error any more.
If you mess something up, you can always run a webOS Doctor to reset any actions you have taken, unlike running a "Full Erase" or an "Erase Apps and Data" which should not affect these changes. Therefore, if you have already had to reset your device because of this error, we would recommend the following actions to cleanly restore your device with this fix.
- Perform a webOS Doctor on your device to reset it to factory settings
- Either log into your profile or bypass activation to gain access to webOS. If you log in to your profile, go into Software Manager immediately upon activation and "pause" the app downloads
- Perform the fix above
- After you reset your device, as per the final step of the directions, go into Device Info - Reset Options - Erase Apps and Data. This will reset your device again back to the activations screen.
- Log into your Profile and redownload all your apps and restore all your data as necessary
Donald is working on an easier solution that may not involve as much command line expertise, but for now, this works quite well and all you need to sacrifice is some space on your USB drive.
Source: WebOS Internals wiki; Thanks to Donald Kirker for these steps!