3
votes

I need to delete an SQLite database and in order to do so , i need to access adb shell.

i'm on windows 7 and i have my sdk installed on:

C:\Users\Omar\AppData\Local\Android

i have opened the cmd and typed adb shell but with no success here is my output :

C:\Users\Omar>adb shell
'adb' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

c:\>adb shell
'adb' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

"unknown command"

Do i need to do something before calling the adb from my windows cmd ? like creating a classpath ?

Thanks a lot in advance ^^

3

3 Answers

2
votes

Either add C:\Users\Omar\AppData\Local\Android\platform-tools to your PATH environment variable, or fully-qualify the path to the command you want to run:

C:\Users\Omar\AppData\Local\Android\platform-tools\adb shell
3
votes

This can be done in a single line command like this:

adb shell "run-as your.package.name rm /data/data/your.package.name/databases/YourDBFileName.db"
2
votes

Thanks a lot it worked with :

C:\Users\Omar\AppData\Local\Android\platform-tools\adb shell

After that i did

cd /data/data/(my application package, com...etc)/Databases

and

rm (mydatabase)