Recent Changes to Rhizome Intents?

10 views
Skip to first unread message

Corey Wallis

unread,
Nov 13, 2012, 12:33:31 AM11/13/12
to serval-proje...@googlegroups.com
Hi,

Up until today I've been successfully using the code in my
RhizomeUtils [1] class to share a file via Rhizome for software that
I'm writing as part of the MaGDAA Project [2].

Unfortunately the code now fails to add a file to Rhizome in a build
of the Serval Mesh software that I made today from the latest
development branch.

The error is as follows:

<snip>
W/ActivityManager( 154): Permission Denial: Accessing service
ComponentInfo{org.servalproject/org.servalproject.rhizome.RhizomeIntentService}
from pid=1237, uid=10060 requires org.servalproject.rhizome.ADD_FILE
E/RhizomeUtils( 1237): security exception thrown when trying to add
file to rhizome
E/RhizomeUtils( 1237): java.lang.SecurityException: Not allowed to
start service Intent { act=org.servalproject.rhizome.ADD_FILE (has
extras) } without permission org.servalproject.rhizome.ADD_FILE
E/RhizomeUtils( 1237): at
android.app.ContextImpl.startService(ContextImpl.java:1117)
E/RhizomeUtils( 1237): at
android.content.ContextWrapper.startService(ContextWrapper.java:359)
E/RhizomeUtils( 1237): at
org.magdaaproject.utils.serval.RhizomeUtils.shareFile(RhizomeUtils.java:81)
E/RhizomeUtils( 1237): at
org.magdaaproject.mem.xforms.InstanceWriter.onReceive(InstanceWriter.java:216)
E/RhizomeUtils( 1237): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2242)
E/RhizomeUtils( 1237): at
android.app.ActivityThread.access$1500(ActivityThread.java:132)
E/RhizomeUtils( 1237): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
E/RhizomeUtils( 1237): at android.os.Handler.dispatchMessage(Handler.java:99)
E/RhizomeUtils( 1237): at android.os.Looper.loop(Looper.java:137)
E/RhizomeUtils( 1237): at
android.app.ActivityThread.main(ActivityThread.java:4575)
E/RhizomeUtils( 1237): at java.lang.reflect.Method.invokeNative(Native Method)
E/RhizomeUtils( 1237): at java.lang.reflect.Method.invoke(Method.java:511)
E/RhizomeUtils( 1237): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/RhizomeUtils( 1237): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
E/RhizomeUtils( 1237): at dalvik.system.NativeStart.main(Native Method)
</snip>

The odd thing is that I do have the permission
org.servalproject.rhizome.ADD_FILE defined in my AndroidManifest file
and up until today the code worked OK.

With this in mind is there anything that has changed with regards to
this RhizomeIntentService in the Serval Mesh software. If so what has
changed and what do I need to do to make the code run work again.

With thanks.

-Corey

[1] https://github.com/magdaaproject/magdaa-library/blob/master/src/org/magdaaproject/utils/serval/RhizomeUtils.java
[2] http://magdaaproject.org/

Paul Gardner-Stephen

unread,
Nov 13, 2012, 12:44:19 AM11/13/12
to serval-proje...@googlegroups.com
Hi Corey,

Try uninstalling and reinstalling your app after updating Serval Mesh,
as Android can get all confused about permissions if the using app is
installed before the providing app.

Paul.
> --
> You received this message because you are subscribed to the Google Groups "Serval Project Developers" group.
> To post to this group, send email to serval-proje...@googlegroups.com.
> To unsubscribe from this group, send email to serval-project-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/serval-project-developers?hl=en.
>

Corey Wallis

unread,
Nov 13, 2012, 12:56:59 AM11/13/12
to serval-proje...@googlegroups.com
Hi Paul,

Thanks for the suggestion.

This seems to have fixed it.

Although why uninstalling and reinstalling Serval Mesh, while leaving
the MaGDAA software installed, should cause such behaviour is a bit of
a mystery to me.

I'll make a note of this process in my documentation.

With thanks.

-Corey

Paul Gardner-Stephen

unread,
Nov 13, 2012, 6:09:50 AM11/13/12
to serval-proje...@googlegroups.com
Hello,

It is a known problem with Android. Upgrading instead of
uninstall/reinstall avoids the problem.

Paul.
Reply all
Reply to author
Forward
0 new messages