Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pull a database from genymotion emulator on to local disk

I am using genymotion for my dev and when I create a database I can't see it in DDMS folder of genymotion emulator.

When searched on google I am able to see the database on adb shell but don't know how to pull the database to my local disk to view the data.

Can anyone please let me know the process.

Thanks in advance

like image 632
Siva Avatar asked Dec 09 '22 11:12

Siva


1 Answers

Try on Genymotion 2.3:

adb shell su -c cp /data/data/<package.name>/databases/<database.name> /sdcard/

and on other version :

adb shell su 0 cp /data/data/<package.name>/databases/<database.name> /sdcard/

And pull it from the device

adb pull /sdcard/<database.name>

(edited, not the same comportment of su in 2.3 and 4.3)

like image 190
slvn Avatar answered Mar 03 '23 17:03

slvn