yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] :
Guys this is not working like that. If something doesn't work it won't help only to say that. Please post the recovery log, as ghost45 did, and I will be able to debug. Now that the recovery works, it will be easy to find the log in /cache/recovery folder or to save it on sdcard with error reporting command from advanced menu.

Thanks!

---------- Post added at 12:03 ---------- Previous post was at 11:59 ----------

Thanks man, I was going to do that later when I'll get to work on twrp. The device tree on github is not updated yet. I'll do that after all test are finished, and you will be able to check every file to adapt to your phone. Also I will make a post with other changes I made in source.
[Upgrading, Modifying and Unlocking] marsapa:
ok, this is the log error View attachment last_log.rar
[Upgrading, Modifying and Unlocking] :
Thanks!

You have to correct your updater-script:

mount("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]5[/COLOR]", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]7[/COLOR]", "/data");

Probably it should be like this:

mount("ext4", "EMMC", "/dev/block/mmcblk0p13", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");

Also if you have a boot zip flasher from recovery, the updater-script should look something like this:

ui_print("writing Boot Image");
package_extract_file("boot.img", "/tmp/boot.img");
run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/mmcblk0p7");
delete("/tmp/boot.img");
ui_print("done.");

The internal sdcard is not mounting yet, but I know what I have to change.
[Upgrading, Modifying and Unlocking] marsapa:
ok now test

edit:

When installation is complete, but freezes the logo and not charge more, now when I log in I send the error log
[Upgrading, Modifying and Unlocking] d.w.d:
Hello,

I come to receive my new ZOPO ZP999 there is 2 weeks ago and I post an answer to get us the link for a custom recovery that I find today.

This recovery is completely functional, and in english. The installation can be done with SP Flash Tool in download mode with this file : View attachment recovery_cwmV16_by_Carliv.zip

Have a nice day and a happy new year :D

Envoy
[Upgrading, Modifying and Unlocking] marsapa:
log errore 2 View attachment last_log.rar

edit:

Now install the rom without the format command in goal, let's see if that's the problem
[Upgrading, Modifying and Unlocking] :
Thanks, that's sweet! :D

And if you want to know where is originated check this: http://xdaforums.com/showpost.php?p=57877201&postcount=224

Cheers!:cowboy:
[Upgrading, Modifying and Unlocking] ghost45:
[MENTION=5186178]carliv[/MENTION],

i have finished my tests here:

http://xdaforums.com/showpost.php?p=57894651&postcount=246

look..

:D
[Upgrading, Modifying and Unlocking] :
There are more problems in your zip file:

you probably use and updater-binary for jellybean:

Installing update...
I:Using legacy property environment for update-binary...
I:Legacy property environment initialized.

you probably tooked the updater-script from a phone with mt6589:

symlink("p2p_mt[COLOR="Red"]6628[/COLOR].ko", "/system/lib/modules/p2p.ko");
symlink("wlan_mt[COLOR="Red"]6628[/COLOR].ko", "/system/lib/modules/wlan.ko");
.......
symlink("wlan_mt[COLOR="Red"]6628[/COLOR].ko", "/system/lib/modules/wlan.ko");
.......
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt[COLOR="Red"]6589[/COLOR].so");

<= THIS ONE IS CAUSING YOU TROUBLE

For your phone you have:

mediatek.wlan.chip=MT6630
mediatek.wlan.module.postfix=_mt6630

and "gralloc.mt6595.so"

You need to find a zip stock archive for kitkat, made for another phone and check that, because even the updater-script is changed for kitkat.

Anyway, none of these are recovery related. I guess you missed what I told yesterday to ghost45.

Cheers!

---------- Post added at 13:10 ---------- Previous post was at 13:08 ----------

Good :good:

I'll prepare the next round to solve internal sdcard now!

Oops, my thanks are still blocked... :(
[Upgrading, Modifying and Unlocking] marsapa:
This is a generic scripts that works on kitkat, it is right to test if there are commands are ignored does not affect the installation, but the biggest problem is that it does not install anything, well if the process ends in fact does not install anything

But at least the backup and restoration work well :)
[Upgrading, Modifying and Unlocking] marsapa:
Carliv, I normally use aroma installer in my rom, but as evidence to make quick use of the scripts you've seen, and I've always installed the system, now I know very well that the root binaries are installed, but if you try to install another even a simple app system, in fact it does nothing, now I'm trying to change the scripts and then let you know
[Upgrading, Modifying and Unlocking] :
New tests added http://xdaforums.com/showpost.php?p=57894268&postcount=244

I think at least one of these will work and we will have after that a final build.

I bet on test 8.
[Upgrading, Modifying and Unlocking] marsapa:
please see this log error: View attachment last_log.rar

The format command does not work in the meta
[Upgrading, Modifying and Unlocking] marsapa:
there sees the internal memory of all recovery
[Upgrading, Modifying and Unlocking] :
Ah yes, I forgot to tell you that before. Your phone has a /data/media internal sdcard and that means is a folder on /data partition. You can't raw format with updater-script because you will erase the internal sdcard too. The clockworkmod has an inteligent way to check that through minivold and when you format data in wipe menu, the data/media folder is preserved and everything else is formated, but for updater-script that is not permitted. This is the reason after Android 4.2.2 the data extract in OTA or updater zips is deprecated and was introduced /app folder in /vendor/operator, to let you add user apps that doesn't have to be installed in system. Those apps are just like any other app instaled in /data/app folder as user apps. If you still want to use that data folder in zip installer, dont add format command, instead instruct users to do a format or wipe data in recovery menu before install. But honestly I don't know if you will be able to extract something in /data partition.

Also this line "symlink("wlan_mtk_connsys_mt6595.ko", "/system/lib/modules/wlan.ko");" should be "symlink("wlan_mtk_connsys_mt6630.ko", "/system/lib/modules/wlan.ko");".

Cheers!
[Upgrading, Modifying and Unlocking] marsapa:
I had already proven symlink ("wlan_mtk_connsys_mt6630.ko", "/system/lib/modules/wlan.ko" but the installation still hangs by mistake set_metadata ("/ system / bin / 6620_launcher ......
[Upgrading, Modifying and Unlocking] :
That is something else I forgot to tell you. You need to copy file_contexts, property_contexts, seapp_contexts and sepolicy from stock recovery in custom recovery ramdisk and to replace those generated by compiler. You can try to set your updater-script correct with permissions instead of metadata and it will be installed in legacy mode, but have to check it to be written well (ask ghost45 for his ROM zip and take a look - that doesn't have any errors). This way you don't need to replace those files.

Anyway, believe it or not, the problem isn't with the recovery but with the ROM zip.

Ontopic now: Nobody else tested latest builds, other than marsapa? I want to make the final build and I need more feedback guys.

.
[Upgrading, Modifying and Unlocking] marsapa:
maybe you did not understand that ghost did not install any rom, did I install the root test the rest will not install
[Upgrading, Modifying and Unlocking] :
Then what is this http://pastebin.com/1iHhUT62 ?

Copied from his recovery log.

You said you can't install even applications....
[Upgrading, Modifying and Unlocking] marsapa:
ringtones not a rom

and if I'm not mistaken you have not installed, even to me the process ends well, but did not install the rom
[Upgrading, Modifying and Unlocking] :
I think this is the third time when I tell you, if you are able to install a zip file (SUpersu, superuser, kingroot or other), then the install from zip works. You just need to make a proper zip archive, following the rules for kitkat. Try to find a cyanogenmod 11 build for a phone and analyse that updater-script.

If I can istall that kitkat zip in my phone with same recovery you should be able to install a rom too.
[Upgrading, Modifying and Unlocking] marsapa:
Carliv, sorry but they are quite able to install a rom, as I do quite a bit, I know it's strange that the root and install a rom not, but I assure you it is not a normal thing, Asthe also the first scripts on other recovery for other phone install the rom. I also tried it with scripts set_metadata and Aroma installer, I always get an error and the installation ends with susccesso restart the phone locks the logo.

I will do other tests, if others give me a hand would be even better, but I assure you that whatever the situation is not quite normal
[Upgrading, Modifying and Unlocking] :
Then try like they did in cyanogenmod:

mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system");
mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/userdata", "/data");
format("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "0", "/system");

and for boot:

ui_print("writing Boot Image");
package_extract_file("boot.img", "/dev/block/platform/mtk-msdc.0/by-name/boot");
ui_print("done.");

This is what I'm trying to tell you. Everything is because of your phone, you need to find what works for it, and has nothing to do with recovery.

Is not normal you say? But what was normal with this phone? :laugh:

---------- Post added at 18:06 ---------- Previous post was at 17:47 ----------

Well, besides marsapa nobody else reported about the new tests so I will post final builds for CWM and CTR:

...deleted, not working yet

and a test build for twrp:

TWRP test 1
[Upgrading, Modifying and Unlocking] marsapa:
TWRP from the black screen

the crt and cwm work but not mountainous sd0
[Upgrading, Modifying and Unlocking] AP756:
Hi Carliv,

thank you for your work and have some coffee. Sorry to jump in and a second sorry that I'm old and as slow as my old computer ;). Installed mod8 (v6_kk_carliv-mod compiled 2015-01-02 named recovery-cwm-test8-ZP999). Get the error "Can't mount /storage/sdcard0", sdcard1 works. Thought better late than never.

Edit 1 (test8): wipe cache and dalvic cache works, other functions too.

Edit 2 (recovery-cwm-carlivmodd-ZP999): same

Edit3 [recovery-CarlivTouch_3_0-ZP999): WOW, that looks nice :). Same as above. All tested functions (e.g. install SuperSU from memory card) work without problem, but sdcard0 can't be accessed.

Your work is greatly appreciated!
[Upgrading, Modifying and Unlocking] :
For twrp I used latest version from omnirom (downloaded this morning) and they seems to have changed the flag for custom graphics file and it wasn't loaded. It will work next time.

Marsapa can you tell me which one from previous builds worked? You said it sees both sdcards:

If I know that I will solve the issue quickly.

Thanks man, I'm not a teenager too :D. If test 8 doesn't work, these won't work too because are based on it. But I didn't had any feedback so I built them anyway.
[Upgrading, Modifying and Unlocking] marsapa:
has been mistranslated in all recovery can not see the internal memory
[Upgrading, Modifying and Unlocking] AP756:
Well I'm from the time people programmed in Z80 machine code ... :)

Test3: no sdcard0

Test4: no sdcard0

Test6: does not boot at all

Test7: no sdcard0

Back to touch :)
[Upgrading, Modifying and Unlocking] :
The main problem for not mounting internal sdcard in cwm is that I don't know the right voldmanged number for it. Since I don't have the phone, some of you have to check in /dev/block/vold and to tell me what is the number for internal sdcard. Or make some screenshots with that folder contents and I'll try to figure out. Thanks!
[Upgrading, Modifying and Unlocking] marsapa:
See this
[Upgrading, Modifying and Unlocking] AP756:
Here we go. Hopefully it works
[Upgrading, Modifying and Unlocking] split52:
marsapa, carliv is right, the problem is in the update-script, after some changes made by me,(a litle script) i can install in system/app, framework and priv-app perfect, without error
[Upgrading, Modifying and Unlocking] marsapa:
I also noticed that I installed the little things, but I can also install all the rom without errors but then did not have anything installed. however post what you have changed so as to compare
[Upgrading, Modifying and Unlocking] split52:
run_program("/sbin/busybox", "mount", "/system");

package_extract_dir("system", "/system");

set_progress(0.4);

ui_print(" Setting correct permissions...");

set_perm(0, 0, 0755, "/system");

set_progress(0.6);

this not delete system, only copy you want, i will make a rom and make a best script and test it later
[Upgrading, Modifying and Unlocking] :
Let's see again:

TWRP test 2

CWM test 9

CWM test 10

CWM test 11
[Upgrading, Modifying and Unlocking] AP756:
Test 9: no scdard0

Test 10: scdcard0 shows as sdcard, I can move around with Aroma file manager (even if Aromafm.zip is missing on my ZP999)

Test 11: no sdcard0, cannot write to /sdcard/clockworkmod/.reovery_version on power off

Test TWRP 2: does not see anything, cannot mount External SDcard in menu Mount.

PS: My battery runs out, too much flashing ;)
[Upgrading, Modifying and Unlocking] :
So let's recap:

CWM test 10 works (if it show sdcard0 as sdcard). - that menu from aroma file manager is internal cwm file explorer (zip chooser), a very simple file manager. It is used for find zip files, and I integrated there to be able to find aroma zip even if it's not at its place.

And twrp boots but doesn't mount external sdcard. - btw, this twrp has mtp support, doesn't appear a "Disable MTP" button?
[Upgrading, Modifying and Unlocking] AP756:
To confirm: Test 10 runs fine. Internal and external sdcard works. Forget about the name, doesn't matter...

For TWRP: Yes, boots (shows two nice grey arrows), but doesn't see any memory (no internal, no external). If you go into "Mount" you cannot set the cross in front of external sdcard. Using "Install" neither card is available.

Didn't see any MTP button (at least can't remember, you know I'm getting old :)). Let me know if I have to install TWRP again, just now I'm running Test 10 to search for hickups.

Will attach the last logfile from Test 10. Please rename from .zip to .log (file is not packed, just renamed)
[Upgrading, Modifying and Unlocking] :
Well, thank you very much. I'm building now a new test for cwm and one carliv touch, and I found the problem for twrp. I'll build a new test for twrp too.

I don't know how will look mounts menu in twrp with data/media internal sdcard, but for me with fat internal sdcard looks like this:
[Upgrading, Modifying and Unlocking] split52:
confirm test 10 internal and external worksssssssssss
[Upgrading, Modifying and Unlocking] AP756:
Yes, looked identical. Except internal sdcard was missing.

PS: I like Carliv touch best. Looks cool ;)
[Upgrading, Modifying and Unlocking] :
New tests (hopefully latest):

CWM test 12

CTR test 1

TWRP test 3

In short time I will post here the new links.

Here they are:

CWM test 13

CTR test 2

TWRP test 4

and the latest ones:

CWM test 14

CWM test 15

CTR test 3

CTR test 4

.
[Upgrading, Modifying and Unlocking] AP756:
Test 12: trying to install a file from sdcard shows a menu containing directories -0, -legacy, -obb and -otaLogs.

-0 is identified as internal sdcard (you can see all files from internal sdcard), -legacy is empty, obb one dir named com.antutu... (empty) and -otaLogs is empty. Couldn't find a rcovery.log

CTR Test 1 boots as expected, same symptoms as with test 12: No direct access to sdcard (first you have to enter directory -0). There is an information in screen. I: Can't partition non mmcblk device: /devices/platform/mtk.msdc.1/mmc_host/mmc1. Tried to install SuperSU from the root of sdcard, works.

Additional note: I use "Dual File Manager" which shows me following directories:

/storage/emulated -> subdirectories -0 and legacy

/storage/sdcard0

/storage/sdcard1

/storage/usbotg

In addition to that I see

/sdcard

/mnt/sdcard (internal sdcard)

/mnt/sdcard2 (external sdcard)

Maybe that helps. Personally I use /storage/sdcard0 and /storage/sdcard1 to identify my cards.
[Upgrading, Modifying and Unlocking] bigrammy:
Hi [MENTION=4729462]marsapa[/MENTION]

I am not sure if you know about or have tried this powerful tool ArchiKitchen Here to help you build your flashable ROM.zip's ;)

Just run your system.img through the kitchen and it will produce an updated updater_script and binary based on the links and permissions contained within the system.img and make you a flashable ROM .zip. :good:

It will save you loads of time :laugh:

I am trying without much success to figure out a way to modify the code so it supports mtk boot.img's but I seem to break the rest of the code when I try :laugh:

PS: It's a Linux Only Tool :eek:
[Upgrading, Modifying and Unlocking] AP756:
TWRP Test 3

Don't ask me what happened with the file dates... August is gone for a while... And I didn't change the date active...

Pic 3 shows in the header /sdcard which is wrong. This is my external sdcard (sdcard1)

Pic 4 shows the root with directories external sdcard (empty) and sdcard (which is external sdcard). Can't find internal sdcard anywhere ;).
[Upgrading, Modifying and Unlocking] :
Thank you very much for your thoroughly tests. You helped me a lot. I have one more (twrp) and I finish all builds again. For twrp I forgot a flag on boardconfig to initiate data/media.

For cwm and ctr I finally understood that my previous settings were good and my only mistake was to define internal sdcard on fstabs: for cwm, if it is emulated, it must not be defined and will work. I experimented many things during this day and I understood a lot about this kind of phone.

And in twrp the sdcards are named as in old cwm: external is "sdcard" and internal is "emmc".
[Upgrading, Modifying and Unlocking] AP756:
You are welcome! You do a lot of work for us, so it's absolutely fine to do some work for you. Anyway I'm a bit tired now and I'll have a bit of sleep ;). Will be back in a couple of hours (after recharging all batteries. Thanks for your efforts.
[Upgrading, Modifying and Unlocking] :
Hi everybody,

Added new latest tests http://xdaforums.com/showpost.php?p=57908108&postcount=294

Let's finish today with these recoveries, to make the final builds and to push the device tree updates to gihub!

Thanks! :highfive:
[Upgrading, Modifying and Unlocking] AP756:
CRT Test 4: E: Can't mount /storage/sdcard0

TWRP: see screen shots, sdcard = external sdcard, emmc is empty

>>And in twrp the sdcards are named as in old cwm: external is "sdcard" and internal is "emmc". <<

The structure is as reported:

/storage/emulated -> subdirectories -0 and legacy

/storage/sdcard0 <-this is the path to internal sdcard

/storage/sdcard1 <- this is the path to external memory cardh

/storage/usbotg

Test 14: no change in directory structure. Restarting from power menu does not work automatically, phone switches off and you have to start manually by pressing power

Test 15: After flashing you have to remove battery for a short time before phone starts. E: Can't mount /storage/sdcard0

Back to Test 10, was best.
[Upgrading, Modifying and Unlocking] :
I know about that but twrp doesn't work this way. They still uses old fstab and in that doesn't exists /storage/sdcardx. It is symlinked to that. That I was trying to tell you, in twrp the sdcard folder is /storage/sdcard1 in Android. But I'm curious why internal sdcard doesn't appear... :confused:

Anyway I see the CPU path is wrong. Can someone search for something like this /sys/class/thermal/thermal_zone0/temp in phone? It may have different name...

Also I want to see some screenshots with the content of this folder /sys/devices/platform/mtk-msdc.0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/

Thank you guys!
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv ,

i have finished the test here:

http://xdaforums.com/showpost.php?p=57915473&postcount=300

test cwm13 and ctr_test2

Now my battery is very low!

i must recharge it!:p

P.s.

Carliv look the different path that i have found to arrive to the backup, probably you understand well.
[Upgrading, Modifying and Unlocking] :
Ok then, I'll make final builds based on test 10. Thank you!

Can you check those paths I asked in previous post?

And can you post here back the test 10 image - I messed up my files and I can find it here (Ihave so many files and tests .... )

Well, no one?
[Upgrading, Modifying and Unlocking] Snoopy2006:
Directories

In the pdf File you see both directories
[Upgrading, Modifying and Unlocking] :
Well I guess you like me me and many of us, are suffering from being used with the old good fat internal storage :) MTK made us like that.

This particular emulated legacy /data/media folder as internal sdcard is working as you see. I used the "stock" defines from init.ssd.rc file:

#
# SHARED_SDCARD related directory & configuration (begin)
#

# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media

#
# SHARED_SDCARD related directory & configuration (end)
#

on init
# See storage config details at http://source.android.com/tech/storage/
# fix non-shell uid process can not access shared-sd
mkdir /mnt/shell 0700 shell shell
chmod 0750 /mnt/shell
chown shell sdcard_r /mnt/shell
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /mnt/shell/emulated/0 0700 shell shell
mkdir /storage/emulated 0555 root root

mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard1 0700 root root

[COLOR="Red"] export EXTERNAL_STORAGE /storage/emulated/legacy

export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated[/COLOR]

mount tmpfs tmpfs /storage/emulated mode=0755,uid=1023,gid=1023

# Support legacy paths
[COLOR="Red"] symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /mnt/shell/emulated/0 /storage/emulated/0[/COLOR]
symlink /storage/sdcard1 /mnt/sdcard2

So what you see there is normal for this type of multiuser functionality. Look at official google explanation: https://source.android.com/devices/storage/config-example.html

Go to "Emulated primary, physical secondary (like Xoom)" - that is aplying here.

Maybe I build so many tests because you guys didn't understood how this is functioning?

The 0 folder you see there is you primary user folder. I will make new builds based on test 10 but I need someone to post it here back to compare and see which one is, because I have three files named like that :eek: EDIT: No one? Well let's take them one at a time then...
[Upgrading, Modifying and Unlocking] ghost45:
Hi Carliv ,

Yes is true , but i want to write all my steps to make you known!

In root of the sdcard0 there is one duplicated folder called clockworkmode but inside there is any backup!

View attachment 3095494

View attachment 3095495

To the contrary in the path:

mtn/shell /emulated/clockworkmod

there is the backup

View attachment 3095488

View attachment 3095489

If i make a backup in sdcard1 this is the real situation:

in root of the sdcard1 there is only one folder called clockworkmod and inside there is the backup ...

no other strange position.

Probably is correct but i only want to make you know.n...you do not have the phone!
[Upgrading, Modifying and Unlocking] AP756:
Good, other jumped in. I'm running an emergency right now, will be back in a couple of hours:mad:
[Upgrading, Modifying and Unlocking] :
Those are from different tests. Try to clean up your internal sdcard before a new test, and delete that clockworkmod folder from emulated.
[Upgrading, Modifying and Unlocking] marsapa:
I finally managed to install all the rom, I phone is making us sweat