-
Notifications
You must be signed in to change notification settings - Fork 35
/
source.html
438 lines (408 loc) · 29.9 KB
/
source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<!DOCTYPE html>
<html>
<head>
<title>Get Source | Android-x86</title>
<link rel="stylesheet" type="text/css" href="master.css" title="default">
<link rel="alternate stylesheet" type="text/css" href="dark.css" title="alternate">
<script type="text/javascript" src="styleswitcher.js"></script>
<link rel="icon" type="image/png" href="mobile.png">
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div w3-include-html="navbar.html"></div>
<div class="openNav">
<div class="icon"></div>
</div>
<!--HTML of main page-->
<div class="wrapper">
<section>
<h1 id="top" class="heading">Android-x86</h1>
<h2 class="subheading">Run Android on your PC</h2>
<!--Style Switcher-->
<div class=themebtn>
<button class="button" onclick="setActiveStyleSheet('default'); return false;"><img src="light_theme.png" height="20px" width"20px" title='Toggle Theme'/> </button>
<button class="button" onclick="setActiveStyleSheet('alternate'); return false;" ><img src="dark_theme.png" height="20px" width"20px" title="Toggle Theme"/></button>
</div>
<p>This page describes the latest information about how to build Android for x86 platform. To browse our source code, see
<p><ul>
<li><a href="https://git.osdn.net/view?a=project_list;pf=android-x86">Android-x86 at OSDN Gitiweb</a></li>
<li><a href="https://osdn.net/projects/android-x86/scm">Code repository list at OSDN</a></li>
<li><a href="https://sourceforge.net/p/android-x86/_list/git">Code repository list at SourceForge</a></li>
</ul></p>
<p>It is easy to compile Android for x86 platform from our git repositories. The built image should run well on real x86 devices as well as virtual machines (like qemu or virtual box). Just follow the following instructions. No additional patch is required.
</p>
<h2><b>The branches in Android-x86 tree</b></h2>
<p>Since <a href="https://source.android.com">AOSP</a> evolves very quickly, we have created different branches corresponding to different releases of AOSP:</p>
<ul>
<li><b>r-x86</b>
<br>Based on Android 11.0 release
</li>
<li><b>q-x86</b>
<br>Based on Android 10.0 release
</li>
<li><b>pie-x86</b>
<br>Based on Android 9.0 release (Pie QPR2)
</li>
<li><b>oreo-x86</b>
<br>Based on Android 8.1 release (Oreo MR1)
</li>
<li><b>nougat-x86</b>
<br>Based on Android 7.1 release (Nougat MR2)
</li>
<li><b>marshmallow-x86</b>
<br>Based on Android 6.0 release (Marshmallow)
</li>
<li><b>lollipop-x86</b>
<br>Based on Android 5.1 release (Lollipop)
</li>
<li><b>kitkat-x86</b>
<br>Based on Android 4.4 release (KitKat)
</li>
<li><b>jb-x86</b>
<br>Based on Android 4.3 release (Jelly Bean)
</li>
<li><b>ics-x86</b>
<br>Based on Android 4.0 release (Ice Cream Sandwich)
</li>
<li><b>honeycomb-x86</b>
<br>Based on Android 3.2 release (Honeycomb)
</li>
<li><b>gingerbread-x86</b>
<br>Based on Android 2.3 release (Gingerbread)
</li>
<li><b>froyo-x86</b>
<br>Based on Android 2.2 release (Froyo)
</li>
<li><b>eclair-x86</b>
<br>Based on Android 2.1 release (Eclair)
</li>
<li><b>donut-x86</b>
<br>Based on Android 1.6 release (Donut)
</li>
<li><b>cupcake-x86</b> (aka android-x86-b0.9)
<br>Based on Android 1.5 release (Cupcake)
</li>
</ul>
<br><br>
<h2><b>Getting Android-x86 source code</b></h2>
<p>Firstly, refer to the AOSP page <a href="http://source.android.com/source/initializing.html">"Establishing a Build Environment"</a> to configure your build environment. For Ubuntu 18.04, install the following required packages:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">sudo apt -y install git gcc curl make repo libxml2-utils flex m4<br></code>
<code class="code-shell">sudo apt -y install openjdk-8-jdk lib32stdc++6 libelf-dev mtools<br></code>
<code class="code-shell">sudo apt -y install libssl-dev python-enum34 python-mako syslinux-utils</code>
</span></div>
<p>Then pull down the Android-x86 source tree to your working directory by:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">mkdir android-x86<br></code>
<code class="code-shell">cd android-x86<br></code>
<code class="code-shell">repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b $branch<br></code>
<code class="code-shell">repo sync --no-tags --no-clone-bundle</code>
</span></div>
<p>Where <tt>$branch</tt> is one of the branch names described in the previous section. Note the projects created or modified by android-x86 are fetched from our git server. All the other projects are still downloaded from the <a href="https://android.googlesource.com/">repositories of AOSP</a>.
</p><p>If you have issues to sync from the git protocol, try the alternative http one
</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">repo init -u http://scm.osdn.net/gitroot/android-x86/manifest -b $branch<br></code>
<code class="code-shell">repo sync --no-tags --no-clone-bundle</code>
</span></div>
<p>If you hope to keep syncing your tree with Android-x86 repository, just do <tt>repo sync</tt>. No need to do <tt>repo init</tt> again. However, sometimes you may see conflicts during <tt>repo sync</tt>. See the section "How to Solve Conflicts" for how to solve this situation.
</p><p>Note: The Android-x86 repository is very big (more than 20GB for oreo-x86). If you encounter problems of sync it, it's likely a network problem or our server is too busy. Repeatedly run '<tt>repo sync</tt>' until it succeeds without any error. Do not bother us with any of the syncing problem.</p>
<h2><b>Getting LineageOS for x86 source code</b></h2>
<p>To get the source code of <a href="https://www.lineageos.org">LineageOS</a> (formerly CyanogenMod) porting for Android-x86, specify the manifest by an additional option <tt>-m cm.xml</tt>:
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">repo init -u git://git.osdn.net/gitroot/android-x86/manifest -m cm.xml -b $branch<br></code>
<code class="code-shell">repo sync --no-tags --no-clone-bundle</code>
</span></div>
</p><p>Currently the LineageOS porting is only available in nougat-x86 (cm 14.1) and marshmallow-x86 (cm 13.0) branches.</p>
<h2><b>Building the image</b></h2>
<p>Once <tt>repo sync</tt> is complete, you can build a cdrom iso image. You need Oracle java 1.6 (OpenJDK may not work) to build branches before (includes) kitkat-x86. <b>Since lollipop-x86, java 1.7 is required</b> and OpenJDK is supported. Since <b>nougat-x86, OpenJDK 1.8 is required</b>.</p>
<p><b>Note:</b> Before froyo-x86 (included), you can build on either a 32-bit or 64-bit host. Since gingerbread-x86, a 64-bit build environment is recommended.</p>
<h2><b>Choose a target</b></h2>
<p>You need to choose a target for the x86 device you want to use/test. We provides several targets for different branches:</p>
<ul>
<li><h4>lollipop-x86 and later versions</h4></li>
<ul>
<li>android_x86_64: for 64-bit x86_64 platform</li>
<li>android_x86: for 32-bit x86 platform</li>
</ul>
<br><li><h4>kitkat-x86 / jb-x86</h4></li>
<ul>
<li>android_x86: for x86 platform</li>
</ul>
<br><li><h4>ics-x86 / honeycomb-x86</h4></li>
<ul>
<li>generic_x86: for generic x86 PC/notebook</li>
<li>amd_brazos: for AMD Brazos platform</li>
<li>eeepc: for ASUS EeePC family only</li>
<li>asus_laptop: for some ASUS laptops</li>
<li>tegav2: for Tegatech Tegav2 (may work with other Atom N45x based tablets)</li>
</ul>
<br><li><h4>gingerbread-x86 / froyo-x86</h4></li>
<ul>
<li>generic_x86: for generic x86 PC/notebook</li>
<li>eeepc: for ASUS EeePC family only</li>
<li>asus_laptop: for some ASUS laptops</li>
<li>tegav2: for Tegatech Tegav2 (may work with other Atom N45x based tablets)</li>
<li>sparta: for Dell Inspiron Mini Duo platform</li>
<li>vm: for virtual machine (virtual box, qemu, vmware)</li>
<li>motion_m1400: for Motion M1400 (Intel Centrino M based with Intel PRO/Wireless)</li>
</ul>
<br><li><h4>eclair-x86</h4></li>
<ul>
<li>generic_x86: for generic x86 PC/notebook</li>
<li>eeepc: for ASUS EeePC family only</li>
<li>q1u: for Samsung Q1U</li>
<li>s5: for Viliv S5</li>
</ul>
<br><li><h4>donut-x86</h4></li>
<ul>
<li>eeepc: for ASUS EeePC family only</li>
<li>q1u: for Samsung Q1U</li>
<li>s5: for Viliv S5</li>
</ul>
<br><li><h4>LineageOS for x86</h4></li>
<ul>
<li>cm_android_x86_64: for 64-bit x86_64 platform</li>
<li>cm_android_x86: for 32-bit x86 platform</li>
</ul>
</ul>
<br>
<p>Unless you are trying to build an ancient branch, you should just use <i>android_x86_64</i> for a 64-bit target, or <i>android_x86</i> for a 32-bit target. They are the universal targets for all x86 devices.</p>
<p>Historically, you should use to use <i>generic_x86</i> for eclair-x86 to ics-x86 branches. However, it may not optimized for a particular target device. Use <i>eeepc</i> for a generic x86 for donut-x86 branch or before, unless you have the particular devices supported by other targets.</p>
<p>If you are a developer, you can create a target based on <i>android_x86</i> for your device. See <a href="documentation/new_target.html">this article</a> for details. However, it's not recommended to do so unless you are a very experienced Android platform developer.</p>
<h2><b>Using lunch commnd (recommended)</b></h2>
<p>You can source the file <i>build/envsetup.sh</i> into your bash environment to get some shell functions to help the building:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">source build/envsetup.sh</code>
</span></div>
<p>Now you can select a target by lunch command:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">lunch $TARGET_PRODUCT-$TARGET_BUILD_VARIANT</code>
</span></div>
<p>where $TARGET_PRODUCT is any target described in the previous section, and possible values of $TARGET_BUILD_VARIANT are eng, user, userdebug. For example,</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">lunch android_x86_64-userdebug</code>
</span></div>
<p>Then you can build an iso file by <b>m</b> command:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">m -jX iso_img</code>
</span></div>
<p><b>m</b> command is equivalent to <b>make</b>, but you can use it in any subdirectory of the android-x86 tree. Replace X by the number of processors you have. For example, if you have a quad core CPU, replace X with 4:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">m -j4 iso_img</code>
</span></div>
<p>Since froyo-x86, we also add menu selection to lunch command. Just type <tt>lunch</tt>, and you will get a list of available targets. Input the number to select a target. Alternatively, just type <tt>lunch $number</tt>.</p>
<p>To build an rpm file:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">m -jX rpm</code>
</span></div>
<p>You need to install the <tt>rpm-build</tt> package (Fedora based distributions) or <tt>rpm</tt> package (Debian / Ubuntu based distributions) before building.</p>
The rpm file could be installed to a Linux distribution directly.<p>
<h2><b>Building directly</b></h2>
<p>You may specify the target to be built by TARGET_PRODUCT variable. For example, to build an iso image for target <tt>android_x86</tt>, type:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">make -jX iso_img TARGET_PRODUCT=android_x86</code>
</span></div>
<p>To generate a live cdrom iso for tegav2, type</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">make -jX iso_img TARGET_PRODUCT=tegav2</code>
</span></div>
<p>Then you will get an iso file out/target/product/x86/android_x86.iso, etc.</p>
<h2><b>Using buildspec.mk</b></h2>
<p>You can create a <tt>buildspec.mk</tt> in your android-x86 directory to remember a particular target product you build often:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
TARGET_PRODUCT := android_x86_64<br>
TARGET_BUILD_VARIANT := userdebug<br>
TARGET_BUILD_TYPE := release<br>
TARGET_KERNEL_CONFIG := android-x86_64_defconfig
</span></div>
<p>With your <tt>buildspec.mk</tt> file in your android-x86 working directory, you can simply make by</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">make -jX iso_img</code>
</span></div>
<h2><b>Building smaller image</b></h2>
<p>Since marshmallow-x86, the generated Android-x86 core filesystem will be compressed by <a href="https://en.wikipedia.org/wiki/SquashFS">squashfs</a> by default. Before that, squashfs is used only if you have squashfs-tools 4.0 (older version <b>will not work</b>) installed in your host. The generated iso file is much smaller (only about 30-40%). However, if you hope to disable it for some reasons, add <tt>USE_SQUASHFS=0</tt> to make. You can put it to buildspec.mk:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
USE_SQUASHFS := 0
</span></div>
<p>Before froyo-x86 (included), If you hope to get a more smaller image, you may remove the debugging symbols by adding</p>
<div class="code-snippet"><span style="color:#d1d1d1">
TARGET_STRIP := 1
</span></div>
<p>Since gingerbread-x86, the debugging symbols are stripped by default. So the option is unnecessary.</p>
<h2><b>Testing</b></h2>
<p>The generated image is located at</p>
<div class="code-snippet"><span style="color:#d1d1d1">
out/target/product/$TARGET_PRODUCT/$TARGET_PRODUCT.iso
</span></div>
<p>You can easily test the iso file by a virtual machine like <a href="documentation/virtualbox.html">virtual box</a> or <a href="documentation/qemu.html">qemu</a>. Alternatively, on a Linux host you can use the <tt>qemu-android</tt> script (available since nougat-x86) to run android-x86 in qemu directly:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">sudo out/host/linux-x86/bin/qemu-android</code>
</span></div>
<p>To test the image on a real x86 hardware, you can burn the iso to a compact disc (CD), then boot it on the target device. Check the manual of your vendor to see how to boot from a CD. On booting it will automatically detect your hardware and load necessary modules.</p>
<p>Since honeycomb-x86, we support the <b>hybrid iso format</b>. That is, the iso could be dumped to a usb disk directly. For example,</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">dd if=out/target/product/x86_64/android_x86_64.iso of=/dev/sdX</code>
</span></div>
<p>where <tt>/dev/sdX</tt> is the device name of your USB disk. The feature is available for all iso files released after 2011/12/25.</p>
<p>If you build an rpm file, install it to your Linux host and run the <tt>qemu-android</tt> script directly. Or reboot and choose android-x86 item from the booting menu.</p>
<p>For more details about how to use the iso or install it, see the <a href="installhowto.html">installation howto.</a></p>
<h2><strong>Advanced</strong></h2>
<p>This section describes some useful information for advanced users. You may need good linux expertise to complete it.</p>
<h2>Install to USB disk</h2>
<p>For advanced linux users, you may create a bootable USB disk by hand. Here are the steps:</p>
<p><ol>
<li>Install grub to your USB disk</li>
<ul>
<li> find a linux machine with the latest grub installed</li>
<li> partition your USB drive with fdisk or gpartd and mark the partition as bootable</li>
<li> format that partition to ext4 (recommended) or vfat.</li>
<li> mount your usb drive to /mnt</li>
<li> cd /mnt</li>
<li> grub-install --root-directory=. --no-floppy /dev/<your usb device node name></li>
<li> cd /boot/grub</li>
<li> create your menu.lst based on the next section</li>
</ul>
<br><li>Add this section to menu.lst</li>
<div class="code-snippet"><span style="color:#d1d1d1">
title Run Android-x86<br>
kernel /android/kernel root=/dev/ram0 androidboot.selinux=permissive SRC=/android<br>
initrd /android/initrd.img<br>
title Run Android-x86 (VESA mode)<br>
kernel /android/kernel root=/dev/ram0 androidboot.selinux=permissive vga=788 SRC=/android<br>
initrd /android/initrd.img<br>
title Run Android-x86 (Debug mode)<br>
kernel /android/kernel root=/dev/ram0 androidboot.selinux=permissive vga=788 SRC=/android DEBUG=1<br>
initrd /android/initrd.img<br>
</span></div>
<p>Note <strong>androidboot.selinux=permissive</strong> must be added since nougat-x86. Besides, before marshmallow-x86, <strong>androidboot.hardware=<target></strong> must be added to specify the target name of the built image. However, <b>do not</b> add this option since nougat-x86.</p>
<p>Since kitkat-x86 the SRC= parameter may be omitted if the system image is in the same directory as the kernel.</p>
<li>Create /android directory in the USB disk, and copy the four files kernel initrd.img ramdisk.img system.sfs (or system.img if you set USE_SQUASHFS=0) to it.</li>
</ol></p>
<p>Then you can boot from the USB disk and enjoy Android. Note all data are saved to the ramdisk, so all will lose after power off. If you hope to save data to disk, see the next section.</p>
<br><br><h2>Install to hard disk</h2>
<p>Install to a hard disk is just the same as install to a USB disk. Even you do not need to create a new partition. Just copy android files into an existing partition, install grub to the hard disk (if not done yet), and modify the menu.lst.<br><br>
People still ask, what if my hard disk is empty? How to install grub and copy files into it? There are several ways to do it. I provide two here:</p>
<ul>
<li>Boot from any rescue cd like <a href="http://www.sysresccd.org">systemrescuecd</a>, and follow the instructions in the previous section.</li>
<li>Install your favorite linux distribution, then copy android files and modify the grub menu.</li>
</ul>
<br>
<h2>Save data to USB/hard disk</h2>
<p>We provide several ways to save data to your disk. You can choose one of them according to your situation:</p>
<ul>
<li>Create a subdirectory named data in the /android directory. The user data will be saved directly to that directory. This method only works for ext4 partition.</li>
<li>Create a file named data.img in the /android directory. The user data will be saved directly to that file. This method works for ntfs or vfat partition. Just boot to debug mode, then
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell-root">mount -o remount,rw /mnt<br></code>
<code class="code-shell-root">dd bs=1M count=4096 if=/dev/zero of=/src/data.img<br></code>
<code class="code-shell-root">losetup /dev/loop6 /src/data.img<br></code>
<code class="code-shell-root">make_ext4fs -L /data /dev/loop6<br></code>
<code class="code-shell-root">losetup -d /dev/loop6</code>
</span></div>
then type '<tt>exit</tt>' or (<tt>ctrl-D</tt>) twice to continue booting.</li>
<li>Create a separate ext4 partition and save data to it. You have to add DATA=<device_name> to the boot option. For example, suppose your data partition is /dev/sda2, then add DATA=sda2 to the boot option.
</li>
</ul>
<br><br><h2>Solving conflicts</h2>
<p>There are several reason to have conflicts during repo sync, say</p>
<ul>
<li>You modify your tree locally.</li>
<li>The upstream changed. Since we usually keep syncing with original Android repository, sometimes we have to rebase with it. That changes the history and may cause conflicts.</li>
</ul>
<br><p>In this section we assume you have conflicts due to the upstream changed. That is, you don't have local modifications. If you do, you have to solve conflicts yourself. If you follow the procedures in this section, you may lose your local modifications.<br><br>Here is an example of a conflict in mainfest:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">repo sync<br></code>
remote: Counting objects: 71, done.<br>
remote: Compressing objects: 100% (41/41), done.<br>
remote: Total 65 (delta 25), reused 28 (delta 9)<br>
Unpacking objects: 100% (65/65), done.<br>
From git://git.tarot.com.tw/android-x86/platform/manifest<br>
d53e6c1..2de7a11 android-1.5r2 -> origin/android-1.5r2<br>
* [new branch] android-1.5r3 -> origin/android-1.5r3<br>
* [new branch] android-sdk-1.5_r3 -> origin/android-sdk-1.5_r3<br>
d53e6c1..c544020 cupcake -> origin/cupcake<br>
* [new branch] cupcake-release -> origin/cupcake-release<br>
f4d79b1..6f7e0dd donut -> origin/donut<br>
+ 7308d31...4a4f936 lan -> origin/lan (forced update)<br>
+ b480a6d...d82496e local -> origin/local (forced update)<br>
+ 11c9d96...84345fb master -> origin/master (forced update)<br>
+ 5bcbf93...66e92cc mirror -> origin/mirror (forced update)<br>
+ 9f3092f...665f9e8 ssh -> origin/ssh (forced update)<br>
+ c6037be...d70927f ssh-mirror -> origin/ssh-mirror (forced update)<br>
+ 00a823f...3ddaf66 test -> origin/test (forced update)<br>
* [new tag] android-1.5r3 -> android-1.5r3<br>
* [new tag] android-sdk-1.5_r3 -> android-sdk-1.5_r3<br>
Fetching projects: 100% (128/128), done.<br>
project .repo/manifests/<br>
First, rewinding head to replay your work on top of it...<br>
Applying: merge donut, change or add the projects to x86 port<br>
error: patch failed: default.xml:3<br>
error: default.xml: patch does not apply<br>
Using index info to reconstruct a base tree...<br>
Falling back to patching base and 3-way merge...<br>
Auto-merging default.xml<br>
CONFLICT (content): Merge conflict in default.xml<br>
Failed to merge in the changes.<br>
Patch failed at 0001 merge donut, change or add the projects to x86 port<br><br>
When you have resolved this problem run "git rebase --continue".<br>
If you would prefer to skip this patch, instead run "git rebase --skip".<br>
To restore the original branch and stop rebasing run "git rebase --abort".<br>
</span></div>
<p><tt>repo sync</tt> stopped due to conflicts. Since we don't have local modifications, just ignore it by <tt>git rebase --skip</tt>:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">cd .repo/manifests<br></code>
<code class="code-shell">git rebase --skip<br></code>
HEAD is now at 4a4f936 add branch for local lan<br>
Applying: add platform/frameworks/policies/base to x86<br>
error: patch failed: default.xml:18<br>
error: default.xml: patch does not apply<br>
Using index info to reconstruct a base tree...<br>
Falling back to patching base and 3-way merge...<br>
Auto-merging default.xml<br>
No changes -- Patch already applied.<br>
Applying: add branch for local lan<br>
error: patch failed: default.xml:1<br>
error: default.xml: patch does not apply<br>
Using index info to reconstruct a base tree...<br>
Falling back to patching base and 3-way merge...<br>
Auto-merging default.xml<br>
No changes -- Patch already applied.<br>
</span></div>
<p>If it complains about another conflict, do <tt>git rebase --skip</tt> again, until the rebase procedure completes. Usually it is enough, but if you hope to be absolute clean, you can ignore the current branch and checkout a new one like (suppose you're using oreo-x86 branch):</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">git checkout -t oreo-x86 m/oreo-x86</code>
</span></div>
<p>This may not be the best approach to solve conflicts, but should be easy enough for beginners. If you have better suggestions, just tell us.</p>
<h2>Customize Kernel</h2>
<p>If you'd like to customize the kernel for your hardware, read <a href="documentation/customize_kernel.html">this article</a> for details. <br></p>
<h2>Develop with Intellij IDEA</h2>
<p>If you want to use IDE to develop Android-x86, maybe <a href="https://www.jetbrains.com/idea/">Intellij IDEA</a> can be a good choice. You can follow below instructions to
setup project for Intellij IDEA:</p>
<p>Firstly, we should build Intellij IDEA project module files:</p>
<div class="code-snippet"><span style="color:#d1d1d1">
<code class="code-shell">source build/envsetup.sh<br/></code>
<code class="code-shell">m idegen<br/></code>
<code class="code-shell">development/tools/idegen/idegen.sh<br/></code>
</span></div>
<p>
And then we should create an empty project from Intellij IDEA, and import android.iml in the source code root directory
as module to import Android-x86 code to Intellij IDEA. After loading, we can use it to view and debug source code.
</p>
</section>
<br><br><br>
<div w3-include-html="footer.html"></div>
</div>
<!--JAVASCRIPT CODE-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
includeHTML();
$(".openNav").click(function() {
$("body").toggleClass("navOpen");
$("nav").toggleClass("open");
$(".wrapper").toggleClass("open");
$(this).toggleClass("open");
});
</script>
</body>
</html>