CC-BY-SA 3.0 - Attribution requirements and misc., except 3rd party material,
PLEASE READ:
This slide must remain as-is in this specific location (slide #1), everything else you are free to change;
including the logo :-)
Use of figures in other documents must feature the below "Originals at" URL immediately under that
figure and the below copyright notice where appropriate.
You are FORBIDDEN from using the default "About" slide as-is or any of its contents.
Several diagrams taken from 3rd party material:
Attribution/citation made in every case
Refer to each original for redistribution/citation
Facts and data are not in principle copyrightable (ex: constants in header files), however if you
don't feel comfortable with our use of your material then let us know and we'll remove it:
courseware@opersys.com
Copyright (C) 2019, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: http://www.opersys.com/training/
Changes of interest (preliminary)Changes of interest (preliminary)
This is a first pass ...
Apex
About 30 new system services
Init semantic additions
New hmm commands
BPF/BCC
Reworking/moving of some functionality
Several changes require some more work to look at
initinit
Useful: diff old and new "main" init.rc
Service options:
interface:
Associates this service with a list of the HIDL services that it provides.
keycodes
Sets the keycodes that will trigger this service.
override:
Indicates that this service definition is meant to override a previous definition for a service
with the same name.
restart_period :
If a non-oneshot service exits, it will be restarted at its start time plus this period.
Sevice options (cntd):
sigstop:
Send SIGSTOP to the service immediately before exec is called.
timeout_period
Provide a timeout after which point the service will be killed.
updatable:
Mark that the service can be overridden (via the 'override' option) later in the boot sequence
by APEXes.
Commands
class_start_post_data
class_reset_post_data
mark_post_data
parse_apex_configs
New way to debug init services:
stop logd
setprop ctl.sigstop_on logd
start logd
ps -e | grep logd
> logd 4343 1 18156 1684 do_signal_stop 538280 T init
gdbclient.py -p 4343
b main
c
c
c
> Breakpoint 1, main (argc=1, argv=0x7ff8c9a488) at system/core/logd/main.cpp:427
stop logd
setprop ctl.sigstop_on logd
start logd
ps -e | grep logd
> logd 4343 1 18156 1684 do_signal_stop 538280 T init
strace -p 4343
(From a different shell)
kill -SIGCONT 4343
> strace runs
ApexApex
Dynamically update core system components
Official doc:
Alernatives considered (and rejected):
Regular package management systems
dm-crypt for integrity
Redirecting paths from /system to /apex
Based on APK format (uses AndroidManifest.xml)
Packaged as filesystem image
Mounted on loopback at next reboot
Apex "clients" must use apex path
https://android.googlesource.com/platform/system/apex/+/refs/heads/master/docs/RE
Thoughts:
Hey Google, what about "dm-integrity"?
Why not just use a real package management system?
https://archive.fosdem.org/2018/schedule/event/cryptsetup/