and.kbr
and.kbr

Reputation: 21

unable to see sdcard contents in Android Device Monitor

I want to create a database in the external storage of android phone. I've tested databases existing with a method and it returned true.

However, I can't see the SD card contents in file explorer.

   public static Context context;
public static SQLiteDatabase database;
public static String SDK = Environment.getExternalStorageDirectory().getAbsolutePath();
public static String DB = SDK + "/database/"; 

context = getApplicationContext(); File file = new File(DB); file.mkdirs(); database = SQLiteDatabase.openOrCreateDatabase(DB + "/db.sqlite", null);

in this picture you can see my file explorer window

this is screenshot of ES File Explorer

Upvotes: 1

Views: 740

Answers (1)

and.kbr
and.kbr

Reputation: 21

my problem solved . I Found a way to see sdcard files and get a copy of "db.sqlite"

i opened adb shell and used this command to copy my database file: adb pull /sdcard/database/db.sqlite and a copy of this file created in C:\Android\sdk\platform-tools folder

and used this command to see my sdcard directory and files :adb shell ls /sdcard/

Upvotes: 1

Related Questions