How To Dual Boot Samsung Galaxy Tab 2 7.0 ~ Hackinthus

Thursday, September 27, 2012

How To Dual Boot Samsung Galaxy Tab 2 7.0


       



WARNING: Hackinthus is not liable if you brick your device. Perform the following steps carefully and you can achieve a Dual-boot..!

To use this method:

1. Your device should be rooted. Click here for rooting instructions.

2. MicroSD card at least 8GB in size. If you use 8GB, though, you will have pretty limited space for storage, so a card 16GB or greater is advised.
Preparing SD Card
  1. Repartition your microSD card using whatever program suits you. You need to shrink the first storage partition to make room for the new system partitions. The new partitions should take at least 5GB, so be sure to leave at least 5.25GB. You can always resize later if you need to.
  2. After shrinking your storage partition, create four ext4 partitions in this order: system (min 800MB, recommended 1.25GB), cache (min 500MB, recommended 700MB), data (min 3GB, recommended 5GB), and EFS (min 21MB, recommended 32MB).
  3. Verify your partitions on your tablet by inserting the SD card, booting into CWM, and running "parted /dev/mmcblk1" (no quotes) over ADB shell.
Flashing External ROM
  1. Now you just need a ROM to flash. Most ROMs are not packaged to run from external SD card. You MUST either use a provided ROM or edit one yourself. I provide here a repackaged version of the 8/28 CM10 nightly which can flash to and run from your SD card. If you want to edit a ROM yourself, see the bottom of this post.
  2. Boot into CWM and backup. You will need your backed up boot image if anything goes wrong.
  3. Now flash your ROM. It will install to the external SD card on the appropriate partitions if you did everything right. Reboot: you should be in your new ROM.
  4. You'll probably want a Google Apps package. See below for packages for external dualboot.
Using Your Dual-Boot Setup
  • Your internal and external ROMs do not share internal storage, due to the odd nature of the SD card fuse tool.Your external ROM has an "internal SD card" of its own. You may find a way to mount the internal /data/media to the external ROM's /sdcard. My new ROM conversion script will add attempt to mount the internal ROM's storage to /storage/intSdCard
  • The ROMs I provide here include a script in /system/bin called "bootinternal." Run this from a terminal emulator or adb to switch from the external ROM back to the internal one. I have attached a script called "bootexternal" to this post. Use it on your internal ROM to switch to the external one (remember to set the executable permission).
  • In order for the boot switching scripts to work, you must do some preparation. On your external ROM, place the internal ROM's boot.img in /sdcard/Boot/internal.img. For your internal ROM, place your external ROM's boot.img in /sdcard/Boot/external.img.
  • If you ever need/watch to switch ROMs manually, run the following commands in a terminal emulator or over ADB, replacing "boot.img" with the boot image of the ROM you are switching to:
    Code:
    cat boot.img > /dev/block/mmcblk0p5
    reboot
    Alternatively, you could switch boot images using Mobile Odin.
  • Update: I would skip using my prepackaged ROMs now, because I have uploaded a converter script that will actually do a better job. These will configure the "bootinternal" and "bootexternal" scripts automatically.
  • If you ever need to wipe your data, cache, or dalvik cache, see the next post for CWM zips.
Downloads
Roms for External SD Card:
CyanogenMod 10 Nightly (8/28/2012)
AOKP P3113 Stable
Note that these are probably unnecessary now, because I provide a script to convert ROMs automatically on Linux.
Google Apps Packages for External SD Card:
Gapps for Jelly Bean - Use for CM10, AOKP, etc
Gapps for Ice Cream Sandwich - Use for stock, RomsWell, etc
If I ever have time, I plan to upload SD card images which you can use to partition your external SD card automatically.
---
Repacking a ROM for Dual-boot from SD Card
Note: You no longer need to do this manually. I have uploaded a script which automates the conversion process. See the next post for download.
  1. First, you need to extract and unpack the boot image. There are tools and scripts available for this, so find one.
  2. Once the boot image is unpacked, you need to edit init.espresso.rc on the ramdisk. Find where the partitions are mounted and change the code to look like this (yours may look slightly different depending on the ROM, but just be sure to replace the default partition mounts with those of your SD card partitions):
    Code:
        #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
  3. Repack the boot image and stick it back into the ROM. Then edit the updater-script, and change all references to the internal system partition (/dev/block/mmcblk0p9) to the external system partition (e.g. /dev/block/mmcblk1p2). If any other partitions are referenced, change them as well.
  4. Optional: insert the "bootinternal" script in /system/bin and the a script to mount the internal storage in /system/etc/init.d.
  5. Your ROM is ready to go. Flash and be happy!

By: Santosh Pavate
Note : All the cwm's and rooting zips are not my work and i take no credits for this. I have just put this things in one post & have tried to make it as simple as i can for all the users.

ATTACHED FILES
File Type: txt02intsdcard.sh.txt - [Click for QR Code] (122 Bytes, 29 views)
File Type: txtbootexternal.sh.txt - [Click for QR Code] (81 Bytes, 34 views)
File Type: txtbootinternal.sh.txt - [Click for QR Code] (81 Bytes, 27 views)

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More