Browse Source

manifest: Import README

Change-Id: I05b151abea1a3321d5a65931ddcd765dd9618e63
Simao Gomes Viana 1 year ago
parent
commit
4a67566f93
2 changed files with 127 additions and 0 deletions
  1. 127
    0
      README.mkdn
  2. BIN
      halogenos-logo.png

+ 127
- 0
README.mkdn View File

@@ -0,0 +1,127 @@
1
+<img src="https://raw.githubusercontent.com/halogenOS/android_manifest/XOS-8.0/halogenos-logo.png">
2
+
3
+___________________________________________________________________________________
4
+
5
+
6
+### Getting Started with XOS
7
+
8
+#### __0. Preliminary Knowledge__
9
+
10
+Before beginning this entire process, please ensure you have sufficient storage space. To carry out a single device build an excess of over 30 GB will be required. If building for more than one device, this amount of required storage can exponentially increase. For speedy builds it is highly recommended that you store the sources in a fast storage medium such as Solid State Drives (SSDs), with modern computers it often turns out to be a greater bottleneck than the processor itself when compiling Android.
11
+
12
+It should also be noted that in order to build Android from source successfully, you will require GNU Make, git and the Open Java Development Kit as as well as a few build and compiler centric packages, this will vary from distribution to distribution so it is recommended that you 'Google' the required packages for compiling Android for your distribution.
13
+
14
+Before you continue, make sure you follow the [Setting up a Linux build environment](https://source.android.com/source/initializing.html#setting-up-a-linux-build-environment) guide.
15
+We also recommend you to use CCache for faster builds: [Optimizing a build environment](https://source.android.com/source/initializing.html#optimizing-a-build-environment)
16
+
17
+#### __1. Getting Started__
18
+
19
+To get started with XOS, you should first become familliar with the basics of the utilities named [git](http://rogerdudler.github.io/git-guide/) and [repo](https://source.android.com/source/using-repo.html), if using a development oriented distro or are already an actual developer working with source based Android ROMs or other similar projects you should more likely than not already have these obtained, if not here's an idea of what one should do below.
20
+
21
+__Installing repo__
22
+
23
+```bash
24
+curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
25
+chmod a+x ~/bin/repo
26
+```
27
+
28
+__Installing git__
29
+
30
+Git would more likely than not probably be already installed in your distribution, if it is not then you should try one of the following terminal commands depending on your distribution:
31
+
32
+```bash
33
+Ubuntu, Debian (apt): apt-get install git
34
+OpenSUSE: zypper install git
35
+Fedora: yum install git-all
36
+Gentoo: emerge --ask --verbose dev-vcs/git
37
+Archlinux: pacman -S git
38
+```
39
+
40
+The derivatives of these common distributions should also have the git package available, if you believe your distribution does not offer git in the default package repositories then you may consider [compiling and installing git from source](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-from-Source).
41
+
42
+#### __2. Initiating Repository and Acquiring Sources__
43
+
44
+First, create a new empty directory of your choice, and `cd` into it:
45
+
46
+```bash
47
+mkdir xossrc
48
+cd xossrc
49
+```
50
+
51
+Of course, you can use any directory name you desire. It is recommended to avoid spaces.
52
+
53
+Now initialize a repo source tree, to do this please use following command:
54
+
55
+```bash
56
+repo init -u https://github.com/halogenOS/android_manifest.git -b XOS-8.0
57
+```
58
+
59
+Then synchronize the source tree using repo, which will fetch the source of XOS. You should be warned that this is a procedure which downloads huge amounts (about 20 GB in total) of data, it may take hours to complete. Be prepared with something fun to do as will be waiting for a while or just listen to EDM.
60
+Note, that you will need more than just 20 GB of storage. The **download** amount of data is <20 GB, the final amount of storage needed, will be around 30-40 GB, and for building XOS, you will need at least additional 35 GB.
61
+To clarify: __Downloaded__ will be only 20 GB, and altogether (including the downloaded data) you will need about 90 GB of storage on your hard drive.
62
+
63
+```bash
64
+repo sync build
65
+source build/envsetup.sh
66
+reposync
67
+```
68
+
69
+#### __3. Building__
70
+
71
+__Note: The current changelog for XOS is here: https://github.com/halogenOS/android_vendor_xos/blob/XOS-8.0/Changelog.md__
72
+
73
+First, in order to build XOS you should execute the envsetup.sh script in your terminal/shell, this will set up and import all of the available device configurations for the ROM as well as giving you some fancy "macro" commands for your build enviroment. As such, in order to do this, run the command:
74
+
75
+```bash
76
+source build/envsetup.sh
77
+```
78
+
79
+Now, you should select and configure the build target by using the *lunch* command. Type 'lunch', and a list of the available devices and build targets will be offered, give it a whirl, it won't bite.
80
+
81
+Additionally here's a list of build types for your target device that you will likely encounter while running 'lunch'.
82
+
83
+| Build type	| Use |
84
+|:----------|:----------|
85
+| user	| The flavour usually for building final releases. |
86
+| userdebug |	Same as "user" but with adb enabled and more debuggable. |
87
+| eng	| Engineering build, enables shell root access, debuggability, adb, install engineering modules and is fully JIT enabled |
88
+
89
+Before you start building, make sure that you have all necessary device-specific trees.
90
+Official trees, maintained by the team, can be retrieved using:
91
+
92
+```bash
93
+breakfast <device>
94
+```
95
+
96
+Example:
97
+
98
+```bash
99
+breakfast oneplus2
100
+```
101
+
102
+At this point you should be able to build the ROM freely, all that's left to do is enter...
103
+
104
+```bash
105
+build full XOS_<device>-userdebug
106
+```
107
+
108
+Example:
109
+
110
+```bash
111
+build full XOS_oneplus2-userdebug
112
+```
113
+
114
+This `build` command is a speciality made by the XOS team. It does everything for you, from lunching to breakfasting, and initiating a new build, as well as finding out which amount of threads are optimal for your machine. Hence you must not specify a thread count using `-j` on this command, as that will be done automatically for you.
115
+
116
+in your terminal, the master chef that is 'Mr Compiler' (aka Ninja) will do the cooking of the ROM for you, this will take another while and depend on your storage speed and the capability of your CPU.
117
+
118
+Once done you should find a cute flashable zip either in your directory or within "out/target/product/", this is your creation, you compiled it, she's yours, your own adorable pet... just make sure to treat her very nicely :).
119
+
120
+_Additional build notes : If you're bringing up a new device, our [wiki](https://github.com/halogenOS/android_manifest/wiki) has some important info_
121
+
122
+#### __4. Flashing__
123
+If you do not know how to flash an Android ROM then you probably shouldn't have followed this guide in the first place, or have a case of amnesia, but in the case that you do need a briefing then here's a short guide on flashing XOS: https://goo.gl/BB53SU
124
+
125
+##### _For those who know what they are doing: XOS is under development. You can 'sync&build' but there are no promises it will work 100% :P"._
126
+<br />
127
+###### To build using your GPU (400x faster) do: <code>export USE_GPU_FOR_BUILDS=true</code>

BIN
halogenos-logo.png View File


Loading…
Cancel
Save