jensstein / oandbackup

backup manager for android
Other
539 stars 193 forks source link

Just a question: backup and restore system settings #191

Closed amo13 closed 3 years ago

amo13 commented 6 years ago

Hey guys, does anyone know if there is a possibility to back up system settings like activated "unknown sources", deactivated annoying touch sounds and maybe the quick settings tiles? What do I need to select in order to back this up? (I'm on LineageOS 14.1) I already tried restoring backups of:

com.android.providers.settings
com.android.settings
com.cyanogenmod.trebuchet
org.cyanogenmod.cmparts

I was also able to restore all my widgets with their respective positions, which is just amazing! But unfortunately, restoring system settings is what I am missing.

I'd appreciate any idea! Thanks in advance!

ildar commented 6 years ago

Let me present my "idea" Settings are very security sensitive and you generally don't want them to be set/reset automatically. For "Unknown sources" it's more safe to use F-Droid Privileged Extension (Services to allow F-Droid to securely install and update apps) - https://f-droid.org/app/org.fdroid.fdroid.privileged Just IMHO

amo13 commented 6 years ago

Thanks for your idea! Yes, fdroid privileged is awesome, like fdroid in general! But it doesn't solve my problem just yet... I actually do have a situation/scenario where I want to set some system settings automatically. Most of these are not relevant for security at all (like turning off sounds). The only security-relevant setting I want to set automatically is the "password visible" toggle, which is set to yes by default and makes your password semi-readable to anyone looking over your shoulder. To me, oandbackup looks like it should be able to do so, but it does not really or I'm not sure how to do it... Any idea?

tulakalbeyo commented 5 years ago

for me (lineage-15.1-20181029-nightly-ether-signed.zip, open_gapps-arm64-8.1-pico-20181103.zip, addonsu-15.1-arm64-signed.zip), using data+apk ...

here's what works: com.android.providers.contacts (Contacts) com.android.providers.userdictionary (User Dictionary)

and here's what doesn't: com.android.settings (Settings) org.lineageos.lineageparts (LineageOS Settings) org.lineageos.lineagesettings (Lineage Settings Storage)

the ones that don't work (don't restore) spit out the kinds of messages shown in the following screenshot:

45529245_264039860923980_7638475250035851264_n

thanks!

amo13 commented 5 years ago

this looks like a small issue with the new rust binary... maybe this can be fixed

jensstein commented 5 years ago

@tulakalbeyo could you run ls -ld /data/user_de/0/org.lineageos.lineagesettings/ and /data/data/dk.jens.backup/files/oab-utils owner /data/user_de/0/org.lineageos.lineagesettings/ as su on your device.

the output of the last command on my device is {"uid": 1000, "gid": 1000}

tulakalbeyo commented 5 years ago

@jensstein sure thing, dude:

$ su
ether:/ #
ether:/ # ls -ld /data/user_de/0/org.lineageos.lineagesettings/
drwx------ 6 system system 4096 1971-12-12 04:46 /data/user_de/0/org.lineageos.lineagesettings/
ether:/ #
ether:/ # /data/data/dk.jens.backup/files/oab-utiens.backup/files/oab-utils owner /data/user_de/0/s owner /data/user_de/0/org.lineageos.lineagesettings/
{"uid": 1000, "gid": 1000}
ether:/ #
ether:/ # exit
$