小编Joe*_*ing的帖子

sqlcipher_export没有导出我的表

我使用sqlciper与android加密现有的sqlite数据库,并遇到加密数据库不包含我的表的问题,它只包含sqlite_master和android_metadata.

我原来的db看起来像:

shell@umts_spyder:/sdcard $ sqlite3 d000000.dat
sqlite3 d000000.dat
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from sqlite_master;
select * from sqlite_master;
table|android_metadata|android_metadata|2|CREATE TABLE android_metadata (locale TEXT)
table|PageData|PageData|3|CREATE TABLE PageData(File_Path TEXT NOT NULL UNIQUE, File_Content BLOB)
index|sqlite_autoindex_PageData_1|PageData|4|
Run Code Online (Sandbox Code Playgroud)

我在下面粘贴我的加密代码,使用空键("")打开普通数据库,如果使用null,则引发NullPointerException(对于我在帖子末尾提到的两个普通数据库):

File plain = new File(mDbPath); /* /sdcard/d0000000.dat */
File encrypt = new File(plain.getParent(), "encrypted.dat");
encrypt.delete();
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(mDbPath, "", null);
String sql = String.format("ATTACH DATABASE '%s' AS encrypted KEY '%s'", encrypt.getPath(), mvKey.getText().toString()); …
Run Code Online (Sandbox Code Playgroud)

sqlite encryption android

3
推荐指数
1
解决办法
1407
查看次数

Virtualbox无法从GPT物理分区启动guest虚拟机

Virtualbox无法从GPT物理分区启动guest虚拟机,它在黑色屏幕上停留,左上角有一个光标(不闪烁).Virtualbox版本是5.0.10 x64.

PhysicalDrive0是一个GPT驱动器,这是分区信息:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0x00 0 /0 /0 0 /0 /0 100 2048
2 0x00 0 /0 /0 0 /0 /0 128 206848
3 0x00 0 /0 /0 0 /0 /0 409372 468992
4 0x00 0 /0 /0 0 /0 /0 409600 838862848
5 0x00 0 /0 /0 0 /0 /0 409600 1677723648
6 0x00 0 /0 /0 0 /0 /0 662640 2516584448
7 0x00 0 …
Run Code Online (Sandbox Code Playgroud)

virtualbox guid-partition-table

3
推荐指数
1
解决办法
6519
查看次数