Hi, Robert

Thanks for the comments. Please see the answers below.

> Where will the shared code be stored on the device?

Shiliu: Shared code exists as an application on Android which is same as all 
other normal applications.

> How do you prevent malicious tampering (code injection) on the shared code, 
> if it is accessible to other applications?

Shiliu: Shared code will be loaded from "createPackageContext" API provided by 
Android. It actually gets the context with the target package's class loader. 
That makes it possible to use the classes in the library apk in real crosswalk 
applications. The security is promised by Android.

> Who will publish the shared APK on Google Play?

Shiliu: Hopefully, crosswalk will publish the default shared APK on 
PlayStore.(There is another session discuss the possibility, let's skip here)
It will also be configurable for the library's package name for shared mode, 
which means embedders is able to publish their own library apk as long as 
changing the package name with little effort (we can provide tool to help).

Thanks,
Shiliu.

-----Original Message-----
From: Staudinger, Robert [mailto:[email protected]] 
Sent: Tuesday, June 3, 2014 2:53 PM
To: Wang, Shiliu
Cc: Zhu, Yongsheng; Liu, Shouqun; Menard, Alexis; Christiansen, Kenneth R; 
[email protected]
Subject: Re: [Crosswalk-dev] Intent to implement - Shared mode for xwalk core 
on Android

Hello Shiliu,

I have a few questions about this.

* Where will the shared code be stored on the device?

* How do you prevent malicious tampering (code injection) on the shared code, 
if it is accessible to other applications?

* Who will publish the shared APK on Google Play?

Many thanks,
Rob

On 30 May 2014 03:20, Wang, Shiliu <[email protected]> wrote:
> Description:
>
> Shared mode allows apps/embedders to share xwalk core from anther 
> APK(library APK) on Android. Apps/Embedders only needs to package a 
> thin wrapper java layer into their own apks. The footprint of an app 
> use shared mode will be very small.
>
> Shared mode is already supported for xwalk runtime API currently for 
> xwalk app usage.
>
> This intent is to move the shared layer down to xwalk embedding API
> (https://crosswalk-project.org/#documentation/apis/embedding_api)
>
>
>
> Affected component:
>
> XWalk on Android:
>
>        Core
>
> Runtime
>
> Package tool
>
>
>
> Related feature
>
> XWALK-1638: Enable shared mode for Crosswalk core
>
>
>
> Target release:
>
> Crosswalk-8
>
>
>
> Implementation details:
>
> The main implementation is planned to be done by three stages:
>
> 1.       Split current xwalk core into xwalk core and xwalk core internal
>
> a)         The real implementation will be moved from package org.xwalk.core
> to org.xwalk.core.internal
>
> b)         A thin wrapper will be manually written and placed at
> org.xwalk.core for upper layer to use.
>
> 2.       Automatically generate wrapper code in xwalk core which 1) provides
> embedding API to embedders; 2) invoke core internal with java reflection.
>
> a)         The thin wrapper in org.xwalk.core in stage 1 will be removed.
>
> b)         Use script to generate bridge and wrapper class at compile time.
>
>                          i.              Bridge class is in
> org.xwalk.core.internal, inherits internal class and talk with wrapper 
> class via reflection.
>
>                        ii.              Wrapper class is the one embedding
> API exposes, talk to bridge class via reflection.
>
>                       iii.              For detail, please refer design
> documentation.
>
> 3.       Enable shared mode by provide library apk of xwalk core and create
> both shared and embedded build target.
>
> a)         Remove current reflection layer in runtime layer.
>
> b)         Add target to package xwalk core internal into a library apk for
> shared mode to use.
>
> c)         Adjust xwalk runtime and xwalk core library to support both
> shared and embedded mode.
>
>
>
> Detail Documentation:
>
> https://docs.google.com/a/intel.com/document/d/1xrqd6dhQG2Qk0LxVUXs4_M
> R2CdIMmUlGl7mA_xe0DkA
>
>
>
>
>
>
>
> Thanks,
>
> Shiliu.
>
>
> _______________________________________________
> Crosswalk-dev mailing list
> [email protected]
> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
>
_______________________________________________
Crosswalk-dev mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to