The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Community Workspace/Tegra3/Nexus7/PA installation

From Mer Wiki
< Community Workspace | Tegra3 | Nexus7(Difference between revisions)
Jump to: navigation, search
(Download)
(Unlock the bootloader)
 
(26 intermediate revisions by 5 users not shown)
Line 9: Line 9:
  
  
== Installation ==
+
=== Installation Choices ===
 +
There are two ways to install Plasma Active.
 +
* You can entirely replace Android and have Plasma Active as the sole operating system on the device 
 +
* You can leave Android on the device and install Plasma Active as an additional operating system with Multirom.
  
=== Download ===
+
 
 +
== Installing Plasma Active as the Sole Operating System ==
 +
 
 +
=== Download Plasma Active image and MOSLO ===
  
 
You can get the current version of Plasma Active for Nexus 7 including the MOSLO at http://download.kde.org/unstable/active/3.0/images/nexus7/.  
 
You can get the current version of Plasma Active for Nexus 7 including the MOSLO at http://download.kde.org/unstable/active/3.0/images/nexus7/.  
Line 19: Line 25:
 
Extract moslo-nexus7-*.tar.gz
 
Extract moslo-nexus7-*.tar.gz
  
=== Unlock ===  
+
=== Unlock the bootloader ===  
  
In order to install Plasma Active on the Nexus 7 you need to first unlock the bootloader. '''Warning:''' Unlocking the bootloader erases all data and resets the device to factory defaults.
+
In order to install Plasma Active on the Nexus 7 you need first to unlock the bootloader. '''Warning:''' Unlocking the bootloader erases all data and resets the device to factory defaults.
Note that you need the fastboot tool to perform the unlocking and further installation. You can get it from [http://dl.google.com/android/repository/platform-tools_r16-linux.zip Android Platform Tools] for example.
+
Note that you need the fastboot tool to perform the unlocking and further installation. You can get it from [http://dl.google.com/android/repository/platform-tools_r16-linux.zip Android Platform Tools] for example. Many Linux distributions already provide these tools in their repositories.
  
1. Reboot the Nexus7 into the Android boot loader. To do this, first power down the device in the normal fashion (hold down the power button, then select power off and wait a few seconds). From the off state, hold the volume down button and press the power button. Continue holding the volume down and power buttons until you see the boot loader interface.  
+
1. Reboot the Nexus 7 into the boot loader mode. To do this, first power down the device in the normal fashion (hold down the power button, then select power off and wait a few seconds). From the off state, hold the volume down button and press the power button. Continue holding the volume down and power buttons until you see the boot loader interface.  
  
 
2. Plug in the device to your computer with a micro-USB cable.
 
2. Plug in the device to your computer with a micro-USB cable.
Line 38: Line 44:
 
<pre>$ sudo fastboot oem unlock</pre>
 
<pre>$ sudo fastboot oem unlock</pre>
  
You will be prompted on screen to unlock the bootloader. Follow the on-screen directions to continue.
+
You will be prompted on the tablet's screen to unlock the bootloader. Follow the on-screen directions to continue.
  
 
5. Complete the process by rebooting:
 
5. Complete the process by rebooting:
Line 52: Line 58:
 
Makre sure you connected the Nexus 7 to your PC with the USB cable and that no other USB devices are plugged-in. Perform the flashing of MOSLO:
 
Makre sure you connected the Nexus 7 to your PC with the USB cable and that no other USB devices are plugged-in. Perform the flashing of MOSLO:
  
   $ fastboot -c "ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo initrd-moslo
+
   $ sudo fastboot -c "ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo initrd-moslo
  
  
You could also specify options like “fbcon=rotate:1″ for rotating the kernel output into landscape or “quiet” for suppressing kernel output. For the first tests it is strongly suggested to keep the kernel command line as-is.
+
You could also specify options like “fbcon=rotate:1″ for rotating the kernel output into landscape or “quiet” for suppressing kernel output. Another way to suppress some but not all output is to set ''loglevel=4''. For the first tests it is strongly suggested to keep the kernel command line as-is.
  
 
=== Install PA ===  
 
=== Install PA ===  
  
When flashing of the MOSLO succeeded keep the Nexus 7 connected to your computer and press the power button in order to boot into MOSLO. With the Nexus 7 connected to your computer via USB, MOSLO should automatically export the userdata partition as USB storage device. You can check, e.g., via “dmesg” that a new USB device showed up.
+
When flashing of the MOSLO succeeded keep the Nexus 7 connected to your computer and press the power button in order to boot into MOSLO. With the Nexus 7 connected to your computer via USB, MOSLO should automatically export the userdata partition as USB storage device. You can check, e.g., via “dmesg | tail -n 30” that a new USB device showed up. This device can be /dev/sdb or something else depending on your system. '''Warning:''' pay close attention to what this device really is! Using a wrong device can be dangerous, since it will wipe the data it contains by rewriting it with the PA image. For the sake of example we use /dev/sdX below.
  
 
In this short guide we will use the entire userdata partition and don’t set up multiboot. At first we format the userdata partition as ext4 file system:
 
In this short guide we will use the entire userdata partition and don’t set up multiboot. At first we format the userdata partition as ext4 file system:
  
 
  mkfs.ext4 /dev/sdX
 
 
   # /dev/sdX is where the exported userdata partition showed up.
 
   # /dev/sdX is where the exported userdata partition showed up.
 
+
  pa_partition=/dev/sdX
 +
  sudo mkfs.ext4 $pa_partition
  
 
Next, we mount the userdata partition and extract the rootfs tarball to it:
 
Next, we mount the userdata partition and extract the rootfs tarball to it:
  
   mount /dev/sdX /mnt/foo
+
   sudo mount $pa_partition /mnt/foo
 
   cd /mnt/foo
 
   cd /mnt/foo
   tar xvf /plasma-active-nexus7-*.tar.bz2
+
   sudo tar xvf /path_to_pa_image/plasma-active-nexus7-*.tar.bz2
 
   sync
 
   sync
 
   cd -
 
   cd -
   umount /mnt/foo
+
   sudo umount /mnt/foo
 
+
 
+
  
 
=== Boot PA ===
 
=== Boot PA ===
Line 85: Line 88:
  
 
The device then reboots and the same bootloader “Start” screen should appear as at the beginning. This time simply press the power key. Your Nexus 7 should now boot into Plasma Active. Please note that I could successfully test this procedure with the 8GB model. However, it failed with the 3G 32GB model.
 
The device then reboots and the same bootloader “Start” screen should appear as at the beginning. This time simply press the power key. Your Nexus 7 should now boot into Plasma Active. Please note that I could successfully test this procedure with the 8GB model. However, it failed with the 3G 32GB model.
 
 
  
 
If there are problems booting into Plasma Active this way you can try to restart the device holding down the volume down key. When the bootloader screen appears you can then try to directly boot into Plasma Active with the MOSLO kernel as follows:
 
If there are problems booting into Plasma Active this way you can try to restart the device holding down the volume down key. When the bootloader screen appears you can then try to directly boot into Plasma Active with the MOSLO kernel as follows:
  
  
  fastboot -c "root=/dev/mmcblk0pX ro console=tty1 rootwait rootfstype=ext4" boot zImage-moslo
 
 
   # For the non-3G models X is 9.
 
   # For the non-3G models X is 9.
 +
  $ X=9
 
   # For the 3G model X is 10.
 
   # For the 3G model X is 10.
 +
  $ X=10
 +
  $ sudo fastboot -c "root=/dev/mmcblk0p${X} ro console=tty1 rootwait rootfstype=ext4" boot zImage-moslo
 +
 +
  
 
Note that when you reboot Plasma Active your device will reboot twice. At first the MOSLO will be booted which then performs a kexec hardboot and reboots into the actual Plasma Active.
 
Note that when you reboot Plasma Active your device will reboot twice. At first the MOSLO will be booted which then performs a kexec hardboot and reboots into the actual Plasma Active.
Line 101: Line 106:
  
  
  fastboot -c "root=/dev/mmcblk0pX ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo
 
 
   # For the non-3G models X is 9.
 
   # For the non-3G models X is 9.
 +
  $ X=9
 
   # For the 3G model X is 10.
 
   # For the 3G model X is 10.
 
+
  $ X=10
 +
  $ sudo fastboot -c "root=/dev/mmcblk0p${X} ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo
  
 
You can re-install the MOSLO at any time later without any problem. You can also temporarily boot into MOSLO by following the MOSLO installation instructions above and leaving out “flash:raw”.
 
You can re-install the MOSLO at any time later without any problem. You can also temporarily boot into MOSLO by following the MOSLO installation instructions above and leaving out “flash:raw”.
 +
 +
=== Choosing repositories ===
 +
 +
TODO: add info on testing / devel and etc. choice of Plasma Active Mer respositories
 +
 +
== Installing Plasma Active as an Additional Operating System ( with MultiRom ) ==
 +
 +
This installation method is pulled from tidbits on the following webpages. Please consult them if any of it is unclear.
 +
 +
* http://www.geek.com/articles/mobile/how-to-unlock-and-root-the-nexus-7-2012081/
 +
* http://forum.xda-developers.com/showthread.php?t=2011403
 +
* http://forum.xda-developers.com/showthread.php?t=2093797
 +
* http://ruedigergad.com/2012/12/21/plasma-active-for-nexus-7-running-the-touch-optimized-plasma-active-linux-distribution-on-nexus-7/
 +
 +
=== Unlock the Boot Loader ===
 +
 +
Use the same instructions as above in the single operating system install section
 +
 +
=== Flash TWRP Recovery ===
 +
 +
Download a modified TWRP recovery from http://www.mediafire.com/?k9mb1135vi6760b (TWRP 2.4.4.0) onto your PC and flash it
 +
 +
<pre>$ sudo fastboot reboot-bootloader
 +
 +
$ sudo fastboot flash recovery TWRP_multirom_n7_20130312.img </pre>
 +
 +
=== Install MultiRom ===
 +
 +
 +
Multirom will be installed from recovery, so download it from android.
 +
 +
MultiROM v9: http://www.mediafire.com/?ye4e435sck8phet
 +
 +
Multirom relies on kexec, so you'll need an android kernel that supports it.
 +
 +
http://www.mediafire.com/?2obaeg0bxbow4jo ( for 4.2)
 +
 +
Reboot into recovery and flash multirom and the new android kernel ( from twrp )
 +
 +
Reboot the tablet to make sure that multirom is working. It should boot into multirom every time. "Internal" is your android operating system.
 +
 +
=== Install Plasma Active ===
 +
 +
Clone the plasma multirom packer on your PC
 +
 +
<pre>git clone https://github.com/Tasssadar/plasma_multirom_packer.git</pre>
 +
 +
Change to the new directory and run the create.sh script as root with the plasma tarball as an argument
 +
 +
<pre>cd plasma_multirom_packer/
 +
sudo ./create.sh URL    # Replace URL with plasma active tarball from http://files.kde.org/plasma/active/3.0/images/nexus7/</pre>
 +
 +
The new image will be created in the current directory.  Copy it to the root of the Nexus 7's filesystem and reboot into recovery.  Go to Advanced > MultiROM > Add ROM, choose "MultiROM installer (*.mrom files) and tap next.  Choose the image you copied over, and follow the prompts.

Latest revision as of 20:43, 3 September 2013

Contents

[edit] Plasma Active for Nexus 7

[edit] Disclaimer

Please be warned that, by following the instructions stated here, you will lose the warranty on your Nexus 7. Furthermore, you might damage or destroy your Nexus 7 or even worse. You do all the things described here on your own responsibility.

Event though very much already works reasonably well, there are still some glitches. So, please don’t expect a 100% working system.


[edit] Installation Choices

There are two ways to install Plasma Active.

  • You can entirely replace Android and have Plasma Active as the sole operating system on the device
  • You can leave Android on the device and install Plasma Active as an additional operating system with Multirom.


[edit] Installing Plasma Active as the Sole Operating System

[edit] Download Plasma Active image and MOSLO

You can get the current version of Plasma Active for Nexus 7 including the MOSLO at http://download.kde.org/unstable/active/3.0/images/nexus7/.

You will need the “plasma-active-*.tar.bz2″ as well as the “moslo-nexus7-*.tar.gz” files. The “*.ks” file is the file that was used to create the rootfs tarball (“*.tar.bz2″).

Extract moslo-nexus7-*.tar.gz

[edit] Unlock the bootloader

In order to install Plasma Active on the Nexus 7 you need first to unlock the bootloader. Warning: Unlocking the bootloader erases all data and resets the device to factory defaults. Note that you need the fastboot tool to perform the unlocking and further installation. You can get it from Android Platform Tools for example. Many Linux distributions already provide these tools in their repositories.

1. Reboot the Nexus 7 into the boot loader mode. To do this, first power down the device in the normal fashion (hold down the power button, then select power off and wait a few seconds). From the off state, hold the volume down button and press the power button. Continue holding the volume down and power buttons until you see the boot loader interface.

2. Plug in the device to your computer with a micro-USB cable.

3. Verify that fastboot lists the device:

$ sudo fastboot devices

You should see the device code shown.

4. Initiate the booltoader unlocking:

$ sudo fastboot oem unlock

You will be prompted on the tablet's screen to unlock the bootloader. Follow the on-screen directions to continue.

5. Complete the process by rebooting:

$ sudo fastboot reboot-bootloader

Or simply press the power button. When the device reboots back into the bootloader (fastboot mode), you should see "LOCK STATE - UNLOCKED" in small red print. At this point Nexus 7 is unlocked.

[edit] MOSLO

After you unlocked the bootloader (and rebooted keeping the volume down key pressed), you should see the Nexus 7 bootloader showing “Start”.

Makre sure you connected the Nexus 7 to your PC with the USB cable and that no other USB devices are plugged-in. Perform the flashing of MOSLO:

  $ sudo fastboot -c "ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo initrd-moslo


You could also specify options like “fbcon=rotate:1″ for rotating the kernel output into landscape or “quiet” for suppressing kernel output. Another way to suppress some but not all output is to set loglevel=4. For the first tests it is strongly suggested to keep the kernel command line as-is.

[edit] Install PA

When flashing of the MOSLO succeeded keep the Nexus 7 connected to your computer and press the power button in order to boot into MOSLO. With the Nexus 7 connected to your computer via USB, MOSLO should automatically export the userdata partition as USB storage device. You can check, e.g., via “dmesg | tail -n 30” that a new USB device showed up. This device can be /dev/sdb or something else depending on your system. Warning: pay close attention to what this device really is! Using a wrong device can be dangerous, since it will wipe the data it contains by rewriting it with the PA image. For the sake of example we use /dev/sdX below.

In this short guide we will use the entire userdata partition and don’t set up multiboot. At first we format the userdata partition as ext4 file system:

  # /dev/sdX is where the exported userdata partition showed up.
  pa_partition=/dev/sdX
  sudo mkfs.ext4 $pa_partition

Next, we mount the userdata partition and extract the rootfs tarball to it:

  sudo mount $pa_partition /mnt/foo
  cd /mnt/foo
  sudo tar xvf /path_to_pa_image/plasma-active-nexus7-*.tar.bz2
  sync
  cd -
  sudo umount /mnt/foo

[edit] Boot PA

In order to boot into Plasma Active simply detach the Nexus 7 from your computer by pulling the USB cable. MOSLO should detect this and initiate the kexec hardboot procedure. You should see a notice that the device will reboot in 5 seconds. Do not press any key during reboot.

The device then reboots and the same bootloader “Start” screen should appear as at the beginning. This time simply press the power key. Your Nexus 7 should now boot into Plasma Active. Please note that I could successfully test this procedure with the 8GB model. However, it failed with the 3G 32GB model.

If there are problems booting into Plasma Active this way you can try to restart the device holding down the volume down key. When the bootloader screen appears you can then try to directly boot into Plasma Active with the MOSLO kernel as follows:


  # For the non-3G models X is 9.
  $ X=9
  # For the 3G model X is 10.
  $ X=10
  $ sudo fastboot -c "root=/dev/mmcblk0p${X} ro console=tty1 rootwait rootfstype=ext4" boot zImage-moslo


Note that when you reboot Plasma Active your device will reboot twice. At first the MOSLO will be booted which then performs a kexec hardboot and reboots into the actual Plasma Active.


If you don’t need the MOSLO and want to boot directly into Plasma Active on reboot you can do this permanently by flashing the MOSLO kernel as follows:


  # For the non-3G models X is 9.
  $ X=9
  # For the 3G model X is 10.
  $ X=10
  $ sudo fastboot -c "root=/dev/mmcblk0p${X} ro console=tty1 rootwait rootfstype=ext4" flash:raw boot zImage-moslo

You can re-install the MOSLO at any time later without any problem. You can also temporarily boot into MOSLO by following the MOSLO installation instructions above and leaving out “flash:raw”.

[edit] Choosing repositories

TODO: add info on testing / devel and etc. choice of Plasma Active Mer respositories

[edit] Installing Plasma Active as an Additional Operating System ( with MultiRom )

This installation method is pulled from tidbits on the following webpages. Please consult them if any of it is unclear.

[edit] Unlock the Boot Loader

Use the same instructions as above in the single operating system install section

[edit] Flash TWRP Recovery

Download a modified TWRP recovery from http://www.mediafire.com/?k9mb1135vi6760b (TWRP 2.4.4.0) onto your PC and flash it

$ sudo fastboot reboot-bootloader

$ sudo fastboot flash recovery TWRP_multirom_n7_20130312.img 

[edit] Install MultiRom

Multirom will be installed from recovery, so download it from android.

MultiROM v9: http://www.mediafire.com/?ye4e435sck8phet

Multirom relies on kexec, so you'll need an android kernel that supports it.

http://www.mediafire.com/?2obaeg0bxbow4jo ( for 4.2)

Reboot into recovery and flash multirom and the new android kernel ( from twrp )

Reboot the tablet to make sure that multirom is working. It should boot into multirom every time. "Internal" is your android operating system.

[edit] Install Plasma Active

Clone the plasma multirom packer on your PC

git clone https://github.com/Tasssadar/plasma_multirom_packer.git

Change to the new directory and run the create.sh script as root with the plasma tarball as an argument

cd plasma_multirom_packer/
sudo ./create.sh URL    # Replace URL with plasma active tarball from http://files.kde.org/plasma/active/3.0/images/nexus7/

The new image will be created in the current directory. Copy it to the root of the Nexus 7's filesystem and reboot into recovery. Go to Advanced > MultiROM > Add ROM, choose "MultiROM installer (*.mrom files) and tap next. Choose the image you copied over, and follow the prompts.

Personal tools