Skip to content
This repository has been archived by the owner on Jun 28, 2019. It is now read-only.

[process]MayLoon System Resources Management

qi.zhang edited this page Dec 23, 2013 · 1 revision

MayLoon System Resources Management

   MayLoon has system resources at com.intel.jsdroid\res_sys\framework-res.apk_FILES. They are compiled resources which will be used by our MayLoon runtime. As some times we need to change some resources such as layout xml and re-compile them, we need to track/maintain the resources, and we also need a environment for  team to build the resource. Here we  have setup a android-2.3.3r1 build environment which can shared by the whole team so that individual developer don't need to setup their own environment, hence can greatly improve our working efficiency.
  

  1. Log into MayLoon machine, you can use SSH or VNC
     IP adress: 10.239.44.46

     UserName: mayloon

     PW: mayloon

  2. cd to /home/mayloon/work/android-2.3.3-r1

     If MayLoon just reported lack of some resources, you only need to copy the original compiled resources from Android to MayLoon.

     Copy the lacked resources from out/target/product/generic/system/framework/framework-res.apk (You need to use unzip this file). to MayLoon com.intel.jsdroid\res_sys\framework-res.apk_FILES.
     And  you don't need to go the below steps anymore and just logout the machine!!!

     If you need to add new resources to Android resources, go to here:

     run  source ./build/envsetup.sh

  3. cd to /home/mayloon/android-2.3.3-r1/frameworks/base/core/res

     Step1: Attention: This directory are fetched from our MayLoon framework-res repository, so they can be maitained under git. Generally now you are on master branch. Before you make any modification to this directory, pls. create your own working branch based on the latest master:

                          git pull origin master            

                          git checkout -b mybrach

     Step2: Make your modifications to resources.

     Step3: cd back to /home/mayloon/android-2.3.3-r1/ and run "make framework-res" to build the resources package.

     Step3: After you ensure that your change can work well. You shoul cd to /home/mayloon/android-2.3.3-r1/frameworks/base/core/res and push your change to framework-res repository. Notice: The commit username are configured as "Framework resource Editor", email is "jin.a.yang@intel.com"

                          git commit "your change"

                          git push origin HEAD:refs/for/master

     Step4: On the other hand, you should also push the comiled resources to MayLoon com.intel.jsdroid\res_sys\framework-res.apk_FILES. Genrally the changes including:

            1. Update "com.intel.jsdroid\src\com\android\internal\R.java" if you have added new resoures to res because new resource id will be added. (The new compiled R.java is at android-2.3.3-r1/out/target/common/obj/APPS/framework-res_intermediates/src/com/android/internal/R.java

            2. Also update "com.intel.jsdroid\src\android\R.java". if you have added new resoures to res because new resource id will be added. (The new compiled R.java is at android-2.3.3-r1/out/target/common/obj/APPS/framework-res_intermediates/src/android/R.java

            3. Add your compiled resources (such as layout.xml  to res/layout). The new compiled resource are at android-2.3.3-r1/out/target/product/generic/system/framework/framework-res.apk (You need to use unzip this file).

            3. The AndroidManifest.xml and  resources.arsc also need to be updated if any change.
  4. Log out from mayloon machine.