Android init

http://cecs.wright.edu/~pmateti/Courses/4440/Lectures/Internals/

Android Internals

Table of Contents

1 Android-Internals-1: First Glimpse

  1. Android System
  2. Virtual Machines: Dalvik + ART
  3. Libraries
  4. Background: What is a Program? Process?
  5. Selected Processes
  6. File System: ext4, etc.
  7. Standard Linux Commands within Android
  8. Inter Process Communication (IPC)

2 Android-Internals-2: Second Look

2.1 Overview

  1. Android Partitions
  2. Boot Sequence/ Shutdown Sequence
  3. Android Init (Android Framework)
  4. Binder (Android Framework) Interprocess/ Component Communication
  5. Zygote (Android Framework) The Mother of All Apps
  6. System Tools: adb, installd, …
  7. Misc Managers: sm - Service, am - activity, pm - package
  8. Framework

2.2 Android's Init

  1. Android's First Process
  2. Action commands.
  3. Service declarations.
  4. Main init.rc
  5. ueventd
  6. Boot Logo
  7. Android's Init

3 Android-Internals-3: Third Look

  1. anon-shared-memory
  2. alarm
  3. wakelocks-etc
  4. low-memory-killer
  5. fastboot
  6. zipalign
  7. deodex
  8. Rooting

4 Build a ROM

  1. AOSP, CyanogenMod, …
  2. ../Build-ROM

5 References

  1. Karim Yaghmour, "Embedded Android", O'Reilly Media, Inc., 2013, 412 pp; WSU Safari Books Online 9781449327958
  2. Nikolay Elenkov, "An In-Depth Guide to Android's Security Architecture", https://www.nostarch.com/androidsecurity, October 2014, 432 pp. ISBN: 978-1-59327-581-5
  3. Jonathan Levin, Android Internals: A Confectioner's Cookbook, Volume I: The Power User's View, http://newandroidbook.com/AIvI-M-RL1.pdf, 267 pp, 2015.
  4. Prabhaker Mateti, Lecture Notes on Android Internals and Security, http://www.cs.wright.edu/~pmateti/Courses/4440/Top/

6 End


Copyright © 2016 www.wright.edu/~pmateti • 2017-08-27

 

=======================================================================

http://cecs.wright.edu/~pmateti/Courses/4440/Lectures/Internals/Init/init.html

 

Table of Contents

1 Linux Init

  1. Linux OS kernel invokes the first program (named init) and hence first process (pid == 1)
  2. /sbin/init standard location
  3. In the Linux/Unix world, there are many designs + implementations that can be used as "init"
    1. A few famous ones: System V, upstart, systemd.
    2. /sbin/init -> /lib/systemd/systemd
    3. % file /lib/systemd/systemd

      /lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
      dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
      BuildID[sha1]=635141ec29ae1dec6bbb11b117a1a5dad5e0e9cb, 
      stripped
      
  4. All inits are driven by their configuration files.

1.1 Expectations of "init"

  1. Services or Daemons: Processes that should start early and until system shutdown.
  2. Start the services. Watch over them. Should they die/crash, restart.
  3. Dependencies: Start the services in a certain order

2 Android Init

  1. Configuration Files
  2. Property-based triggers
  3. Action commands.
  4. Service definitions
  5. Main init.rc
  6. ueventd
  1. Android's Init excerpts from Embedded Linux, Chapter 6, PDF

2.1 Service Definition

  1. Example: Boot Animation
service bootanim /system/bin/bootanimation
    user graphics
    group graphics
    disabled
    oneshot 
  1. https://github.com/android/platform_system_core/blob/master/init/readme.txt Android Init Language, 201x. Describes the language.

3 References

  1. Karim Yaghmour, "Embedded Android", O'Reilly Media, Inc., 2013, 412 pp; WSU Safari Books Online 9781449327958; Android Init PDF excerpts, Chapter 6. Required Reading.
  2. Karim Yaghmour, Embedded Android Workshop with Nougat, AnDevCon San Francisco 2016, PDF, 175 slides.

Copyright © 2015 pmateti@wright.eduwww.wright.edu/~pmateti 205-08-30

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值