I have an app that stores some data in database. When app starts database is created and app is able to write into it.
Problem begins when I power off my board and power it back on. Database gets deleted and new one is made. So I tried to make database outside sandbox and give app access to it in adef file in requires but it is says it’s read only.
but it still says it’s read only.
I also tried chmod 777 database.db.
So my general question is how to preserve my database is sandboxed app after power off?
Thank you
@Alegato Thank you for answering. My code works fine on my Ubuntu PC, so I don’t think it’s code problem… My file is in /mnt/flash/database/database.db and I gave it write smack label. When I type xattr get, I get name=security.SMACK64, value=app.MyApprwx. My .adef file looks like this:
gets name=security.SMACK64; value=_. I than give this file write smack label and when I restart my app, it agains says statement:
Read only: attempt to write a readonly database
I’ ve also tried to move database.db to /home/root.
Again, app is working fine when I don’t give it any extern database, when app creates database in runtime. Then it writes everything fine and all is good. But that database gets deleted after power off.
Thank you