SlideShare a Scribd company logo
Android resource and
overlay study
Agenda
• Compile resource.
• Init resource.
• Load resource.
• Overlay mechanism.
2
What is resource in Android
Android resources makes it easy to update various
characteristics of your application without modifying
code.
Resource type
Assets
Res
 Animator
 Anim
 Color
 Drawable
 Layout
 Menu
 Raw
 Values
 xml
3
Compile resource
Aapt tool is used to compile the resource
4
Res/values will be compiled into Resources.arsc
Compile resource
• No modification
The resource files under assets and res/raw.
The Bitmap files under drawable directory.(*.png,*.bmp,*.jpg)
• Every resource(excepts assets) will be assigned a
identical ID.
• Resources.arsc is created to store the resource
index.
• R.java is created to store the resource ID constant.
• Other xml files(includes of AndroidManifests.xml)
will be compiled into binary xml file.
5
Every resource(excepts assets) will be assigned a
identical ID
Compile resource
• The structure of every binary xml
6
Every xml will be compiled into a binary xml
Compile resource
• The structure of Resources.arsc
7
Scan package
8
A Idmap file will be created if it is a overlay package
Init resource
9
Only the string pool will be loaded into java layer
Resource structure
10
Load resource
11
Load the best matching resource in APK or overlay APK
Overlay mechanism
Static overlay
Dynamic overlay
12
Overlay mechanism - Static overlay
 Overlay resource is placed under device/intel/***
PRODUCT_PACKAGE_OVERLAYS :=
DEVICE_PACKAGE_OVERLAYS :=
 The overlay directory list will be used by the aapt tool.
13
Overlay mechanism - Dynamic overlay
 Create the pure overlay package using AAPT with the –o argument.
<overlay targetPackage="com.target.package" priority="1234"/>
 A idmap file of every overlay apk is created when it is scanned.
The idmap file is used to map the resId original package in to the resId in overlay apk.
It is stored under "/data/resource-cache/“ and named
@vendor@intel@overlay@settings@settings.apk@idmap.
( vendor/intel/overlay/settings/settings.apk)
 Load the idmap into Header in ResTable when the resource is loaded.
two variable is added in Header for idmap.
resourceIDMap
resourceIDMapSize
 Query the resource id from all packages according to the priority below.
High priority overlay apk -> low priority overlay apk -> original apk
It only can be used to replace the existing resource but
no can be used to add a new resource.
14
Conclusion
Dynamic overlay is used to change the existing
resource without compilation.
It is not suitable for our requirement,
Don’t port the patch of Sony from Google.
15
Conclusion
static overlay.
 How to resolve the compile issue when we do
pdk rebase.(Some new resource is added in aosp)
 Keep AOSP clean and add all new resources into overlay directory.
 Add a argument named when we use AAPT tool.
LOCAL_AAPT_FLAGS += --auto-add-overlay
 How to enable overlay directory in different
platform(ARM and emulator)
Add DEVICE_PACKAGE_OVERLAYS in the mk for platform
Add the resource into overlay dir.
16
Reference
https://android-
review.googlesource.com/#/c/46739/
http://developer.android.com/reference/android/c
ontent/res/Resources.html
17

More Related Content

What's hot

Big Data and Hadoop Guide
Big Data and Hadoop GuideBig Data and Hadoop Guide
Big Data and Hadoop Guide
Simplilearn
 
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Simplilearn
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7
aminmesbahi
 
Александр Третьяков: "Spring Data JPA and MongoDB"
Александр Третьяков: "Spring Data JPA and MongoDB" Александр Третьяков: "Spring Data JPA and MongoDB"
Александр Третьяков: "Spring Data JPA and MongoDB"
Anna Shymchenko
 
.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 18
 .NET Core, ASP.NET Core Course, Session 18 .NET Core, ASP.NET Core Course, Session 18
.NET Core, ASP.NET Core Course, Session 18
aminmesbahi
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
Anatole Tresch
 
Standards of rest api
Standards of rest apiStandards of rest api
Standards of rest api
Maýur Chourasiya
 
Modelling RESTful applications – Why should I not use verbs in REST url
Modelling RESTful applications – Why should I not use verbs in REST urlModelling RESTful applications – Why should I not use verbs in REST url
Modelling RESTful applications – Why should I not use verbs in REST url
Xebia IT Architects
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
aminmesbahi
 

What's hot (12)

Big Data and Hadoop Guide
Big Data and Hadoop GuideBig Data and Hadoop Guide
Big Data and Hadoop Guide
 
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7
 
Александр Третьяков: "Spring Data JPA and MongoDB"
Александр Третьяков: "Spring Data JPA and MongoDB" Александр Третьяков: "Spring Data JPA and MongoDB"
Александр Третьяков: "Spring Data JPA and MongoDB"
 
.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10
 
.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
 
.NET Core, ASP.NET Core Course, Session 18
 .NET Core, ASP.NET Core Course, Session 18 .NET Core, ASP.NET Core Course, Session 18
.NET Core, ASP.NET Core Course, Session 18
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
Standards of rest api
Standards of rest apiStandards of rest api
Standards of rest api
 
Modelling RESTful applications – Why should I not use verbs in REST url
Modelling RESTful applications – Why should I not use verbs in REST urlModelling RESTful applications – Why should I not use verbs in REST url
Modelling RESTful applications – Why should I not use verbs in REST url
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
 

Viewers also liked

Crowd funding
Crowd funding Crowd funding
Crowd funding
Haifa Ftirich
 
Vagrant workshop 2015
Vagrant workshop 2015Vagrant workshop 2015
Vagrant workshop 2015
Haifa Ftirich
 
Présentation-Tunihack 2015
Présentation-Tunihack 2015Présentation-Tunihack 2015
Présentation-Tunihack 2015
Haifa Ftirich
 
Adams, Research Mentoring Program Presentation April 2014
Adams, Research Mentoring Program Presentation April 2014Adams, Research Mentoring Program Presentation April 2014
Adams, Research Mentoring Program Presentation April 2014
ladams3
 
Adams_The College Experiences of Black Female Alumnae of PWIs
Adams_The College Experiences of Black Female Alumnae of PWIsAdams_The College Experiences of Black Female Alumnae of PWIs
Adams_The College Experiences of Black Female Alumnae of PWIs
ladams3
 
New features in android m upload
New features in android m   uploadNew features in android m   upload
New features in android m upload
Bin Yang
 
JenkinsPy workshop
JenkinsPy workshop JenkinsPy workshop
JenkinsPy workshop
Haifa Ftirich
 
Jrny Overview
Jrny OverviewJrny Overview
Jrny Overview
Jrny
 
Adams lurop presentation_april 12, 2014
Adams lurop presentation_april 12, 2014Adams lurop presentation_april 12, 2014
Adams lurop presentation_april 12, 2014
ladams3
 
Linker namespace upload
Linker namespace   uploadLinker namespace   upload
Linker namespace upload
Bin Yang
 
Presentacion gases arteriales , ph y equilibrio acido base
Presentacion gases arteriales , ph y equilibrio acido basePresentacion gases arteriales , ph y equilibrio acido base
Presentacion gases arteriales , ph y equilibrio acido base
Felipe Hauska
 
Android secuirty permission - upload
Android secuirty   permission - uploadAndroid secuirty   permission - upload
Android secuirty permission - upload
Bin Yang
 
Linker and loader upload
Linker and loader   uploadLinker and loader   upload
Linker and loader upload
Bin Yang
 
The What,Why and How of Experiential Marketing
The What,Why and How of Experiential MarketingThe What,Why and How of Experiential Marketing
The What,Why and How of Experiential Marketing
Jrny
 
Parantez.com - Software Development Life Cycle
Parantez.com - Software Development Life CycleParantez.com - Software Development Life Cycle
Parantez.com - Software Development Life Cycle
Murat Orno
 

Viewers also liked (16)

Crowd funding
Crowd funding Crowd funding
Crowd funding
 
Vagrant workshop 2015
Vagrant workshop 2015Vagrant workshop 2015
Vagrant workshop 2015
 
Présentation-Tunihack 2015
Présentation-Tunihack 2015Présentation-Tunihack 2015
Présentation-Tunihack 2015
 
Ejercicios
EjerciciosEjercicios
Ejercicios
 
Adams, Research Mentoring Program Presentation April 2014
Adams, Research Mentoring Program Presentation April 2014Adams, Research Mentoring Program Presentation April 2014
Adams, Research Mentoring Program Presentation April 2014
 
Adams_The College Experiences of Black Female Alumnae of PWIs
Adams_The College Experiences of Black Female Alumnae of PWIsAdams_The College Experiences of Black Female Alumnae of PWIs
Adams_The College Experiences of Black Female Alumnae of PWIs
 
New features in android m upload
New features in android m   uploadNew features in android m   upload
New features in android m upload
 
JenkinsPy workshop
JenkinsPy workshop JenkinsPy workshop
JenkinsPy workshop
 
Jrny Overview
Jrny OverviewJrny Overview
Jrny Overview
 
Adams lurop presentation_april 12, 2014
Adams lurop presentation_april 12, 2014Adams lurop presentation_april 12, 2014
Adams lurop presentation_april 12, 2014
 
Linker namespace upload
Linker namespace   uploadLinker namespace   upload
Linker namespace upload
 
Presentacion gases arteriales , ph y equilibrio acido base
Presentacion gases arteriales , ph y equilibrio acido basePresentacion gases arteriales , ph y equilibrio acido base
Presentacion gases arteriales , ph y equilibrio acido base
 
Android secuirty permission - upload
Android secuirty   permission - uploadAndroid secuirty   permission - upload
Android secuirty permission - upload
 
Linker and loader upload
Linker and loader   uploadLinker and loader   upload
Linker and loader upload
 
The What,Why and How of Experiential Marketing
The What,Why and How of Experiential MarketingThe What,Why and How of Experiential Marketing
The What,Why and How of Experiential Marketing
 
Parantez.com - Software Development Life Cycle
Parantez.com - Software Development Life CycleParantez.com - Software Development Life Cycle
Parantez.com - Software Development Life Cycle
 

Similar to Android ressource and overlay upload

Android project architecture
Android project architectureAndroid project architecture
Android project architecture
Sourabh Sahu
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
Vyara Georgieva
 
Generating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving PerformanceGenerating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving Performance
Paresh Mayani
 
From System Engineer to Gopher
From System Engineer to GopherFrom System Engineer to Gopher
From System Engineer to Gopher
I-Fan Wang
 
Android Programming.pptx
Android Programming.pptxAndroid Programming.pptx
Android Programming.pptx
vishal choudhary
 
Adapter and cache technique
Adapter and cache techniqueAdapter and cache technique
Adapter and cache technique
Hoang Vy Nguyen
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docx
audeleypearl
 
Optimize APK size
Optimize APK sizeOptimize APK size
Optimize APK size
Kirill Rozov
 
Ray The alternative to distributed frameworks.pdf
Ray The alternative to distributed frameworks.pdfRay The alternative to distributed frameworks.pdf
Ray The alternative to distributed frameworks.pdf
Andrew Li
 
Large Scale Indexing
Large Scale IndexingLarge Scale Indexing
Large Scale Indexing
Sease
 
Android Auto instrumentation
Android Auto instrumentationAndroid Auto instrumentation
Android Auto instrumentation
Przemek Jakubczyk
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplication
poojapainter
 
Springboot2 postgresql-jpa-hibernate-crud-example
Springboot2 postgresql-jpa-hibernate-crud-exampleSpringboot2 postgresql-jpa-hibernate-crud-example
Springboot2 postgresql-jpa-hibernate-crud-example
HyukSun Kwon
 
Android stepbystep
Android stepbystepAndroid stepbystep
Android stepbystep
Krazy Koder
 
03 android application structure
03 android application structure03 android application structure
03 android application structure
Sokngim Sa
 
The Road To Single Dex (GDG San Francisco Meetup)
The Road To Single Dex (GDG San Francisco Meetup)The Road To Single Dex (GDG San Francisco Meetup)
The Road To Single Dex (GDG San Francisco Meetup)
Jared Burrows
 
The Road To Single Dex (Gradle Summit 2017)
The Road To Single Dex (Gradle Summit 2017)The Road To Single Dex (Gradle Summit 2017)
The Road To Single Dex (Gradle Summit 2017)
Jared Burrows
 
When using Android Studio- what is the purpose of the R-java file- Doe.docx
When using Android Studio- what is the purpose of the R-java file- Doe.docxWhen using Android Studio- what is the purpose of the R-java file- Doe.docx
When using Android Studio- what is the purpose of the R-java file- Doe.docx
SUKHI5
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
NodeXperts
 
Chapter 9 - Resources System
Chapter 9 - Resources SystemChapter 9 - Resources System
Chapter 9 - Resources System
Sittiphol Phanvilai
 

Similar to Android ressource and overlay upload (20)

Android project architecture
Android project architectureAndroid project architecture
Android project architecture
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
 
Generating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving PerformanceGenerating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving Performance
 
From System Engineer to Gopher
From System Engineer to GopherFrom System Engineer to Gopher
From System Engineer to Gopher
 
Android Programming.pptx
Android Programming.pptxAndroid Programming.pptx
Android Programming.pptx
 
Adapter and cache technique
Adapter and cache techniqueAdapter and cache technique
Adapter and cache technique
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docx
 
Optimize APK size
Optimize APK sizeOptimize APK size
Optimize APK size
 
Ray The alternative to distributed frameworks.pdf
Ray The alternative to distributed frameworks.pdfRay The alternative to distributed frameworks.pdf
Ray The alternative to distributed frameworks.pdf
 
Large Scale Indexing
Large Scale IndexingLarge Scale Indexing
Large Scale Indexing
 
Android Auto instrumentation
Android Auto instrumentationAndroid Auto instrumentation
Android Auto instrumentation
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplication
 
Springboot2 postgresql-jpa-hibernate-crud-example
Springboot2 postgresql-jpa-hibernate-crud-exampleSpringboot2 postgresql-jpa-hibernate-crud-example
Springboot2 postgresql-jpa-hibernate-crud-example
 
Android stepbystep
Android stepbystepAndroid stepbystep
Android stepbystep
 
03 android application structure
03 android application structure03 android application structure
03 android application structure
 
The Road To Single Dex (GDG San Francisco Meetup)
The Road To Single Dex (GDG San Francisco Meetup)The Road To Single Dex (GDG San Francisco Meetup)
The Road To Single Dex (GDG San Francisco Meetup)
 
The Road To Single Dex (Gradle Summit 2017)
The Road To Single Dex (Gradle Summit 2017)The Road To Single Dex (Gradle Summit 2017)
The Road To Single Dex (Gradle Summit 2017)
 
When using Android Studio- what is the purpose of the R-java file- Doe.docx
When using Android Studio- what is the purpose of the R-java file- Doe.docxWhen using Android Studio- what is the purpose of the R-java file- Doe.docx
When using Android Studio- what is the purpose of the R-java file- Doe.docx
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Chapter 9 - Resources System
Chapter 9 - Resources SystemChapter 9 - Resources System
Chapter 9 - Resources System
 

Recently uploaded

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 

Recently uploaded (20)

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 

Android ressource and overlay upload

  • 2. Agenda • Compile resource. • Init resource. • Load resource. • Overlay mechanism. 2
  • 3. What is resource in Android Android resources makes it easy to update various characteristics of your application without modifying code. Resource type Assets Res  Animator  Anim  Color  Drawable  Layout  Menu  Raw  Values  xml 3
  • 4. Compile resource Aapt tool is used to compile the resource 4 Res/values will be compiled into Resources.arsc
  • 5. Compile resource • No modification The resource files under assets and res/raw. The Bitmap files under drawable directory.(*.png,*.bmp,*.jpg) • Every resource(excepts assets) will be assigned a identical ID. • Resources.arsc is created to store the resource index. • R.java is created to store the resource ID constant. • Other xml files(includes of AndroidManifests.xml) will be compiled into binary xml file. 5 Every resource(excepts assets) will be assigned a identical ID
  • 6. Compile resource • The structure of every binary xml 6 Every xml will be compiled into a binary xml
  • 7. Compile resource • The structure of Resources.arsc 7
  • 8. Scan package 8 A Idmap file will be created if it is a overlay package
  • 9. Init resource 9 Only the string pool will be loaded into java layer
  • 11. Load resource 11 Load the best matching resource in APK or overlay APK
  • 13. Overlay mechanism - Static overlay  Overlay resource is placed under device/intel/*** PRODUCT_PACKAGE_OVERLAYS := DEVICE_PACKAGE_OVERLAYS :=  The overlay directory list will be used by the aapt tool. 13
  • 14. Overlay mechanism - Dynamic overlay  Create the pure overlay package using AAPT with the –o argument. <overlay targetPackage="com.target.package" priority="1234"/>  A idmap file of every overlay apk is created when it is scanned. The idmap file is used to map the resId original package in to the resId in overlay apk. It is stored under "/data/resource-cache/“ and named @vendor@intel@overlay@settings@settings.apk@idmap. ( vendor/intel/overlay/settings/settings.apk)  Load the idmap into Header in ResTable when the resource is loaded. two variable is added in Header for idmap. resourceIDMap resourceIDMapSize  Query the resource id from all packages according to the priority below. High priority overlay apk -> low priority overlay apk -> original apk It only can be used to replace the existing resource but no can be used to add a new resource. 14
  • 15. Conclusion Dynamic overlay is used to change the existing resource without compilation. It is not suitable for our requirement, Don’t port the patch of Sony from Google. 15
  • 16. Conclusion static overlay.  How to resolve the compile issue when we do pdk rebase.(Some new resource is added in aosp)  Keep AOSP clean and add all new resources into overlay directory.  Add a argument named when we use AAPT tool. LOCAL_AAPT_FLAGS += --auto-add-overlay  How to enable overlay directory in different platform(ARM and emulator) Add DEVICE_PACKAGE_OVERLAYS in the mk for platform Add the resource into overlay dir. 16