run-as: Could not set capabilities: Operation not permitted

后端 未结 7 704
梦毁少年i
梦毁少年i 2020-12-05 01:29

on android 6.0.1 I am getting this error when trying to use run-as.

⋊> ~ adb shell                                                          14:29:01
shell         


        
7条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 02:22

    If you have a SAMSUNG device, don't bother - SAMSUNG broke run-as by dropping the setuid flag (so run-as has no chance of switching to a different identity).

    Also don't bother trying the Smart Switch "reinitialize device" workaround, it won't work until SAMSUNG fixes it in the firmware (so it is worth updating to the latest version).

    Use some other method to access your app's data, like adb backup:

    adb backup -f data.ab 
    dd if=data.ab  bs=24 skip=1 | openssl zlib -d > data.tar
    

    Instead of dd you can use the abe tool, which can also write .ab files.

提交回复
热议问题