yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] bigrammy:
Yes sorry path is wrong it should be

adb shell
ls -al /dev/block/platform/mtk_msdc.0/by-name

The output should look like this.

[IMG="Output"]http://i41.tinypic.com/rsg20h.png[/IMG]

As you can see we will get the real /dev/block I think anyway :confused: It seem's the by-name are probably just links. :confused:

Maybe [MENTION=5186178]carliv[/MENTION] can shed more light on this when he gets a little time. :fingers-crossed:

This is from the boot init.rc which shows the mtk property file system which will be the same for all MTK's most likely.

on fs_property:ro.mount.fs=EXT4
write /proc/bootprof "INIT:eMMC:Mount_START"
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/system /system noatime ro wait commit=1,noauto_da_alloc
exec /sbin/e2fsck -pfD /dev/block/platform/mtk-msdc.0/by-name/userdata
exec /sbin/tune2fs -O has_journal /dev/block/platform/mtk-msdc.0/by-name/userdata
exec /system/bin/ext4_resize
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata /data noatime nosuid nodev wait noauto_da_alloc,discard
exec /sbin/e2fsck -p /dev/block/platform/mtk-msdc.0/by-name/cache
exec /sbin/tune2fs -O has_journal /dev/block/platform/mtk-msdc.0/by-name/cache
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/cache /cache noatime nosuid nodev wait noauto_da_alloc,discard

#change partition permissions
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/boot
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/boot
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/recovery
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/recovery
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/secro
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/secro
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/seccfg
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/seccfg
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/proinfo
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/proinfo
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/otp
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/otp
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/nvram
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/nvram
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/para
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/para
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/logo
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/logo
write /proc/bootprof "INIT:eMMC:Mount_END"

I am not registered with 4shared too much spam popups etc :( Also most dev's will not like it :( so I am not able to read your method.

I recommend using Dev-Host http://d-h.st/ or Mega https://mega.co.nz/ or Google Drive https://drive.google.com all free and pretty much spam free. :good:

Regards bigrammy. :cool:
[Upgrading, Modifying and Unlocking] bigrammy:
Hi mate,

Not sure what happened with the above command but we are missing the by-name part which is what's required :eek:

Could you please re run the adb shell command again :confused:

ls -al /dev/block/platform/mtk_msdc.0/by-names

For some reason the command that seem's to have been run was :laugh:

ls -al /dev/block/

PS: Tip: When you post or reply you can use # symbol from the editing menu to wrap the output text in a Code box it looks neater and keeps the formatting. Just paste the text between the code /code boxes ;)

Thanks. bigrammy
[Upgrading, Modifying and Unlocking] bigrammy:
Perfect!!! :laugh: :laugh:

Regarding Carliv's finding (seclabel) :eek: It's not something I have heard of before :eek: I guess I will have to learn about this now :crying:

If [MENTION=5186178]carliv[/MENTION] is now active with this project I will await his findings because he is far far more knowledgeable than I :o

The boot.img is not that important as most user/superuser things can be done without any need to touch it. :good:
[Upgrading, Modifying and Unlocking] ghost45:
Hi, Big, i don't know and i don't understand the connection between the recovery and the boot!

But according me the only thing that i understand well is that the problem principal is the repack system or tool that not permitted to create a recovery in good way.

Carliv probably understand what is that because he have decompiled and have repacked the recovery without modify and the recovery run well.

So the broblem of the boot image according me is not connected with the recovery and only what you said before that is connected only with have right root.

But we have already right root so we need only to understand what tool and what have this recovery that is not possible to repack it.

See you
[Upgrading, Modifying and Unlocking] ghost45:
Hi,

so i'm distressed, Also THe Great Carliv has threw in the towel!!!

This phone is terrible to mod !

:(

New firmware is issue with new recovery and new boot stock small differences inside !

This is the Recovery and Boot:

http://www.4shared.com/file/lSbORoxCba/recovery.html

http://www.4shared.com/file/X9pwwUcxce/boot.html
[Upgrading, Modifying and Unlocking] bigrammy:
Sad news but it is almost impossible to work on a problem if you don't have the phone in your hands :(

If Carliv has give up it's probably for that reason maybe zopo shop should send him a loan item to work on :laugh:

Again bro upload to xda 4shared is awful with spam/ads

I have couple of ideas to try.

PS PS!! I have found the Mediatek 4.4.4 Kernel source code thanks to this article Here google source here https://android.googlesource.com/kernel/mediatek/ so maybe another dev could build one with the security off.
[Upgrading, Modifying and Unlocking] ghost45:
Hi Big,

Believe in me that is indifferent to have or not the phone in his hands!

This phone is terrible to mod!

I have saw the article that you have speaking.. But is not connected with this socs.. The sources is not for this phone's soc.

Thanks for your help
[Upgrading, Modifying and Unlocking] bigrammy:
It is always easier if you have the device in your hand rather than trying multiple things which could take a lot of time and effort to try explain to others. :crying:

Regarding Source: I know that I just thought someone maybe able to use or decipher from the make file the way or options that the new 4.4.4 boot.img is formed I think this maybe the same regardless of the SoC version mt65xx :confused:

Thing to try:

1. Take stock recovery unpack and repack it.

2, flash to the phone by SPFlashtool

3. Start the phone normally (NOT IN RECOVERY)

4. Backup the Recovery using adb via the dd command or via MTKDroidtools if its working

5. .Now backup Recovery with SPFlashtool.

6. Now Reflash both of the Recovery.img's one at a time and see if one or both will boot

From some selinux reading it seems the selabel may get added by selinux :fingers-crossed:
[Upgrading, Modifying and Unlocking] ghost45:
Hi Big,

1) unpack and repack the recovery with which tool?

I use many but the repack have problems i think.

2)flash with flashtool of course

3)start normally the first time after flashtool step. Of course.

4)dd command? Tell me better

Mtkdroid do not run at all... Show only the partition but nothing else.

5)backup from flashtool vers 5?sure?

I wait your voice!
[Upgrading, Modifying and Unlocking] Lihis:
SPFlashtool and MTKdroidtools probably do not have linux alternatives?

Sent from my ZP999Pro
[Upgrading, Modifying and Unlocking] bigrammy:
It's just a process of elimination bro :eek:

Maybe dd on the system has the code to append the created .img :fingers-crossed:

Who knows how SPflashtool really works anyway maybe it too has been updated to append the .img :fingers-crossed:

If you do not try it we will never know thats why it's called hacking :laugh:

---------- Post added at 06:09 PM ---------- Previous post was at 05:56 PM ----------

Bro I cannot type every little thing :crying: it will take me forever :eek:

For unpack use mitchfood tools or brunos mtk boot tools if using linux. (Use search)

Use this thread for dumping the recovery (Section 2:

Dumping ROM partition) http://xdaforums.com/showpost.php?p=45721523&postcount=1
[Upgrading, Modifying and Unlocking] Lihis:
Okay, thanks. This is mine first MTK based device, so if you have any good resources which are worth of reading I'm all ears :)

Sent from my ZP999Pro
[Upgrading, Modifying and Unlocking] bigrammy:
If new bro it's best to read up on carliv's condenced explanations Here

Also search all threads started by master [MENTION=4478781]yuweng[/MENTION] to whom I personally owe so much. :o

For a list of mtk dev's see [MENTION=4478781]yuweng[/MENTION] thread http://xdaforums.com/showthread.php?t=2164959

:cool: :cool: :cool: :cool: :cool:

Regards bigrammy
[Upgrading, Modifying and Unlocking] ghost45:
H bro,

All the tool that i have tested do not close correctly the recovery file when i made the repack.

So the recovery don't start at all.

Only Carliv have made one recovery (without modify) and run well.

But unfortunately i don't know the tools that him has used!

Probably his 3 version tool for kk.

But i don't know.

In this phone about the flashtool app, run only version 5.1436 if i don't remember bad.. All the previous version do not run.

See you Great Big.
[Upgrading, Modifying and Unlocking] :
Hi guys.

I think I owe you some explanations. For unpack/repack that recovery I used bgcngm's tool on linux, and I didn't tell you but I did make some modifications to that recovery (I changed security to off in default.prop, and adb security off too). I did that to see if there is some security on file trigger or on files size, or if the security is requested by kernel. As you told me none of these applies because the recovery works. So, the reason for boot repacked to not work must be in bootloader (which in MTK phones means preloader and uboot). It's just a guess, I can't be sure, and as bigrammy said before, with the phone phisically in my hand I can find more, but it's not a sure thing I'll solve the problem (at least without sources).

For these phones won't work MTKDroidTools or other tool based on extracting "dumchar_info" from the phone because this phone doesn't have a dumchar_info file. It has a "partinfo" file (if I remember correctly) but its structure is different.

The porting routine won't work on this phone also, because now the phone has a new way of handling partitions, more like qualcomm based phones, and that makes it mandatory to build the recovery from source.

With these phones, MTK starts a new era, and this will make that old softwares and techniques to become obsolete. Maybe if Zoppo and any other manufacturer release the sources, the development will start for these phones too.

Cheers!
[Upgrading, Modifying and Unlocking] bigrammy:
Hi Bro,

Thanks for this carliv it explains a lot :good:

Just for info I had noticed that michfoods Windows ALL_phones_Boot_Recovery_repack_util_for_WINDOWS_v2 seems to mess up the ram_disk CPIO when packing it to the ram_disk.gz see attached images below. I should say that this seems to be a bug within gzip rather than anything to do with michfood's tool but maybe the cause of the problems.

excerpt from gzip web page below.

Sorry but I am a little confused now :confused: :laugh:

I understand the boot.img maybe a problem :eek: and for you to port or compile the stock recovery to your own CTR recovery may also be very difficult :eek:

Is it possible to build a fully working recovery whether it be CTR or CWM :confused:

I maybe a little dumb here or missing something :confused: Thanks to you and brunos tool we can now unpack/re-pack the recovery without problem :good:

So the stock recovery is cwm already and I thought it was just a matter of adding the functionality to be able to flash and backup the different partitions by way of the real /dev/block/mmcblkxxx which we now hopefully have thanks to adb shell :eek:

P:\ANDROID\zp999\MtkDroidTools-253>adb shell
shell@vanzo95_lwt_ds_kk:/ $ ls -al /dev/block/platform/mtk-msdc.0/by-name

lrwxrwxrwx root root 2014-12-16 18:25 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2014-12-16 18:25 cache -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2014-12-16 18:25 expdb -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2014-12-16 18:25 flashinfo -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2014-12-16 18:25 lk -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-12-16 18:25 logo -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2014-12-16 18:25 nvram -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-12-16 18:25 para -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2014-12-16 18:25 proinfo -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-12-16 18:25 protect1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-12-16 18:25 protect2 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-12-16 18:25 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2014-12-16 18:25 seccfg -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-12-16 18:25 secro -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2014-12-16 18:25 system -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2014-12-16 18:25 userdata -> /dev/block/mmcblk0p15

Would it not now be just be a matter of editing the fstab.mt6595 and recovery.fstab to suite. :o

I dont expect you to give a full explanation bro just a simple yes no or give it a try will do :good:

I will bow to your knowledge on this subject :laugh:
[Upgrading, Modifying and Unlocking] :
I told ghost45 on PM (we exchanged few messages) that it can be built from source but it needs a device tree set up. I can't do that without the phone, but someone of you, those who have it, can try to make a device tree and to start building. Usually it takes some time until you get a working build, but all problems can be solved one by one. If you are lucky it will work first time. A good inspiration might be AndroidOne device tree, since they are using same kernel structure. Ah, I remember that someone ported my recovery to sprout (androidone) and he said it's working... so, that means the new things doesn't affect older platforms (sprout is mt6582).

Cheers!
[Upgrading, Modifying and Unlocking] bigrammy:
Ok thanks bro. :angel:

I guess the owners of mt6595 phones will have to wait or push zopo/lenovo etc to release a custom recovery. :(
[Upgrading, Modifying and Unlocking] bigrammy:
Ghost bro,

You really have to be more clear when you post :confused: I think everyone is becoming more and more confused :rolleyes:

Are these recovery and boot from Zopo Official?

If you notice they have just been modded according to the info we got from the phone anyway. :eek:

What happens when you boot to this recovery?

Do you have any functions/ menus etc? and what happens if you try to make a backup or flash a zip.

Some photos or screenshots would be nice :good:

Edit:

Info taken from the OTA update1.zip at least this confirms we are on the write track. ota update.zip HERE GoogleDrive

It also looks like the /system recovery will probably just restore the stock recovery/boot due to a recovery-from-boot.sh

ui_print("Unpacking new recovery...");
package_extract_dir("recovery", "/system");

Now due to the update one of two things may have happened due to the boot.img.p and recovery-from-boot.p

1, Zopo are still enforcing the .img checks and restoring or preventing boot up due to checks.

2, Zopo have removed the .img checks to allow modification of the boot and recovery.img

I think they have probably removed the checks (2) because they know this will hurt their sales if people cant develop mod this phone.

[COLOR="Blue"]mount("ext4", "EMMC", "/dev/block/mmcblk0p13", "/system");[/COLOR]
file_getprop("/system/build.prop", "ro.build.fingerprint") == "alps/L901/L901:4.4.2/KOT49H/1416065144:user/test-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "alps/L901/L901:4.4.2/KOT49H/1417839624:user/test-keys" ||
abort("Package expects build fingerprint of alps/L901/L901:4.4.2/KOT49H/1416065144:user/test-keys or alps/L901/L901:4.4.2/KOT49H/1417839624:user/test-keys; this device has " + getprop("ro.build.fingerprint") + ".");
getprop("ro.product.device") == "vanzo95_lwt_ds_kk" || abort("This package is for \"vanzo95_lwt_ds_kk\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Verifying current system...");]
[Upgrading, Modifying and Unlocking] :
Can you post the result of this commands:

adb shell ls /dev

adb shell cat /sys/devices/platform/mtk-msdc.0/mmc_host

adb shell cat /sys/devices/platform/mtk-msdc.1/mmc_host

adb shell
env | grep sdcard
exit

?
[Upgrading, Modifying and Unlocking] bigrammy:
Not sure if this is of any use bro but I have noticed something in the binary files boot.img.p and recovery-from-boot.p files in the OTA .zip. :confused:

Are these binarys just ram_disks and Kernels because they seem quite large at 6,172,371 bytes :confused:

EDIT: Funny how one thing leads to another but I think I/we have just found a way to flash our own modded boot.img and recovery's :fingers-crossed: :victory:

Please see the first post in this thread HERE http://xdaforums.com/showthread.php?t=1702233 could it really be this simple :confused:

Please View the photos attached.

Regards bigrammy
[Upgrading, Modifying and Unlocking] :
I don't get you... That link, and those images are for boot and recovery patches. Normally they are applied after OTA install, but in that thread is presented a solution to do it with adb. That command is inspired from install-recovery.sh script (you can find it in /system/etc folder in any OTA zip). Ex:

#!/system/bin/sh
if ! applypatch -c EMMC:recovery:5394432:fdba81d77fb93600c8b2ef5d1e1e45f90a448c75; then
log -t recovery "Installing new recovery image"
applypatch -b /system/etc/recovery-resource.dat EMMC:boot:4892672:9763a49751b7a9464db9c4c2c8c1eb241feb56f9 EMMC:recovery fdba81d77fb93600c8b2ef5d1e1e45f90a448c75 5394432 9763a49751b7a9464db9c4c2c8c1eb241feb56f9:/system/recovery-from-boot.p
else
log -t recovery "Recovery image already installed"
fi

I don't know if you can install this way a modded recovery or boot. Those patches are generated by OTA-building script if I remember correctly. And as you can see it uses the applypatch tool. Maybe in linux, using diff you can create a patch... Anyway the purpose of these patches is to avoid the flashing again of certain partitions, and to decrease the size of update zip. For a custom recovery it will be too much the difference, but for boot it might work if you can generate a proper patch...
[Upgrading, Modifying and Unlocking] bigrammy:
Of Course you are correct again :laugh: :laugh:

I was getting a little too far in front of myself I guess :o

As you rightly say "a proper boot.img.p patch" may be a problem :eek: more on that here https://android.googlesource.comapplypatch/imgdiff.c as usual not as easy as I first though it would be by simply useing this online tool here http://i-tools.org/bsdiff to create a patch :crying:

Well back to the drawing board then. :silly:

Thanks for the reply bro.
[Upgrading, Modifying and Unlocking] :
Well, you can see now why it's hard to do something without the device. I posted yesterday a request at 18:27 (my time), and now I still didn't get any answer, nobody from the users with the phone answered. So, this is counterproductive, and it's the main reason nobody can work for a device that don't own.

Happy holidays everyone!
[Upgrading, Modifying and Unlocking] Lihis:
[B]adb shell ls /dev[/B]
Output in [URL=http://pastebin.com/M08ssfS3]Pastebin[/URL]

[B]adb shell cat /sys/devices/platform/mtk-msdc.1/mmc_host[/B]
cat: /sys/devices/platform/mtk-msdc.0/mmc_host: Is a directory
[B]adb shell ls /sys/devices/platform/mtk-msdc.1/mmc_host[/B]
mmc1
[B]adb shell ls /sys/devices/platform/mtk-msdc.1/mmc_host/mmc1[/B]
device
mmc1:59b4
power
subsystem
uevent

[B]adb shell cat /sys/devices/platform/mtk-msdc.1/mmc_host[/B]
cat: /sys/devices/platform/mtk-msdc.1/mmc_host: Is a directory
[B]adb shell ls /sys/devices/platform/mtk-msdc.0/mmc_host[/B]
mmc0
[B]adb shell ls /sys/devices/platform/mtk-msdc.0/mmc_host/mmc0[/B]
device
mmc0:0001
power
subsystem
uevent

[B]env | grep sdcard[/B]
Phone do not have "env" so I couldn't get output. Busybox probably contains it? I'll try find it

And happy holidays!
[Upgrading, Modifying and Unlocking] marsapa:
Android one has only the bootloader locked, but the rest is equal to 6582 but with a partition style INEW v3. carliv, you're all wrong looking outside of the recovery, the only problem is the type of repack the recovery, in fact if you fill out the TWRP with sources omni then please repack the old fashioned way with scripts linux has white screen indicating a repack malformed, that is the same if you use the recovery directly compiled with sources omni. Indeed mediatek lab to my request for information has dismissed me and told me to ask the manufacturer
[Upgrading, Modifying and Unlocking] :
Thanks and sorry I wrote by mistake cat instead of ls.

Actually is not the same for the new mt6595 platform. I know AndroidOne has the same structure except for the kernel, but this one is different. All those commands I asked were to help me to understand better the phone new structure. So it doesn't use anymore a dumchar_info file, the nand partitions are not maped on same block as before (that's why I asked for that /dev list command), they have now defined blocks entries as in "regular phones", and therefore there is no need now for C3C0 patch to make them backup and restore as in the old platforms. The rest of commands were for sdcards to find voldmanaged paths. Now I can try to build a recovery to see if it works. I always use linux, so my attempt with a repacked recovery was working as ghost45 said. What didn't worked was the repacked boot image. That remains to be studied to find the reason, but someone need to provide some boot logs from the failed boot and from a successful boot. So I wasn't wrong looking outside of the recovery because this phone is different than any of the old ones. I am sure now that the "porting" method will not work in it anymore, and if we take a look in boot or recovery init files we can see the old "emmc@android" and so on are gone now. The partitions are mounted as in qualcomm with "/dev/block/platform/mtk-msdc.0/by-name/system" and there is a routine of chmod and chown for everyone... A lot of things are changed now to cut to the chase.
[Upgrading, Modifying and Unlocking] marsapa:
Now that the structure is very similar to Qualcomm is indisputable, but to create the recovery first we have to understand the format of the repack, then comes the rest to follow if we do not close because we can not do any testing