![]() ![]() ![]() On the actual website, they also talk about features for network inspection and looking through the view hierarchy. I've used Stetho on several occasions for different purposes (one of them being database inspection). I'm actually very surprised that no one has given this solution: List all of the available SQLite prompt commands. Print the entire table: SELECT * FROM tablename There are a few steps to see the tables in an SQLite database: dbĦ- run sqlite3 commands that you like eg: Select * from table1 where. I haven't found any way to do that in Android Studio, but I access the db with a remote shell instead of pulling the file each time.ġ- Go to your platform-tools folder in a command promptĢ- Enter the command adb devices to get the list of your devices C:\Android\adt-bundle-windows-x86_64\sdk\platform-tools>adb devicesģ- Connect a shell to your device: C:\Android\adt-bundle-windows-x86_64\sdk\platform-tools>adb -s emulator-xxxx shellĤ- Navigate to the folder containing your db file: cd data/data//databases/ĥ- run sqlite3 to connect to your db: sqlite3. It goes without saying however that you should undo all these steps before publishing your app. Go to this Github repository and follow the instructions in the readme to be able to view your database on your device. You can now view the contents of your database. Click on ' open database', navigate to the location you saved the database file, and open. Now, open the SQLiteBrowser you installed. Right click on the database and select Save As. Go to data > data > PACKAGE_NAME > database, where PACKAGE_NAME is the name of your package (it is com.Movie in the example above) Open Device File Explorer via View > Tool Windows > Device File Explorer Click on the ' pull a file from the device' button:Ī window will open asking you where you want to save your database file. Go to the top right corner of the Android Device Monitor window. Select the database by just clicking on it. Go to File Explorer (one of the tabs on the right), go to /data/data/databases Copy the database from the device to your PC:Īndroid Studio versions Android > Android Device Monitor ![]()
0 Comments
Leave a Reply. |