Are you asking about the security implications of something called
IGNORE_SECURITY?

What this does is loads code from one application into another app's
process -- that's arbitrary code that the loading application has no
control over.

There is no finer granularity control like "load only parcelables and
whatever code they reference" (which might pull in more and more code,
making the whole thing moot).

In short, I wouldn't touch it with a ten foot pole, and would instead
use a combination of basic data types supported by Parcelable "out of
the box".

Using custom parcelables within the same package is another story, of course.

-- K

21 марта 2012 г. 22:20 пользователь Franzi Roesner
<franzi.roes...@gmail.com> написал:
> I figured this out, in case someone else needs this one day. In the remote
> service, I did:
>
> Context c = createPackageContext("com.my.package",
> Context.CONTEXT_IGNORE_SECURITY | Context.CONTEXT_INCLUDE_CODE);
> bundle.setClassLoader(c.getClassLoader());
>
>
> However, what are the security implications of this (particularly the
> CONTEXT_IGNORE_SECURITY flag)?
>
> Thanks!
>
> Franzi
>
>
> On Wednesday, March 21, 2012 9:36:19 AM UTC-7, Franzi Roesner wrote:
>>
>> Hi,
>>
>> I'm trying to send a custom Parcelable to another application (in another
>> process).
>>
>> I have a client and a remote service, as well as an abstract class (say,
>> AbstractCustomParcelable) that I added to the Android framework itself (for
>> research purposes). The remote service should receive an object from the
>> client that is an instantiation of this abstract class, and then call a
>> method on it.
>>
>> The problem is that if I extend AbstractCustomParcelable in the client
>> (say, MyCustomParcelable) and then pass it to the service (by putting it in
>> a Bundle with some other stuff and sending it via a Message), I get a
>> ClassNotFoundError in the service:
>>
>> android.os.BadParcelableException: ClassNotFoundException when
>> unmarshalling: com.my.package.Client$MyCustomParcelable
>>
>> I've done some searches and it appears I need to do something with the
>> classloader, but I'm not sure where to set which classloader, and nothing
>> I've tried has worked so far (e.g., doing
>> setClassLoader(MyCustomParcelable.class.getClassLoader()) on the Bundle). Is
>> there a way to make this work?
>>
>>
>> Thanks in advance!
>>
>> Franzi
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to