Android tool used to view and edit resources like Preferences and Sqlite database.
Installed Android Debug Bridge (adb), python3.
Connect Android device to the computer, and wait till device is ready, then run:
python3 cari-client-standalone.py
cari-client-standalone.py file is a compressed version of cari client, this file can be downloaded from release assets.
- -d provide a device
- -p provide custom port for forward, default is 38300
- use [resource|prefs_scope|sqlite_database] - Use resource, scope or sqlite database for further actions
- clear - Clear used resource and scopes
- version - Print CARI Android SDK version
- prefs, Android shared preferences wrapper, commands:
- scopes - print all preferences scopes, related to the application context
- use - select preferences scope for further actions
- dump - print all preferences data (can be used with and without scope)
- list - list all keys (e.g. command: list)
- remove - remove key with value (e.g. command: remove KeyToDelete)
- set - set value to key (e.g. command: set new_key KeyValue)
- get - get key value (e.g. command: get my_key)
- sqlite, Android SQLite wrapper, commands:
- databases - print all databases, related to the application context
- use - select sqlite database for further actions
- tables - print all tables from selected database
- [query] - execute SQLite query, when database is used (e.g. command: SELECT * FROM table or with prefix: q SELECT 1)
- Run CARI:
python3 cari-client-standalone.py
- In CARI shell type:
use prefs
- Dump all scopes, by typing in shell:
dump
- Use preferences scope (eg app_preferences), by typing in shell:
use app_preferences
- Type in shell to list all keys:
list
- Run CARI:
python3 cari-client-standalone.py
- In CARI shell type:
use sqlite
- Print all databases, by typing in shell:
databases
- Select database, by typing in shell:
use room_db
- Type in shell to execute an query:
SELECT * FROM table ORDER BY _id DESC
- Add to project build.gradle file those lines:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add to project build.gardle CARI sdk dependency:
implementation 'com.github.darekbx:CARI:{latest release}'
- Initialize CARI in your Application class:
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
CARI.initialize(applicationContext)
}
}
- Add INTERNET permission to AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
Copyright 2019 DarekBx
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.