Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Intent to trigger restore #40
I want to script re-installing my phone as much as possible, and one of the manual steps right now is starting oandbackup and selecting the apps to restore and clicking go.
In email, you suggested that one approach would be to use Intents to trigger this. I think this seems like a good approach: have an Intent to trigger restore of all apps in the configured path.
Then my script to automate re-install of my phone could be something like:
adb install dk.jens.backup-1.apk
This issue is to make it easier to track progress around this. :-)
i have considered having this for some time, and my first thought would be to do it via intents.
a security issue to consider here (if we go with intents) is how best to set up permissions for the broadcastreceiver. it needs to be permissive enough to be actually useable, but it probably wouldn't be a good idea to just let everybody (every other app, that is) send an intent to e.g. restore all apps.
It seems like receiving intent can be conditioned on having some permissions, see:
To enforce a permission when receiving, you supply a non-null permission when registering your receiver --
I'm not sure how to acquire such a permission from 'am broadcast' though... maybe being root is sufficient.