Android-x86 on SD card with NTFS, Secure Boot and UEFI:
I will show you how to install the 64-bit version of Android-x86 7.1rc2 (and likely other versions such as CM14.1 rc1, or other operating systems based on Android-x86 such as RemixOS), on a SD/microSD card using NTFS as the filesystem (thus providing a fast Android experience) with Secure Boot and UEFI boot.
User apps are installed in the typical way via the Google Play Store, Amazon Appstore, third-party markets, or sideloading. In contrast, system apps are apps pre-installed in the phone’s system partition with your ROM and typically, Android device users don’t have the access to the system partition. Installing USB driver for android is as easy as 1,2, 3. See how to install USB driver for android using this step by step guide in a matter of minutes.
Most of the tutorials available on the web showhow to install Android-x86 on a USB storage device. Even though I was able tofind some information about how to install on a microSD card reader, I found noinformation whatsoever about doing so together with:
Using NTFS as the filesystem for storingAndroid-x86’s virtual partitions was a priority for me, since I originallytested Android-x86 on a cheap USB stick and observed that theperformance/latency difference of EXT4 or FAT32 vs. NTFS was jaw-dropping, withthe EXT4 or FAT32 being almost unusable.
I mentioned not giving up Secure Boot when usingNTFS. Well, I would eventually have made the effort to give up Secure Boot inorder to use Android-x86 with NTFS. However, I simply was not successful inbooting to GRUB when using the card, but was successful when using the USDdrive. Using the card simply printed the following and froze:
So, to summarize, this postwill allow you to:
And here are some quick links to the multiplesections:
Before moving on, make sure that:
The computer I have used for my installation wasthe Dell Latitude 7480, and from what I can gather any Dell E7x40, E7x50,E7x60, E7x70, 7x80 should work the same way, if not many others from Dell. Ican’t guarantee that this post will work with your computer even if the above 2points tick, since it will depend on the manufacturer of the card reader, aswell as whether Linux kernel modules are available for it in Android-x86.
I will mention keyboard shortcuts, terminology,screens and show photographs from the Dell Latitude 7480. If you are using adifferent laptop, you’ll need to find the equivalent items. I will also mentionmicroSD specifically from now on, since that’s the card type this laptop canread.
System configuration
Get to the BIOS setup tool of the computer(press F2 during the POST screen – right after turning on the computer) and:
Prepare your devices
You will need 2 or 3 devices:
The microSD card needs to have either a GPT or aMS-DOS partition table (I have used and tested MS-DOS, but GPT should work aswell).
Then make sure the card has the followingpartitions in the following order:
Install Android-x86
Turn the computer on again, with the Android-x86installer USB drive plugged-in, and press the F10 key to launch the one-timeboot menu. Choose the USB device.
The Android-x86 GRUB menu will show up, choose the third option:
When you are faced with the list ofdevices/partitions where you can install Android-x86, you might notice that thepartitions of your microSD card are missing (they are in the Dell Latitude7480). This depends on the manufacturer of the microSD card reader but myexpectation is that they will be missing more often than not. In order to makethe partitions show up on the list, the correct kernel module for the cardreader needs to be loaded. For the Dell Latitude 7480 the module name is
rtsx_pci_sdmmc ,but it may be different in other computers. One way to find the name of themodule is to launch another Linux-based OS such as Ubuntu or Parted Magic andrunning the following commands to inspect their output and obtain the name ofthe module:
Or by finding out the module driving
/dev/mmcblk0p1 , for example. You can check here for more information at [1]
Once you know the module name, in my case
rtsx_pci_sdmmc ,just boot the Android-x86 usb drive again and, once on the list of partitions,press Ctrl+Alt+F2 to switch to tty2 and run the following command (modifyaccordingly):
Then press Ctrl+Alt+F1 to go back to tty1 (wherethe list of partitions is), and select “Detect devices”. Hopefully, the 2/3partitions of your microSD card will now show up and will probably be called
mmcblk0p1 and mmcblk0p2 and mmcblk0p3 . The numbers will reflect the order ofthe partitions you created earlier (first to last), and the filesystem typewill also give you another indication as to which partition is which.
Choose the microSD card NTFS partition as the destination of the Android-x86 installation.
When asked if you want to install EFI GRUB, say yes.
When asked if you want to make the
/system partition read+write, say yes.
When asked how big you want the
/data partitionto be, make it about 1500MB if you chose to have a 4GB NTFS partition. Forevery additional GB your NTFS partition has, add an additional 1024MB to the/data partition size. I am using an NTFS partition with 23GB and my /data has acapacity of 20GB. If the microSD card isn’t very fast, you might want to trywith only 600MB to make it quicker just so you can check if Android-x86 worksin the end (and then repeat the installation with more space for /data ).
Then wait from a few minutes to more than anhour, depending on the
/data size and the microSD card speed.
When finished, select Reboot. However,Android-x86 won’t work out-of-the-box after rebooting.
Making it boot
At this point, Android-x86 is already installedon the microSD card. However, the USB installation drive/media will be used onemore time in the next section, so keep it around.
To make Android boot there are 2 importantissues that need to be corrected (might be only 1 in some cases):
At this point, go back to your Linuxinstallation or Linux live image.
There, 3 things have to be done with regards tothe partitions and files from Android-x86:
The nextsection will go through all of this.
Get the necessary kernel modules
To get the necessary kernel modules for bootingAndroid-x86 (only
rtsx_pci_sdmmc and its dependency rtsx_pci in my scenario –you should look for the dependencies of the modules you need using the lsmod command). The Android-x86 live squashfs image should first be extracted so thatyou can access its files. So plug in the live USB drive and mount it in yourLinux system. Then follow the following steps:
You now know where the needed modules are, solet’s temporarily switch to something else: getting the original initrd imagein order to later update it with the additional modules.
The initrd image is now extracted, so you canmodify it as needed. In terms of the microSD card reader kernel module, the 2modules above will be copied to initrd and will be loaded by changing one ofthe scripts (the same one that issues the
Detecting Android-x86 message).
Inside the init file, look for the following:
Before that (should be around line 135), add thefollowing:
What these lines do is to simply load themodules manually, from where we copied them to (although from the perspectiveof the initial ramdisk already running, so don’t doubt that the paths arecorrect in the lines above).
Change the message in the “echo” line howeveryou want, or remove it.
Now that the initrd image is finally ready, it’stime to turn it back into a single file.
And copy that file, along with the ramdisk and kernel files thatare in the NTFS partition, into the FAT16 partition. This will make GRUB findthe files even if Secure Boot is disabled or the NTFS GRUB module is notpresent.
Happy booting
With a fixed
initrd.img together with a newlocation for it and its relatives, GRUB should now be able to boot the initialramdisk which should be able to automatically detected Android-x86 on themicroSD card, since any missing kernel modules will now be loaded.
Links:
Freeware
Windows
859 MB
16,160
The original plan is to host different patches for android x86 support from open source community. A few months after we created the project, we found out that we could do much more than just hosting patches. So we decide to create our code base to provide support on different x86 platforms, and set up a git server to host it.
Installation:
Popular apps in Operating SystemsComments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |