XayahSuSuSu / Android-DataBackup

DataBackup for Android 8.0+
https://DataBackupOfficial.github.io
GNU General Public License v3.0
2.4k stars 98 forks source link

[Feature] shizuku instead of root #115

Closed TamasBarta closed 1 year ago

TamasBarta commented 1 year ago

Describe the feature

I'm not sure if this is possible, but I saw articles about Swift Backup using Shizuku instead of root to backup and restore apps. Shizuku for those not familiar with it is an alternative privilege escalation method, that doesn't grant root permissions, but adb shell level permissions.

I don't know what it takes to support that instead of root, but would make sense for a rootless phone.

XayahSuSuSu commented 1 year ago

As I know, adb shell level permissions are not enough.

(base) PS C:\Users\Xayah> adb shell
cas:/ $ ls /data/data
ls: /data/data: Permission denied
1|cas:/ $
TamasBarta commented 1 year ago

I just checked Swift Backup again, and with Shizuku it only backs up the APK, not the user data. I was also checking adb backup but that seems to have stopped working properly since Android 12 according to https://stackoverflow.com/a/74388896/518076

If you think it makes sense to provide this partial backup support in this app, you can keep the ticket open, but feel free to close it.

Thanks for taking a look!

TamasBarta commented 1 year ago

Another discovery I made was that I could adb shell with root access on Lineage OS, if I enable it under the developer settings. This looks interesting, as I started a Shizuku terminal, and whoami says I'm root, so Shizuku may work after all.

XayahSuSuSu commented 1 year ago

Another discovery I made was that I could adb shell with root access on Lineage OS, if I enable it under the developer settings. This looks interesting, as I started a Shizuku terminal, and whoami says I'm root, so Shizuku may work after all.

That depends on the rom side and has no universality