For anyone interested, below are the steps for getting your device dual-booting with CyanogenMod 10.2.
- I don't want to erase native firmware and want to give a try to CyanogenMod
- I want to have both native and CM, because I like native Samsung S-Pen apps, but want to have more fresh Android too
- I like experimenting - it's cool!
Our Android device has 2 boot partitions - for normal boot, and to boot into recovery. If I want to boot CyanogenMod, I need to place its boot image instead one of those boot partitions. E.g. if I want to have both native firmware and cyanogen - then obviously I need to replace recovery partition. However I can do the backup of recovery and restore it later if needed.
But, I also need to place cyanogen system and data partitions somewhere. Putting it on the external sdcard makes CM working really slow, repartitioning internal memory might be good idea, but it is not so easy and is not necessary for experimenting. Thus I've created 2 image files and put it to native data partition (mmcblk0p12) to media folder, e.g. into internal sdcard, then changed cyanogen boot image to mount those image files on boot as system and data partitions.
- Rooted Samsung Galaxy Note 10.1 2012 Edition
- 2GB of free disk space at internal sdcard
- Recovery partition backup, because we are going to replace it with CyanogenMod boot image
- Clear understanding of what you are doing, because you potentially can break your device
This manual suggests that you are going to do the recovery backup to external sdcard and has native firmware which means that recovery partition is mmcblk0p6, data partition is mmcblk0p12 and internal sdcard is /mnt/sdcard folder (otherwise you need to change the commands appropriately and might need to fix cyanogen boot image too).
Download 3 files by the links above and upload to internal sdcard of your device. Connect to your device via ADB and run ADB shell, or type the next commands in terminal emulator:
# become root su - # go to external sdcard to create recovery backup cd /mnt/extSdCard dd if=/dev/block/mmcblk0p6 of=./recovery.img # go to internal sdcard folder cd /mnt/sdcard # unpack partition images - each is 1Gb of disk space gunzip ./system.img.gz gunzip ./data.img.gz # write CM boot image to recovery partition dd if=./cyanogen.img of=/dev/block/mmcblk0p6 # finish exit exit
Restoring native recovery:
If you got tired from CyanogenMod and/or would like to take back your recovery, please use the backup you've done before. Lets say it is placed on your external sdcard, then connect to your device via ADB and run ADB shell, or type the next commands in terminal emulator:
# become root su - # go to the folder with recovery backup cd /mnt/extSdCard # write recovery image over recovery partition dd if=./recovery.img of=/dev/block/mmcblk0p6
P.S. What I've changed in Cyanogen boot.img to make it using img files instead of partitions in form of patch: cyanogen_boot_img.patch. It is also necessary to create /host folder in initrd folder tree.