Procedure to dual boot your Galaxy Tab 2 (7.0) P31xx

The title sounds interesting doesn’t it? You might be running your PC on dual boot (usually it’s Windows + Linux) but think about dual booting your tablet. Now that sounds cool! Macadamia Daze who is a XDA-developer has come up with this great hack for Samsung Galaxy Tab 2. The idea behind this dual boot is to run one Android OS from internal memory and other OS from the SD card. For this you will need a SD card of 8GB storage or more.

Note: I should not be blamed if anything bad happens to your device. Given process has been tested and it worked fine for me.

Preparing for dual boot

1. First of all repartition the SD card (you may use any tool for this). Shrink the first partition to about 5.30 GB (new partitions will take about 5 GB space so 5.30 GB space is sufficient).

2. Now you need to create 4 ext4 partitions.

  1. system (1 GB)
  2. cache (700 MB)
  3. data (3 GB)
  4. EFS (25 MB)

3. Now insert the SD card, boot in CWM and run the command given below in ADB.

“parted /dev/mmcblk1″

4. Boot into CWM and extract our your important data.

5. Download the CM 10 nightly firmware ROM + Google Apps + P3113 AOKP and flash your device using it.

Samsung Galaxy Tab 2 7.0

Samsung Galaxy Tab 2 7.0

Steps to dual boot Galaxy Tab 2

1. There is a script in the ROM package you just have downloaded. Mount the (/dev/block/mmcblk0p10) and access the /data/media using this. Also mount the /data/media to SD card of the external ROM.

2. Now the main part of dual boot is to switch between the operating systems. Since we have one OS in internal memory and other one in external SD card so we will need a switching mechanism for dual booting. There is a script named as “bootinternal” in /system/bin.

Execute this one from the terminal or you may also run this from ADB (this will work as a switch from external to internal). You may use “bootexternal” to switch from internal to external.

3. Now we just have to make these switching work. For this, in your external ROM copy the boot.img file from internal memory to /sdcard/Boot/internal.img. Similarly in internal ROM copy the boot.img file from external ROM to /sdcard/Boot/external.img.internal memory to /sdcard/Boot/internal.img.

4. In case you want to switch the ROM manually you will need to run the commands given below:

cat boot.img > /dev/block/mmcblk0p5
reboot

Other way is to use Mobile Odin.

5. Now the next step is to unpacking the boot image. Do it by using any tool (you will have to search for it). After unpacking edit the init.expresso.rc file (ramdisk). Search for the partitions which have been mounted and edit the code snippet like:

#mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system wait rw
mount ext4 /dev/block/mmcblk1p2 /system wait rw
#mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system ro remount
mount ext4 /dev/block/mmcblk1p2 /system ro remount
#mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data wait noatime nosuid nodev crypt discard,noauto_da_alloc

mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data2 wait noatime nosuid nodev crypt discard,noauto_da_alloc

mount ext4 /dev/block/mmcblk1p4 /data wait noatime nosuid nodev crypt discard,noauto_da_alloc

#mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache wait noatime nosuid nodev nomblk_io_submit,errors=panic

mount ext4 /dev/block/mmcblk1p3 /cache wait noatime nosuid nodev nomblk_io_submit,errors=panic

#mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/EFS /efs wait rw
mount ext4 /dev/block/mmcblk1p5 /efs wait rw

6. Repacking of boot image should be done then put it in ROM. Open the updater-script and change the references to internal partition (/dev/block/mmcblk0p9 -> /dev/block/mmcblk1p2). Do this for all the referenced paritions.

That is all. You have successfully dual-booted your Samsung Galaxy Tab 2 7.0 P31xx.

Wiping out the data on external dual-boot paritions

If you want to wipe your data on on external dual-boot paritions completely then use these 3 CWM pacakges:

1. CWM package for wiping cache
2. CWM package for wiping dalvik
3. CWP pacakge for wiping data

More info at xda-developers.

About Chankey Pathak

Yet another tech blogger, makes software 9-5, writes blogposts at night. Follow on Google+ or Twitter.

3 Comments

  1. Fonsi

    January 22, 2013 at 4:17 pm

    Dear Chankey

    I’m wondering it how to install ubuntu 12.04 on Samsung Tab 2 10.1, and get it on dual boot
    if you can make a howto but really for user with very low technicals skills , you will make a lot of people very happy

    Thank you very much

    Fonsi

  2. Rick

    July 1, 2014 at 8:35 am

    Hi,I am all set to go on my external ROM but I cannot get this converter script to work. Would anyone be cool and convert my ROM for me? Thank you for any and all help.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>