[Android] howlinwolf430:
Hope this is the right place to post, I've been lurking around the forums since I got my first smart phone a few years ago but never posted as I've usually found what I'm looking for through googling and rtfm'ing, only reason I came out of the shadows was to get my Kobo Arc 7 rooted. No way I could live without it, I had been watching this thread http://xdaforums.com/showthread.php?t=2507886, checking it every few days to see if there was any development when I saw development was pretty much abandoned on the Arc 7. So this all started with a pm that made me try getting root myself with a little help from dazza9075.

Basically was told to trade in the arc 7 for an arc 7hd, barring that I could try the new cydiaimpactor update and see if it worked. It went something like this. I followed the instructions for the 7hd:

Everything went fine until plugging in the device to let it install a USB composite device. As expected it did fail on the third but when trying to install Google USB drivers it couldn't find any for the device. Just for kicks I opened up Impactor and pressed "Start" it did nothing, I then clicked "USB Scan" and let it complete, then pushed "Start" again. Quick popup on the screen, so I swiped the screen and ran Root Checker Basic and voila I had root.

Since then I've pretty much been badgering dazza9075 through pm to see about getting a recovery for it, I'm an old school linux guy, but never spent much time doing any development, so trying to figure things out myself is usually not an issue but this is new to me. I've been utilizing my google fu to try getting a recovery image made and had some success. Basically started with the instructions for dumping the partition info via dazza's instructions. Turned out to be a little more frustrating than anything, all the commands were turning up nothing, then finally I checked chipset specific stuff, it's running an MTK8125 so after getting nowhere with:

cat /proc/mounts

root@android:/ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
tmpfs /storage/emulated tmpfs rw,relatime,mode=705,uid=1023,gid=1023 0 0
/emmc@android /system ext4 ro,noatime,noauto_da_alloc,commit=1,data=ordered 0 0
/emmc@usrdata /data ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=or
dered 0 0
/dev/block/loop0 /mnt/cd-rom iso9660 ro,relatime 0 0
/emmc@protect_f /protect_f ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_all
oc,commit=1,data=ordered 0 0
/emmc@protect_s /protect_s ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_all
oc,commit=1,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_i
d=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:97 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

cat /proc/partitions

root@android:/ # cat /proc/partitions
cat /proc/partitions
major minor #blocks name

7 0 1254 loop0
179 0 7523456 mmcblk0
179 1 1 mmcblk0p1
179 2 10240 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 786432 mmcblk0p5
179 6 524288 mmcblk0p6
179 7 6145664 mmcblk0p7
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
179 96 15637504 mmcblk1
179 97 15633408 mmcblk1p1

So trying to find the ls -al /dev/block/platform/dw_mmc/by-name was the first hurdle as there was no "by-name"

ls -al /dev/block/platform/dw_mmc/by-name

ls -al /dev/block/platform
drwxr-xr-x root root 2014-01-29 20:33 mtk-msdc.0
drwxr-xr-x root root 2014-01-29 20:33 mtk-msdc.1

ls -al /dev/block/platform/mtk-msdc.0
drwxr-xr-x root root 2014-01-29 20:33 by-num
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0boot0 -> /dev/block/mmcblk0boot0
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0boot1 -> /dev/block/mmcblk0boot1
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk0p7 -> /dev/block/mmcblk0p7

ls -al /dev/block/platform/mtk-msdc.1
drwxr-xr-x root root 2014-01-29 20:33 by-num
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root root 2014-01-29 20:33 mmcblk1p1 -> /dev/block/mmcblk1p1

but an ls -l revealed:

root@android:/ # ls -l
ls -l
drwxr-xr-x root root 2014-01-31 08:16 acct
-rw-r--r-- root root 16927 1969-12-31 18:00 advanced_meta_init.rc
drwxrwx--- system cache 2014-01-28 19:01 cache
dr-x------ root root 2014-01-31 08:16 config
-rw-r--r-- root root 4 1969-12-31 18:00 custom_build_verno
lrwxrwxrwx root root 2014-01-31 08:16 d -> /sys/kernel/debug
drwxrwx--x system system 2014-01-31 08:17 data
-rw-r--r-- root root 185 1969-12-31 18:00 default.prop
drwxr-xr-x root root 2014-01-31 08:16 dev
lrwxrwxrwx root root 1969-12-31 18:00 emmc@android -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1969-12-31 18:00 emmc@cache -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1969-12-31 18:00 emmc@ebr1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1969-12-31 18:00 emmc@protect_f -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1969-12-31 18:00 emmc@protect_s -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1969-12-31 18:00 emmc@sec_ro -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1969-12-31 18:00 emmc@usrdata -> /dev/block/mmcblk0p7

So I focused on googling emmc partition tables and stumbled upon this thread http://xdaforums.com/showthread.php?t=2450045 which again I followed with little success. I had already tried way 1 and way 2 and way 3 couldn't read the partition table. So I followed the comments and #3 mentioned "cat /proc/emmc", so:

root@android:/ # cat /proc/emmc
cat /proc/emmc
partno: start_sect nr_sects partition_name
emmc_p1: 00000400 00000002 "ebr1"
emmc_p2: 00006800 00005000 "protect_f"
emmc_p3: 0000b800 00005000 "protect_s"
emmc_p4: 00016c00 00003000 "sec_ro"
emmc_p5: 00020c00 00180000 "android"
emmc_p6: 001a0c00 00100000 "cache"
emmc_p7: 002a0c00 00bb8d00 "usrdata"

Still not giving me a good picture of the partition table so I followed that thread till the end which took me to this thread, http://xdaforums.com/showthread.php?t=1959445. So in fashion I started following that. So

Using fdisk:

root@android:/ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5

Disk /dev/block/mmcblk0: 7704 MB, 7704018944 bytes
1 heads, 16 sectors/track, 940432 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 65 64 2147483647+ 5 Extended
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 1665 2944 10240 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 2945 4224 10240 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 5825 6592 6144 83 Linux
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 8385 106688 786432 83 Linux

parted:

root@android:/ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
p
Error: Can't have a partition outside the disk!

gdisk:

root@android:/ # gdisk -l /dev/block/mmcblk0
gdisk -l /dev/block/mmcblk0
GPT fdisk (gdisk) version 0.8.4

EBR signature for logical partition invalid; read 0x0000, but should be 0xAA55
Error reading logical partitions! List may be truncated!
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
***************************************************************

Disk /dev/block/mmcblk0: 15046912 sectors, 7.2 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E01B69E6-D822-467F-B1D2-97C0B7BA9ABA
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 15046878
Partitions will be aligned on 1024-sector boundaries
Total free space is 13420733 sectors (6.4 GiB)

Number Start (sector) End (sector) Size Code Name
2 26624 47103 10.0 MiB 8300 Linux filesystem
3 47104 67583 10.0 MiB 8300 Linux filesystem
4 93184 105471 6.0 MiB 8300 Linux filesystem
5 134144 1707007 768.0 MiB 8300 Linux filesystem

Still no love. So I read on to the emmc section of that thread and understand nothing, more google fu gets me here: https://github.com/ameer1234567890/OnlineNandroid/wiki/How-To-Gather-Information-About-Partition-Layouts. So now I'm looking at the emmc stuff thinking this really doesn't help me, but remembering I'm running an mtk chip I was pretty happy when I got:

root@android:/ # cat /proc/dumchar_info
cat /proc/dumchar_info
Part_Name Size StartAddr Type MapTo
preloader 0x0000000000c00000 0x0000000000000000 2 /dev/misc-sd
mbr 0x0000000000080000 0x0000000000000000 2 /dev/block/mmcblk0
ebr1 0x0000000000080000 0x0000000000080000 2 /dev/block/mmcblk0p1
pmt 0x0000000000400000 0x0000000000100000 2 /dev/block/mmcblk0
pro_info 0x0000000000300000 0x0000000000500000 2 /dev/block/mmcblk0
nvram 0x0000000000500000 0x0000000000800000 2 /dev/block/mmcblk0
protect_f 0x0000000000a00000 0x0000000000d00000 2 /dev/block/mmcblk0p2
protect_s 0x0000000000a00000 0x0000000001700000 2 /dev/block/mmcblk0p3
seccfg 0x0000000000020000 0x0000000002100000 2 /dev/block/mmcblk0
uboot 0x0000000000060000 0x0000000002120000 2 /dev/block/mmcblk0
bootimg 0x0000000000600000 0x0000000002180000 2 /dev/block/mmcblk0
recovery 0x0000000000600000 0x0000000002780000 2 /dev/block/mmcblk0
sec_ro 0x0000000000600000 0x0000000002d80000 2 /dev/block/mmcblk0p4
misc 0x0000000000080000 0x0000000003380000 2 /dev/block/mmcblk0
resv 0x0000000000080000 0x0000000003400000 2 /dev/block/mmcblk0
logo 0x0000000000300000 0x0000000003480000 2 /dev/block/mmcblk0
expdb 0x0000000000a00000 0x0000000003780000 2 /dev/block/mmcblk0
android 0x0000000030000000 0x0000000004180000 2 /dev/block/mmcblk0p5
cache 0x0000000020000000 0x0000000034180000 2 /dev/block/mmcblk0p6
usrdata 0x00000001771a0000 0x0000000054180000 2 /dev/block/mmcblk0p7
bmtpool 0x0000000001500000 0x00000000ff3f00a8 2 /dev/block/mmcblk0
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate

Bingo, so finally, root, partition info, next recovery. Again I'm green here so I searched and searched and searched until finally I found the lenovo has the same chip that someone else had managed to get a recovery installed. So I've spent most of my day with this page, trying to get a recovery installed http://xdaforums.com/newthread.php?do=postthread&f=613. So I managed to get everything done, booted into CWM recovery, finished up all excited, then started testing CWM first reboot and I'm back to the stock android recovery. So I ended up finding the recovery.img that was created through the steps in the above link and did:

adb shell
mount -o remount,rw /system
mv /system/recovery-from-boot.p /system/recovery-from-boot.p-orig
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh-orig

As this was apparently a known problem with some samsung devices. Then:

fastboot flash recovery "path to recovery"

Which I cut and pasted the path, then rebooted the Arc 7 into fastboot by holding down the Volume up and power slider for aproximately 30 seconds. Fastboot was successful but hung after installing the recovery.img so I hard rebooted and got back into the arc. So I've tested it a few times and now it's booting into CWM recovery, I had two backups made during the image creation process and have been able to restore from both backups, tried creating a backup which completed with an error, can't remember what it is at this point though I will try again later. Only thing I'm noticing is when I boot into recovery it throws the following errors.

CWM automade 03.02.2014 11:23:02
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last-log
E:Can't open /cache/recovery/last_log

At this point I'm not sure if this is a problem or not as so far everything seems to be working, I will continue testing this recovery out then hopefully post it to dazza9075's original thread. At this point I really don't know what to do from here and any input would be greatly appreciated, dazza has been a great help but I'm at the mercy of being in different countries and timezones, so the pm process is always a little hurry up and wait. Apologies again if this is the wrong place to post, and thanks to all the people in the other posts above for all the hard work they have put in. Hopefully having some of this information in one place will help others with Microtek Chips.