SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Android and its upstream projects
Bernhard “Bero” Rosenkränzer, LCU2013
www.linaro.org
• Android is, in many ways, just another Linux distribution
• As such, it includes code from many FOSS projects...
• … and quite frequently, isn't in sync with what upstreams are
doing.
Android's upstreams
www.linaro.org
• Android imports an external FOSS project into its git repository
(sometimes a released version, sometimes a git or svn snapshot)
• Patches to make it work with Android (and sometimes to add, remove or
modify some functionality) are added inside Android's git repository
• There is little or no effort made to upstream those changes, some
changes are a little bogus (checking in a config.h generated by autoconf
to avoid the need to call configure, ...)
• A newer upstream release may or may not be merged into Android – if at
all, merges typically happen months after the upstream release
• Android has no concept of OS component packages, and cannot update
an individual component (e.g. openssl) – often leading to important
upstream updates being ignored by device makers
Current situation
www.linaro.org
• Patches needed for Android go upstream ASAP (#ifdef-ed if
necessary)
• Upstream releases can be merged into Android quickly and
painlessly because all relevant patches are already there
• Upstream releases actually are merged in a timely manner
• Android adopts some sort of upstream packaging so e.g. an
OpenSSL security update can be pushed even to people who
are stuck with an ancient Android version
Ideal situation
www.linaro.org
• Upstream Android will likely never use regular Linux style
packaging because OEMs don't like the idea of having parts
of their OS overwritten by an update too much, so – aside
from maybe making sure rpm, dpkg and friends can run on
top of Bionic – let's focus on what can be done:
• Try to upstream patches found in the Android source tree
• Merge newer upstream releases into the Android source tree
and try to upstream that
• Find solutions for projects that have been abandoned (or are
otherwise obsolete/bad choices) upstream
What can Linaro (and others) do?
www.linaro.org
• Toolchains:
– Android 4.3 uses a modified version of gcc 4.6
– Linaro already provides alternative toolchains based on gcc 4.7 and gcc 4.8
(using Linaro performance patches + forward ports of Google's patches) and
[unofficially] llvm/clang 3.4svn
• Kernel:
– Android devices typically are released with a kernel that is slightly outdated at
device release time, and never get kernel updates (at best, they get updates
from the -stable branch within their minor kernel release, e.g. v3.0.1 →
v3.0.15)
– Linaro provides current kernels with patches needed to make Android work
(Binder, ashmem, …) - but can't possibly release kernels for every device,
and device specific changes are typically not upstreamed by handset makers.
Core components
www.linaro.org
●
Freetype
– Android uses 2.4.9
– Current 2.5.x releases add Adobe's CFF engine (better TrueType rendering) and
embedded bitmaps (color emoji etc)
What are we missing out on?
www.linaro.org
●
Harfbuzz, Harfbuzz-ng
– Also on font rendering, Android uses a revision of harfbuzz from February 2012 (this
tree is essentially unmaintained, but still needs to be watched for fixes – or better yet,
get rid of it) and harfbuzz-ng 0.9.14
– Current Harfbuzz-ng is 0.9.22 with various seemingly important changes:
●
Bug fixes (including a fix for an undefined memory access)
●
Several Arabic mark positioning and width bugs
●
Major speedups in OpenType processing
What are we missing out on?
www.linaro.org
●
V8, WebRTC, Chromium, WebKit, WebP
– Outdated versions included in Android – v8 3.9.24.30 (current work goes into
3.21.x), WebRTC rev. 180 (current: 4933), Chromium 12.0.742.130 (July 2011)
– WebKit and WebP fairly current and synced frequently (last sync shortly before 4.3
release)
– Lots of work has gone into those projects since, e.g.
●
Performance improvements, including better VFPv2 and VFPv3 support
●
Bugfixes (including support for newer toolchains already backported by Linaro)
●
Variable limit increased in v8
●
Debugging improvements
– If I was wearing my tin foil hat, I'd make some comment about this being related to
the push for binary-only Chrome for Android...
But of course, any reasonable person knows this is just because nobody has time to
work on it...
There might also be binary compatibility issues
What are we missing out on?
www.linaro.org
●
Image formats – libjpeg, libpng, libgif
– libpng 1.2.46 (current: 1.6.6/1.2.50)
●
Potential problem: Binary compatibility. Soname has changed 3 times since Android's forking... But
Android has no concept of sonames, so this is potentially dangerous for NDK users – workaround could
be naming it libpng16.so (would require changing the linker command every time libpng is updated to a
new major version though...)
●
Fixes for important security backports were backported to 1.2.46, we're not affected by CVE-2011-3048
anymore
●
Nevertheless, we can't stay on dead code forever, this needs to be addressed at some point.
●
Changes include major cleanups and optimizations, support for some new chunks
– libjpeg 6 (current: 9a – better yet, switch to libjpeg-turbo unless we need SmartScale)
●
Last synced with upstream in November 2009
●
libjpeg-turbo is heavily optimized, among other things with NEON support
●
Linaro has already made the switch to libjpeg-turbo...
– … but then fell into the same trap, no libjpeg-turbo updates since January 2012 (latest release:
1.3.0 from Sept 25, 2013)
– giflib 4.1.6 (current: 5.0.5/4.2.3)
●
Many important things (reentrancy, ...) added in 5.x – but are gifs still relevant?
What are we missing out on?
www.linaro.org
●
libusb
– Android's libusb derives from libusb 1.0.9
– libusb is essentially dead, with even its maintainers telling people to use the libusbx
fork (currently at 1.0.17)
– libusbx is primarily about bugfixes
What are we missing out on?
www.linaro.org
●
STL
– Parts of the C++ Standard Template Library (STL) are used by almost all C++ based projects
and libraries, including those that are part of Android
– Android decided not to use GNU libstdc++ because of its GPL-with-linking-exception licensing
– So it chose STLport 5.2.1 (released 2008) instead... But STLport hasn't made any releases since
(and seems to be almost unmaintained – the latest commit in the git repository is more than a
year old). In the mean time, other STLs have moved on, speeding things up [and STLport wasn't
known for its speed when it was still current] and implementing C++11, beginnings of C++14,
…
– It may make sense to go with a viable alternative, such as GNU libstdc++ (not liked in Android
because of licensing) or LLVM's libc++ (probably the best choice – small, fast, and under a
BSD-like license)
– Issue with binary compatibility – source level compatibility is almost 100%, binary compatibility
doesn't exist. Still, this may be the only way to not fall behind the rest of the world.
– Shipping 2 STLs is possible, but still causes issues (an application that links to stlport and to a
library linked against libc++ is likely to see weird issues)
What are we missing out on?
www.linaro.org
●
apache-harmony
– Android's core Java class library is derived from Apache Harmony svn rev. 1097236
– Apache decided to abandon Harmony on November 16, 2011 (last svn rev.: 1148509)
– Android has made slight modifications on top of Harmony, but not enough to keep
a dead project alive...
– Can Android stay on the Java 6 language level forever? This may seem feasible now
with Java 7 and 8 not introducing too many important changes – but what about 9?
10? 50?
– What are possible alternatives?
●
OpenJDK's class library (Unlikely to happen upstream because of Google-Oracle patent
fighting)
●
GNU Classpath (Unlikely to happen upstream because Android doesn't like GPL-with-
linking-exception licensing)
A problem waiting to happen...
connect.linaro.org

Weitere ähnliche Inhalte

Mehr von Linaro

Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...Linaro
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramLinaro
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNLinaro
 

Mehr von Linaro (20)

Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NN
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

LCU13: Android not in sync with upstream & external projects

  • 1. Android and its upstream projects Bernhard “Bero” Rosenkränzer, LCU2013
  • 2. www.linaro.org • Android is, in many ways, just another Linux distribution • As such, it includes code from many FOSS projects... • … and quite frequently, isn't in sync with what upstreams are doing. Android's upstreams
  • 3. www.linaro.org • Android imports an external FOSS project into its git repository (sometimes a released version, sometimes a git or svn snapshot) • Patches to make it work with Android (and sometimes to add, remove or modify some functionality) are added inside Android's git repository • There is little or no effort made to upstream those changes, some changes are a little bogus (checking in a config.h generated by autoconf to avoid the need to call configure, ...) • A newer upstream release may or may not be merged into Android – if at all, merges typically happen months after the upstream release • Android has no concept of OS component packages, and cannot update an individual component (e.g. openssl) – often leading to important upstream updates being ignored by device makers Current situation
  • 4. www.linaro.org • Patches needed for Android go upstream ASAP (#ifdef-ed if necessary) • Upstream releases can be merged into Android quickly and painlessly because all relevant patches are already there • Upstream releases actually are merged in a timely manner • Android adopts some sort of upstream packaging so e.g. an OpenSSL security update can be pushed even to people who are stuck with an ancient Android version Ideal situation
  • 5. www.linaro.org • Upstream Android will likely never use regular Linux style packaging because OEMs don't like the idea of having parts of their OS overwritten by an update too much, so – aside from maybe making sure rpm, dpkg and friends can run on top of Bionic – let's focus on what can be done: • Try to upstream patches found in the Android source tree • Merge newer upstream releases into the Android source tree and try to upstream that • Find solutions for projects that have been abandoned (or are otherwise obsolete/bad choices) upstream What can Linaro (and others) do?
  • 6. www.linaro.org • Toolchains: – Android 4.3 uses a modified version of gcc 4.6 – Linaro already provides alternative toolchains based on gcc 4.7 and gcc 4.8 (using Linaro performance patches + forward ports of Google's patches) and [unofficially] llvm/clang 3.4svn • Kernel: – Android devices typically are released with a kernel that is slightly outdated at device release time, and never get kernel updates (at best, they get updates from the -stable branch within their minor kernel release, e.g. v3.0.1 → v3.0.15) – Linaro provides current kernels with patches needed to make Android work (Binder, ashmem, …) - but can't possibly release kernels for every device, and device specific changes are typically not upstreamed by handset makers. Core components
  • 7. www.linaro.org ● Freetype – Android uses 2.4.9 – Current 2.5.x releases add Adobe's CFF engine (better TrueType rendering) and embedded bitmaps (color emoji etc) What are we missing out on?
  • 8. www.linaro.org ● Harfbuzz, Harfbuzz-ng – Also on font rendering, Android uses a revision of harfbuzz from February 2012 (this tree is essentially unmaintained, but still needs to be watched for fixes – or better yet, get rid of it) and harfbuzz-ng 0.9.14 – Current Harfbuzz-ng is 0.9.22 with various seemingly important changes: ● Bug fixes (including a fix for an undefined memory access) ● Several Arabic mark positioning and width bugs ● Major speedups in OpenType processing What are we missing out on?
  • 9. www.linaro.org ● V8, WebRTC, Chromium, WebKit, WebP – Outdated versions included in Android – v8 3.9.24.30 (current work goes into 3.21.x), WebRTC rev. 180 (current: 4933), Chromium 12.0.742.130 (July 2011) – WebKit and WebP fairly current and synced frequently (last sync shortly before 4.3 release) – Lots of work has gone into those projects since, e.g. ● Performance improvements, including better VFPv2 and VFPv3 support ● Bugfixes (including support for newer toolchains already backported by Linaro) ● Variable limit increased in v8 ● Debugging improvements – If I was wearing my tin foil hat, I'd make some comment about this being related to the push for binary-only Chrome for Android... But of course, any reasonable person knows this is just because nobody has time to work on it... There might also be binary compatibility issues What are we missing out on?
  • 10. www.linaro.org ● Image formats – libjpeg, libpng, libgif – libpng 1.2.46 (current: 1.6.6/1.2.50) ● Potential problem: Binary compatibility. Soname has changed 3 times since Android's forking... But Android has no concept of sonames, so this is potentially dangerous for NDK users – workaround could be naming it libpng16.so (would require changing the linker command every time libpng is updated to a new major version though...) ● Fixes for important security backports were backported to 1.2.46, we're not affected by CVE-2011-3048 anymore ● Nevertheless, we can't stay on dead code forever, this needs to be addressed at some point. ● Changes include major cleanups and optimizations, support for some new chunks – libjpeg 6 (current: 9a – better yet, switch to libjpeg-turbo unless we need SmartScale) ● Last synced with upstream in November 2009 ● libjpeg-turbo is heavily optimized, among other things with NEON support ● Linaro has already made the switch to libjpeg-turbo... – … but then fell into the same trap, no libjpeg-turbo updates since January 2012 (latest release: 1.3.0 from Sept 25, 2013) – giflib 4.1.6 (current: 5.0.5/4.2.3) ● Many important things (reentrancy, ...) added in 5.x – but are gifs still relevant? What are we missing out on?
  • 11. www.linaro.org ● libusb – Android's libusb derives from libusb 1.0.9 – libusb is essentially dead, with even its maintainers telling people to use the libusbx fork (currently at 1.0.17) – libusbx is primarily about bugfixes What are we missing out on?
  • 12. www.linaro.org ● STL – Parts of the C++ Standard Template Library (STL) are used by almost all C++ based projects and libraries, including those that are part of Android – Android decided not to use GNU libstdc++ because of its GPL-with-linking-exception licensing – So it chose STLport 5.2.1 (released 2008) instead... But STLport hasn't made any releases since (and seems to be almost unmaintained – the latest commit in the git repository is more than a year old). In the mean time, other STLs have moved on, speeding things up [and STLport wasn't known for its speed when it was still current] and implementing C++11, beginnings of C++14, … – It may make sense to go with a viable alternative, such as GNU libstdc++ (not liked in Android because of licensing) or LLVM's libc++ (probably the best choice – small, fast, and under a BSD-like license) – Issue with binary compatibility – source level compatibility is almost 100%, binary compatibility doesn't exist. Still, this may be the only way to not fall behind the rest of the world. – Shipping 2 STLs is possible, but still causes issues (an application that links to stlport and to a library linked against libc++ is likely to see weird issues) What are we missing out on?
  • 13. www.linaro.org ● apache-harmony – Android's core Java class library is derived from Apache Harmony svn rev. 1097236 – Apache decided to abandon Harmony on November 16, 2011 (last svn rev.: 1148509) – Android has made slight modifications on top of Harmony, but not enough to keep a dead project alive... – Can Android stay on the Java 6 language level forever? This may seem feasible now with Java 7 and 8 not introducing too many important changes – but what about 9? 10? 50? – What are possible alternatives? ● OpenJDK's class library (Unlikely to happen upstream because of Google-Oracle patent fighting) ● GNU Classpath (Unlikely to happen upstream because Android doesn't like GPL-with- linking-exception licensing) A problem waiting to happen...