Featured

Building Android-N x86

Getting Android-x86 source code

Firstly, follow the AOSP page “Establishing a Build Environment” to configure your build environment.Then

$ mkdir android-x86
$ cd android-x86
$ repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b Nougat-MR2
$ repo sync –no-tags –no-clone-bundle

Building the image

$ . build/envsetup.sh
$ lunch android_x86-userdebug
$ make iso_img -j8(No of threads,depends on your processor)

The generated image is located at out/target/product/$TARGET_PRODUCT/$TARGET_PRODUCT.iso

Use tools like Unetbootin or Ultraiso to burn Androidx86 iso image to the USB disk

Install and Boot on Laptop/dextop .

Image result for android x86 nougat images

 

Installation

Introduction

The supported filesystems are

  • ext3
  • ext2
  • ntfs
  • fat32

You can install Android-x86 to an NTFS filesystem to co-exist with Windows.

Step by step

  • Burn the iso image to cdrom, or create a bootable USB disk (recommended).
  • Boot from the Android-x86 installation CD/USB, choose the ‘Install Android to harddisk’ item, as show below

After seconds of booting, you will see a partition selection dialog. You can choose an existing partition to install Android-x86, or you can create or modify partitions by choosing ‘Create/Modify partitions’. Note you can install Android-x86 to an external disk like USB drive. If the target drive is not shown, try ‘Detect devices’.

  • Android-x86 can co-exist with other operating system or data in the chosen partition. If the partition is formatted, you may choose ‘Do not format’ to keep existing data. Otherwise, choose a filesystem type to format. Note the type you chosen must match the partition id, or the boot loader will fail to boot.

Also note if you choose to format to fat32, you will see a warning that android cannot save data to fat32. You can still proceed to install, but the installed android system will work like a live cd system. That is, all data will lose after power off. Therefore we do not recommend to install Android-x86 to a fat32 partition.

  • Next question is whether to install boot loader Grub. Usually you should answer yes, unless you want to install boot loader by hand yourself. Note the installer only creates boot items for Android-x86. If you hope to boot other operating systems, you need to add the item to /grub/menu.lst manually.
  • If you are lucky, the installation will begin, and you will see the progress bar.
  • If you see this screen, the installation is complete. Congratulations! Now you can run Andrond-x86 directly, or you can reboot and run it.

Android Boot Problem

How to boot the Android-x86 Live-CD when you have problems with your graphic card

When you start the Live-CD and see the menu with the different boot
options, hit the <tab> key to see the boot prompt.

Now you should see something like:

kernel initrd=/initrd.img root=/dev/ram0
androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16
quiet SRC= DATA= DPI=240

You can edit this line. When you’re finished, hit <enter> to boot the system.

I suggest you to remove the word “quiet” to see the kernel messages.
Now the kernel should tell you what he does.

The parameter “nomodeset” disables “the kernel mode setting” (tells
the kernel to not set the graphic resolution, let X do that instead).

The parameter “xforcevesa” enforces to use the VESA driver for X.

I would play with both parameters:

* Booting with parameter “nomodeset”
* Booting with parameter “xforcevesa”
* Booting with parameter “nomodeset xforcevesa”

Build Kernel

Compile and Build Kernel for Android-x86

Prepare the source tree

Read the article GetSourceCode for details.

Build the default kernel

Default config for android-x86 is in kernel/arch/x86/configs/. To build a kernel image from this config, run

$ make iso_img TARGET_PRODUCT=android_x86

By specifying the TARGET_PRODUCT to android_x86, the build system automatically selects the config android-x86_defconfig to compile the kernel binary and its modules. The binary will finally be generated in out/target/product/x86/kernel, and the modules is put under out/target/product/x86/system/lib/modules/. The final target out/target/product/x86/android_x86.iso will contain the kernel binary and its modules.

You may build the kernel and its modules alone, by changing the goal iso_img to kernel.

$ make kernel TARGET_PRODUCT=android_x86

Build the target kernel

Each target may has its customized kernel config located in its device definition directory. When you choose a target (by specifying TARGET_PRODUCT or lunch command), the customized kernel config of this target will be used to build the kernel image.

Build a customized kernel

Suppose you already have a workable kernel config for you hardware, it’s easy to tell the build system to use your config to build the iso. Just put your config file to kernel/arch/x86/configs/, and run (suppose the name of your config is my_defconfig)

$ make iso_img TARGET_PRODUCT=android_x86 TARGET_KERNEL_CONFIG=my_defconfig

Note you cannot use a kernel config from a normal linux distribution (e.g, ubuntu) for android-x86. You need to enable android kernel features to make it work. See android/configs/android-base.cfgfor a list of required configuration options for a kernel to support an Android system. (but removes arm specific options for android-x86, e.g., PMEM)

Customize the kernel configuration

It is never advisable to edit the kernel config file directly, as it may generate faulty configuration (dependencies not met etc.). The correct way to customize the kernel config is (on the top of android-x86 tree)

$ . build/envsetup.sh
$ lunch xxx-userdebug
$ make -C kernel O=$OUT/obj/kernel ARCH=x86 menuconfig

where xxx is a target you chosen. Then copy $OUT/obj/kernel/.config to custom_kernel_config_location.

DO NOT issue make menuconfig in the kernel/ directory directly. If you do so, the build rules may be broken. In this case, try this way to recover it (on the top of android-x86 tree):

$ make -C kernel distclean
$ rm -rf $OUT/obj/kernel

Use a prebuilt kernel

If you have a workable prebuilt kernel binary for your hardware, you can generate the iso with it:

$ make iso_img TARGET_PRODUCT=android_x86 TARGET_PREBUILT_KERNEL=<path to the prebuilt kernel>