SQlite – enable log events and see it in logcat

Create .bat file with commands provided below:

adb shell setprop log.tag.SQLiteLog V
adb shell setprop log.tag.SQLiteStatements V
adb shell su 0 stop
adb shell su 0 start

After You execute app, You (in this case) emulator will reboot.

Now search in logcat something like this below:

/data/user/0/{APP_PACKAGE_NAME}/databases/{APP_DATABASE_NAME}

Simple pulling database sqlite to desktop and preview it

All what we need is to make few steps:

  1. Add in our project this line to output in log current path to database
    Log.d(TAG, "onCreate db: " +  context.getDatabasePath("mydatabase.db"));
  2. Create simple batch command to pull database (afik root is no needed)
    adb pull "/data/data/com.example.app/databases/mydatabase.db" mydatabase_%date%.db.sqlite
  3. Download SQLiteManager to firefox, run it, open our sqlite database

 

Zrzut ekranu 2016-02-16 12.15.38

 

 

 

Good luck!

Graduation Work – Project Państwa Miasta 206 days left

My graduation work is a project called Państwa Miasta as a big base with words for specific categories.

Name Państwa Miasta is from the paper game, very popular in many youth. One player says one letter from alphabet. In example L and the rest of the playing players (having on their papers columns with names: cities, countries, flowers, cars..) is trying get one word per column starting with that letter.

My project is about android app where user will be able preview big list of categories. When he enters in any of them, he will see from A to Z words connected with that category.
I decided to make this project because I have created first version of panstwa miasta app before. It wasn’t so flexible to manage it from other place like php/server.

Continue reading “Graduation Work – Project Państwa Miasta 206 days left”