Decompile this app or this. You can't see the database(words, Synonym or ...). I wrote a dictionary app and my words are in the SQLite database. After decompiling the app, the person can see the database (words or ...).
How do I hide the database? Like Oxford Dictionary and other dictionaries?
Do these apps use SQLite?
Did I convey my mean clearly?
If you want offline data, you have to encrypt your database. Use a database that you can encrypt, such as Sqlite. DB Browser for Sqlite will help you encrypt your database.
https://sqlitebrowser.org/
Or if you want an online database, then you have to use a backend such as Firebase or Amazon AWS.
You have one option:
Store your words online (in Firebase for example) at first launch you download all the words and store it on SQLite (or Room database) and you are ready to go. By using remote server the download size of your apk also become smaller!
Related
The Story
I have an Android application which heavily relies on the Firebase Realtime Database. So far I do not have any problem using it.
But I need to store some highly sensitive data of the users in the database and I would not like to do that in plain text.
So, I have encrypted the data before storing them into the database. I can see the encrypted string in the Firebase Console.
The Problem
I need to check and verify how the data is internally represented by Firebase Database in my local device as I am storing the key for encryption in the database as well.
I have setPersistenceEnabled() for my database and thus Firebase stores these data locally in the users device. It is nowhere mentioned how Firebase does this internally. Does it store it as a JSON file or a SQLite database (most probable).
My Attempt
To dig deeper into the problem, I tried to pull the databases from my app.
I used,
"adb -d shell "run-as com.yourpackge.name ls /data/data/com.yourpackge.name/databases/"
in my terminal to get a list of all database names for my app, and this is what I got,
app-debug-xxxx.firebaseio.com_default
app-debug-xxxx.firebaseio.com_default-journal
crash_reports
crash_reports-journal
So, these are my databases right? Are they regular SQLite databases? I was unable to read data from these files using the assumption that they are SQLite databases.
I personally think it is very important for us to know how the data is internally represented in Android so that we can make better decisions to store our data.
Any help will be highly appreciated?
After inspecting the file you mentioned, yes it's indeed a SQLite database file (app.firebaseio.com_default).
The data is saved in serverCache table and it contains 2 columns: path (TEXT) and value (BLOB). path is the path to the data in firebase database, something like /users/-KOasdbcde and the value is the JSON value of that path.
EDIT
Here's the structure of that table
I'm trying to use SQLite Databases, but as I'm learning (via the internet), I'm getting really confused and I have a few questions.
Where is the data actually stored? For example, let's say I want a database that stores all the usernames and all the passwords for everyone who uses my application. I need to write this information onto the database, but where is it? Is it on the user's phone? Is it on the web somewhere? Whenever the user goes onto the app, I need to read from the database. Does it read from somewhere online or does it only read from the database created on the user's phone? Is there any way to create a static database that all users are able to write to?
If I'm using a SQLite Database to store username and passwords, do I need to secure it with a password? If so, how? I've read on some websites that this information can easily be read if it isn't secured with a password, but others tell me that it can only be accessed by my application.
SQLite Databases are used where you need to store the data of particular user or save his usage or some data which is permanent. This DataBase resides in the Android device. If you want to save the user accounts (say username & password) this should be done in the server (backend) and should get the data by using service calls every time.
Ex: You have a comic book application for which the user has to signup / signin. Then you maintain the user account in the server. After signup / signin, when user downloads a book to read. Make that book stored in the SQLite Database in Android device, so that it will be available forever.
If you try to maintain user accounts in the SQLite DataBase, you cannot get data of all the users an store in one Android device. So global data should be on server and Local data should be stores in SQLite DataBase.
1)straight answer is: When u use SqLite database in android application, in the sense your application have sqliteDatabase, means when u download that application in to your device then all sqlite database data stored in device.
2) For password security u have to encrypt password and store in sqlite database.
Previously, I developed an application with an internal sqlite database stored.
Now I need to upload that database in an online server so that admins can easily modify the contents.
Is it possible for my app to access/use the sqlite database online?
The application is done on both ios and android.
For iOS it is not possible to access an online database. You should send the data to a server side script like php and from there parse it into your database. Only need to recreate your database format on the server end.
Or export the database as a file and import it on your server with something like phpMyAdmin or something. It can import all different kinds of formats like .sql, .csv, .txt.. Whatever you like.
Good luck!
Hmm, after rereading I think you ask the question if the app is able to use the database from an online source after importing it there? Am I correct?
Simple answer.. for iOS. No. You have to return results to the app by using a POST or GET request.
In my app I have a SQLite DB want to backup to server but what I want is one to one synchronization for off-line backup (e.g. standalone SQLite file instead of a centralized MySQL server, mainly performance reason and I don't need real time query)
Ideally I don't want to upload the database everytime when I need to sync, prefer only sync the changes?
Are there any existing solution for this? (I can consider using other file DB as currently I mainly use SQLite as Key-Value database)
Thanks.
As you are willing to consider using a different DB, take a look at TouchDB-Android. This syncs a database on an Android device to a CouchDB server. There is a related project SyncPoint, that automates setting up a database for each user.
We are using TouchDb-iOS for our product at the moment are planning work on an Android version using TouchDB-Android soon.
The development community is active. Check out the user group.
I am new to Android Development and I'm developing an application for my Final Year Project.
I am a little confused as to when it comes to setting up the database. I read a few things and most people seem to use SQLite.
Basically I am developing an android app which has too different aspects to it.
1. admin inputs data on the app and saves to a database. 2. users open app and view data from the database.
The data is going to have to be input and viewable over the 3g/wifi network.
Do i need to host my database online and which database would be best to use? from reading it seems SQLite is hosted on your local disk so should i use MySQL?
Any help would be grately appreciated.
Thanks
Android includes SQLite. So, if you save data in a DB on an Android system itself, you use SQLite. If you store your data elsewhere, you are free to use whatever you like, Oracle, DB2, Mysql or even SQLite.