-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with open db msgstore.db #15
Comments
It requires root access to access WhatsApp database. If your device is rooted and you have given the desired permission, let me know or you may proceed with the non-rooted method for which only accessibility permission is required. |
In that case, disable root permission for the app using the superuser app and continue with the non-rooted method or provide me with the logcat of the app at the time of the error. |
@nikhilmuz when disable root permission for app (in superuser) app provide error like this:
my friend i have another question about csv template, can you share me csv template that you provide for this app ? |
The sample CSV template is already committed to this repo. Refer readme to get it. If you still face any issue do let me know or try using another phone. |
Hi @nikhilmuz - I tried to use this app and also ran into the same SQLiteCantOpenDatabaseException. My device is rooted (an S5 running Lineage / Android 9 OS). I granted root permission for the app as well. I verified the file it's looking for exists and made sure the permissions looked OK (using adb shell). Could this be a problem with newer versions of Android preventing 1 app from opening a database that belongs to another app? Since the database call is done outside of the SU() library that's just what jumped out to me.. But, I'd love to hear your thoughts. (I can run this using AccessibililtyServices -- I'm mostly interested in learning about rooted direct access though)
|
@jpage4500 It works on RR (Based on Lineage Oreo) for me. Maybe WhatsApp for business is not installed on your mentioned phone. Check it once. Alternatively, to use it for WhatsApp check for database files in |
@nikhilmuz - I tried with WhatsApp for business. I also tried with the normal WhatsApp version (with modified paths like above). I verified the paths exist and the SU commands making the folders readable works. I can only think that maybe Android Pie (9) has something that prevents this. |
It maybe the case I will go through android developer change log for the
same but I don't think it should be the case. Anyways you may try it with
SU access and let me know.
…On Sun, 5 May, 2019, 3:45 AM Joe Page, ***@***.***> wrote:
@nikhilmuz <https://github.com/nikhilmuz> - I tried with WhatsApp for
business. I also tried with the normal WhatsApp version (with modified
paths like above).
I verified the paths exist and the SU commands making the folders readable
works. I can only think that maybe Android Pie (9) has something that
prevents this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEZUYFYAUGGUGR3KV7G6GYLPTYDH3ANCNFSM4GMLQ5DA>
.
|
I was able to successfully test this using another device, an S5 running OS 5.1.1 For now I am guessing Android 9 prevents opening the database in another app's folder (even if permissions are read/write) FWIW - this is the line of code I'm talking about:
I even did this test on Android 9 -- I created the File object and logged the full path and if it I briefly thought maybe you could use SU to copy the database to another location (like the app's) -- modify it -- then use SU to copy it back again.. seems like it could lead to other issues though but might be worth trying as a way to get this to work on OS 9. |
use |
@jpage4500 Your Idea did work. Thanks for the suggestion and your contribution. |
i have a whatsapp 4 business in my phone also have in msgstore.db in /data/data/com.whatsapp.w4b/databases/msgstore.db but when i test app i got a error like this and force close app
2-27 10:11:40.296 19159-19395/ga.nikhilkumar.whatsappsender E/SQLiteLog: (14) cannot open file at line 32456 of [bda77dda96] (14) os_unix.c:32456: (13) open(/data/data/com.whatsapp.w4b/databases/msgstore.db) - 12-27 10:11:40.297 19159-19395/ga.nikhilkumar.whatsappsender E/SQLiteDatabase: Failed to open database '/data/data/com.whatsapp.w4b/databases/msgstore.db'. android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696) at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:711) at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:704) at ga.nikhilkumar.whatsappsender.sender.WhatsappApi$1.doInBackground(WhatsappApi.java:104) at ga.nikhilkumar.whatsappsender.sender.WhatsappApi$1.doInBackground(WhatsappApi.java:100) at android.os.AsyncTask$2.call(AsyncTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) 12-27 10:11:40.299 19159-19395/ga.nikhilkumar.whatsappsender E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: ga.nikhilkumar.whatsappsender, PID: 19159 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:325) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696) at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:711) at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:704) at ga.nikhilkumar.whatsappsender.sender.WhatsappApi$1.doInBackground(WhatsappApi.java:104) at ga.nikhilkumar.whatsappsender.sender.WhatsappApi$1.doInBackground(WhatsappApi.java:100) at android.os.AsyncTask$2.call(AsyncTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) 12-27 10:11:51.179 19159-19182/ga.nikhilkumar.whatsappsender E/EGL_emulation: tid 19182: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)
i already give read/write permission for app whereas i got error
The text was updated successfully, but these errors were encountered: