Difficulty Level: Intermediate-Advanced
Introduction
From browsing around XDA-Developers you have probably seen a large number of ROMs which are built from source. This includes many of the popular multi-device custom ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area. projects such as CyanogenMod and AOKP.
This chapter aims to teach you the basics of setting up the required environment to get started on building Android from source.
This guide is adapted from the Android guidelines on building. Also, please bear in mind that this guide presumes you have access to a computer or virtual machine running a 64-bit Debian-based Linux operating system such as Ubuntu (the procedures of setting this up are well outwith the scope of this book). You do not need to use Debian, but these instructions have been designed for it, so procedures may vary.
Initial Setup
Before beginning this process, please ensure you have sufficient hard drive space. The Android source code alone consumes around 9A resizeable bitmap resource that can be used for backgrounds or other images on the device. GB of hard drive space, and to carry out a single device build at least 30 GB will be required. If building for more devices, this can easily exceed 100 GB.
In order to build Android from source successfully, you will require Python 2.7, GNU Make 3.81 or 3.82, GitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. 1.7 or later, and the Oracle (Sun) Java Development Kit version 6.
The following packages should also be installed via “sudo apt-get install”, followed by the list of packages. The web copy of this book can be used, so that you can copy-paste this list.
|
|
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 |
Next, in order to address an incorrect library with Ubuntu 11.10 and above, run the following command:
|
|
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so |
The next step is optional, but can offer significant performance gains while compiling, by using ccache (a compiler cache tool), which caches the output of the compiler, to save time when compiling a file which has not been changed since the last compile.
To enable ccache, edit your ~/.bashrc or ~/.profile file (or equivalent), and add the following line
After you log out and back in again, this change will take effect.
By default, the Android build process creates a subfolder named “out” within the rootRoot is the name of the highest level superuser (susu (substitute user) is a Linux command which, when run without a username parameter, gives the user full ‘root’ permissions. By default, this command binary (ie. Linux equivalent of an executable file) is not included on Android systems, but the process of “rooting” a phone copies this file to the ‘/system/bin/’ directory thereby enabling the command. Since root privileges can be abused by malicious applications it’s highly recommended to install an app to grant and manage access to su, similar to UAC on Windows. Many ROMs include the app called “SuperSU” for this.) on Unix-like systems such as Android. The root user, and applications run by the root user, have administrative access to protected files and services which makes it dangerous for normal daily use.
A ‘rooted’ device is one which has been hacked to provide privilege escalation from a standard user to superuser. Rooting a device is usually the first step in installing cooked ROMs. of your source tree. While for most users this is best, in some situations it can be advantageous to move the output directory to another file system. If, for example, you have a striped RAID array, it is beneficial to store the output directory on this array. All of the files within the out directory can be re-generated in the event of filesystem problems (if the sources were held on another filesystem).
To change the output directory to another filesystem, use the command
|
|
export OUT_DIR_COMMON_BASE=<path-to-your-out-directory> |
Within the defined output directory, a new folder will be created, named after your current source tree directory. For instance, if you have source trees as /source/master1 and /source/master2 and OUT_DIR_COMMON_BASE is set to /output, the output directories will be/output/master1 and /output/master2.
It is therefore important to ensure you do not have multiple sources stored in directories with the same name, as they would end up sharing an output directory, with unpredictable results.
This is only supported when building Jelly Bean (4.1) and newer.
Preparing RepoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded
At this point, the basic setup of the build environment has now been configured, and it’s time to obtain the Android sources.
Firstly, the repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded tool must be installed. This is a tool that allows the Android source code to be downloaded automatically from the hundreds of individual repositories in use by Android. Ensure you have a “bin” folder within your home directory, and that it is within your path by running the commands
|
|
mkdir ~/bin export PATH=~/bin:$PATH |
The latter command can be added to your ~/.bashrc script, to ensure the bin folder is always added to your path variable. The repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded script can now be downloaded (run this command from within the ~/bin directory), and the correct permissions set.
|
|
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo chmod a+x ~/bin/repo |
Initialising a RepoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded and Syncing
Initialisation of the repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded creates the bare skeleton directory structure required for storing the Android source code. Create a directory within your home directory where you wish to copy the source code to (as mentioned previously, this drive requires a large amount of free space).
Within this directory, run the command
|
|
repo init -u <URL-to-repository-here> -b <branch-here> |
Here, the URL of the repository you wish to clone should be entered, and the branch desired. This information differs for the ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area. source you wish to obtain. By referring to the project’s gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories, and looking for a README, the suitable command should be given. The branch defines the Android version you wish to clone, such as “ics” or “jellybean” (using the CyanogenMod naming scheme)
After the repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded initialisation completes, a new hidden directory called “.repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded” should have been created within this folder, containing the manifestAn XML file that each application must define, to describe the application’s package name, version, components (activities, intentA message object that you can use to launch or communicate with other applications/activities asynchronously. An Intent object is an instance of Intent. It includes several criteria fields that you can supply, to determine what application/activity receives the Intent and what the receiver does when handling the Intent. Available criteria include include the desired action, a category, a data string, the MIME type of the data, a handling class, and others. An application sends an Intent to the Android system, rather than sending it directly to another application/activity. The application can send the Intent to a single target application or it can send it as a broadcast, which can in turn be handled by multiple applications sequentially. The Android system is responsible for resolving the best-available receiver for each Intent, based on the criteria supplied in the Intent and the Intent Filters defined by other applications. filters, services), imported libraries, and describes the various activities, and so on. files that detail what should be synced from the remote source repository.
It is now time to download the actual sources – this will take a significant amount of time, so it is best to leave the computer to complete this and return later. Run the command “repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded sync”, and it will begin syncing. In the event of the process being interrupted, re-run repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded sync, and the process will be resumed, although a small amount of data may be re-downloaded.
In future, when it is desired to update the source code to obtain the latest updates to the ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area. you are building, the command “repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded sync” can be used on its own to update the source tree. Be aware that doing this will remove and eliminate any changes you have made to your local sources.
Carrying out an Actual Build
To carry out an actual build for a device, it’s necessary to have some device-specific components and source code. Pure Android (Google AOSPThe Android Open Source ProjectThe Android Open Source Project is the Google project which makes available the source code for Android, allowing anyone to build it for themselves. All Android ROMs are ultimately based on AOSP at some point in their development. is the Google project which makes available the source code for Android, allowing anyone to build it for themselves. All Android ROMs are ultimately based on AOSP at some point in their development.) only supports a small subset of available devices (mainly Nexus devices, with a few exceptions that have been added). In order to make a build for your device, you will need a suitably device configuration. Often these are included within the main source download, or are obtained through a method documented by the developers of the ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area..
TIP: The device tree from an AOSPThe Android Open Source ProjectThe Android Open Source Project is the Google project which makes available the source code for Android, allowing anyone to build it for themselves. All Android ROMs are ultimately based on AOSP at some point in their development. is the Google project which makes available the source code for Android, allowing anyone to build it for themselves. All Android ROMs are ultimately based on AOSP at some point in their development. ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area. is not necessarily compatible with a CyanogenMod (or other custom ROMROM is literally “read-only memory” but its usage has changed over time. Today ROM can refer to the non-volatile area of a device’s flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. memory on which read-only data resides or the packed image to be written to that flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. area.), and vice versa. In fact, without changes, it will not allow the build to complete. For this reason, the correct type of device tree is required.
Once you have obtained the suitable device sources (you can add a gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repository to the .repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded/local_manifest.xml file if desired, in order to add it to the repositories updated via a “repoRepo is used within the Android source code to manage multiple gitThe Git version control system is a distributed version control system, which tracks the changes made to some source code. Android and the Linux kernel make heavy use of git.
Git lets multiple authors collaborate on code, and share their changes quickly and easily. repositories. It can synchronise them all, and carry out other actions such as setting up your source tree, without having to manually define each repository needing downloaded sync”), it is time to prepare the build environment.
First, the envsetup.sh script must be executed, which sets up and imports all available device configs. It also adds a few “macro” commands to your environment, such as “chroot”, which will change directory to the rootRoot is the name of the highest level superuser (susu (substitute user) is a Linux command which, when run without a username parameter, gives the user full ‘root’ permissions. By default, this command binary (ie. Linux equivalent of an executable file) is not included on Android systems, but the process of “rooting” a phone copies this file to the ‘/system/bin/’ directory thereby enabling the command. Since root privileges can be abused by malicious applications it’s highly recommended to install an app to grant and manage access to su, similar to UAC on Windows. Many ROMs include the app called “SuperSU” for this.) on Unix-like systems such as Android. The root user, and applications run by the root user, have administrative access to protected files and services which makes it dangerous for normal daily use.
A ‘rooted’ device is one which has been hacked to provide privilege escalation from a standard user to superuser. Rooting a device is usually the first step in installing cooked ROMs. of the Android source tree.This step must be carried out every time you start a new shell session, or reboot. Run the command
Now, the target device should be selected and configured using the “lunch” command. Type “lunch”, and a list of the available devices will be offered. Enter the number of your device to select it for building. Be aware that the device names are often “codenames” rather than final shipping names, but you can research this in your device forum.
Once you know your device’s name, you can directly invoke the command “lunch <codename>-userdebug”. For example, the command
would be invoked to select the Galaxy S2 (i9100) in a CyanogenMod build (hence the “cm_” prefix). Userdebug refers to the type of build being carried out – a userdebug build allows rootRoot is the name of the highest level superuser (susu (substitute user) is a Linux command which, when run without a username parameter, gives the user full ‘root’ permissions. By default, this command binary (ie. Linux equivalent of an executable file) is not included on Android systems, but the process of “rooting” a phone copies this file to the ‘/system/bin/’ directory thereby enabling the command. Since root privileges can be abused by malicious applications it’s highly recommended to install an app to grant and manage access to su, similar to UAC on Windows. Many ROMs include the app called “SuperSU” for this.) on Unix-like systems such as Android. The root user, and applications run by the root user, have administrative access to protected files and services which makes it dangerous for normal daily use.
A ‘rooted’ device is one which has been hacked to provide privilege escalation from a standard user to superuser. Rooting a device is usually the first step in installing cooked ROMs. access, and has some basic debug features available for use in diagnosing issues.
At this point, Android is finally ready to be built! To carry out a build, the “make” command is used. There are some arguments that can be used to speed up this process though on multi-core systems. By using the “-j X” option, where X is twice the number of CPU cores in a system, Android will be built with parallel threads running to make use of the multiple CPU cores.
In some ROMs, it is possible to use the command “mka” to automatically carry this out. Before actually building though, it is important to decide what type of build is required. Running “make” will produce a basic, image based build, which is not easily flashed to a device. Chances are, you want to build a flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc.-able update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. style file which can easily be installed to a device. To do this, use the command “make otapackage” (for CyanogenMod ROMs, “make bacon” is used instead).
To carry out a new build by clearing out the prepared/packaged output files, run the command
This will remove the compiled files from previous builds. At this point, make can be invoked to run a build as before.
To carry out a clean build from scratch (or clear out the large “out” directory if you no longer need the files produced), run the command
This will remove the compiled files from previous builds. At this point, make can be invoked to run a build from scratch as before.
Once the compilation process is completed, the update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. can be found in the path out/target/product/<device name>. There may be multiple zips here, so ensure you are selecting the correct one, as named by the build process in the final lines when the process ended. This zip file can be flashed to the device using recoveryThe recovery partition is a boot-mode for your phone that allows you to wipe your settings from the Data partitionThe data partition on the device contains the user-related data, such as installed applications and settings for those apps, as well as your SQLite database containing Android settings and messages. Normally, the directory /data/app is off-limits through the ‘adb shell’ command, as well as other terminal applications that can run on the device, since this directory contains the apk files for apps. On a rooted phone, using the ‘su’ command will allow full access to this partition. This partition can be flashed using FastbootFastboot is a means which allows the user to execute or FlashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. an img file to their device. Some devices and/or bootloaders allow this access, while others do not, with all Google Nexus devices allow such access. Often, the bootloader must be unlocked before fastboot can be fully used. or Nandroid. of the phone (a hard wipe), or perform an update using an update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. file on the root of the microSD card. It is common (although not necessary) to flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. a patched Recovery image, such as TWRPThe recovery partition is a boot-mode for your phone that allows you to wipe your settings from the Data partitionThe data partition on the device contains the user-related data, such as installed applications and settings for those apps, as well as your SQLite database containing Android settings and messages. Normally, the directory /data/app is off-limits through the ‘adb shell’ command, as well as other terminal applications that can run on the device, since this directory contains the apk files for apps. On a rooted phone, using the ‘su’ command will allow full access to this partition. This partition can be flashed using FastbootFastboot is a means which allows the user to execute or FlashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. an img file to their device. Some devices and/or bootloaders allow this access, while others do not, with all Google Nexus devices allow such access. Often, the bootloader must be unlocked before fastboot can be fully used. or Nandroid. of the phone (a hard wipe), or perform an update using an update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. file on the root of the microSD card. It is common (although not necessary) to flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. a patched Recovery image, such as TWRP or ClockworkModThe recovery partition is a boot-mode for your phone that allows you to wipe your settings from the Data partitionThe data partition on the device contains the user-related data, such as installed applications and settings for those apps, as well as your SQLite database containing Android settings and messages. Normally, the directory /data/app is off-limits through the ‘adb shell’ command, as well as other terminal applications that can run on the device, since this directory contains the apk files for apps. On a rooted phone, using the ‘su’ command will allow full access to this partition. This partition can be flashed using FastbootFastboot is a means which allows the user to execute or FlashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. an img file to their device. Some devices and/or bootloaders allow this access, while others do not, with all Google Nexus devices allow such access. Often, the bootloader must be unlocked before fastboot can be fully used. or Nandroid. of the phone (a hard wipe), or perform an update using an update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. file on the root of the microSD card. It is common (although not necessary) to flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. a patched Recovery image, such as TWRP or ClockworkMod Recovery. This allows you to run NandroidNandroid is used to backup or restore backups from Recovery. You can chose to either do a regular backup (Phone only) or a backup + sd-ext (Phone + Apps2sd ext.) Both will backup your whole system, the second will include apps saved on your sdcard’s sd-ext. backup from the device, and flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. modifications, such as files to the device, essentially becoming a means to install software to the device. Recovery mode is separate from ‘normal’ mode, and can be entered by holding down home whilst turning the phone on. Recovery. This allows you to run NandroidNandroid is used to backup or restore backups from Recovery. You can chose to either do a regular backup (Phone only) or a backup + sd-ext (Phone + Apps2sd ext.) Both will backup your whole system, the second will include apps saved on your sdcard’s sd-ext. backup from the device, and flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. modifications, such as files to the device, essentially becoming a means to install software to the device. Recovery mode is separate from ‘normal’ mode, and can be entered by holding down home whilst turning the phone on. or ClockworkModThe recovery partition is a boot-mode for your phone that allows you to wipe your settings from the Data partitionThe data partition on the device contains the user-related data, such as installed applications and settings for those apps, as well as your SQLite database containing Android settings and messages. Normally, the directory /data/app is off-limits through the ‘adb shell’ command, as well as other terminal applications that can run on the device, since this directory contains the apk files for apps. On a rooted phone, using the ‘su’ command will allow full access to this partition. This partition can be flashed using FastbootFastboot is a means which allows the user to execute or FlashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. an img file to their device. Some devices and/or bootloaders allow this access, while others do not, with all Google Nexus devices allow such access. Often, the bootloader must be unlocked before fastboot can be fully used. or Nandroid. of the phone (a hard wipe), or perform an update using an update.zipAn update.zip (does not have to actually be called update.zip if you have a patched Recovery image) is a file containing some files which will be copied to the phone’s internal memory. Normally, a new system update or ROM is stored in the file, but update.zip files are commonly used to install modifications such as themes or applications that are installed on the System partitionThe /system directory on your device is where the main operational software for the Android OS is stored. It has a number of sub-directories of which /system/apps (where application apk’s are stored) is probably the only one users would have need to access. The /system folder is read-only by default and needs remounted via ‘adbAndroid Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, it is integrated into your development environment.’ to allow write access. to prevent uninstallation. file on the root of the microSD card. It is common (although not necessary) to flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. a patched Recovery image, such as TWRP or ClockworkMod Recovery. This allows you to run NandroidNandroid is used to backup or restore backups from Recovery. You can chose to either do a regular backup (Phone only) or a backup + sd-ext (Phone + Apps2sd ext.) Both will backup your whole system, the second will include apps saved on your sdcard’s sd-ext. backup from the device, and flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. modifications, such as files to the device, essentially becoming a means to install software to the device. Recovery mode is separate from ‘normal’ mode, and can be entered by holding down home whilst turning the phone on. Recovery. This allows you to run NandroidNandroid is used to backup or restore backups from Recovery. You can chose to either do a regular backup (Phone only) or a backup + sd-ext (Phone + Apps2sd ext.) Both will backup your whole system, the second will include apps saved on your sdcard’s sd-ext. backup from the device, and flashFlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. FlashingFlashing is the process of writing data to the internal memory on your phone. Normally, you would flash a ROM image to the phone, which would give you a different version of system software on your phone. Flashing can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. can also refer to updating/writing to any of the other parts of the phone, such as the SPL, Radio etc. modifications, such as files to the device, essentially becoming a means to install software to the device. Recovery mode is separate from ‘normal’ mode, and can be entered by holding down home whilst turning the phone on., as detailed earlier in this book.