如何分析 Android 上的 sqlcipher?
How to profile sqlcipher on Android?
SqlCipher 有探查器。
根据 documentation 要打开它,开发人员应执行:
sqlite> PRAGMA cipher_profile='sqlcipher.log';
sqlite> CREATE TABLE t1(a,b);
sqlite> INSERT INTO t1(a,b) VALUES('one for the money', 'two for the show');
sqlite> PRAGMA cipher_profile=off;
在 Android 我在查询后添加到数据库挂钩
database.rawExecSQL(“PRAGMA cipher_profile=’” + name + “.log’;”);
其中名称是日志文件的字符串路径。
但我没有看到使用此路径创建的任何日志。
有人可以解释一下是否可以在 Android 上分析 sqlcipher?
官方回答:
https://discuss.zetetic.net/t/pragma-cipher-profile-on-android/3766
It appears there is an issue with capturing the profile output to a file on the Android platform. In the interim, you can set cipher_profile to use stdout, then redirect stdout to logcat for your emulator or rooted device.
SqlCipher 有探查器。 根据 documentation 要打开它,开发人员应执行:
sqlite> PRAGMA cipher_profile='sqlcipher.log';
sqlite> CREATE TABLE t1(a,b);
sqlite> INSERT INTO t1(a,b) VALUES('one for the money', 'two for the show');
sqlite> PRAGMA cipher_profile=off;
在 Android 我在查询后添加到数据库挂钩
database.rawExecSQL(“PRAGMA cipher_profile=’” + name + “.log’;”);
其中名称是日志文件的字符串路径。
但我没有看到使用此路径创建的任何日志。
有人可以解释一下是否可以在 Android 上分析 sqlcipher?
官方回答:
https://discuss.zetetic.net/t/pragma-cipher-profile-on-android/3766
It appears there is an issue with capturing the profile output to a file on the Android platform. In the interim, you can set cipher_profile to use stdout, then redirect stdout to logcat for your emulator or rooted device.