惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
P
Privacy International News Feed
Security Latest
Security Latest
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Last Watchdog
The Last Watchdog
S
Schneier on Security
Engineering at Meta
Engineering at Meta
Google Online Security Blog
Google Online Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Cyberwarzone
Cyberwarzone
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
A
Arctic Wolf
博客园 - 聂微东
I
Intezer
腾讯CDC
罗磊的独立博客
T
Tailwind CSS Blog
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
L
Lohrmann on Cybersecurity
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Simon Willison's Weblog
Simon Willison's Weblog
W
WeLiveSecurity
N
News and Events Feed by Topic
SecWiki News
SecWiki News
S
Security Affairs
T
Threat Research - Cisco Blogs
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
T
Troy Hunt's Blog
N
News and Events Feed by Topic
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
I
InfoQ
Hacker News: Ask HN
Hacker News: Ask HN
T
The Blog of Author Tim Ferriss
Schneier on Security
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Homepage on Aditya Telange

One Year with evil-winrm-py - A Retrospective Bypassing LinkedIn's Connection Privacy with a Simple Search Filter Making Dynamic Instrumentation Accessible with Frida UI Breaking Payload Encryption in Web Applications HackTheBox (HTB) - Escape HackTheBox (HTB) - Resolute HackTheBox (HTB) - Certified State of VMWare Workstation (Pro?) on Linux Android App Security Testing Lab with MobSleuth Android phone as a Webcam on Linux Breaking down Reverse shell commands HackTheBox (HTB) - Photobomb Merging AOSP Security Patches into Custom ROMs Primer on HTTP Security Headers Image Zoom-In effect with HUGO HackTheBox (HTB) - Legacy HackTheBox (HTB) - Lame Cryptohack - Keyed Permutations [5 pts] Cryptohack - Resisting Bruteforce [10 pts] Cryptohack - RSA Starter 1 [10 pts] Cryptohack - Base64 [10 pts] Cryptohack - Bytes and Big Integers [10 pts] Cryptohack - Hex [5 pts] Cryptohack- XOR Starter [10 pts] HackTheBox (HTB) - Horizontall HackTheBox (HTB) - Forge HackTheBox (HTB) - Previse HackTheBox (HTB) - BountyHunter HackTheBox (HTB) - Explore HackTheBox (HTB) - Cap HackTheBox (HTB) - Pit HackTheBox (HTB) - Knife HackTheBox (HTB) - Love HackTheBox (HTB) - Tenet HackTheBox (HTB) - Ready Watermarking images with HUGO My Github Project went viral! Cryptohack - ASCII [5 pts] Cryptohack - Finding Flags [2 pts] Cryptohack - Great Snakes [3 pts] Cryptohack - JWT Sessions [10 pts] Cryptohack - Network Attacks [5 pts] Cryptohack - Token Appreciation [5 pts] CAF's Android for MSM Basic Website Analytics with Vercel Github Actions as Temporary File Sharing Platform Addition of prebuilt APK - AOSP Rom Development External Link With target='_blank' in Hugo Markdown Getting Started - AOSP Rom Development Using Secure HTTP Headers with Vercel/Zeit Education and Certifications Link Tree ↟ | Aditya Telange Personal Projects Resume - Aditya Telange Security Acknowledgements About Me Graph View License Privacy Policy
Setting Up Build Environment - AOSP Rom Development
[Aditya Telange](https://x.com/adityatelange) · 2020-04-17 · via Homepage on Aditya Telange

Introduction

Probably many guides are available on the Internet right now ! Motivation of writing the article is to share my experiences and some tips and tricks I have received from android development community.

I will be considering Linux build environment for the sake of this article. (as most of developers use local machine as well as servers which are Linux based.) Also you should be using a Linux based OS especially Debian based, if you are just starting as more support is available for it !

System Requirements

You can view requirements preferred by AOSP here

Establishing a Build Environment

Now most of ROM development takes place via cloud servers such as GCP (Google Cloud Platform), Azure cloud and other cloud providers, as compilation requires a lot of Disk space with processing power, but people who meet the requirements do compile on their local machine such as desktops and also laptops.

Installing dependencies

For a debian based environment such as Ubuntu( AOSP recommends Ubuntu LTS (14.04) and above ) the following are packages required =>

Use package manager apt to install these packages. More or Less could be necessary depending on which ROM you are building and their implementation

sudo apt-get install \
adb autoconf automake axel bc bison build-essential ccache clang cmake curl \
expat flex g++ g++-multilib gawk gcc gcc-multilib git git-core git-lfs \
gnupg gperf htop imagemagick kmod lib32ncurses5-dev lib32readline-dev \
lib32z1-dev libc6-dev libcap-dev libexpat1-dev libgmp-dev liblz4-* liblz4-tool \
liblzma* libmpc-dev libmpfr-dev libncurses5-dev libsdl1.2-dev libssl-dev \
libtinfo5 libtool libwxgtk3.0-dev libxml-simple-perl libxml2 libxml2-utils \
lzip lzma* lzop maven ncftp ncurses-dev patch patchelf pkg-config pngcrush \
pngquant python python3 python-all-dev re2c rsync schedtool squashfs-tools subversion \
texinfo unzip w3m xsltproc zip zlib1g-dev zram-config

Also a simple automated script is available at android_build_env.sh by Akhil Narang.

For people who want to have a separate build environment can use Virtual Machines or Docker container.

Docker setup

Here is a Docker Environment Script ready to be used as a build host ; )

Installing Source Control Tools

For managing the huge source of android requires using Git and a tool called Repo which is a Google-built repository-management tool that runs on top of Git.

We have already installed Git with all the dependencies.

Installing repo:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Setup Git

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Note: remember the email you use above will be used for git commits(if you do so), and will be available to anyone if you push to github.

Now that you have setup tools and dependencies needed, next step is getting the source code !


Refrerences