yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Android-Andi:
Still alive ketut? Haven't heard from you a while. Hope you're OK :) I also started to merge yesterday, but stopped after solveing some conflicts because I was out of time :p
[Android Software Development] danarama:
http://xdaforums.com/showthread.php?p=49484154

---------- Post added at 06:56 AM ---------- Previous post was at 06:55 AM ----------

No cm11?

---------- Post added at 06:57 AM ---------- Previous post was at 06:56 AM ----------

This is the development thread. Try asking in one of the device user threads
[Android Software Development] ketut.kumajaya:
I'm OK :good: Been busy for my real life, to keep my family alive :laugh:
[Android Software Development] danarama:
@ those of you who added the philz repo to your local repo files so it updates when you repo sync, curious how you're looking at cherry-picking the vold commit for f2fs

[MENTION=2910818]PonsAsinorem[/MENTION] [MENTION=4675598]shoey63[/MENTION]

Also, does anyone know how we can easily confirm that our f2fs build actually formats to f2fs?

...and what does a Nandroid restore from an ext4 backup do to f2fs if restored on it?
[Android Software Development] Phil3759:
Just git clone my vold repo. It is latest cm with needed fixes
[Android Software Development] danarama:
I suppose that would be easy enough ;)
[Android Software Development] Phil3759:
Great

I tried f2fs code on my S4 but not inside a rom (should'nt matter).

Only bug is adb shell mount (busybox). But i suppose it is either related to my kernel changes (a rough merge from falcon with fingers crossed) or to missing /etc/fstab entry. Will look into it later
[Android Software Development] Phil3759:
6.42.5 (30.05.2014)
[Android Software Development] Phil3759:
6.42.7 (30.05.2014)

relax, I am done :D
[Android Software Development] DSA:
I finally got a job and start Monday...as soon as I get paid you are getting a donation dude. The work you have put into this is amazing. nuff said
[Android Software Development] georgytay:
Picture doesnt work. Can you add it again? Please.

Thanks!.)
[Android Software Development] ketut.kumajaya:
[MENTION=4666971]Phil3759[/MENTION] Thanks for simply my codes but for ext4/f2fs formatting routine I prefer my initial codes https://github.com/kumajaya/philz_touch_cwm6/commit/d80b4041e557d99973d0664b7b9aced18dcfe35c . I believe, your routine much safer for ordinary user, any further explanation?
[Android Software Development] lambstone:
Nope. It's a chinese device with an X86 processor. So there's no CM for it, no kernel sources. For other tablets with the same situation of no CM and no sources, some people managed to build CWM and TWRP.

So I think there is a way to do so.

I can extract the mount points and stuff from the boot.img but as for building it from your repo, I haven't got much more ideas
[Android Software Development] danarama:
Its not my repo :)

How do they build CWM? Usually they build CWM from CM11, then just replace CWM folders with Philz folders. So step 1, find out how they CWM build.
[Android Software Development] lambstone:
Would this be of any use?

http://xda-university.com/as-a-developer/porting-clockworkmod-recovery-to-a-new-device.

Seems like all I need is to extract the boot.img from my device.
[Android Software Development] danarama:
Yeah maybe. I've never ported myself so I'm hardly an authority on that...

Sounds like a start though. If thats what the guys who got cwm working on your device did.
[Android Software Development] Phil3759:
Yes, it is exactly for that: more friendly for common users

Else, whenever they want to format a device, they get the nag and some confusion with it

Also, even advanced users would make the conversion once maybe. After that, they expect to format to default value. So, no need to nag every time for f2fs vs ext4

And, thanks to you for the code and work you did on f2fs support. I just never found time until now to look closer at it

I could fix the mount bug also. The conversion is now really smooth and working.
[Android Software Development] Phil3759:
6.42.9 (30.05.2014) - Final and stable

After deeper testing, I am unsure busybox tar new version is working as expected

I decided to revert to libtar, which is 100% working as expected
[Android Software Development] iron@ss:
Been checking the Goo.im download section for 6 hours and still cannot see this latest version. Is there are mirror available for it please?

Forget the above. Just noticed 6.42.9
[Android Software Development] Phil3759:
6.43.0 (30.05.2014)

I just spotted an annoying bug present since early cwm version...
[Android Software Development] Le Ch@land:
Hi Phil3759,

I own a Galaxy Note 3 SM-N9005 lte and i am just a bit curious. :confused:

Maybe a noob question, but, when i repack a whole rom by remplacing the stock recovery one with your's in .tar.md5 file, the recovery seems unable to install the CSC files when rebooting just after flashing with Pc ODIN as the stock recovery can and do.

It seems the installation process is launched but nothing appends.

Maybe it is normal.

Anyway, thanks for your work. :good:
[Android Software Development] danarama:
Sorry this is going to sound really noob....

So I've compiled with a test kernel with f2fs support. I have the toggle to enable ext4 <>F2fs conversion....

But what are the actual steps to convert? Toggle on conversion, then format /data?
[Android Software Development] Phil3759:
yes, just that

It will add a prompt to mounts and storage format entries
[Android Software Development] danarama:
Sorry, what do you mean a prompt?

Only change in my build is this toggle. When I format data as I usually would, I don't get any prompt. Also I believe data is still ext 4
[Android Software Development] Phil3759:
because you cannot convert a file system without a full real wipe!

format /data and /data/media
[Android Software Development] danarama:
Oh so we wipe sdcard too.... Ok
[Android Software Development] Phil3759:
formatting is done on a partition

You can always backup /data/media to USB OTG using PhilZ or to PC using MTP

I advise PhilZ because MTP skips many files

There are also some adb backup solutions that use tar. However, I am not sure about their tar implementation and selinux

In PhilZ Touch, backup of /data/media is proper
[Android Software Development] jurben:
It seems default to BBTAR?

I mean:

On version 6.41.6: if we define nothing then libtar will be used. If we define BOARD_RECOVERY_USE_BBTAR then bbtar will be used.

On version 6.43.0: if we define nothing then bbtar will be used. If we define BOARD_RECOVERY_USE_LIBTAR then libtar will be used.

Or am i wrong?
[Android Software Development] Phil3759:
Exactly

You can check my comments on gerrit. Official cwm and busybox seem flawed for some reason. With 6.43.0, backup intevrity has never been so perfect!
[Android Software Development] Phil3759:
sd-ext support was broken since vold was introduced, by end of life of cm-10.2, that is near a year now maybe

I never tested it again since that

You can try to setup sdcard in your fstab with old legacy paths instead of vold virtual path. Do not put the voldmanaged flag as i doubt vold would support it.

Normally, you'll get sd-ext back
[Android Software Development] Android-Andi:
[MENTION=2872010]rootSU[/MENTION] not tried on Phil's way, but using ketut's solution.

1. Make a custom backup

2. Format the partition to f2fs

3. Custom restore the backup

If you flash a Rom.zip it will automaticaly format and f2fs gone.

Gesendet von meinem GT-I8190 mit Tapatalk
[Android Software Development] Phil3759:
This issue is caused by the buggy binary update. I patched cwm to be able to format partitions. In original cwm, it will corrupt your phone when you format
[Android Software Development] Theshawty:
Ah, so the problem now actually lies within CM?
[Android Software Development] chrcol:
I just tried this.

It has a screen dim timeout and screen off timeout.

I assumed the screen timeout the phone would stay on but in idle/sleep mode like when in android.

However the phone actually turned off I had to power it back on, is this supposed to happen?
[Android Software Development] Phil3759:
Happens only if you keep it above 60mn
[Android Software Development] freebee269:
hi phil, first want to say this is a very nice edition of cwm you have done. i have some twrp backups that are data only with no md5 (unchecked md5 in twrp options when i made the backups). when i try to restore the backups with your cwm about 20% of the way during restore it errors out. i have 3 different twrp backups and all of them error out. do you have any suggestion on what i can do? could it be because they have no md5? i have an at&t galaxy s4 using the loki version.
[Android Software Development] Phil3759:
post a log
[Android Software Development] Phil3759:
- S3 AT&T (d2att) - Unofficial port credits to [MENTION=3212538]blackwing182[/MENTION]
[Android Software Development] Phil3759:
5.07.0 (20.06.2013)

I will try to update all phones to latest version as there were some annoying (non fatal) bugs introduced by v5.06.5 and because of the new minor features/fixes

I am being very busy with real life and my next big target on the todo list is dual boot which seems tricky. So, still no new devices support planned except requests fully filling previous post criteria (read a little on previous pages to know them or the dev post in page 1)
[Android Software Development] freebee269:
not having md5 was the problem. i was able to regenerate md5 for all the twrp backups then used your cwm to restore them without an error. thanks.
[Android Software Development] ztotherad:
phone request

Verizon Wireless Samsung Galaxy Note II (i605/t0ltevzw):

I'm not sure if you want the original boot.img/recovery.img or the ones that were built with cyanogenmod 10.1, so here are the ones that I built with just moving your bootable/recovery folder and replacing cm's original one.

Hope these are what you needed! thanks!
[Android Software Development] Phil3759:
All devices updated to 5.07.1

Check download folder for your device
[Android Software Development] Phil3759:
5.07.1: i9100G support

- i9100G - credits to [MENTION=4576707]Ryuinferno[/MENTION] for the port
[Android Software Development] MrHomebrew:
I do not see the updated version for my device, I thought it was out?
[Android Software Development] sholsten:
The AT&T SGH-I337 variant isn't updated either.
[Android Software Development] MrHomebrew:
I'm on Rogers Canadian version. I just found the I9505 version of the new one and its working fine :)

Only issue is I can not mount my 64Gb external SD card.
[Android Software Development] Phil3759:
Galaxy S4 US variants update was removed to fix exfat
[Android Software Development] Ryuinferno:
Thanks to you too! My kernel users are crazy about your recovery...:P
[Android Software Development] Phil3759:
Thank you for having ported the open source version. Makes things easier
[Android Software Development] ElRongMcBong:
The following problem a 64Gb SanDisk.Hatte it at that time over Linux in a special FAT32 copied, since Recovery they did not mounten in the work formatting could/wanted. Now I formatted the map straight over android (omega v7.0) and now can the map already again in the Recovery not gemounted become.

HP: Have the current felt touch before 10min. gedownloadet, but the problem exists further… which can I do?

On Samsung s4 (i9505)
[Android Software Development] dragon36:
Verizon Galaxy S3

Wondering if anyone could give me a couple hints as to how to compile this or add support for the Verizon galaxy s3.. im pretty good at compiling my own nighty's was just curious as to how to add this and get it to compile for the d2vzw as i use it on my galaxy tab2 and love it
[Android Software Development] danarama:
This didn't work for me. Am I only formatting /data?

I did custom backup, flash f2fs kernel. Toggle enable conversion, format data...
[Android Software Development] Phil3759:
I already answered you

Do you really think you can only format a few folders in a partition!!
[Android Software Development] danarama:
Yes I know you did. I was advising Android-andi that I had already tried what he suggested yesterday and it didn't work for me, which was what lead to me posting here yesterday.

However, he did say Reflashing Rom will reformat to ext 4. So I am asking him in his suggestion if he is also formatting /system or just /data

You misunderstand me!
[Android Software Development] Android-Andi:
/system , /data and /data/media

Gesendet von meinem GT-I8190 mit Tapatalk
[Android Software Development] danarama:
Ok thanks. So one more question, do you already have an f2fs enabled kernel flashed into the ROM at that point?

I'm trying to work out the exact steps on my device, so I can confirm whether the f2fs kernel I compiled in will work - but its proving a challenge switching between the kernels (In Android) as the f2fs kernel doesn't work in Android if the partitions are all ext4... Im not even sure if that is normal.
[Android Software Development] Phil3759:
1- you cannot convert /data without wiping sdcard

2- if rom installer formats /data using edify script, sdcard is preserved and format type unchanged

3- if it uses a shell script, you can edit it with your preferred fs type
[Android Software Development] Phil3759:
You can play with /cache

If you can mount it after you format it to f2fs, then it is fine
[Android Software Development] danarama:
Thats a good point.

I'm getting a little frustrated :(
[Android Software Development] Phil3759:
Np

All my tests were done on /cache and an usb drive with otg

That way you do not mess your data during debugging
[Android Software Development] danarama:
Yeah I would have done that but I only have a 8GB Stick :(

The main source of frustration is the Android kernel part. I'll get there eventually. It's just a case of mapping out the process correctly.
[Android Software Development] Android-Andi:
[MENTION=2872010]rootSU[/MENTION] maybe [MENTION=4021423]ketut.kumajaya[/MENTION] can tell you how he managed it.

Gesendet von meinem GT-I8190 mit Tapatalk
[Android Software Development] Phil3759:
Use a prebuilt
[Android Software Development] danarama:
Ah sorry, me not being clear again,

I used a prebuilt. Recovery compiled fine etc... I mean using a kernel in Android to get f2fs working there. Because i keep getting a decryption password request. It doesnt seem to support EXT4 AND F2FS... Its just a bit annoying.
[Android Software Development] ketut.kumajaya:
[MENTION=2872010]rootSU[/MENTION] As Phil3759 said you can play with /cache but to prevent nanroid restore reformat it, please check https://github.com/kumajaya/philz_touch_cwm6/blob/cm-11.0/nandroid.c#L983-L988

[MENTION=4666971]Phil3759[/MENTION] Previously I used recursive delete for /system and /cache: https://github.com/kumajaya/philz_touch_cwm6/commit/c291beaba456c74fe0b5a341f2b1b9a247a6ab24 , less ENABLE_BLACKHAWK_PATCH ifdef means better ;)
[Android Software Development] danarama:
I'm having some huge issues here...

Here is what I have done:

To start fresh:

Rebooted, ensured toggle was disabled.

Formatted everything (system, data, data & data media, cache) using normal options (btw it did not create /media or /media/0 - is this normal? I created using mkdir via adb)

Reset sdcard location back to /data/media/0

Reboot

adb push clockworkmod /sdcard/clockworkmod

Wipe data for clean install

Remove logs

reboot recovery

At this point my phone has no ROM, no /sdcard data except the clockworkmod directory, everything formatted to default ext4

First test - formatting everything to f2fs

toggle f2fs <-> ext4 migration = ext4 <-> f2fs conversion enabled

format /cache > f2fs > Yes - format device = Done formatting /cache (f2fs)

adb shell mkdir /cache/recovery

format /system > f2fs > Yes - format device = Done formatting /system (f2fs)

format /data and /data/media (/sdcard) > f2fs > Yes - format device = Done formatting /data (f2fs)

Reboot recovery

step01 logs generated (see attached)

Highlights from step01 logs (see data)

0 /system f2fs /dev/block/platform/msm_sdcc.1/by-name/system 0
1 /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata 0
2 /cache f2fs /dev/block/platform/msm_sdcc.1/by-name/cache 0

Other info:

format /data and /data/media (/sdcard) does not delete files on /data/media/0

Second test - restoring backup of /system

remove logs

Custom restore (/system only) = Can't mount /system!

Mounts and Storage > Mount /system = Error mounting /system!

step02 logs generated (see attached)

Any help appreciated. My main concerns:

It appears format of /data/media doesn't touch /data/media/0 directories (surely they should be removed?)

/data appears to remain in ext4 format

unable to mount /system (which is f2fs) when restoring backup (fyi, it will mount immediately after the format to f2fs, but the restore breaks it)

Should a normal format of /data and /data media (with toggle disabled) actually remove /media?

Let me know if you need to see fstab or anything please, or if I can provide any more information. I have formatted everything using the prompt > ext4 option and restored my backup, but I wont copy sdcard data back just yet...
[Android Software Development] Phil3759:
I will look at it [emoji106]
[Android Software Development] danarama:
Thanks...

A bit of further information that is maybe related...

After I reset my phone back to normal, I flashed the Android version of the prebuilt kernel I used in recovery into my ROM. Booted and I got the decrypt password option (which proves that it will not support ext4 formatting).

I rebooted back into recovery, wiped data and formatted /data and /data/media to f2fs. I rebooted Android and was faced with the set up wizard. This means /data was successfully identified as f2fs I think, however, my /data partition only showed up as 128 MB and was pretty full so I couldn't do any other troubleshooting.

I formatted data and data/media with toggle off again to restore. So juts to confirm if the toggle is disabled, format data and /data/media does clean the /sdcard, but with the toggle on, whether I choose default, ext4 or f2fs, the /sdcard data is left untouched and the partition of /data always shows as ext4 in recovery logs
[Android Software Development] Phil3759:
I found the bug source :good:

I will fix asap
[Android Software Development] danarama:
You know I love you, right? ;)

Edit I was slightly wrong above. Format f2fs and ext4 with toggle enabled doesnt clean sdcard but format default with toggle enabled I think does.
[Android Software Development] johnnyslt:
I found a way to mount sd-ext !

I added this to fstab:

[B]/dev/block/vold/179:66 /sd-ext ext4 rw defaults[/B]

Maybe someone else will be interested :)
[Android Software Development] danarama:
On My s3, when I was writing a script to mount /sdcard (/data/media/0) directories on /external_sd (microsd card) I found that between different roms etc, the vold/179:x changed between roms.
[Android Software Development] Phil3759:
Did you try:

/dev/block/mmcblk1p2 /sd-ext ext4 rw defaults
[Android Software Development] ali.filth:
Hi Phil3759, thanks for your update.

sorry off topic..

I hope next if you have more time please look into my problem about AROMA file manager were inverted on some LG devices .. for me or some users this is a useful feature found on philz .. and I hope you don't think this is not a priority..

I know..this is a simple problem..but..can you make simple way, maybe you just write some code and we just added a flag like : "TARGET_AROMA_FLIPE_SCREEN := true" ??? :p it will be better :)

Send from my Pager using xda-developers app
[Android Software Development] Phil3759:
Aroma has nothing to do with recovery. It uses its own code, touch engine, gui code...

It is Aroma sources that need to be fixed or you manage to find a fix in your kernel driver to flip display as some developers did for some galaxy pads
[Android Software Development] ali.filth:
Hemm..ok..will try and try again.. :)

Thanks

Send from my Pager using xda-developers app
[Android Software Development] johnnyslt:
Yeah that works too, I'll use it this way.

Thanks !
[Android Software Development] Phil3759:
thanks for the feedback

I will restore use of sd-ext in my recoveries now that I know it works :good:
[Android Software Development] Phil3759:
6.43.3 (31.05.2014)

How to convert between f2fs <-> ext4 format type

Most f2fs parts of the code were adapted from

[MENTION=4021423]ketut.kumajaya[/MENTION]

Huge credits to him :good:
[Android Software Development] danarama:
Updating repo now ;&
[Android Software Development] Phil3759:
yeh, let me know if the formatting and data migration do work now
[Android Software Development] danarama:
I shall indeed. Thanks for your dedication :)
[Android Software Development] danarama:
Formatting /data and /data/media works as expected in that it deletes all sdcard data. I still had to manually create 0 with mkdir though afterwards.

The data migration seems to work great. Restored my ext4 backup to f2fs and it remained f2fs

formatted /system as f2fs but couldnt boot. Perhaps this is kernel related. Not sure f2fs on system is much use anyway

formatted /cache as f2fs but lost IMEI, baseband, time daemon etc. This is common on the N5 with a bad cache format - again could be kernel related and not sure cache as f2fs holds much use either

Am I right in thinking, if migration is disabled, format will format whatever fs is currently formatted on a partition? and that if enabled, "default" does the same also?

I'm going to upload the recovery.img as a test build. Looking good....
[Android Software Development] MarJar:
Hi [MENTION=1390705]Phil37[/MENTION]95, it's possible make the recovery for the Samsung S3 Neo (gt-i9300i)

Enviado desde mi GT-I9300I mediante Tapatalk
[Android Software Development] ketut.kumajaya:
Yes, normal boot filesystem manager not as smart as this recovery :) I did a lot of dirty trick and hack to adapt both ext4 and f2fs for Tab 2 and 3 :(
[Android Software Development] cr0wnest:
Why cant odin view and add zip files anymore? I never did anything to Odin.
[Android Software Development] Phil3759:
Yes, normal format will keep actual fstype
[Android Software Development] kronikings:
Phil3759: I just installed philz recovery on hltevzw but when i try to restore backups I get md5 mismatch, i disabled md5 and it isn't finding my backups...

my backups are in mnt/shell/emulated/clockworkmod/backup

but I don't see an option to restore backups from that location within recovery..
[Android Software Development] Phil3759:
6.43.4 (01.06.2014)

Small graphics bug fix
[Android Software Development] Phil3759:
[MENTION=2872010]rootSU[/MENTION] and [MENTION=4021423]ketut.kumajaya[/MENTION]

About f2fs:

- for now, the conversion is only supported for ext4/f2fs. Some old legacy devices use ext2/ext3 or rfs. They will need code modification to allow migration.

- for that same reason, I think limiting the nandroid data restore migration to ext4 and f2fs is a good idea for now. Maybe in the future we could add a timeout prompt when fstype differs to inform about migration or any other idea

- about partitions allowed to migrate, as it depends on custom kernels anyway, I do not think we should limit it. Also, original [MENTION=4021423]ketut.kumajaya[/MENTION] code won't permit nandroid migration for /data on non data/media devices

- rm - rf is a bad idea as it cannot fix some ext4 corruption causing issues

Please let me know about any other bugs or ideas about this f2fs implementation
[Android Software Development] cr0wnest:
I get an error flashing this on stock recovery on a Note 3. It gives me a verification failed error and nothing gets flashed other than CSC code getting applied. My device is already rooted via CF Root

EDIT: nevermind used the .tar.md5 format instead, stupid me :P
[Android Software Development] Phil3759:
Galaxy S2 users:

I added a version including kernel modules to fix wifi/3g

Please report if it is ok
[Android Software Development] kronikings:
Hey buddy, I can't restore backups, i get md5 mismatch and when i disable md5 it doesn't find the backup. Any ideas?

I've searched and searched...