omegaes / Whatsapp-API

An Android Library with demo application, to send media and text messages via Whatsapp on rooted device
http://abdul.mega4tech.com/
GNU Lesser General Public License v3.0
153 stars 79 forks source link

can't open database msgstore.db #7

Open diqidevdroid1 opened 6 years ago

diqidevdroid1 commented 6 years ago

hi, i've tried on android 7 rooted device and got problem can not open database with following message (logcat) : on script --> Shell.SU.run("chmod 777 /data/data/com.whatsapp/databases/msgstore.db")

Failed to open database '/data/data/com.whatsapp/databases/msgstore.db' Error Code : 1806 (SQLITE_CANTOPEN_EACCES) Caused By : Application has no permission to open the specified database file. (unknown error (code 1806): Could not open database)

but, previously tried on android version 4.4 down can work. Whether this is related to security mode in android related enforcing and permissive ?, is there a solution to this ?.

thanks..

diqidevdroid1 commented 6 years ago

sorry to add, from the above issue, more precisely the problem on the line: db = SQLiteDatabase.openOrCreateDatabase (new File ("/ data / data / com.whatsapp / databases / msgstore.db"), null);

thanks..