How can I monitor another application's database for changes?

前端 未结 4 2069
北荒
北荒 2021-02-19 10:35

I\'d like to monitor changes to another applications SQLite database. Since the Android doesn\'t allow me to access another application\'s internal data, I need a root applicati

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-19 11:36

    Iff you have root access, why not update file permissions to allow group read access to the file in question? i.e.

    • Create a new group if needed e.g. SQLLiteGroup
    • Update group ownership of SQLLite db file to SQLLiteGroup
    • Set file permissions for group read for SQLLite db file
    • App2 add user to group SQLLiteGroup

    App2 user should now have read access to file, FileObserver will work.

    FYI symbolic links mirror (i.e. respect) the permissions of the file that is being pointed to.

提交回复
热议问题