• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
  • Created about 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AOSPA/PA global manifest

Paranoid Android

Setting up your machine

You must be running a 64-bit Linux distribution and must have installed some packages to build Paranoid Android. Google recommends using Ubuntu for this and provides instructions for setting up the system (with Ubuntu-specific commands) on the Android Open Source Project website.

Once you have set up your machine according to the instructions by Google, return here and carry on with the rest of the instructions.

Grabbing the source

Repo is a tool provided by Google that simplifies using Git in the context of the Android source.

Installing Repo

# Make a directory where Repo will be stored and add it to the path
$ mkdir ~/.bin
$ PATH=~/.bin:$PATH

# Download Repo itself
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo

# Make Repo executable
$ chmod a+x ~/.bin/repo

Initializing Repo

# Create a directory for the source files
# You can name this directory however you want, just remember to replace
# WORKSPACE with your directory for the rest of this guide.
# This can be located anywhere (as long as the fs is case-sensitive)
$ mkdir WORKSPACE
$ cd WORKSPACE

# Install Repo in the created directory
# Use a real name/email combination, if you intend to submit patches
$ repo init -u https://github.com/AOSPA/manifest -b topaz

Downloading the source tree

This is what you will run each time you want to pull in upstream changes. Keep in mind that on your first run, it is expected to take a while as it will download all the required Android source files and their change histories.

# Let Repo take care of all the hard work
#
# The -j# option specifies the number of concurrent download threads to run.
# 4 threads is a good number for most internet connections.
# You may need to adjust this value if you have a particularly slow connection.
$ repo sync --no-clone-bundle --current-branch --no-tags -j4

Syncing specific projects

In case you are not interested in syncing all the projects, you can specify what projects you do want to sync. This can help if, for example, you want to make a quick change and quickly push it back for review. You should note that this can sometimes cause issues when building if there is a large change that spans across multiple projects.

# Specify one or more projects by either name or path

# For example, enter AOSPA/android_frameworks_base or
# frameworks/base to sync the frameworks/base repository

$ repo sync PROJECT

Building

The bundled builder tool ./rom-build.sh handles all the building steps for the specified device automatically. As the device value, you just feed it with the device codename (for example, 'beryllium' for the Pocophone F1).

# Go to the root of the source tree...
$ cd WORKSPACE
# ...and run the builder tool.
$ ./rom-build.sh DEVICE

Submitting Patches

We're open source and patches are always welcome!

You can see the status of all patches at Gerrit Code Review.

Following the standard workflow

# Start by going to the root of the source tree
$ cd WORKSPACE

# Create a new branch on the specific project you are going to work on
# For example, `repo start fix-clock AOSPA/android_frameworks_base`
$ repo start BRANCH AOSPA/PROJECT
# You can also use the project path in place of the project name.
# The PROJECT_DIR is the portion after the android_ prefix on
# the AOSPA Github.  For example, android_frameworks_base translates
# into the directory frameworks/base.
# This applies to all repo commands that reference projects.
$ repo start BRANCH PROJECT_DIR

# Go inside the project you are working on
$ cd PROJECT_DIR

# Make your changes
...

# Commit all your changes
$ git add -A
$ git commit -a -s

# Upload your changes
$ cd WORKSPACE
$ repo upload AOSPA/PROJECT
# or
$ repo upload PROJECT_DIR

Using plain git to upload

# Go inside the project you are working on
$ cd PROJECT_DIR

# Make your changes
...

# Commit all your changes
$ git add -A
$ git commit -a -s

# Upload your changes
$ git push ssh://[email protected]:29418/AOSPA/PROJECT HEAD:refs/for/topaz

Extra commands for Gerrit

# If you desire to upload a change as private use the below command
$ git push ssh://[email protected]:29418/AOSPA/PROJECT HEAD:refs/for/topaz%private

# If you desire to upload a change as W.I.P(Work in Progress) use the below command
$ git push ssh://[email protected]:29418/AOSPA/PROJECT HEAD:refs/for/topaz%wip

# After that, if you want to make the commit public you can use the UI tools on AOSPA Gerrit website, or use the below command
$ git push ssh://[email protected]:29418/AOSPA/PROJECT HEAD:refs/for/topaz%remove-private

# If you want to unset the W.I.P status on your commit, you can use UI tools on AOSPA Gerrit website, or use the below command
$ git push ssh://[email protected]:29418/AOSPA/PROJECT HEAD:refs/for/topaz%ready

Making additional changes

If you are going to make more changes, you just have to repeat the steps (except for repo start which you should not repeat) while using git commit --amend instead of git commit -a -s so that you avoid having multiple commits for this single change. Gerrit will then recognize these changes as a new patch set and figure out everything for you when you upload.

Squashing multiple commits

Your patches should be single commits. If you have multiple commits laying around, squash them by running git rebase -i HEAD~<commit-count> before uploading.

Writing good commit messages

You will be asked a commit message when you run git commit. Writing a good commit message is often hard, but it is also essential as these messages will stay around with your changes and will be seen by others when looking back at the project history.

A few general pointers to keep in mind when writing the commit message are that you should use imperative as it matches the style used by the git merge and git revert commands (that means "Fix bug" is preferred over "Fixes bug", "Fixed bug" and others) and that you should write the first line of the commit message as a summary of the commit. It should always be capitalized and followed by an empty line. You might optionally include the project name at the start and try to keep it to 50 characters when possible as it is used in various logs, including "one line" logs.

Working on translations

If you want to help on translating PA to your desired language(s), you can use Crowdin which provides an easy interface to submit translations.

For accessing PA´s Crowdin, visit http://crowdin.aospa.co.

Using our assets

Code

Our codebase is licensed under Apache License, Version 2.0 unless otherwise specified. Apache License 2.0 allows a variety of actions on the content as long as licensing and copyright notices are retained and included with the code and your changes to the codebase are stated.

You can read the full license text at http://www.apache.org/licenses/LICENSE-2.0

Images & other assets

Unless otherwise specified, all our assets, including but not limited to images, are licensed under Creative Commons Attribution-NonCommercial 4.0 International, or CC BY-NC 4.0 for short. This means that you are allowed to modify the aforementioned assets in any way you want and you are free to share the originals and/or the modified work. However, you are not allowed to use the assets for commercial purposes and you must provide attribution at all times which means you have to include a short note about the license used (CC BY-NC 4.0), the original author/authors (Paranoid Android Project or AOSPA) and inform about any changes that have been made. A link to the website should usually be included as well.

You can reach the full legal text at http://creativecommons.org/licenses/by-nc/4.0/

More Repositories

1

android_frameworks_base

Java
104
star
2

android_build

Makefile
41
star
3

android_device_lge_hammerhead

Nexus 5 (hammerhead) device tree
C++
25
star
4

android_device_qcom_common

Makefile
20
star
5

android_vendor_pa

Makefile
17
star
6

android_packages_apps_Settings

Java
15
star
7

android_device_xiaomi_spes

Java
14
star
8

android_packages_apps_ParanoidOTA

PA OTA updates application
Java
13
star
9

android_kernel_xiaomi_ginkgo

C
11
star
10

android_kernel_oneplus_msm8996

C
9
star
11

android_frameworks_av

C++
9
star
12

android_kernel_lge_hammerhead

Nexus 5 (hammerhead) kernel tree
C
9
star
13

android_kernel_xiaomi_laurel_sprout

C
9
star
14

android_device_oneplus_oneplus5

Java
8
star
15

android_device_oneplus_bacon

C
8
star
16

android_device_nothing_phone1

C++
8
star
17

android_vendor_aospa

Makefile
8
star
18

android_packages_apps_Lightbulb

Java
6
star
19

android_device_oneplus_onyx

C++
6
star
20

android_kernel_xiaomi_sdm845

C
6
star
21

android_kernel_xiaomi_miatoll

C
6
star
22

android_device_xiaomi_miatoll

C++
6
star
23

android_device_xiaomi_ginkgo

Java
6
star
24

android_device_qcom_sepolicy

Shell
6
star
25

android_device_nothing_phone2

C++
6
star
26

android_device_oneplus_oneplus3

Shell
6
star
27

android_packages_apps_SnapdragonCamera

Java
5
star
28

android_hardware_qcom_display

C++
5
star
29

android_device_xiaomi_trinket-common

Makefile
5
star
30

android_hardware_qcom_audio

C
5
star
31

android_device_asus_grouper

Nexus 7 2012 (grouper) device tree
C
5
star
32

android_art

C++
5
star
33

android_system_core_old

C++
5
star
34

android_device_moto_shamu

C++
4
star
35

android_device_realme_sm8250-common

Makefile
4
star
36

android_kernel_oneplus_sm8250

C
4
star
37

android_device_xiaomi_beryllium

Makefile
4
star
38

android_device_lge_mako

Nexus 4 (mako) device tree
C++
4
star
39

android_kernel_nothing_sm7325

C
4
star
40

android_packages_apps_Dialer

Java
4
star
41

android_device_oneplus_oneplus6

Shell
4
star
42

android_kernel_asus_sdm660

C
3
star
43

android_hardware_qcom_media

C
3
star
44

android_hardware_google_pixel

C++
3
star
45

android_device_essential_mata

C++
3
star
46

android_bionic

Assembly
3
star
47

android_kernel_nextbit_msm8992

C
3
star
48

android_kernel_oneplus_sdm845

C
3
star
49

android_kernel_build

Shell
3
star
50

android_build_soong

Go
3
star
51

android_device_xiaomi_laurel_sprout

Makefile
3
star
52

android_device_xiaomi_vayu

Java
3
star
53

android_packages_apps_Launcher3

Java
3
star
54

android_device_xiaomi_sdm845-common

C++
3
star
55

android_kernel_xiaomi_msm8996

C
3
star
56

android_device_xiaomi_spes-kernel

C
3
star
57

android_external_f2fs-tools

C
3
star
58

android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9

2
star
59

android_hardware_qcom_wlan

C
2
star
60

android_device_oneplus_oneplus2

C++
2
star
61

android_kernel_oneplus_msm8974

C
2
star
62

android_kernel_oneplus_msm8998

C
2
star
63

android_packages_apps_ParanoidPapers

Python
2
star
64

android_device_asus_flo

Nexus 7 2013 (flo) device tree
C++
2
star
65

android_kernel_xiaomi_msm8998

C
2
star
66

android_kernel_oneplus_onyx

C
2
star
67

android_kernel_realme_sm8250

C
2
star
68

android_external_arm-optimized-routines

C
2
star
69

android_device_xiaomi_lisa

Java
2
star
70

android_prebuilts_gcc_linux-x86_aarch64_aarch64-elf

Latest baremetal GCC for arm64
C
2
star
71

android_device_oneplus_oneplus9pro

Makefile
2
star
72

ParanoidAndroid

Vue
2
star
73

android_vendor_blobscript

Shell
2
star
74

android_bootable_recovery

C++
2
star
75

android_external_jemalloc-new

C
2
star
76

android_device_xiaomi_sagit

C
2
star
77

android_frameworks_native

C++
2
star
78

android_kernel_lge_mako

Nexus 4 (mako) kernel tree
C
2
star
79

android_device_xiaomi_nuwa-kernel

C
2
star
80

android_device_xiaomi_gemini

C
2
star
81

android_hardware_qcom_gps

C++
2
star
82

android_external_busybox

C
2
star
83

android_device_oneplus_sdm845-common

Shell
2
star
84

android_device_lenovo_A6020

C
2
star
85

android_vendor_miuicamera

Shell
2
star
86

android_device_asus_tilapia

Nexus 7 3G 2012 (tilapia) device tree
C++
1
star
87

android_device_xiaomi_sm6150-common

C++
1
star
88

android_device_oneplus_oneplus9

Makefile
1
star
89

android_kernel_xiaomi_sm6150

C
1
star
90

android_packages_apps_ExactCalculator

1
star
91

android_vendor_google_interfaces

1
star
92

android_device_xiaomi_sm6225-common

Java
1
star
93

android_packages_services_Telephony

Java
1
star
94

android_kernel_oneplus_sm8350

1
star
95

vendor_qcom_proprietary_audio-devicetree

Makefile
1
star
96

android_kernel_msm

C
1
star
97

android_device_google_dragon

1
star
98

android_device_lge_mako-kernel

1
star
99

android_kernel_lge_bullhead

C
1
star
100

android_device_asus_X00TD

C++
1
star