Android 5.0 Lollipop brings huge change, compare to before.
This report includes statistics from source code with data and hidden features from source code & git log investigation.
9. What’s new about L CDD?
● CDD stands for Compatible Definition
Document.
● But L CDD is NOT published yet.
● Please check
○ http://source.android.com/compatibility/
○ http://source.android.com/compatibility/android-cdd.pdf
11. Nexus6 is 560dpi device
● Nexus6 uses 560dpi!
○ But it is 492.8dpi (sqrt(2560^2+1440^2)/5.96inch)
○ 492.8dpi
Commit a3fb40d5f492825bb86769f541620baca5616e05
Author: Dianne Hackborn <hackbod@google.com>
Date: Tue Aug 12 15:06:50 2014 -0700
Add 560dpi, and some other stuff.
● Ideal combination is…
2560x1440/5.25inch = 560dpi
12. Nexus9 is the 1st 64bit ARMv8 device
ARMv8 crypto extension support
● Userland (external/openssl)
○ Update ARM assembly patch
● kernel
○ Crypto extension for linux kernel crypto API
■ dm-crypt and dm-verity use this.
● Other 64bits
○ Please check my previous presentation also.
15. Security
● All of domain are enforced.
○ http://source.android.com/devices/tech/security/se-linux.html
■ In the Android 5.0 (L) release, Android moves to full enforcement of
SELinux. ..snip.. In short, Android is shifting from enforcement on a limited
set of crucial domains (installd, netd, vold and zygote) to everything (more
than 60 domains). This means manufacturers will have to better
understand and scale their SELinux implementations to provide
compatible devices. Understand that:
● Everything is in enforcing mode in the 5.0 release
● No processes other than init should run in the init domain
● Any generic denial (for a block_device, socket_device,
default_service, etc.) indicates that device needs a special domain
16. Default encryption by vold
● What we’ve added for Android 5.0
○ Created fast encryption, which only encrypts used blocks on the data
partition to avoid first boot taking a long time. Only ext4 and f2fs
filesystems currently support fast encryption.
○ Added the forceencrypt flag to encrypt on first boot.
○ Added support for patterns and encryption without a password.
○ Added hardware-backed storage of the encryption key. See Storing
the encrypted key for more details.
Caution: Devices upgraded to Android 5.0 and then encrypted may be returned to an unencrypted state by
factory data reset. New Android 5.0 devices encrypted at first boot cannot be returned to an unencrypted state.
● In system/vold/cryptfs.c
#define DEFAULT_PASSWORD "64656661756c745f70617373776f7264"
18. Block level FOTA
Switching to block-oriented OTAs
To enable dm-verity on your devices, you must move from file-based "over the air" (OTA) updates to block-oriented OTAs. This is
needed because during OTA, Android attempts to change the contents of the system partition at the filesystem layer.
And since OTA works on a file-by-file basis, it is not guaranteed to write files in a consistent order, have a consistent last modified
time or superblock, or even place the blocks in the same location on the block device. For this reason, file-based OTAs will fail on
a dm-verity-enabled device.The device will not boot after OTA.
● ota_from_target_files
--block
Generate a block-based OTA if possible. Will fall back to a
file-based OTA if the target_files is older and doesn't support
block-based OTAs.
19. ART’s AOT impacts
● Prebuilt (odex)
WITH_PREDEXOPT:=true
Odex size is approx. x3 sizeof classes.dex
(In Google I/O, it was announced that the size was x2.
4 of dex.)
● And the odex was copied to /data/dalvik-cache
23. @SystemApi
/**
* Indicates an API is exposed for use by bundled system applications.
* <p>
* These APIs are not guaranteed to remain consistent release-to-release,
* and are not for use by apps linking against the Android SDK.
* </p><p>
* This annotation should only appear on API that is already marked <pre>@hide</pre>.
* </p>
*
* @hide
*/
/work/l/frameworks/base$ grep "@SystemApi" -nr ./* | wc -l
489
25. SystemWebView
● Generate symlinks to libwebviewchromium.
so in /system/priv-app
● Make the WebView Java library into an APK.
● Move WebView resources to separate APK
● Update framework resource references.
● Prepare WebView library APK.
● Include pak files in the WebView apk.
26. New HAL since L
● hardware/libhardware
○ activity_recognition.h
○ audio_alsaops.h
○ bt_hf_client.h
○ bt_mce.h
○ fingerprint.h
○ hdmi_cec.h
○ nfc_tag.h
○ sound_trigger.h
○ tv_input.h
○ vibrator.h
● hardware/libhardware_legacy
○ gscan.h
○ link_layer_stats.h
○ rtt.h
○ tdls.h
○ wifi_hal.h
27. Finger print HAL
typedef struct fingerprint_enroll {
uint32_t id;
/* samples_remaining goes from N (no data collected, but N scans needed)
* to 0 (no more data is needed to build a template).
* The progress indication may be augmented by a bitmap encoded indication
* of finger area that needs to be presented by the user.
* Bit numbers mapped to physical location:
*
* distal
* +-+-+-+
* |2|1|0|
* |5|4|3|
* medial |8|7|6| lateral
* |b|a|9|
* |e|d|c|
* +-+-+-+
* proximal
*
*/
uint16_t data_collected_bmp;
uint16_t samples_remaining;
} fingerprint_enroll_t;
typedef struct fingerprint_msg {
fingerprint_msg_type_t type;
union {
uint64_t raw;
fingerprint_error_t error;
fingerprint_enroll_t enroll;
fingerprint_removed_t removed;
fingerprint_acquired_t acquired;
fingerprint_processed_t processed;
} data;
} fingerprint_msg_t;
28. sound_trigger HAL
* Retrieve implementation properties.
int (*get_properties)(const struct sound_trigger_hw_device *dev,
struct sound_trigger_properties *properties);
* Load a sound model. Once loaded, recognition of this model can be started and stopped.
* Only one active recognition per model at a time. The SoundTrigger service will handle
* concurrent recognition requests by different users/applications on the same model.
* The implementation returns a unique handle used by other functions (unload_sound_model(),
* start_recognition(), etc...
int (*load_sound_model)(const struct sound_trigger_hw_device *dev,
struct sound_trigger_sound_model *sound_model,
sound_model_callback_t callback,
void *cookie,
sound_model_handle_t *handle);
* Unload a sound model. A sound model can be unloaded to make room for a new one to overcome
* implementation limitations.
int (*unload_sound_model)(const struct sound_trigger_hw_device *dev,
sound_model_handle_t handle);
/* Start recognition on a given model. Only one recognition active at a time per model.
* Once recognition succeeds of fails, the callback is called.
* TODO: group recognition configuration parameters into one struct and add key phrase options.
int (*start_recognition)(const struct sound_trigger_hw_device *dev,
sound_model_handle_t sound_model_handle,
const struct sound_trigger_recognition_config *config,
recognition_callback_t callback,
void *cookie);
/* Stop recognition on a given model.
* The implementation does not have to call the callback when stopped via this method.
int (*stop_recognition)(const struct sound_trigger_hw_device *dev,
sound_model_handle_t sound_model_handle);
29. High definition audio?
Float mixer seems not to be used
AudioMixer.cpp in frameworks/av
// Set kUseNewMixer to true to use the new mixer engine. Otherwise the
// original code will be used. This is false for now.
static const bool kUseNewMixer = false;
// Set kUseFloat to true to allow floating input into the mixer engine.
// If kUseNewMixer is false, this is ignored or may be overridden internally
// because of downmix/upmix support.
static const bool kUseFloat = true;
t->mMixerInFormat = kUseFloat && kUseNewMixer
? AUDIO_FORMAT_PCM_FLOAT : AUDIO_FORMAT_PCM_16_BIT;
https://www.google.com/events/io/io14videos/0f228fb0-42e0-e311-b297-00155d5066d7
30. Multidex as platform build
# Build the master framework library.
# The framework contains too many method references (>64K) for poor old DEX.
# So we first build the framework as a monolithic static library then split it
# up into smaller pieces.
LOCAL_MODULE := framework
LOCAL_DX_FLAGS := --core-library --multi-dex
See more