Retrieve database or any other file from the Internal Storage using run-as

后端 未结 12 2323
清酒与你
清酒与你 2020-11-22 11:01

On a non-rooted android device, I can navigate to the data folder containing the database using the run-as command with my package name. Most files types I am c

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 11:50

    #!/bin/bash
    #export for adb
    export PATH=$PATH:/Users/userMe/Library/Android/sdk/platform-tools
    export PATH=$PATH:/Users/userMe/Library/Android/sdk/tools
    
    adb -d shell 'run-as com.android.app  cp /data/data/com.android.app/files/db.realm /sdcard'
    adb pull sdcard/db.realm /Users/userMe/Desktop/db
    

    You can use this script for get Realm database.

提交回复
热议问题