yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 Android Development] cangcan:
yes..i used both fastboot & terminal cmd methods..weird..seems like I installed "Tethered TWRP", the twrp recovery does not stay in the device after a reboot..something is breaking the twrp..maybe I had to do it from the beginning step.. thank you anyway..

edit: finally its stick to the device and I managed to permanently changed stock recovery into TWRP recovery,, I ended up re-unlock the bootloader and didnt change the white splashscreen to black one.. Its really weird, I have unlocked the bootloader before and managed to get the white splashscreen before and reflash the black splashscreen, but it seems that the bootloader is not unlocked yet and maybe thats why the TWRP seems to be still in "tethered" mode.. Anyway I solved my problem.. Thank you anyway..
[ZenFone 2 Android Development] rafyvitto:
Recovery is failing to go into idle mode, once the screen shuts off(unticking timeout in settings does nothing it still shutsoff) , it wont wake with power button, it will go into charging mode, it does this while making backups, i flashed the latest build in OP.
[ZenFone 2 Android Development] Bushcrafter:
[MENTION=2388665]TheSSJ[/MENTION]. Thanks for the latest version of TWRP! Keep up the good work.:D
[ZenFone 2 Android Development] jrior001:
Working on 551 because that's what I have, once that is proper we can revisit the other model and its differences.
[ZenFone 2 Android Development] TheSSJ:
Odd, I removed the screen off function,normally it shouldn't turn off at all..could you please reflash twrp?

Does anybody else experience this?
[ZenFone 2 Android Development] DmA81:
Wow, that was fast :).
[ZenFone 2 Android Development] karmacoma7:
Searching the thread did not find the answer.

Is there a way to use flash drive connected wth USB OTG as backup destination ?

I did connect a drive, and a led starts to flash, but cant select usb OTG as a source for backup, since its not there.
[ZenFone 2 Android Development] TheSSJ:
I didn't think that this is actually something people do :D

I will search for recovery.fstabs including usb-otg and will try to include it in my next build
[ZenFone 2 Android Development] saurabhrck:
thnx. actually I use 550ml. So can you tell me how to extract the recovery for that??

cat /proc/mtd is not working. saying no such directory.
[ZenFone 2 Android Development] cangcan:
yep,,i have the same problem too..it happens 3 times in a row while doing a backup..the screen shuts off by itself and only long pressing power button can turn on the screen.. but in my case, it seems that it does not happen while the device is in idle mode/screen off, but i noticed that the temperature goes high as 74C and maybe that is the cause for the phone to shut off.. but i wonder if it was also because of the size of my DATA to backup was too big as it hits 4200+ mb size and coincidentally every time the device shuts off was while doing backup for data partition..
[ZenFone 2 Android Development] TheSSJ:
dd if=/dev/block/by-name/recovery of=/sdcard/stockrecovery.img

Maybe the new version has a bug - the screen didn't turn off on 2.8.5.0. We learn that newer is not always better :silly:

Will check if the boardconfig flags are still taken into consideration in the src of TWRP, otherwise I compare the source with the 2.8.5.0 one to check if they changed something on this particular code piece
[ZenFone 2 Android Development] chubby65:
That's how I had to make backups on the nexus 5 and 6 due to the lack of onboard memory

But with the Zenfone there should be more than enough space either internal or external sd card
[ZenFone 2 Android Development] ocyrion:
This is great! Initially the unlock wouldn't take because I'd flashed the pre-rooted 2.19.40.18 files from here:

http://xdaforums.com/zenfone2/general/guide-to-apply-ota-bootloop-rooted-zf2-t3127835

I hadn't realised the droidboot.img from the OTA needed to be flashed, but once done, all was well! Bring on the ROMs :D
[ZenFone 2 Android Development] ponnuvelpandian:
Wow, Its amazing and much faster than before. But TWRP Always fails to flash Stock ROM ZIP, but still CWM does it.

And if I remove the lines with getprop commands from the updater-script, its flashing fine with TWRP.

As I have permanent TWRP now, I'm not even able to flash Stock ROM ZIP without modifying the script content...

So, I'm expecting a fix for this small issue...

Thanks a lot for this wonderful work...
[ZenFone 2 Android Development] TheSSJ:
Can you please post a link to this zip file?
[ZenFone 2 Android Development] ponnuvelpandian:
Here it is...

http://dlcdnet.asus.com/pub/ASUS/ZenFone/ZE551ML/UL-Z00A-WW-2.18.40.12-user.zip

The Stock 2.18 ROM from ASUS Website...
[ZenFone 2 Android Development] Harfainx:
Removing lines 1, 5, and 6 of the updater-script from the 2.18 full build will allow it to flash in TWRP. That's been a problem that was addressed on other phones too. I had the issues on Oppo phones, as well as the OnePlus One.

Basically lines 1-6 can be removed. Then it'll work.

It's not really a big deal, but it is annoying.
[ZenFone 2 Android Development] ponnuvelpandian:
Yes, those lines contains some conditional commands refers to the build date, sku and the device model. It will abort flashing if it has a mismatch (as I understand from the script lines). But it seems TWRP is not recognizing those lines (but tethered CWM recognizes it).

As per my opinion (if I'm not wrong), its a missing feature of TWRP and its not the ROMs issue...
[ZenFone 2 Android Development] Harfainx:
You're correct. Like I said, it's a known issue. When we first discovered the work around, it was brought up and talked about. I thought they were going to fix it, but I guess it hasn't been addressed at the source yet.
[ZenFone 2 Android Development] yakub234go:
Why not build cwm then we can have both its not that hard building cwm if u built a working twrp already IMHO
[ZenFone 2 Android Development] trnscnd:
Build away..
[ZenFone 2 Android Development] TheSSJ:
As I don't want to dl 1.1gb,coild you please post lines 1-6 here? Maybe i just need to add some info in default.prop
[ZenFone 2 Android Development] JackSparrow17:
So u mean to say CMW is coming soon to Zenfone2 ?
[ZenFone 2 Android Development] trnscnd:
No, not what I meant to say. It is possible.. When? Who knows. I think most are very comfortable with TWRP.
[ZenFone 2 Android Development] nnssxx:
http://pastebin.com/Brkf5aug
[ZenFone 2 Android Development] Harfainx:
mount("ext4", "EMMC", "/dev/block/by-name/system", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
getprop("ro.build.fingerprint") == "asus/WW_Z00A/Z00A:5.0/LRX21V/2.18.40.12_20150529_9543_user:user/release-keys" ||
getprop("ro.build.fingerprint") == "asus/WW_Z00A/Z00A:5.0/LRX21V/2.19.40.18_20150612_1183_user:user/release-keys" ||
abort("Package expects build fingerprint of asus/WW_Z00A/Z00A:5.0/LRX21V/2.18.40.12_20150529_9543_user:user/release-keys or asus/WW_Z00A/Z00A:5.0/LRX21V/2.19.40.18_20150612_1183_user:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
getprop("ro.product.device") == "Z00A" || abort("This package is for \"Z00A\" devices; this is a \"" + getprop("ro.product.device") + "\".");
[ZenFone 2 Android Development] TheSSJ:
As already correctly stated by [MENTION=4728150]ponnuvelpandian[/MENTION] this is a limitation of TWRP, https://github.com/omnirom/android_bootable_recovery/blob/android-5.1/updater/install.c

It just doesn't define these lines, so this has nothing to do with this specific build. If I have time to spend, I could extend this file to support these commands, but real life comes first ;)
[ZenFone 2 Android Development] vampirefo:
I don't see a problem, users says it's a pain, really a pain you only have to change the zip file one time in the your life.

Stop deleting the changed stock rom, or just upload it some where then when you need it download it, guess what nothing will require modification.
[ZenFone 2 Android Development] TheSSJ:
Me neither, I see these requests as nice to have and as a possibility to get TWRP to know better under its hood. If a new version should come up, someone just needs to edit the update-script, upload it for the community to profit from it, too, and then apply the update

Most improvements come out of laziness :D

What advantages would one have in using CWM over TWRP anyways? The only real change is the support of fstab v2
[ZenFone 2 Android Development] social-design-concepts:
twrp doesn't support abort? Why would they remove that?
[ZenFone 2 Android Development] TheSSJ:
was it ever supported in any version?

RegisterFunction("mount", MountFn);

RegisterFunction("is_mounted", IsMountedFn);

RegisterFunction("unmount", UnmountFn);

RegisterFunction("format", FormatFn);

RegisterFunction("show_progress", ShowProgressFn);

RegisterFunction("set_progress", SetProgressFn);

RegisterFunction("delete", DeleteFn);

RegisterFunction("delete_recursive", DeleteFn);

RegisterFunction("package_extract_dir", PackageExtractDirFn);

RegisterFunction("package_extract_file", PackageExtractFileFn);

RegisterFunction("symlink", SymlinkFn);

RegisterFunction("set_metadata", SetMetadataFn);

RegisterFunction("set_metadata_recursive", SetMetadataFn);

RegisterFunction("getprop", GetPropFn);

RegisterFunction("file_getprop", FileGetPropFn);

RegisterFunction("write_raw_image", WriteRawImageFn);

RegisterFunction("apply_patch", ApplyPatchFn);

RegisterFunction("apply_patch_check", ApplyPatchCheckFn);

RegisterFunction("apply_patch_space", ApplyPatchSpaceFn);

RegisterFunction("wipe_block_device", WipeBlockDeviceFn);

RegisterFunction("read_file", ReadFileFn);

RegisterFunction("sha1_check", Sha1CheckFn);

RegisterFunction("rename", RenameFn);

RegisterFunction("wipe_cache", WipeCacheFn);

RegisterFunction("ui_print", UIPrintFn);

RegisterFunction("run_program", RunProgramFn);

RegisterFunction("reboot_now", RebootNowFn);

RegisterFunction("get_stage", GetStageFn);

RegisterFunction("set_stage", SetStageFn);

RegisterFunction("enable_reboot", EnableRebootFn);

RegisterFunction("tune2fs", Tune2FsFn);
[ZenFone 2 Android Development] social-design-concepts:
I'm an idiot didn't realize that was the update-binary source. If you wanna be able to support ota updates with out modification, you'll need to use prop overrides so that the default.prop has the values expected in the stock recovery or just replace the default.prop with the default.prop from the stock recovery.

It's not twrp doesn't support it its doing exactly what it should do and stopping cause it isn't the correct build info in the default.prop
[ZenFone 2 Android Development] vampirefo:
There are a few advantages of cw over twrp, size is the main one, on some devices twrp is just too big for the recovery partition.

Another is cw backs up with tar, another is plain cw doesn't use touch and almost one size fits all.

I use cw on some of my devices, I like carliv touch cw for my dell 3830 which is a Intel device.
[ZenFone 2 Android Development] TheSSJ:
I saw that https://github.com/CyanogenMod/android_bootable_recovery/blob/cm-12.1/install.cpp checks if an updater-binary is available and runs it instead of evaluating it by itself (this source file exists in TWRP, too). Maybe this works correctly on CWM but not on TWRP, where it parses the file with its limited instruction set. Would be at least an explanation
[ZenFone 2 Android Development] tasar:
I just flashed the new TWRP and now my 551 boot only into recovery :( Please help!
[ZenFone 2 Android Development] Harfainx:
What exactly did you flash? Which commands did you enter?
[ZenFone 2 Android Development] tasar:
I flashed the new twrp.img with Rasher (like another user posted here) and now it boots only into the new recovery.
[ZenFone 2 Android Development] chubby65:
I had something similar on my oneplus one a few weeks ago

Download this and put it on your sd card boot into recovery and flash it then you should be able to start normally

http://xdaforums.com/showthread.php?t=3142596

[TEST] 551 TWRP Flashable 2.19 OTA from 2.18 - Some junk removed
[ZenFone 2 Android Development] Harfainx:
Something overwriting the droidboot image in addition to the recovery partition? I wonder what's causing that.

I know it isn't the TWRP image that caused it. Maybe something with how Rasher flashes? Strange.
[ZenFone 2 Android Development] vampirefo:
Using fastboot to flash recovery works perfectly. I wouldn't bother with apps.
[ZenFone 2 Android Development] chubby65:
In my case it was flashifly that caused my problem

I thought what the hell have I done but luckily for me I kept all my roms on usb stick and managed to flash rom through OTG using twrp
[ZenFone 2 Android Development] tasar:
I think so, fortunately i made a backup yesterday and so i can test the restrore function today :) Now every thing is ok. Iam happy, that we have now an functionally TWRP recovery. A big thanx to all, that make it possible!
[ZenFone 2 Android Development] stephtban:
I personally used rashr to flash recovery and had no problem rebooting. Strange indeed :confused:
[ZenFone 2 Android Development] jejemc:
Hi it and to follow the market to deliver basic recovery thank you.;)
[ZenFone 2 Android Development] TheSSJ:
I tested rashr too. Explanation is simple: it overwrote boot with the recovery.img xD

When i restored boot.img everything went back to normal...rashr could at least give the oportunity to select the partition to be flashed
[ZenFone 2 Android Development] stephtban:
It's really strange! I used it yesterday and everything went fine. Should i avoid to use it next time?
[ZenFone 2 Android Development] TheSSJ:
Maybe you use it right and we don't...don't worry :)

The ui could be improved a little I think,but it's not the end of the world
[ZenFone 2 Android Development] karmacoma7:
Definitely worked on my nexus 7 :)

Its very convenient, since my SD is full and internal ram is only 16gb.
[ZenFone 2 Android Development] 29y6145:
Iam flash FW full 2.15 for ZE551ml

edit updater script

Flashsing work fine

I will report if flash succeed

PS:

step 1 : Iam flash rom but mount failed

Step 2: iam power off device and reboot twrp again and flash fom , twrp mount system ok

But flash forever

hic hic

sorry E my bad
[ZenFone 2 Android Development] TheSSJ:
I don't want to interrupt this discussion (as it is really interesting), but I managed to fix all the main issues!

Doesn't the adbd binary get compiled with the recovery? That was the reason why there was no adb access :silly:

Also I reworked the entire boardconfig, now it is a little slower, but at least everything works now...
[ZenFone 2 Android Development] cangcan:
keep it up all of you developers! :D

anyway is there any limit on the file size that can be flashed on this temporary TWRP?

edit: BTW why dont you use latest version of TWRP instead 2.8.5.0?
[ZenFone 2 Android Development] TheSSJ:
Hi,

There is no restriction about flashing afaik. I backed up all of my partitions where data and system are both over 2gb. Flashing a zip with hundreds of mb shouldn't be a problem here :)

Bad luck I suppose :D I repo sync'ed on 25th May...one day later a new version comes up...will sync again today and use 2.8.6.0,thanks for the info
[ZenFone 2 Android Development] 29y6145:
Update 6-2 . good job. I will test
[ZenFone 2 Android Development] troy5890:
Wow from Alpha to beta that quick, man TheSSJ is doing a wonderful job!:D:thumbup:

Sent from my ZE550ML
[ZenFone 2 Android Development] TheSSJ:
Hi,

please use my Update 6-2b as the crypto support caused the backup operation to freeze, my last release works a charm again!

[MENTION=2472806]vampirefo[/MENTION]: If you included the TW_INCLUDE_CRYPTO into your boardconfig.mk, you should check if the backups run through successfully...
[ZenFone 2 Android Development] Harfainx:
Testing a backup now. Previous backup failed. Hopefully this goes well.

Edit: It does show a percent btw. It didn't even give me that in a previous build.
[ZenFone 2 Android Development] TheSSJ:
Worked for me now :)
[ZenFone 2 Android Development] vampirefo:
Backup and restore works great for me, I do get the error no boot.img found as my two Intel's boot.img can't be backed up and restored due to their design.

But system and data are backed up and restored pretty quickly for me.
[ZenFone 2 Android Development] Harfainx:
You wouldn't be able to make a recovery.img out of this would you? I'd greatly appreciate it. :fingers-crossed:

---------- Post added at 06:07 PM ---------- Previous post was at 06:07 PM ----------

Meant to tag [MENTION=2388665]TheSSJ[/MENTION] there
[ZenFone 2 Android Development] TheSSJ:
Of course I could, there would be just some entries in the boardconfig with some addresses (which I would extract with the abootimg tool). I would need to pack the whole bunch with a mkbootimg made for intel devices

As the bootloader is locked, what exactly would you expect out of this img? I assume flashing it would be fatal - in the best case you could still boot into the system, the worst case would be that the phone wouldn't boot at all (except into fastboot I think).

But if you still want I can build it for you :)
[ZenFone 2 Android Development] Harfainx:
I would appreciate it. Might want to pm me a link or attachment so people don't brick their phones.
[ZenFone 2 Android Development] updateing:
This commit may help increase the performance of pixelflinger. I don't have a ZF2 so I can't test that...
[ZenFone 2 Android Development] social-design-concepts:
yeah that fixed the lag really smooth now,

you need vendor/intel/hardware/apache-harmony and to add libenc to minui , minuitwrp , healthd Android.mk files

I'll upload in a little while, it's actually usable.
[ZenFone 2 Android Development] saifzahid:
wow TWRP for ZF2 , I ll try soon.

keep it up..:thumbup::thumbup::thumbup:
[ZenFone 2 Android Development] TheSSJ:
I would really like to include these changes into my local sources, but I have absolutely no clue on how to do that...when I try to execute the git fetch command (git fetch hxxp://review.cyanogenmod.org/CyanogenMod/android_system_core refs/changes/25/97125/1 && git cherry-pick FETCH_HEAD) it tells me

fatal: Not a git repository (or any of the parent directories)

Makes sense, I only used repo init & repo sync, so I don't know how there should be a .git folder in my sources...if anyone knows how to include such cherry picks I will of course include them

/EDIT: Finally found a useable guide: https://source.android.com/source/using-repo.html

Repo download did the trick pretty well...
[ZenFone 2 Android Development] social-design-concepts:
I used the command you provided you have to be in system/core to run it.

I ended not using that and went to the source the patches came from that person is summiting other peoples work , my issue was not adding libenc to system/core/health/Android.mk

Internet is down I'm going to upload all four themes when I get to work.
[ZenFone 2 Android Development] TheSSJ:
Geez, I cannot compile the recovery anymore...I added the reference to libenc to healthd, too, but it complains that make cannot find any rule to make libenc

/EDIT: Now I understood, that vendor/intel/apache-harmony holds the libenc module I need to refer to, but still I don't know how to trigger its compilation so that the other libs can use the shared module...
[ZenFone 2 Android Development] vampirefo:
Hopefully we can get this worked out, I am no where near a computer, just cell phone with horrible service.
[ZenFone 2 Android Development] social-design-concepts:
It doesn't seem to work if you add it arch specific add it to the shared / static lib lines directly

The libenc version you need is on my github it needs to export the header files ,

I fought with it for 2hours before I figured out the issue

still fighting issues with adb but I think I found a solution building a static linked mksh now. Can upload a test but adb won't work mtd works great though
[ZenFone 2 Android Development] TheSSJ:
Well, then have fun - new release supports USB-OTG!
[ZenFone 2 Android Development] quadeur06:
Hello guys i have problem...I make a backup of all my rom and i make a full wipe (but it don't work ) E: Unable to mount '/cache' ... My phonee is blocked in the logo "Asus" And now i can't restore :( The restoration is blocked to "16mb of 7855mb" :( Who have the solution please ??? Thank you so much:) he is blocked with " wiping cache...Formatting cache using make-ext4fs function." :(
[ZenFone 2 Android Development] TheSSJ:
What smartphone model do you have ZE550ML or 551ML? Cache wipe and restore works fine for me

Otherwise start your phone in fastboot and then give the following command:

fastboot erase cache

This will take a long time

Then boot into recovery and go into settings. There please activate "use rm -rf instead of make-ext4fs" and then try the restore again
[ZenFone 2 Android Development] quadeur06:
Thank :) i have a 551ml :) I make the fastboot erase cache and i activate use rm-rf instead of formatting and when i want restore i have " E/ Unable to mount 'data' :( why??

THANK FOR THE HELP!!:)
[ZenFone 2 Android Development] TheSSJ:
Something seriously messed up as it seems...

Then you need to be careful, boot into fastboot again and type (

this COULD wipe your internal SD card

):

fastboot erase data

Then reboot into recovery and let's hope it mounts everything again andyou can restore. Otherwise you will need to unbrick your phone: http://xdaforums.com/zenfone2/help/how-to-upgrade-cn-version-to-ww-t3101556
[ZenFone 2 Android Development] BOSSPDA:
supersu

Are you planning to introduce supersu in ramdisk, soon?
[ZenFone 2 Android Development] quadeur06:
No......... Now i have " E: Unable to mount /system" ..............

I will try with a fastboot erase system :)
[ZenFone 2 Android Development] TheSSJ:
So basically whatever happened screwed your whole partitions...I assume it should work to restore after the erase system command
[ZenFone 2 Android Development] quadeur06:
The backup work...But now my phone block on " Asus powered by android " ... And after he go on twrp..

I don't understand anything :( Why he make that???

I give up..

And same with the other tutorial..Who have the solution please..

I retry a backup...It work!! And after ..................it's work x))

THANK!!!!!!!:)
[ZenFone 2 Android Development] grorg:
Are you restore whole backup or just one partition. I've hade this issue on tmp twrp on v2.18 ROM when try ro restore whole backup.

After that I've flashed full ROM with fastboot but the problem has stayed. I wiped cache and data and phone became alive.
[ZenFone 2 Android Development] jejemc:
Hello that could make me a zip file to restore the original recovery? thank you ;)
[ZenFone 2 Android Development] quadeur06:
Now it's work...I don't understand but it's work :)
[ZenFone 2 Android Development] Mrinal Roy:
Awesome finally some development. Eagerly waiting for cm :)
[ZenFone 2 Android Development] quadeur06:
I create a experimental rom for this phone..But when i make a full wipe..The wipe block :( And after all my phone is blocked and i have a bootloop..Who have the solution for the full wipe please ?:) Because for the bootloop now i can resolve the problem :)
[ZenFone 2 Android Development] TheSSJ:
Any chance you can

adb pull /cache/recovery/last_log .

?

I did a full wipe (system,data,cache) and then a restore and everything works,so I need the recovery log somehow
[ZenFone 2 Android Development] quadeur06:
thank :) I will retry with a new version of my rom..And after if it's don't work i tell you :)
[ZenFone 2 Android Development] TheSSJ:
Can't confirm your problems though, cache wipe and restore works a charm and quick here
[ZenFone 2 Android Development] Harfainx:
Just fastboot flash the original recovery img from the version of the ROM that you're on.

If you're on 2.19, use this file:

https://drive.google.com/open?id=0B2OJIWJ3yAeBR2tIVHJsTTd0Uzg

---------- Post added at 02:48 PM ---------- Previous post was at 02:46 PM ----------

What did you change for your ROM? I have flashed a customized version of the full 2.19 ROM and it works fine for me.

Insecure boot, removed junk, cleaned up some stuff, and some other changes. :good:
[ZenFone 2 Android Development] quadeur06:
Yeah same for me :)