DroidPluginTeam / DroidPlugin

A plugin framework on android,Run any third-party apk without installation, modification or repackage
http://droidpluginteam.github.io/DroidPlugin/
GNU Lesser General Public License v3.0
6.9k stars 2.53k forks source link

ContentProvider 魅族有兼容性问题 #412

Open SheepYoung opened 7 years ago

SheepYoung commented 7 years ago

如题, 使用魅族(API level: 23 Flyme 6.2.0.0A)使用ContenProvider的时候报错:

android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:220) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:204) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:840) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:825) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:718) 11-06 17:40:37.276 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:234) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at com.owncloud.android.providers.FileContentProvider.query(FileContentProvider.java:352) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.content.ContentProvider.query(ContentProvider.java:1140) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.content.ContentProvider$Transport.query(ContentProvider.java:262) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.content.ContentResolver.query(ContentResolver.java:506) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at android.content.ContentResolver.query(ContentResolver.java:441) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at com.owncloud.android.datamodel.FileDataStorageManager.getCapabilityCursorForAccount(FileDataStorageManager.java:1975) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at com.owncloud.android.datamodel.FileDataStorageManager.getCapability(FileDataStorageManager.java:1998) 11-06 17:40:37.277 4607-4607/com.microvideo.mivi:PluginP03 W/System.err: at com.owncloud.android.ui.activity.FileActivity.onAccountSet(FileActivity.java:762)

SheepYoung commented 7 years ago

另外我还发现一些其他的error: E/SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.owncloud.android/shared_prefs/oc_flag_file.xml

E/SQLiteLog: (14) os_unix.c:31322: (2) open(/data/user/0/com.owncloud.android/databases/filelist) - /SQLiteDatabase: Failed to open database '/data/user/0/com.owncloud.android/databases/filelist'.

我到shell里面查看: root@M2E:/data/user/0 # ls -l com.own
com.own
: No such file or directory

root@M2E:/data/user/0 # find . -name "com.own*"
./com.microvideo.mivi/Plugin/com.owncloud.android

应该是插件创建User文件失败了,

SheepYoung commented 7 years ago

对比其他手机(Nexus 6P 6.0.1): root@angler:/data/data/com.microvideo.mivi/Plugin/com.owncloud.android/data/com.owncloud.android # ls databases files shared_prefs