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/