SlideShare a Scribd company logo
1 of 45
Download to read offline
Android Custom Kernel/ROM 
design 
Muhammad Najmi Ahmad Zabidi 
IIUM 
MOSC 2014 
Menara SSM 
Kuala Lumpur, Malaysia 
24-25 September 2014 
Muhammad Najmi MOSC 2014 1/37
About 
 I am a research grad student in Universiti Teknologi 
Malaysia, Skudai, Johor Bahru, Malaysia 
 My current employer is International Islamic University 
Malaysia, Kuala Lumpur 
 Research area - malware detection, narrowing on 
Windows executables 
 Doing things on Android kernel and ROM due to some 
stories... 
Muhammad Najmi MOSC 2014 2/37
A bit about Android 
 Android is a mobile 
operating system 
 Using Linux kernel 
 Components for kernel 
are C language 
 Components for 
interface are mostly 
C++ and Java 
Muhammad Najmi MOSC 2014 3/37
Comparison between Android kernel and ROM 
Kernel ROM 
GPL licensed Apache licensed 
Source code must be pub-lished 
Source code is not compul-sory 
to be published. Hence 
any modifications are not 
neccessarily going back to 
the public 
Muhammad Najmi MOSC 2014 4/37
Android structure 
Muhammad Najmi MOSC 2014 5/37
Custom Kernel 
Muhammad Najmi MOSC 2014 6/37
Android kernel vs Linux kernel 
Source: http: 
//eecatalog.com/embeddedlinux/2011/08/23/from-zero-to-boot-porting-android-to-your-arm-platform/ 
Muhammad Najmi MOSC 2014 7/37
My custom Android kernels 
 Some are based from AOSP (Android Open Source 
Project) kernels - original source are from Google’s git 
 Some are based from CM (AOSP + Code Aurora Forum 
(CAF) commits) 
 Some are based from other custom kernels which are 
based from two sources above 
Muhammad Najmi MOSC 2014 8/37
I developed my custom kernels for two devices 
 Nexus 4 (codename: Mako) 
Muhammad Najmi MOSC 2014 9/37
I developed my custom kernels for two devices 
 Nexus 4 (codename: Mako) 
 Nexus 5 (codename: Hammerhead) 
Muhammad Najmi MOSC 2014 9/37
I developed my custom kernels for two devices 
 Nexus 4 (codename: Mako) 
 Nexus 5 (codename: Hammerhead) 
 After I sold my Mako :) 
Muhammad Najmi MOSC 2014 9/37
Why use custom kernel 
Customization,add-on features: 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
 Allow DoubleTaptoWake(DT2W) or Sweep2Wake, 
Sweep2Sleep (S2W,S2S) features 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
 Allow DoubleTaptoWake(DT2W) or Sweep2Wake, 
Sweep2Sleep (S2W,S2S) features 
 Allow many more CPU governors to be used 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
 Allow DoubleTaptoWake(DT2W) or Sweep2Wake, 
Sweep2Sleep (S2W,S2S) features 
 Allow many more CPU governors to be used 
 Allow under/overvolting 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
 Allow DoubleTaptoWake(DT2W) or Sweep2Wake, 
Sweep2Sleep (S2W,S2S) features 
 Allow many more CPU governors to be used 
 Allow under/overvolting 
 Allow number of online/offline CPUs using many methods 
Muhammad Najmi MOSC 2014 10/37
Why use custom kernel 
Customization,add-on features: 
 Sound patch (for e.g: Faux sound patch) 
 Allow DoubleTaptoWake(DT2W) or Sweep2Wake, 
Sweep2Sleep (S2W,S2S) features 
 Allow many more CPU governors to be used 
 Allow under/overvolting 
 Allow number of online/offline CPUs using many methods 
 Allow many more TCP congestion methods 
Muhammad Najmi MOSC 2014 10/37
Skillsets for kernel modifying/developing 
 Git knowledge 
 Knows at least how to clone, pull, push 
 Then reading git log.. (i’m using --pretty option) 
 Creating branch, reset to certain checkpoint/offset.. 
resetting everything (git reset --hard) 
Muhammad Najmi MOSC 2014 11/37
Git cloning the source 
najmi@quds:~$ git clone https://android.googlesource.com/kernel/msm -b android-msm-hammerhead-3.4-l-preview 
Cloning into ’msm’... 
remote: Sending approximately 953.94 MiB ... 
remote: Finding sources: 100% (3604873/3604873) 
Receiving objects: 0% (14589/3604873), 4.63 MiB | 656.00 KiB/s 
Muhammad Najmi MOSC 2014 12/37
najmi@quds:~/cempaka-kernel$ git log --pretty=format: 
’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)%an%Creset’ --abbrev-commit 
ba22633 - (HEAD, origin/cempaka-stable, cempaka-stable) 
Cempaka v2.5 (11 days ago) Muhammad Najmi Ahmad Zabidi 
acaaeea - Merge branch ’ElementalX-1.00-cm’ of 
https://github.com/flar2/ElementalX-N5 into cempaka-stable (11 days ago) Muhammad Najmi Ahmad Zabidi 
039a263 - (elementalx/ElementalX-1.00-cm) Merge branch ’ElementalX-1.00’ into ElementalX-1.00-cm 
(12 days ago) flar2 
cb7e4f0 - (elementalx/ElementalX-1.00) update defconfig (12 days ago) flar2 
753de48 - msm-sleeper: use ex_max_freq (12 days ago) flar2 
c5cc9d2 - Merge branch ’ElementalX-1.00’ into 
ElementalX-1.00-cm (2 weeks ago) flar2 
8438630 - vibrator: change permissions again (2 weeks ago) flar2 
e51fa2d - Revert vibrator: change sysfs permissions (2 weeks ago) flar2 
9949aff - Merge branch ’ElementalX-1.00’ into ElementalX-1.00-cm (3 weeks ago) flar2 
cbee9fe - update defconfig (3 weeks ago) flar2 
Muhammad Najmi MOSC 2014 13/37
Most of the developers’ works are hosted on github 
 Some use sourceforge’s git and bitbucket’s 
 I prefer github because I am familiar with it 
Muhammad Najmi MOSC 2014 14/37
Android timeline, from 4.x 
 4.0 (Ice Cream Sandwich) 
 4.1 (Jelly Bean) 
 4.2 (Jelly Bean) 
 4.3 (Jelly Bean) 
 4.4 (KitKat) 
 4.4.1 
 4.4.2 
 4.4.3 
 4.4.4 (latest, as of now) 
Muhammad Najmi MOSC 2014 15/37
My kernel projects for Nexus 4/Mako 
Kernel Sources 
Semaphore 
Kernel 
Hellscore 
Kernel 
Franco 
Kernel 
CM Bricked 
Kernel 
Ampang 
Kernel 
Pandan 
Kernel 
Zulfa 
Kernel 
Franco 
Gombak 
Kernel 
Aufa 
Kernel 
Seladang 
Kernel 
Muhammad Najmi MOSC 2014 16/37
My kernel projects for Nexus 5/Hammerhead 
Kernel Sources 
ElementalX CodeBlue Jerung Kernel 
Lekiu Kernel 
(for L preview) 
Cempaka Kernel Blue Kelisa Kernel 
Muhammad Najmi MOSC 2014 17/37
My Nexus 4/Mako Kernel Features 
Kernel Tap2Wake 
and 
S2S/S2W 
Additional 
Governors 
Additional 
Sched-ulers 
Fast 
Charge 
Multiboot 
(kexec) 
Intelliplug Advanced 
MPD 
Aufa X X X X X X - 
Zulfa X X X X X X - 
Ampang X X X X X X - 
Franco 
X X X X X - - 
Gombak 
Seladang X X X X X - X 
Pandan X X X X X X - 
Table : Features of the custom kernels (at least from what I 
remember) 
Muhammad Najmi MOSC 2014 18/37
My Nexus 5/Hammerhead Kernel Features 
Kernel Tap2Wake 
and 
S2S/S2W 
Additional 
Governors 
Additional 
Schedulers 
Fast 
Charge 
Multiboot 
(kexec) 
Intelliplug Advanced 
MPD 
Cempaka X X X X X X - 
Blue Kelisa X X X X X X - 
Jerung X X X X X X - 
Lekiu X X X X not yet - - 
Table : Features of the custom kernels (at least from what I 
remember) 
Muhammad Najmi MOSC 2014 19/37
MultiROM capabilities 
Figure : List of ROMs Figure : MultiROM settings 
Muhammad Najmi MOSC 2014 20/37
Kernel configurations 
Figure : Using trickster to tune the kernel parameters, by sysfs interfacing 
Muhammad Najmi MOSC 2014 21/37
I/O scheduler selector 
Figure : Using trickster to select preferred I/O scheduler 
Muhammad Najmi MOSC 2014 22/37
CPU governors 
Figure : Using trickster to select preferred CPU governors 
Muhammad Najmi MOSC 2014 23/37
How to compile Android kernel? 
 Use desktop PC (Mine is i3, 16GB RAM, Ubuntu 14.04 LTS) 
 Only works on 64-bit Linux 
 Use cross compiler.. GCC for ARM 
 Cross compiling in this case means compiling ARM kernel 
image on x86 (x64) based machine 
 Default kernel sources somehow cannot use latest 
(bleeding edge) GCC (as for now 4.10). Need some patches 
to allow that. 
Muhammad Najmi MOSC 2014 24/37
How to add features 
 Use ‘‘patch’’ command by downloading intended patch 
from other source manually 
 Use ‘‘git cherry pick’’ command 
Muhammad Najmi MOSC 2014 25/37
Patch 
wget -c https://github.com/engstk/l-preview/commit/8c203729fc0d4479b790408de2ac464745cc7769.patch 
--2014-09-24 23:53:24-- 
https://github.com/engstk/l-preview/commit/8c203729fc0d4479b790408de2ac464745cc7769.patch 
Resolving github.com (github.com)... 192.30.252.130 
Connecting to github.com (github.com)|192.30.252.130|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: unspecified [text/plain] 
Saving to: ’8c203729fc0d4479b790408de2ac464745cc7769.patch’ 
[ = 2014-09-24 23:53:26 (59.6 KB/s) - ’8c203729fc0d4479b790408de2ac464745cc7769.patch’saved [20146] 
najmi@quds:~/lekiu-lprev-kernel$ patch -Np1 -i 8c203729fc0d4479b790408de2ac464745cc7769.patch 
patching file arch/arm/Kconfig 
Hunk #1 succeeded at 2213 (offset 1 line). 
patching file arch/arm/boot/compressed/head.S 
patching file arch/arm/configs/hammerhead_defconfig 
patching file arch/arm/include/asm/kexec.h 
patching file arch/arm/kernel/machine_kexec.c 
patching file arch/arm/kernel/relocate_kernel.S 
patching file arch/arm/mach-msm/include/mach/memory.h 
patching file arch/arm/mach-msm/lge/devices_lge.c 
patching file arch/arm/mach-msm/restart.c 
patching file include/linux/kexec.h 
patching file kernel/kexec.c 
Muhammad Najmi MOSC 2014 26/37
git cherry pick 
najmi@quds:~/lekiu-lprev-kernel$ git fetch codeblue 
remote: Counting objects: 1073, done. 
remote: Compressing objects: 100% (422/422), done. 
remote: Total 1073 (delta 698), reused 974 (delta 649) 
Receiving objects: 100% (1073/1073), 1.09 MiB | 443.00 KiB/s, done. 
Resolving deltas: 100% (698/698), done. 
From https://github.com/engstk/l-preview 
+ 3043028...647125f code_blue-l - codeblue/code_blue-l (forced update) 
+ 59063dc...647125f code_blue-l-beta - codeblue/code_blue-l-beta (forced update) 
najmi@quds:~/lekiu-lprev-kernel$ git cherry-pick 8c203729fc 
[test cf6f160] Implement kexec-hardboot by. All work done by @Tasssadar 
Author: franciscofranco franciscofranco.1990@gmail.com 
11 files changed, 350 insertions(+), 7 deletions(-) 
Muhammad Najmi MOSC 2014 27/37
Since kernel sources are GPL, if you publish your release, 
you MUST publish your source codes 
 People can view your codes/modifications or borrow/use 
them anyway they want, and they need to publish them 
as well 
Muhammad Najmi MOSC 2014 28/37
Custom ROMs 
Muhammad Najmi MOSC 2014 29/37
Custom ROM 
 Custom ROMs are either AOSP or CM 
 AOSP and CM ROM source are out there, many creative 
people do modifications on these sources 
 Popular custom ROMs with relatively awesome team 
members and support many devices 
 CyanogenMod 
 Carbon ROM 
 Liquid Smooth 
 Paranoid Android (PA) 
 Mahdi ROM 
 AOKP 
Muhammad Najmi MOSC 2014 30/37
Sources and modifications are updated in gerrits 
 Cherry pick is also possible 
Muhammad Najmi MOSC 2014 31/37
Figure : Liquid Smooth ROM, running Cempaka 
Kernel 
Figure : Carbon ROM, running Blue Kelisa 
Kernel 
Muhammad Najmi MOSC 2014 32/37
Source sync 
 ROMs are using ‘‘repo’’ command to sync all changes from 
the upstream 
 Updates are based from the repositories defined in the 
manifest file 
Muhammad Najmi MOSC 2014 33/37
Repo sync 
najmi@quds:~/rom/aicp$ repo sync 
remote: Counting objects: 3, done. 
remote: Compressing objects: 100% (3/3), done. 
remote: Total 3 (delta 0), reused 3 (delta 0) 
Unpacking objects: 100% (3/3), done. 
From https://github.com/AICP/platform_manifest 
9ee1fc3..d607bb2 kitkat - origin/kitkat 
project .repo/manifests/ 
Updating 9ee1fc3..d607bb2 
Fast-forward 
default.xml | 2 +- 
1 file changed, 1 insertion(+), 1 deletion(-) 
Fetching project platform/packages/apps/Provision 
Fetching project CyanogenMod/android_hardware_ti_wpan 
Fetching project omnirom/android_packages_wallpapers_PhaseBeam 
Fetching project platform/external/tinyxml 
............... 
remote: Counting objects: 12, done 
remote: Finding sources: 100% (12/12) 
remote: Total 12 (delta 0), reused 12 (delta 0) 
remote: Counting objects: 12, done 
Unpacking objects: 100% (12/12), done. 
From https://android.googlesource.com/platform/external/eigen 
Muhammad Najmi MOSC 2014 34/37
Example of extra features in custom ROMS 
 Hover 
 PIE 
 Halo 
 Customization of date display 
Muhammad Najmi MOSC 2014 35/37
Figure : PIE Figure : Hover 
Muhammad Najmi MOSC 2014 36/37
END 
najmi.zabidi@gmail.com 
Muhammad Najmi MOSC 2014 37/37

More Related Content

What's hot

Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesChris Simmonds
 
Tip: How to enable wireless debugging with Android?
Tip: How to enable wireless debugging with Android?Tip: How to enable wireless debugging with Android?
Tip: How to enable wireless debugging with Android?Sarath C
 
Android bootup process
Android bootup processAndroid bootup process
Android bootup processSanjay Kumar
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updatesGary Bisson
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded LinuxChris Simmonds
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezShakacon
 
Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldStefano Babic
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)Chris Simmonds
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAMChris Simmonds
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
Android Security, From the Ground Up
Android Security, From the Ground UpAndroid Security, From the Ground Up
Android Security, From the Ground UpOpersys inc.
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesNational Cheng Kung University
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Stefano Babic
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsAlex Matrosov
 

What's hot (20)

Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Tip: How to enable wireless debugging with Android?
Tip: How to enable wireless debugging with Android?Tip: How to enable wireless debugging with Android?
Tip: How to enable wireless debugging with Android?
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
Android bootup process
Android bootup processAndroid bootup process
Android bootup process
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updates
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded Linux
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew Suarez
 
Init of Android
Init of AndroidInit of Android
Init of Android
 
Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_world
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Android Security, From the Ground Up
Android Security, From the Ground UpAndroid Security, From the Ground Up
Android Security, From the Ground Up
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
 

Viewers also liked

Hardware Abstraction Layer
Hardware Abstraction LayerHardware Abstraction Layer
Hardware Abstraction LayerTeh Kian Cheng
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android WifiNanik Tolaram
 
An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...William Liang
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyJollen Chen
 
Android Wear Hackathon 요리 레시피 앱 발표자료
Android Wear Hackathon 요리 레시피 앱 발표자료Android Wear Hackathon 요리 레시피 앱 발표자료
Android Wear Hackathon 요리 레시피 앱 발표자료HwanIk Kim
 
nl80211 and libnl
nl80211 and libnlnl80211 and libnl
nl80211 and libnlawkman
 
Debian & the BeagleBone Black
Debian & the BeagleBone BlackDebian & the BeagleBone Black
Debian & the BeagleBone BlackRaju Vindane
 
COS: A Configurable OS for Embedded SoC Systems
COS: A Configurable OS for Embedded SoC SystemsCOS: A Configurable OS for Embedded SoC Systems
COS: A Configurable OS for Embedded SoC SystemsPrateek Anand
 
Connecting Hardware to the Web with the BeagleBone
Connecting Hardware to the Web with the BeagleBoneConnecting Hardware to the Web with the BeagleBone
Connecting Hardware to the Web with the BeagleBoneFrank Hunleth
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyLinaro
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
BeagleBone Black Using Python
BeagleBone Black Using PythonBeagleBone Black Using Python
BeagleBone Black Using PythonSai Viswanath
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introductionWilliam Liang
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on AndroidGary Bisson
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel ProgrammingNalin Sharma
 
What is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelWhat is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelNeel Parikh
 

Viewers also liked (20)

Hardware Abstraction Layer
Hardware Abstraction LayerHardware Abstraction Layer
Hardware Abstraction Layer
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android Wifi
 
An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
 
Android Wear Hackathon 요리 레시피 앱 발표자료
Android Wear Hackathon 요리 레시피 앱 발표자료Android Wear Hackathon 요리 레시피 앱 발표자료
Android Wear Hackathon 요리 레시피 앱 발표자료
 
nl80211 and libnl
nl80211 and libnlnl80211 and libnl
nl80211 and libnl
 
Debian & the BeagleBone Black
Debian & the BeagleBone BlackDebian & the BeagleBone Black
Debian & the BeagleBone Black
 
Malware Detection With Multiple Features
Malware Detection With Multiple FeaturesMalware Detection With Multiple Features
Malware Detection With Multiple Features
 
COS: A Configurable OS for Embedded SoC Systems
COS: A Configurable OS for Embedded SoC SystemsCOS: A Configurable OS for Embedded SoC Systems
COS: A Configurable OS for Embedded SoC Systems
 
Connecting Hardware to the Web with the BeagleBone
Connecting Hardware to the Web with the BeagleBoneConnecting Hardware to the Web with the BeagleBone
Connecting Hardware to the Web with the BeagleBone
 
BeagleBone Workshop
BeagleBone WorkshopBeagleBone Workshop
BeagleBone Workshop
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case study
 
Beagle board
Beagle boardBeagle board
Beagle board
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
BeagleBone Black Using Python
BeagleBone Black Using PythonBeagleBone Black Using Python
BeagleBone Black Using Python
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introduction
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel Programming
 
What is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelWhat is Kernel, basic idea of kernel
What is Kernel, basic idea of kernel
 

Similar to Android Custom Kernel/ROM design

Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
Linux Module Programming
Linux Module ProgrammingLinux Module Programming
Linux Module ProgrammingAmir Payberah
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloudUC Davis
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep diveNaoto MATSUMOTO
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android EmulatorSamael Wang
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and InsightsGlobalLogic Ukraine
 
Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?GlobalLogic Ukraine
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfkanedafromparis
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyMediafly
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 

Similar to Android Custom Kernel/ROM design (20)

Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Linux Module Programming
Linux Module ProgrammingLinux Module Programming
Linux Module Programming
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep dive
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and Insights
 
Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?
 
Readme
ReadmeReadme
Readme
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdf
 
Lecture 4 Cluster Computing
Lecture 4 Cluster ComputingLecture 4 Cluster Computing
Lecture 4 Cluster Computing
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 

Recently uploaded

OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 

Recently uploaded (20)

OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 

Android Custom Kernel/ROM design

  • 1. Android Custom Kernel/ROM design Muhammad Najmi Ahmad Zabidi IIUM MOSC 2014 Menara SSM Kuala Lumpur, Malaysia 24-25 September 2014 Muhammad Najmi MOSC 2014 1/37
  • 2. About I am a research grad student in Universiti Teknologi Malaysia, Skudai, Johor Bahru, Malaysia My current employer is International Islamic University Malaysia, Kuala Lumpur Research area - malware detection, narrowing on Windows executables Doing things on Android kernel and ROM due to some stories... Muhammad Najmi MOSC 2014 2/37
  • 3. A bit about Android Android is a mobile operating system Using Linux kernel Components for kernel are C language Components for interface are mostly C++ and Java Muhammad Najmi MOSC 2014 3/37
  • 4. Comparison between Android kernel and ROM Kernel ROM GPL licensed Apache licensed Source code must be pub-lished Source code is not compul-sory to be published. Hence any modifications are not neccessarily going back to the public Muhammad Najmi MOSC 2014 4/37
  • 5. Android structure Muhammad Najmi MOSC 2014 5/37
  • 6. Custom Kernel Muhammad Najmi MOSC 2014 6/37
  • 7. Android kernel vs Linux kernel Source: http: //eecatalog.com/embeddedlinux/2011/08/23/from-zero-to-boot-porting-android-to-your-arm-platform/ Muhammad Najmi MOSC 2014 7/37
  • 8. My custom Android kernels Some are based from AOSP (Android Open Source Project) kernels - original source are from Google’s git Some are based from CM (AOSP + Code Aurora Forum (CAF) commits) Some are based from other custom kernels which are based from two sources above Muhammad Najmi MOSC 2014 8/37
  • 9. I developed my custom kernels for two devices Nexus 4 (codename: Mako) Muhammad Najmi MOSC 2014 9/37
  • 10. I developed my custom kernels for two devices Nexus 4 (codename: Mako) Nexus 5 (codename: Hammerhead) Muhammad Najmi MOSC 2014 9/37
  • 11. I developed my custom kernels for two devices Nexus 4 (codename: Mako) Nexus 5 (codename: Hammerhead) After I sold my Mako :) Muhammad Najmi MOSC 2014 9/37
  • 12. Why use custom kernel Customization,add-on features: Muhammad Najmi MOSC 2014 10/37
  • 13. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Muhammad Najmi MOSC 2014 10/37
  • 14. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Allow DoubleTaptoWake(DT2W) or Sweep2Wake, Sweep2Sleep (S2W,S2S) features Muhammad Najmi MOSC 2014 10/37
  • 15. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Allow DoubleTaptoWake(DT2W) or Sweep2Wake, Sweep2Sleep (S2W,S2S) features Allow many more CPU governors to be used Muhammad Najmi MOSC 2014 10/37
  • 16. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Allow DoubleTaptoWake(DT2W) or Sweep2Wake, Sweep2Sleep (S2W,S2S) features Allow many more CPU governors to be used Allow under/overvolting Muhammad Najmi MOSC 2014 10/37
  • 17. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Allow DoubleTaptoWake(DT2W) or Sweep2Wake, Sweep2Sleep (S2W,S2S) features Allow many more CPU governors to be used Allow under/overvolting Allow number of online/offline CPUs using many methods Muhammad Najmi MOSC 2014 10/37
  • 18. Why use custom kernel Customization,add-on features: Sound patch (for e.g: Faux sound patch) Allow DoubleTaptoWake(DT2W) or Sweep2Wake, Sweep2Sleep (S2W,S2S) features Allow many more CPU governors to be used Allow under/overvolting Allow number of online/offline CPUs using many methods Allow many more TCP congestion methods Muhammad Najmi MOSC 2014 10/37
  • 19. Skillsets for kernel modifying/developing Git knowledge Knows at least how to clone, pull, push Then reading git log.. (i’m using --pretty option) Creating branch, reset to certain checkpoint/offset.. resetting everything (git reset --hard) Muhammad Najmi MOSC 2014 11/37
  • 20. Git cloning the source najmi@quds:~$ git clone https://android.googlesource.com/kernel/msm -b android-msm-hammerhead-3.4-l-preview Cloning into ’msm’... remote: Sending approximately 953.94 MiB ... remote: Finding sources: 100% (3604873/3604873) Receiving objects: 0% (14589/3604873), 4.63 MiB | 656.00 KiB/s Muhammad Najmi MOSC 2014 12/37
  • 21. najmi@quds:~/cempaka-kernel$ git log --pretty=format: ’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)%an%Creset’ --abbrev-commit ba22633 - (HEAD, origin/cempaka-stable, cempaka-stable) Cempaka v2.5 (11 days ago) Muhammad Najmi Ahmad Zabidi acaaeea - Merge branch ’ElementalX-1.00-cm’ of https://github.com/flar2/ElementalX-N5 into cempaka-stable (11 days ago) Muhammad Najmi Ahmad Zabidi 039a263 - (elementalx/ElementalX-1.00-cm) Merge branch ’ElementalX-1.00’ into ElementalX-1.00-cm (12 days ago) flar2 cb7e4f0 - (elementalx/ElementalX-1.00) update defconfig (12 days ago) flar2 753de48 - msm-sleeper: use ex_max_freq (12 days ago) flar2 c5cc9d2 - Merge branch ’ElementalX-1.00’ into ElementalX-1.00-cm (2 weeks ago) flar2 8438630 - vibrator: change permissions again (2 weeks ago) flar2 e51fa2d - Revert vibrator: change sysfs permissions (2 weeks ago) flar2 9949aff - Merge branch ’ElementalX-1.00’ into ElementalX-1.00-cm (3 weeks ago) flar2 cbee9fe - update defconfig (3 weeks ago) flar2 Muhammad Najmi MOSC 2014 13/37
  • 22. Most of the developers’ works are hosted on github Some use sourceforge’s git and bitbucket’s I prefer github because I am familiar with it Muhammad Najmi MOSC 2014 14/37
  • 23. Android timeline, from 4.x 4.0 (Ice Cream Sandwich) 4.1 (Jelly Bean) 4.2 (Jelly Bean) 4.3 (Jelly Bean) 4.4 (KitKat) 4.4.1 4.4.2 4.4.3 4.4.4 (latest, as of now) Muhammad Najmi MOSC 2014 15/37
  • 24. My kernel projects for Nexus 4/Mako Kernel Sources Semaphore Kernel Hellscore Kernel Franco Kernel CM Bricked Kernel Ampang Kernel Pandan Kernel Zulfa Kernel Franco Gombak Kernel Aufa Kernel Seladang Kernel Muhammad Najmi MOSC 2014 16/37
  • 25. My kernel projects for Nexus 5/Hammerhead Kernel Sources ElementalX CodeBlue Jerung Kernel Lekiu Kernel (for L preview) Cempaka Kernel Blue Kelisa Kernel Muhammad Najmi MOSC 2014 17/37
  • 26. My Nexus 4/Mako Kernel Features Kernel Tap2Wake and S2S/S2W Additional Governors Additional Sched-ulers Fast Charge Multiboot (kexec) Intelliplug Advanced MPD Aufa X X X X X X - Zulfa X X X X X X - Ampang X X X X X X - Franco X X X X X - - Gombak Seladang X X X X X - X Pandan X X X X X X - Table : Features of the custom kernels (at least from what I remember) Muhammad Najmi MOSC 2014 18/37
  • 27. My Nexus 5/Hammerhead Kernel Features Kernel Tap2Wake and S2S/S2W Additional Governors Additional Schedulers Fast Charge Multiboot (kexec) Intelliplug Advanced MPD Cempaka X X X X X X - Blue Kelisa X X X X X X - Jerung X X X X X X - Lekiu X X X X not yet - - Table : Features of the custom kernels (at least from what I remember) Muhammad Najmi MOSC 2014 19/37
  • 28. MultiROM capabilities Figure : List of ROMs Figure : MultiROM settings Muhammad Najmi MOSC 2014 20/37
  • 29. Kernel configurations Figure : Using trickster to tune the kernel parameters, by sysfs interfacing Muhammad Najmi MOSC 2014 21/37
  • 30. I/O scheduler selector Figure : Using trickster to select preferred I/O scheduler Muhammad Najmi MOSC 2014 22/37
  • 31. CPU governors Figure : Using trickster to select preferred CPU governors Muhammad Najmi MOSC 2014 23/37
  • 32. How to compile Android kernel? Use desktop PC (Mine is i3, 16GB RAM, Ubuntu 14.04 LTS) Only works on 64-bit Linux Use cross compiler.. GCC for ARM Cross compiling in this case means compiling ARM kernel image on x86 (x64) based machine Default kernel sources somehow cannot use latest (bleeding edge) GCC (as for now 4.10). Need some patches to allow that. Muhammad Najmi MOSC 2014 24/37
  • 33. How to add features Use ‘‘patch’’ command by downloading intended patch from other source manually Use ‘‘git cherry pick’’ command Muhammad Najmi MOSC 2014 25/37
  • 34. Patch wget -c https://github.com/engstk/l-preview/commit/8c203729fc0d4479b790408de2ac464745cc7769.patch --2014-09-24 23:53:24-- https://github.com/engstk/l-preview/commit/8c203729fc0d4479b790408de2ac464745cc7769.patch Resolving github.com (github.com)... 192.30.252.130 Connecting to github.com (github.com)|192.30.252.130|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: ’8c203729fc0d4479b790408de2ac464745cc7769.patch’ [ = 2014-09-24 23:53:26 (59.6 KB/s) - ’8c203729fc0d4479b790408de2ac464745cc7769.patch’saved [20146] najmi@quds:~/lekiu-lprev-kernel$ patch -Np1 -i 8c203729fc0d4479b790408de2ac464745cc7769.patch patching file arch/arm/Kconfig Hunk #1 succeeded at 2213 (offset 1 line). patching file arch/arm/boot/compressed/head.S patching file arch/arm/configs/hammerhead_defconfig patching file arch/arm/include/asm/kexec.h patching file arch/arm/kernel/machine_kexec.c patching file arch/arm/kernel/relocate_kernel.S patching file arch/arm/mach-msm/include/mach/memory.h patching file arch/arm/mach-msm/lge/devices_lge.c patching file arch/arm/mach-msm/restart.c patching file include/linux/kexec.h patching file kernel/kexec.c Muhammad Najmi MOSC 2014 26/37
  • 35. git cherry pick najmi@quds:~/lekiu-lprev-kernel$ git fetch codeblue remote: Counting objects: 1073, done. remote: Compressing objects: 100% (422/422), done. remote: Total 1073 (delta 698), reused 974 (delta 649) Receiving objects: 100% (1073/1073), 1.09 MiB | 443.00 KiB/s, done. Resolving deltas: 100% (698/698), done. From https://github.com/engstk/l-preview + 3043028...647125f code_blue-l - codeblue/code_blue-l (forced update) + 59063dc...647125f code_blue-l-beta - codeblue/code_blue-l-beta (forced update) najmi@quds:~/lekiu-lprev-kernel$ git cherry-pick 8c203729fc [test cf6f160] Implement kexec-hardboot by. All work done by @Tasssadar Author: franciscofranco franciscofranco.1990@gmail.com 11 files changed, 350 insertions(+), 7 deletions(-) Muhammad Najmi MOSC 2014 27/37
  • 36. Since kernel sources are GPL, if you publish your release, you MUST publish your source codes People can view your codes/modifications or borrow/use them anyway they want, and they need to publish them as well Muhammad Najmi MOSC 2014 28/37
  • 37. Custom ROMs Muhammad Najmi MOSC 2014 29/37
  • 38. Custom ROM Custom ROMs are either AOSP or CM AOSP and CM ROM source are out there, many creative people do modifications on these sources Popular custom ROMs with relatively awesome team members and support many devices CyanogenMod Carbon ROM Liquid Smooth Paranoid Android (PA) Mahdi ROM AOKP Muhammad Najmi MOSC 2014 30/37
  • 39. Sources and modifications are updated in gerrits Cherry pick is also possible Muhammad Najmi MOSC 2014 31/37
  • 40. Figure : Liquid Smooth ROM, running Cempaka Kernel Figure : Carbon ROM, running Blue Kelisa Kernel Muhammad Najmi MOSC 2014 32/37
  • 41. Source sync ROMs are using ‘‘repo’’ command to sync all changes from the upstream Updates are based from the repositories defined in the manifest file Muhammad Najmi MOSC 2014 33/37
  • 42. Repo sync najmi@quds:~/rom/aicp$ repo sync remote: Counting objects: 3, done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 3 (delta 0) Unpacking objects: 100% (3/3), done. From https://github.com/AICP/platform_manifest 9ee1fc3..d607bb2 kitkat - origin/kitkat project .repo/manifests/ Updating 9ee1fc3..d607bb2 Fast-forward default.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Fetching project platform/packages/apps/Provision Fetching project CyanogenMod/android_hardware_ti_wpan Fetching project omnirom/android_packages_wallpapers_PhaseBeam Fetching project platform/external/tinyxml ............... remote: Counting objects: 12, done remote: Finding sources: 100% (12/12) remote: Total 12 (delta 0), reused 12 (delta 0) remote: Counting objects: 12, done Unpacking objects: 100% (12/12), done. From https://android.googlesource.com/platform/external/eigen Muhammad Najmi MOSC 2014 34/37
  • 43. Example of extra features in custom ROMS Hover PIE Halo Customization of date display Muhammad Najmi MOSC 2014 35/37
  • 44. Figure : PIE Figure : Hover Muhammad Najmi MOSC 2014 36/37
  • 45. END najmi.zabidi@gmail.com Muhammad Najmi MOSC 2014 37/37