Tuesday, April 5, 2016

[GUIDE] Triple Boot Linux Windows and Remix OS (with full root)

Last year I wrote a guide on how to triple boot Ubuntu Windows and Android-x86, which since then remains my daily set-up. Now that Android-x86 is partnering with Remix OS I thought I'd give it a try (even if it was closed-sourced).

There are other tutorials on installing Remix OS, but the reason I'm writing this one, is because the others are not detailed and depend on scripts. Lots of things can go wrong with scripts if they're not updated, so this is purely manual and detailed, which offers a very simple successful rooting method.

I have a 12" touch notebook Asus X200 with 4GB of RAM and 500GB of disk space.
Currently triple booting Arch Linux, Windows 10, and Remix OS 2.0.102.

Quick summary:
  1. Create an ext3/ext4 partition for Remix OS.
  2. Download the iso and extract its content to that partition.
  3. Root Remix OS easily
  4. Configure grub to detect Remix OS.

Pre-Requirements:
  • A Linux distribution already installed.
  • Grub already installed.

First of all, boot your PC into your Linux distro.

A. Creating a partition for you Android
We need to prepare a 10GB ext3/ext4 partition for Android. You can do so by resizing an existing partition, using gparted.
Now depending on which partition you want to resize (Ubuntu or Windows), you can use gparted from a Live Ubuntu CD, or directly from Ubuntu. I highly recommend resizing an NTFS partition (Windows).
Here is a tutorial on how to use it.
  1. Install gparted (in case you don't have it)
    Code:

    sudo apt-get install gparted
  2. Once installed run gparted (requires root permission).
  3. Select the partition you want to resize
  4. Right-click and select Resize/Move.
  5. Shrink it so you can get a new partition of 10GB
  6. An unallocated partition will be created.
  7. Right-click on it and select New.
  8. Select ext3, label it Android and press Add.
    Notice that I labeled the partition "Android", for easier identification.
  9. Make sure that you took the right steps before you apply the changes.
  10. Here is how my Android Partition looks like (sda8)

  11. Write down the path for your android partition, in my case /dev/sda8 (You will need it later)
  12. To test it. Go to nautilus (file explorer), and mount the partition and see if you can access it.


B. Downloading and extracting the ISO
If you don't need full root (read/write) you can skip this section, all you need to do is to copy the 4 files extracted from the andorid-x86 iso (initrd.img ramdisk.img kernel system.sfs) to your android partition. Create an empty folder called data in your android partition too. And then jump to section C.

The difference here in this section is that we extract the contents of system.sfs and then copy them to the android partition with the other 3 files (initrd.img ramdisk.img kernel), and create an empty data folder. This way, we will have full root access.
(system.sfs is a squashfs which is a compressed read-only file system, which explains why we can't have full root)
  1. Head down to the folks at Jide and download the latest version.
    In my case it's Remix OS Beta 2.0.102 64 bit.
  2. Hit the terminal.
    You can use the following bash commands to easily extract and copy the files.
  3. Extract the contents of the iso
    Code:

    7z x Remix_OS_for_PC_64_B2016030106.zip -oremix && \
    cd remix

  4. Extract the contents of the system.img
    Code:

    mkdir temp && \
    mount -o loop system.img temp

  5. Now let's copy initrd.img ramdisk.img kernel files to the Android partition. Create 2 folders on the Android partition called data and system, extract system.sfs (and eventually system.img) and copy its contents to the system folder we just created.
    Code:

    cp initrd.img ramdisk.img kernel /path/to/the/android/partition &&\
    mkdir /path/to/the/android/partition/system && \
    mkdir /path/to/the/android/partition/data && \
    cp -avr temp/* /path/to/the/android/partition/system &&\
    umount temp &&\
    cd .. && \
    rm -rf remix &&\
    exit

You should have something like that




C. Rooting
Now it's extremely easy to root it using the latest stable SuperSU, as you only need to place the su binary in your android system.
  1. Download the latest SuperSU
  2. Extract it
  3. Open a terminal and depending on your architecture (I'll assume you got the 64 bit version) copy the file su to /system/bin inside your android partition and change the file permission to 6755
    Code:

    sudo cp x64/su /path/to/the/android/partition/system/bin
    sudo chmod 6755  /path/to/the/android/partition/system/bin/su

  4. Copy the application Superuser.apk to your system apps under SuperSU folder, and change its permission to 644.
    Code:

    sudo mkdir /path/to/the/android/partition/system/app/SuperSU
    sudo cp common/Superuser.apk /path/to/the/android/partition/system/SuperSu/SuperSU.apk
    sudo chmod 644 /path/to/the/android/partition/system/SuperSU/SuperSU.apk

  5. And that's it. You're done. You have root.


D. Configuring Grub
  1. Now after copying all the necessary files to the Andorid partition, all we need to do is modify grub to boot from that partition.

    Code:

    sudo gedit /etc/grub.d/40_custom
    Quote:

    menuentry "Remix OS" {
    set root='(hd0,8)'
    linux /kernel quiet root=/dev/ram0 androidboot.hardware=remix_x86_64 acpi_sleep=s3_bios,s3_mode SRC=/
    initrd /initrd.img}
    You can actually experiment with the boot parameters to see what fits your machine more, all you have to do is when you restart and have the Grub boot menu select Remix OS and press 'e' so that you can modify the kernel boot parameter. Usually for debugging you can add DEBUG=1 for example.

    You should change (hd0,8) entry based on your android partition location, the one that we wrote before.
    (hdX,Y) for /dev/sdXY with a corresponding to 0, b to 1, c to 2 etc ..
    In my case, my android partition is /dev/sda8 correspond to (hd0,8)
    a -> X=0
    8 -> Y=8
    So '(hd0,8)'
  2. Update Grub configuration by:
    Code:

    sudo update-grub

E. Finally
  1. Reboot your laptop, and select Remix OS from Grub menu (it should be the last entry).
  2. ... And enjoy Android!
    (Don't forget to update the SuperSU root binaries)


from xda-developers http://ift.tt/1PRqYzV
via IFTTT

No comments:

Post a Comment