New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Intent to trigger restore #40

jas4711 opened this Issue Nov 5, 2013 · 3 comments


None yet
3 participants
Copy link

jas4711 commented Nov 5, 2013

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
adb push oandbackups /sdcard/oandbackups
adb shell am ... # trigger intent here

This issue is to make it easier to track progress around this. :-)


This comment has been minimized.

Copy link

jensstein commented Nov 6, 2013

i have considered having this for some time, and my first thought would be to do it via intents.
different options could then be exposed via extras and called with something like am broadcast -a dk.jens.backup.INTENTNAME -e mode restore -e dirpath /sdcard/backups -n dk.jens.backup/.Receiver
but since i never automate things like this myself, i would very much appreciate any input from others who do.

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.


This comment has been minimized.

Copy link

jas4711 commented Nov 6, 2013

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 --
either when calling registerReceiver(BroadcastReceiver, IntentFilter, String, android.os.Handler) or in the static
tag in your AndroidManifest.xml. Only broadcasters who have been granted this permission (by
requesting it with the tag in their AndroidManifest.xml) will be able to send an Intent to the

I'm not sure how to acquire such a permission from 'am broadcast' though... maybe being root is sufficient.



This comment has been minimized.

Copy link

SLiX69 commented Mar 23, 2017

Hi, is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment