Mô tả

This comprehensive course is designed to guide participants through the intricacies of setting up a development environment on Ubuntu 20.04 within Google Cloud, diving deep into the Android Open Source Project (AOSP), and mastering the art of Android platform development.
Through a structured series of lectures and labs, learners will embark on a journey that covers a broad spectrum of topics from VM setup and source code compilation to advanced security and debugging techniques.

Section 1 lays the foundational knowledge required to navigate Google Cloud's compute engine, install the gcloud CLI, and create a VMX-enabled Ubuntu VM, ensuring students are well-prepared for Android platform development.

Section 2 progresses to downloading and building the Android 14 source code. Participants will learn how to bring the Cuttlefish device to life, providing a practical environment for testing and development.

In Section 3, the course shifts focus to transforming Ubuntu Server into a Desktop environment and installing ASfP, equipping learners with the tools necessary for Android platform development.

Section 4 introduces essential tools like the 'hmm' command and adb, enhancing the learners’ ability to interact with and control Android devices and environments effectively.

Security basics are demystified in Section 5, where participants explore user IDs, discretionary and mandatory access control, and how Android secures application data and processes, providing a solid understanding of Android's security model.

Section 6 delves into images and partitions of Android, revealing the complexities of system updates, and partition management.

Sections 7 through 14 consist of hands-on labs ranging from creating a CPU HAL interface with AIDL, developing service daemons, setting correct SELinux permissions, to creating and registering the CPU service implementation. Each lab is meticulously designed to reinforce learning, encourage exploration, and develop a thorough understanding of Android platform development.

Moreover, the labs tackles debugging tools and strategies, including forcing crashes and using llvm-addr2line, as well as debugging native services with lldb, preparing students to troubleshoot and optimize Android platform applications and services efficiently.

By the end of this course, participants will have gained not only theoretical knowledge but also practical experience in Android platform development, security models, debugging, and application deployment, enabling them to contribute to the Android ecosystem or undertake custom Android platform projects with confidence.

Bạn sẽ học được gì

Understand Android OS Architecture and control Linux kernel drivers

Develop a C++ service and make it persistent with an rc file

Build a Kotlin application with system control UI

Use AIDL for HAL communication be in line to AOSP design patterns and the CTS

Learn how to solve SELinux avc denied errors

Yêu cầu

  • Software Developer

Nội dung khoá học

14 sections

Set up VMX enabled Ubuntu 20.04 in Google Cloud

3 lectures
Create a Google Cloud account with compute engine enabled
01:23
Install the gcloud CLI and connect to the AOSP project on your Google Cloud
01:43
Create an Ubuntu 20.04 VM with VMX enabled
07:59

Download the Android 14 source code, build and run the cuttlefish device

2 lectures
Download the android-14.0.0_r21 branch
03:06
Build and run the Cuttlefish VM
08:59

Ubuntu Desktop + Android Studio for Platform (ASfP)

2 lectures
Convert Ubuntu Server to Ubuntu Desktop
02:13
Install and configure the Android Studio for Platform
02:37

Tools - hmm, adb

2 lectures
The 'hmm' Command
01:00
Authorizing Real Device for ADB Connection
00:35

Security basics

3 lectures
User IDs and the Discretionary Access Control
03:27
Mandatory Access Control - SELinux
02:32
Process Status (ps) and Private Application Files in /data/data
03:28

Images and partitions

4 lectures
PRODUCT_MAKEFILES and Makefile Inheritance
04:56
Generic System Image (GSI)
02:15
Android Partitions
02:56
Dynamic Partitions, "super.img", A/B System Updates and "fastbootd"
04:05

Lab 1: AIDL for HAL - creating a CPU HAL Interface Definition

6 lectures
About the Main Lab
01:51
Change the CPU scaling governor via the command line (adb shell)
00:50
Define an aidl_interface module in Android.bp
01:27
Define a CPU interface in ICpu.aidl
00:53
Build the CPU Interface using mm
02:04
Add the AIDL interface to the Cuttlefish build
00:26

Lab 2: Creating the service daemon

5 lectures
Create an empty service holder in service.cpp
01:20
Define a new CPU Service executable in Android.bp
00:49
Define an init.rc persistent service pointing to the CPU service executable
01:06
Define a Vendor Interface (VINTF) xml object
00:49
Add the CPU Service to the Cuttlefish build
00:48

Lab 3: Setting correct SELinux permissions

3 lectures
Print the logcat and correctly label the service executable
01:07
Define new SELinux types and use SELinux macros
02:10
Use audit2allow to solve "avc: denied" errors
01:27

Lab 4: Create and register the CPU service implementation

4 lectures
Define the CPU class header file
00:48
Define the CPU class implementation file
00:54
Register the CPU service with the Service Manager
02:16
Define a new CPU service interface SELinux type in the Service Manager
01:28

Lab 5: Test the CPU service and fix permissions errors

2 lectures
Create CpuTester executable
01:50
Change the Scaling Governor file permissions
01:24

Lab 6: Create a services system app with a Broadcast Receiver

7 lectures
Extend the Application class
01:28
Create a Broadcast Receiver to handle external requests
00:41
Defne a persistent Android App in AndroidManifest.xml
00:36
Create a strings.xml resources file
00:14
Define an Android App module in Android.bp
00:45
Set SELinux rules for the system app
01:18
Test the services app by sending a broadcast
00:10

Lab 7: Add Activity Control UI to the Platform app

4 lectures
Create the resource files
01:33
Extend the Activity class
01:23
Add the activity to the AndroidManifest.xml file
00:49
Test the Activity
00:12

Lab 8: Debugging Tools

2 lectures
Forcing a crash and using llvm-addr2line
00:48
Debugging native service with lldb
00:52

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.