copy db file with adb pull results in 'permission denied' error

前端 未结 15 774
执笔经年
执笔经年 2020-12-13 17:13

I just rooted my Nexus 5 using this method: http://www.phonearena.com/news/How-to-root-Google-Nexus-5_id49014

I also enabled USB debugging in the developer options.<

15条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 17:55

    @guest-418 tips works well:

    adb -d shell "run-as com.example.test cat /data/data/com.example.test/databases/data.db" > data.db
    

    However, if you want to use a GUI, use Android Studio's Device File Explorer.

    1. Launch Android Studio

    2. Click on Device File Explorer at bottom right-side Navigate to your app's file:

      /data/data/path.to.package/databases/data

    3. Right-mouse click select Save As and save to a local folder

    I have been having Android Monitor hang on me lately on macOS. Device File Explorer works well for this purpose.

提交回复
热议问题