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

前端 未结 15 794
执笔经年
执笔经年 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:41

    When executing adb commands, by default, a limited privileges user is used, the same kind of limited privilege user that is assigned to an app, and you have requested for all privelages to use all features of the device.

    This kind of limited user helps protect your phone from malware, by restricting the access between apps, and the system. This is the reason you are unable to access app data and system data on an unrooted phone. The act of rooting means becoming user 0, the super user of the system, capable of any action, and is the highest privilege. Your apps however, are still secure in that they can not talk to eachother.

    Now when accessing secure files, note that you do not want to change the permissions of the file when you access it, which may allow for vulnerabilities.

    An option that you could use instead, is to make a copy of the file on the sdcard as root, modify that as a standard user, and then move it back into the filesystem as root, while preserving the file permissions of the original file.

提交回复
热议问题