Coder Social home page Coder Social logo

Comments (6)

MalitsPlus avatar MalitsPlus commented on September 24, 2024

?没看懂你想做什么

from shizurunotes.

MalitsPlus avatar MalitsPlus commented on September 24, 2024

你是说你想手动拷一个数据库文件到app的内部文件夹?

from shizurunotes.

Kanata03 avatar Kanata03 commented on September 24, 2024

额就是我需要特定版本的数据库,但是我在没root的情况下我只能读取最新版本的db

from shizurunotes.

Kanata03 avatar Kanata03 commented on September 24, 2024

另外目前最新的数据库国服我手机提示加载错误

************* Log Head ****************
Date of Log : 2022_04_17
Device Manufacturer: samsung
Device Model : SM-G960F
Android Version : 12
Android SDK : 31
App VersionName : 1.12.2
App VersionCode : 66
************* Log Head ****************

14:14:52.506 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/files/userData.json
14:14:52.565 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/databases/redive_jp.db
14:14:54.135 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager$1.dbCheckUpdateCompleted(UpdateManager.kt:113)]: New db version10037700 determined.
14:14:55.631 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager$1$dbCheckUpdateCompleted$1$2.invoke(UpdateManager.kt:123)]: Canceled download db version10037700.
14:15:04.766 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/files/userData.json
14:15:04.883 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/files/userData.json
14:15:04.939 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/databases/redive_cn.db
14:15:06.423 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager$1.dbCheckUpdateCompleted(UpdateManager.kt:113)]: New db version202204141603 determined.
14:15:07.074 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager.downloadDB(UpdateManager.kt:309)]: Start download DB ver202204141603.
14:15:07.731 E/FileDelete [Thread-3, com.github.malitsplus.shizurunotes.utils.FileUtils.deleteFile(FileUtils.java:95)]: Failed to delete file: /data/user/0/com.github.malitsplus.shizurunotes/databases/redive_cn.db. Size: 0KB.
14:15:07.732 I/UpdateManager [Thread-3, com.github.malitsplus.shizurunotes.common.UpdateManager.doDecompress(UpdateManager.kt:358)]: Start decompress DB.
14:15:07.740 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager$1.dbDownloadCompleted(UpdateManager.kt:151)]: DB download finished.
14:15:07.992 I/UpdateManager [main, com.github.malitsplus.shizurunotes.common.UpdateManager$1.dbUpdateCompleted(UpdateManager.kt:159)]: DB update finished.
14:15:08.106 E/loadCharaData [Thread-6, com.github.malitsplus.shizurunotes.ui.shared.SharedViewModelChara$loadData$1.invoke(SharedViewModelChara.kt:57)]: Text '2022/4/17 11:00' could not be parsed at index 5
14:15:42.772 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFile(FileUtils.java:102)]: FileNotExists: /data/user/0/com.github.malitsplus.shizurunotes/files/userData.json
14:15:42.912 I/FileCheck [main, com.github.malitsplus.shizurunotes.utils.FileUtils.checkFileAndSize(FileUtils.java:122)]: /data/user/0/com.github.malitsplus.shizurunotes/databases/redive_cn.db. Size: 11880KB.
14:15:43.260 E/loadCharaData [Thread-4, com.github.malitsplus.shizurunotes.ui.shared.SharedViewModelChara$loadData$1.invoke(SharedViewModelChara.kt:57)]: Text '2022/4/17 11:00' could not be parsed at index 5

from shizurunotes.

MalitsPlus avatar MalitsPlus commented on September 24, 2024

额就是我需要特定版本的数据库,但是我在没root的情况下我只能读取最新版本的db

参考 #50
没 root 的话可以把这个 repo 克隆下来用 Android Studio 编译一个 debug 版本的 apk(或者直接连接手机 debug)然后把数据库文件往 /databases 里面拷就行了,debug 版本的 app 不需要 root 权限就能访问内部文件。

from shizurunotes.

HerDataSam avatar HerDataSam commented on September 24, 2024

I have one solution. Just leave this idea to whom really want to implement it.
I really do not recommend implementing it in this project, @MalitsPlus, because it can yield many unwanted errors or exceptions as I have already faced.
Just consider below if you are interested and are working with a forked project.

  • Add the 'Custom DB' option in the server selection.
  • Implement a DB file loader fragment somewhere in the setting.
    • This advanced function lets you easily load the custom DB file from your file system.
  • I also recommend implementing the checking system whether it is valid sqlite3 using the first few bytes.
  • Please turn off the update DB service for this server(?).

If you are interested in this function but do not know how to implement it, you can freely refer to some commits of my KR version of the ShizuruNotes, the KasumiNotes project. However, DO NOT USE redive_cn.db for a test in my app because it crashes instantly.
I also will not attach a link or directly refer to my commits here because my project goes so far away from the original ShizuruNotes, so I just leave the idea.

from shizurunotes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.