Yes, it's very strange - unless you subclassed SQLiteOpenHelper, the
database files for both applications should be in their respective
private data directories, not on the memory card. Those directories are
only accessible by the application they belong to, and you can't browse
them (from the computer or with a file manager).
It doesn't matter how you uninstall the applications, but if adb
uninstall is giving you an error, it might mean that something is really
wrong (assuming you used correct package name and syntax with "adb
uninstall").
Given the situation, I would reset the phone to factory settings, to
clear everything. It's under Menu - Settings - Privacy.
-- Kostya
01.03.2011 6:35, javaxmlsoapdev пишет:
Just got a chance to resume this issue. How to search the device for
the database file? Apparently something really strange is going on or
I am doing something wrong. Shouldn't databases be private by default?
I haven't done anything special to make them public. databases aren't
on the memory card. Any other idea what could have gone wrong and how
to go about haunting db files on the device to remove (if they exist
on the device)? Also note, I have always uninstalled these apps from
the device's "Applications -->Manage Applications-->" option. Is this
ininstall different than adb uninstall? adb uninstall keeps giving me
"Failure" message.
Thanks,
On Feb 21, 10:57 am, Kostya Vasilyev<[email protected]> wrote:
Each application has its own private data files, including the
databases. Uninstalling should remove those.
So either somehow the files didn't get removed (which is strange by
itself), or else something even more strange is going on.
Are the databases, perhaps, not private to the respective applications?
Are you using a shared user id for both apps? Are the databases on the
memory card?
-- Kostya
21.02.2011 18:46, javaxmlsoapdev :
yes. both apps are uninstalled but unable to remove database from the
phone, which originally was created by app1 (and subsequently app2
used the same db name, which screwed up the things)?
I also tried context.deleteFile(DATABASE_NAME);
context.deleteDatabase(DATABASE_NAME);
without any luck.
how to go about deleting/removing db from on the device. permission is
denied even to "cd" to data directory. any idea how to go about this?
Thanks,
On Feb 20, 11:26 am, Kostya Vasilyev<[email protected]> wrote:
Have you tried uninstalling both applications? For example, "adb uninstall
your.package.name"?
--
Kostya Vasilyev --http://kmansoft.wordpress.com
16.02.2011 5:37 "javaxmlsoapdev"<[email protected]> :
I had an existing working application which was creating a database
using SQLite helper/code. In another application, which I am
developing I copied app1's DBHelper code and honestly forgetting to
rename the database name in the DBHelper, which I copied from app1
code. Now I keep getting following error for both app1 (from which I
copied DBHelper code) and app2 as well. Caused by:
java.lang.IllegalStateException: database not open. Seems like
something is badly screwed up. Any idea?
Also when I tried to view database from adb shell I get Permission
Defined error.
02-15 21:31:25.798: WARN/dalvikvm(10965): threadid=1: thread exiting
with uncaught exception (group=0x400259f8)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): FATAL EXCEPTION: main
02-15 21:31:25.808: ERROR/AndroidRuntime(10965):
java.lang.RuntimeException: Unable to start activity ComponentInfo
AddressActivity}: java.lang.IllegalStateException: database not open
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2787)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2803)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread.access$2300(ActivityThread.java:135)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.os.Looper.loop(Looper.java:144)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread.main(ActivityThread.java:4937)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
java.lang.reflect.Method.invokeNative(Native Method)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
java.lang.reflect.Method.invoke(Method.java:521)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
dalvik.system.NativeStart.main(Native Method)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): Caused by:
java.lang.IllegalStateException: database not open
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:
611)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelp
er.java:
113)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
DataHelper.<init>(DataHelper.java:37)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
AddressActivity.onCreate(AddressActivity.java:15)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1069)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2751)
02-15 21:31:25.808: ERROR/AndroidRuntime(10965): ... 11 more
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev --http://kmansoft.wordpress.com
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en