[Miscellaneous Android Development] aicjofs:
Did you delete some text?

So it's clear his has an extra partition. I can't fathom how he would have created one, as I was unable to get fdisk or parted to read the emmc disk label and therefore can't print the partition table to even edit it. So the assumption would be Fuhu put it there.

Here is what we do know

The Nabi such as mine

/dev/block/mmcblk0 size: 7766016 (entire internal nand)
/dev/block/mmcblk0p1 size: 8192 (recovery)
/dev/block/mmcblk0p2 size: 8192 (boot)
/dev/block/mmcblk0p3 size: 524288 (system)
/dev/block/mmcblk0p4 size: 786432 (cache)
/dev/block/mmcblk0p5 size: 2048 (misc - used for updates)
/dev/block/mmcblk0p6 size: 32768 (staging - used for system patching)
/dev/block/mmcblk0p7 size: 1536000 (addon - has a copy of all kids apps on device)
/dev/block/mmcblk0p8 size 2048 (???)
/dev/block/mmcblk0p9 size 65536 (??? I think I figured out what this was and can't remember now)
/dev/block/mmcblk0p10 size 8192 (???)
/dev/block/mmcblk0p11 size:4775936 (data)
/dev/block/mmcblk0boot0 size:2048
/dev/block/mmcblk0boot1 size:2048

This Madagascar Nabi

/dev/block/mmcblk0 size: 7766016 (entire internal nand)
/dev/block/mmcblk0p1 size: 8192 (recovery)
/dev/block/mmcblk0p2 size: 8192 (boot)
/dev/block/mmcblk0p3 size: 524288 (system)
/dev/block/mmcblk0p4 size: 786432 (cache)
/dev/block/mmcblk0p5 size: 2048 (misc - used for updates)
/dev/block/mmcblk0p6 size: 32768 (staging - used for system patching)
/dev/block/mmcblk0p7 size: 2048 [COLOR="Red"]extra partition of the device that we don't have [/COLOR]
/dev/block/mmcblk0p8 size: 1536000 (addon - has a copy of all kids apps on device)
/dev/block/mmcblk0p9 size 2048 (???)
/dev/block/mmcblk0p10 size 65536 (??? I think I figured out what this was and can't remember now)
/dev/block/mmcblk0p11 size 8192 (???)
/dev/block/mmcblk0p12 size:4775936 (data)
/dev/block/mmcblk0boot0 size:2048
/dev/block/mmcblk0boot1 size:2048

His Nabi has added a 2048 partition in the 7th slot. It's not very large, and I can't imagine what it is for, regardless it has shifted all his partitions from 7 down. The Madagascar supposedly has some Madagascar Videos and Wallpaper along with hardware accessories, no way that is fitting in there..

Now here is what's interesting. Here is what a recovery for a Nexus 7 looks like(Tegra3). Also look in one of the OTA updates and you will see the ".p" patch files that are applied by calling the partitions as below.

# mount point	fstype	device

/sdcard	datamedia	/dev/null
/system	ext4	/dev/block/platform/sdhci-tegra.3/by-name/APP
/cache	ext4	/dev/block/platform/sdhci-tegra.3/by-name/CAC
/data	ext4	/dev/block/platform/sdhci-tegra.3/by-name/UDA	length=-32768
/misc	emmc	/dev/block/platform/sdhci-tegra.3/by-name/MSC
/boot	emmc	/dev/block/platform/sdhci-tegra.3/by-name/LNX
/recovery	emmc	/dev/block/platform/sdhci-tegra.3/by-name/SOS
/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP

The above is similiar to what jmztaylor used for starting making a device tree but then change it to what is below for every TWRP build we are using. So we have always used the below.

# mount point fstype device
/recovery emmc /dev/block/mmcblk0p1
/boot emmc /dev/block/mmcblk0p2
/system ext4 /dev/block/mmcblk0p3
/cache ext4 /dev/block/mmcblk0p4
/misc emmc /dev/block/mmcblk0p5
/staging emmc /dev/block/mmcblk0p6
/data ext4 /dev/block/mmcblk0p11 length=-32768
/external_sdcard vfat /dev/block/mmcblk1p1
/addon	ext4 /dev/block/mmcblk0p7

As you can see the first recovery.fstab that people are using for the Nexus in CM10 would appear to be more flexible. It calls out the partitions by name not number, so if it can read that information it doesn't matter where the partition is(it's #) because it reads the name, where what we are using is much more strict and calls the exact partition, and if it moves things won't work. Example:

/dev/block/platform/sdhci-tegra.3/by-name/SOS === (recovery) === /dev/block/mmcblk0p1

/dev/block/platform/sdhci-tegra.3/by-name/LNX === (boot) === /dev/block/mmcblk0p2

/dev/block/platform/sdhci-tegra.3/by-name/APP === (system) === /dev/block/mmcblk0p3

/dev/block/platform/sdhci-tegra.3/by-name/CAC === (cache) === /dev/block/mmcblk0p4

/dev/block/platform/sdhci-tegra.3/by-name/MSC === (misc) === /dev/block/mmcblk0p5

/dev/block/platform/sdhci-tegra.3/by-name/USP === (staging) === /dev/block/mmcblk0p6

/dev/block/platform/sdhci-tegra.3/by-name/UDA === (data) === /dev/block/mmcblk0p11 or /dev/block/mmcblk0p12

/dev/block/platform/sdhci-tegra.3/by-name/UDB === (addon) === /dev/block/mmcblk0p7

For this /dev/block/platform/sdhci-tegra.3/by-name/UDA === (data) === /dev/block/mmcblk0p11 or /dev/block/mmcblk0p12 if calling by name it would map correctly for either Nabi.

I don't fully understand why the decision was made to use mmcblkp# over the tegra-by-name. There must have been a logical reason but I don't know that information. People are using the Nexus 7 recovery sucessfully and it is using "tegra-by-name". I built a TWRP with "tegra-by-name" mappings and backed up and restored without issue, but I would like to better understand why we are using "by partition #" and what bad things could happen from using one over the other.

As a side note, I have seen a few people having can't mount sdcard and can't mount data errors when running the script or in TWRP in general. I wonder if it's possible there are more Nabi's like this then we think.

His gapps is normal gapps, just deletes 2 .odex files that were left over. It's really only necessary to delete those 2 files if you used an old Gapps, an there will be no more Android is upgrading. What t499user has done that is great is for people that come across late in the game they can just flash his if they have no gapps and skip having to deal with a 2nd gapps flash. Also this main install script from OP is due for an overhaul. We have made lots of progress since then and alot of the stuff in that install package is out of date so to speak.