- Android x86 для ubuntu
- Android-x86
- Run Android on your PC
- Installation
- Introduction
- Step by Step
- Upgrade
- Auto Installation
- Auto Update
- Other boot options
- Advanced
- Create a bootable USB stick for Android-x86
- Multi-Boot
- Updated (2010)
- Issues
- VMware
- Android-x86
- Run Android on your PC
- The branches in Android-x86 tree
- Getting Android-x86 source code
- Getting LineageOS for x86 source code
- Building the image
- Choose a target
- lollipop-x86 and later versions
- kitkat-x86 / jb-x86
- ics-x86 / honeycomb-x86
- gingerbread-x86 / froyo-x86
- eclair-x86
- donut-x86
- LineageOS for x86
- Using lunch commnd (recommended)
- Building directly
- Using buildspec.mk
- Building smaller image
- Testing
- Advanced
- Install to USB disk
- Install to hard disk
- Save data to USB/hard disk
- Solving conflicts
- Customize Kernel
- Develop with Intellij IDEA
Android x86 для ubuntu
Android OS на x86
В этой теме обсуждаются вопросы общие для всех Андроидов на платформе x86, конкретно проект портирования Android-х86, а также его братья, не имеющие отдельных тем обсуждения на нашем форуме.
Android в виртуальную машину | Сайт и Форум проекта Android-х86 | Android от Intel
Вопросы, касающиеся только проектов Phoenix OS , Remix OS x86 и Bliss-x86 , обсуждаются в своих темах.
За работоспособность ваших устройств ответственность несёте исключительно Вы. Задавая вопрос, постарайтесь указать следующую информацию .
- Hardware List — список совместимого оборудования
- Графическое ускорение нормально работает на видеоадаптерах от AMD и Intel (кроме GMA 500, GMA 600, GMA 3600, GMA 3650, т.к. они основаны на PowerVR).
Графика nVidia поддерживается начиная с Android-x86 4.4-R3; новое поколение начинает поддерживаться после выхода следующего. - Ситуация с поддержкой планшетов, Критическое замечание о звуке.
- Чипы, которые реализуют одновременно и WiFi, и Bluetooth работают хуже, чем отдельные.
- Если Вы не нашли в шапке или в листе совместимости версию для вашего компьютера/ноутбука (модификации железа), то следует попробовать разные версии и опытным путём подобрать оптимальную.
- Загрузочную флешку или диск необходимо записать с помощью Rufus, UNetbootin, LiLi, или WinImage. UltraISO использовать не рекомендуется потому, что созданные им флешки мало где грузятся.
Раздел под Android рекомендуется форматировать в ext3 или ext4 (для версии 5.0 Lollipop и новее) чтобы иметь >4ГБ места под свои нужды и избежать проблем с SuperSU и другим софтом. Форматирование раздела лучше произвести до установки Android сторонним ПО (Acronis, GParted, др.): родной установщик не всегда справляется с этой задачей.
title Android-x86 5.1-rc1
kernel /android-5.1-rc1/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/android-5.1-rc1
initrd /android-5.1-rc1/initrd.img
title Android-x86 5.1-rc1 (Debug mode)
kernel /android-5.1-rc1/kernel root=/dev/ram0 androidboot.hardware=android_x86 DEBUG=2 SRC=/android-5.1-rc1
initrd /android-5.1-rc1/initrd.img
title Android-x86 5.1-rc1 (Debug nomodeset)
kernel /android-5.1-rc1/kernel nomodeset root=/dev/ram0 androidboot.hardware=android_x86 DEBUG=2 SRC=/android-5.1-rc1
initrd /android-5.1-rc1/initrd.img
title Windows
rootnoverify (hd0,1)
chainloader +1
Тут default указывает номер пункта, котоый будет выбран автоматически после истечения timeout секунд. root и rootnoverify указывают с какого диска, и с какого его раздела загружать выбраную операционную систему. Как и в случае с default, нумерация начинается с нуля. Параметры загрузки прописываются в конец строки, которая начинается со слова kernel. Такими параметрами можно повлиять на многие аспекты работы Андроида с железом. К примеру настроить работу с внешним монитором.
GRUB 2 — следующая версия GRUB. Разработчики писали GRUB 2 «с нуля», чтобы добиться переносимости и модульности.
Используется в образах Android-x86 для компьютеров с новым UEFI-BIOS.
Может хранить свои настроки в файле grub.cfg либо menu.lst. Обычно этот файл лежит на отдельном системном разделе EFI (ESP). Типичное содержимое:
set timeout=60
set gfxmode=1024×768
terminal_output gfxterm
Источник
Android-x86
Run Android on your PC
Installation
Introduction
In particular, you can install Android-x86 to an NTFS filesystem to co-exist with Windows. See the Advanced Section for more details.
Step by Step
- Download an iso image from a mirror site. Usually you should just use the latest image.
- Burn the iso image to cdrom, or create a bootable USB disk (recommended). See the Advanced Section for details.
- Boot from the Android-x86 installation CD/USB, choose the ‘Install Android-x86 to harddisk’ item, as shown below:
Upgrade
You may upgrade an older Android-x86 installation by the installer. Just select the partition containing the older installation. The installer will prompt if you’d like to upgrade it:
If there are multiple older versions in the same partition, the installer will ask which version to upgrade:
Auto Installation
If you want to use Android-x86 as the only OS in your device, you may choose «Auto Installation» under the «Advanced options».
The installer will prompt you to confirm:
After you select ‘Yes’, the installer will erase the whole content of the hard disk, partition and install Android-x86 to it.
If you have multiple hard drives, the installer will let you choose which one to use. Be careful to choose the correct one.
Auto Update
By choosing «Auto Update» under the «Advanced options», the installer could update an older installation automatically.
In this mode, the installer searches a partition named «Android-x86» or the first ext4 partition, and update the older installation in it automatically. If no such a partition is found, the auto update mode will be cancelled.
Other boot options
- Live CD — Run Android-x86 without installation
The item means to boot Android-x86 directly. This is useful to check if your hardware is compatible with Android-x86 quickly. All data is stored in RAM (tmpfs) and will lose after poweroff.
Live CD — Debug mode
See the debug howto for more details.
Live CD — Vulkan support (experimental)
Enable the experimental Vulkan support. Not all GPUs support it.
Live CD — No Setup Wizard
Skip the Setup Wizard. It’s useful if you want to test some apps quickly in live mode.
Live CD VESA mode — No GPU hardware acceleration
Disable GPU hardware acceleration. If you encounter black screen after booting, you may try this mode to see if it’s bootable.
Advanced
Create a bootable USB stick for Android-x86
There are several tools which could be used to create a bootable USB stick for Android-x86. The following tools are available for Windows users:
- Win32 Disk Imager — see demo video.
- UNetbootin — see demo video.
- Rufus — see demo video.
- Linux Live USB Creator (LiLi) — Obsolete software, but used to officially support Android-x86 until v4.4.
For Linux users, just use the standard dd command like:
Multi-Boot
To boot other operating systems, you have to add items for them to /grub/menu.lst. For example, to boot Windows, add the following:
This assumes Windows is installed to the first partition of the first hard disk. Alternatively, you need to change rootnoverify to the appropriate value. See Grub Manual for details.
Updated (2010)
Issues
VMware
You have to change your virtual disk type to be IDE because the default type in VMware is SCSI, and Android-x86 kernel is not configured to support SCSI. You can follow these steps:
- Create a virtual machine.
- Edit virtual machine settings after the virtual machine created.
- Choose the hard disk and remove it.
- Add a hard disk to create a new virtual disk, then you can choose IDE as your virtual disk type.
- When finished, you can install android-x86 normally.
Источник
Android-x86
Run Android on your PC
This page describes the latest information about how to build Android for x86 platform. To browse our source code, see
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.
The branches in Android-x86 tree
Since AOSP evolves very quickly, we have created different branches corresponding to different releases of AOSP:
- q-x86
Based on Android 10.0 release - pie-x86
Based on Android 9.0 release (Pie QPR2) - oreo-x86
Based on Android 8.1 release (Oreo MR1) - nougat-x86
Based on Android 7.1 release (Nougat MR2) - marshmallow-x86
Based on Android 6.0 release (Marshmallow) - lollipop-x86
Based on Android 5.1 release (Lollipop) - kitkat-x86
Based on Android 4.4 release (KitKat) - jb-x86
Based on Android 4.3 release (Jelly Bean) - ics-x86
Based on Android 4.0 release (Ice Cream Sandwich) - honeycomb-x86
Based on Android 3.2 release (Honeycomb) - gingerbread-x86
Based on Android 2.3 release (Gingerbread) - froyo-x86
Based on Android 2.2 release (Froyo) - eclair-x86
Based on Android 2.1 release (Eclair) - donut-x86
Based on Android 1.6 release (Donut) - cupcake-x86 (aka android-x86-b0.9)
Based on Android 1.5 release (Cupcake)
Getting Android-x86 source code
Firstly, refer to the AOSP page «Establishing a Build Environment» to configure your build environment. For Ubuntu 18.04, install the following required packages:
Then pull down the Android-x86 source tree to your working directory by:
Where $branch 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 repositories of AOSP.
If you have issues to sync from the git protocol, try the alternative http one
If you hope to keep syncing your tree with Android-x86 repository, just do repo sync. No need to do repo init again. However, sometimes you may see conflicts during repo sync. See the section «How to Solve Conflicts» for how to solve this situation.
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 ‘repo sync‘ until it succeeds without any error. Do not bother us with any of the syncing problem.
Getting LineageOS for x86 source code
To get the source code of LineageOS (formerly CyanogenMod) porting for Android-x86, specify the manifest by an additional option -m cm.xml:
Currently the LineageOS porting is only available in nougat-x86 (cm 14.1) and marshmallow-x86 (cm 13.0) branches.
Building the image
Once repo sync 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. Since lollipop-x86, java 1.7 is required and OpenJDK is supported. Since nougat-x86, OpenJDK 1.8 is required.
Note: 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.
Choose a target
You need to choose a target for the x86 device you want to use/test. We provides several targets for different branches:
lollipop-x86 and later versions
- android_x86_64: for 64-bit x86_64 platform
- android_x86: for 32-bit x86 platform
kitkat-x86 / jb-x86
ics-x86 / honeycomb-x86
- generic_x86: for generic x86 PC/notebook
- amd_brazos: for AMD Brazos platform
- eeepc: for ASUS EeePC family only
- asus_laptop: for some ASUS laptops
- tegav2: for Tegatech Tegav2 (may work with other Atom N45x based tablets)
gingerbread-x86 / froyo-x86
- generic_x86: for generic x86 PC/notebook
- eeepc: for ASUS EeePC family only
- asus_laptop: for some ASUS laptops
- tegav2: for Tegatech Tegav2 (may work with other Atom N45x based tablets)
- sparta: for Dell Inspiron Mini Duo platform
- vm: for virtual machine (virtual box, qemu, vmware)
- motion_m1400: for Motion M1400 (Intel Centrino M based with Intel PRO/Wireless)
eclair-x86
- generic_x86: for generic x86 PC/notebook
- eeepc: for ASUS EeePC family only
- q1u: for Samsung Q1U
- s5: for Viliv S5
donut-x86
- eeepc: for ASUS EeePC family only
- q1u: for Samsung Q1U
- s5: for Viliv S5
LineageOS for x86
- cm_android_x86_64: for 64-bit x86_64 platform
- cm_android_x86: for 32-bit x86 platform
Unless you are trying to build an ancient branch, you should just use android_x86_64 for a 64-bit target, or android_x86 for a 32-bit target. They are the universal targets for all x86 devices.
Historically, you should use to use generic_x86 for eclair-x86 to ics-x86 branches. However, it may not optimized for a particular target device. Use eeepc for a generic x86 for donut-x86 branch or before, unless you have the particular devices supported by other targets.
If you are a developer, you can create a target based on android_x86 for your device. See this article for details. However, it’s not recommended to do so unless you are a very experienced Android platform developer.
Using lunch commnd (recommended)
You can source the file build/envsetup.sh into your bash environment to get some shell functions to help the building:
Now you can select a target by lunch command:
where $TARGET_PRODUCT is any target described in the previous section, and possible values of $TARGET_BUILD_VARIANT are eng, user, userdebug. For example,
Then you can build an iso file by m command:
m command is equivalent to make, 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:
Since froyo-x86, we also add menu selection to lunch command. Just type lunch, and you will get a list of available targets. Input the number to select a target. Alternatively, just type lunch $number.
To build an rpm file:
You need to install the rpm-build package (Fedora based distributions) or rpm package (Debian / Ubuntu based distributions) before building.
The rpm file could be installed to a Linux distribution directly.
Building directly
You may specify the target to be built by TARGET_PRODUCT variable. For example, to build an iso image for target android_x86, type:
To generate a live cdrom iso for tegav2, type
Then you will get an iso file out/target/product/x86/android_x86.iso, etc.
Using buildspec.mk
You can create a buildspec.mk in your android-x86 directory to remember a particular target product you build often:
With your buildspec.mk file in your android-x86 working directory, you can simply make by
Building smaller image
Since marshmallow-x86, the generated Android-x86 core filesystem will be compressed by squashfs by default. Before that, squashfs is used only if you have squashfs-tools 4.0 (older version will not work) 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 USE_SQUASHFS=0 to make. You can put it to buildspec.mk:
Before froyo-x86 (included), If you hope to get a more smaller image, you may remove the debugging symbols by adding
Since gingerbread-x86, the debugging symbols are stripped by default. So the option is unnecessary.
Testing
The generated image is located at
You can easily test the iso file by a virtual machine like virtual box or qemu. Alternatively, on a Linux host you can use the qemu-android script (available since nougat-x86) to run android-x86 in qemu directly:
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.
Since honeycomb-x86, we support the hybrid iso format. That is, the iso could be dumped to a usb disk directly. For example,
where /dev/sdX is the device name of your USB disk. The feature is available for all iso files released after 2011/12/25.
If you build an rpm file, install it to your Linux host and run the qemu-android script directly. Or reboot and choose android-x86 item from the booting menu.
For more details about how to use the iso or install it, see the installation howto.
Advanced
This section describes some useful information for advanced users. You may need good linux expertise to complete it.
Install to USB disk
For advanced linux users, you may create a bootable USB disk by hand. Here are the steps:
- Install grub to your USB disk
- find a linux machine with the latest grub installed
- partition your USB drive with fdisk or gpartd and mark the partition as bootable
- format that partition to ext4 (recommended) or vfat.
- mount your usb drive to /mnt
- cd /mnt
- grub-install —root-directory=. —no-floppy /dev/
- cd /boot/grub
- create your menu.lst based on the next section
- Add this section to menu.lst
Note androidboot.selinux=permissive must be added since nougat-x86. Besides, before marshmallow-x86, androidboot.hardware= must be added to specify the target name of the built image. However, do not add this option since nougat-x86.
Since kitkat-x86 the SRC= parameter may be omitted if the system image is in the same directory as the kernel.
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.
Install to hard disk
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.
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:
- Boot from any rescue cd like systemrescuecd, and follow the instructions in the previous section.
- Install your favorite linux distribution, then copy android files and modify the grub menu.
Save data to USB/hard disk
We provide several ways to save data to your disk. You can choose one of them according to your situation:
- 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.
- 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
then type ‘exit‘ or (ctrl-D) twice to continue booting.
Solving conflicts
There are several reason to have conflicts during repo sync, say
- You modify your tree locally.
- 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.
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.
Here is an example of a conflict in mainfest:
repo sync
remote: Counting objects: 71, done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 65 (delta 25), reused 28 (delta 9)
Unpacking objects: 100% (65/65), done.
From git://git.tarot.com.tw/android-x86/platform/manifest
d53e6c1..2de7a11 android-1.5r2 -> origin/android-1.5r2
* [new branch] android-1.5r3 -> origin/android-1.5r3
* [new branch] android-sdk-1.5_r3 -> origin/android-sdk-1.5_r3
d53e6c1..c544020 cupcake -> origin/cupcake
* [new branch] cupcake-release -> origin/cupcake-release
f4d79b1..6f7e0dd donut -> origin/donut
+ 7308d31. 4a4f936 lan -> origin/lan (forced update)
+ b480a6d. d82496e local -> origin/local (forced update)
+ 11c9d96. 84345fb master -> origin/master (forced update)
+ 5bcbf93. 66e92cc mirror -> origin/mirror (forced update)
+ 9f3092f. 665f9e8 ssh -> origin/ssh (forced update)
+ c6037be. d70927f ssh-mirror -> origin/ssh-mirror (forced update)
+ 00a823f. 3ddaf66 test -> origin/test (forced update)
* [new tag] android-1.5r3 -> android-1.5r3
* [new tag] android-sdk-1.5_r3 -> android-sdk-1.5_r3
Fetching projects: 100% (128/128), done.
project .repo/manifests/
First, rewinding head to replay your work on top of it.
Applying: merge donut, change or add the projects to x86 port
error: patch failed: default.xml:3
error: default.xml: patch does not apply
Using index info to reconstruct a base tree.
Falling back to patching base and 3-way merge.
Auto-merging default.xml
CONFLICT (content): Merge conflict in default.xml
Failed to merge in the changes.
Patch failed at 0001 merge donut, change or add the projects to x86 port
When you have resolved this problem run «git rebase —continue».
If you would prefer to skip this patch, instead run «git rebase —skip».
To restore the original branch and stop rebasing run «git rebase —abort».
repo sync stopped due to conflicts. Since we don’t have local modifications, just ignore it by git rebase --skip:
If it complains about another conflict, do git rebase --skip 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):
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.
Customize Kernel
If you’d like to customize the kernel for your hardware, read this article for details.
Develop with Intellij IDEA
If you want to use IDE to develop Android-x86, maybe Intellij IDEA can be a good choice. You can follow below instructions to setup project for Intellij IDEA:
Firstly, we should build Intellij IDEA project module files:
Источник