yashsingh1/xdaforums huggingface dataset:
[HD2 Android Q&A, Help & Troubleshooting and Genera] duhhh:
yes

can I just put all files from Nilfs2.zip to rom and then flash it

is there any other way to clean this sh%@
[HD2 Android Q&A, Help & Troubleshooting and Genera] gazzacbr:
did you get an answer?

you need to tell mount the type of file system, what you are mounting and where

check that /dev/sdb2 is correct

then you can

mkdir /nilfs (the name of your mountable folder)

then

mkfs -t nilfs2 /dev/sdb2 /nilfs

maybe need to chmod 777 of /nilfs if you want to write as normal user
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
Haven't you forgotten about the script: /system/etc/init.d/04nilfs?

If yes then create it with these lines:

#!/system/bin/sh
/system/xbin/nilfs_cleanerd

Then "chmod +x" the file.

The notion to HypoTurtle, PLEASE write about above mentioned more vividly in the second post of yours

! ;)

First of all check whether nilfs_cleanerd is running.

You can use one of task managers many system tools from the market have in their packages.

However, the simplest and most reliable way is to run terminal and into it:

$ su
# ps

Then look through output if nilfs_cleanerd is on a list. If you don't want to see the whole list but just nilfs_cleanerd itself (or nothing if it's not running) then put in terminal this command:

# ps |grep nilfs_cleanerd

or just e.g.: 'ps |grep nil' etc... (hardly part of the searched word to somehow filter output list)

Anyways, worth to mention, nilfs_cleanerd doesn't start to clean at once, it depends on settings in nilfs_cleanerd.cfg in what conditions it jumps into action. In fact this stuff which fills the partition might turn out to be usefull so nilfs_cleanerd tries to keep it until more space is really needed for the user.

If you want to see always free space inferred from just simple addition/substraction (of partition's content and volume) then set the parameter min_clean_segments	to 0 in your nilfs_cleanerd.cfg

# 0 = continuous cleaning
# > 0 = pause cleaning until less segments are available
min_clean_segments	0

Besides perhaps this delaying with cleaning has it's meaning, e.g. it saves SD card in terms of wearing off(?), correct me if it's wrong...
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Thanks for this, was waiting for this kind of post, going through the list:

The init.d script should be included in the Nilfs2.zip.

Had some issues trying to chmod +x (fixed I think by changing/adding the $PATH to /system/xbin), but isn't this the same as chmod 777 (rwx.rwx.rwx) or 755 (rwx,r-x,r-x)?

I've had ps -a work one minute and report as an unknown command the next; does ps -w do the same thing?

Can't really say much in terms of the .conf, nilfs2 is new to me so can't say anything with any knowledge.

We could look into changing the .conf in terms of protection period (default being 30 mins).

Haven't got the cleaner to run on all systems (yet) will try after a fresh install

Some of the things above I think maybe due to kernel issues, (between JB, ICS and GB kernels) and/or busybox version.
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
It needs just "ps |grep nilfs", appologies!

(In a while I'll correct this in my post)

ps -a was necessary on PC linux, where many user accounts are created...

---------- Post added at 10:33 PM ---------- Previous post was at 09:58 PM ----------

BTW please, somebody tell me where is this 4EXT recovery which supports NILFS and even 2 SD-ext partitons?

This about which Xylo has mentioned.

It'd be so helpful to avoid flashing by oneself sequentially all recoveries from the folders and trying if they saw the partiton!
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
#1 under ROM Installation - it's the modified 4ext one look in the test folder
[HD2 Android Q&A, Help & Troubleshooting and Genera] gazzacbr:
i think so, the continual garbage cleaning is wearing the SD. i think it should be run as a minimum triggered by low free space.

also, wont the clearerd itself reduce performance by running anyway?
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
So, how do you propose to tune up the nilfs_cleanerd.cfg?

Other thing: why isn't this garbage filling/cleaning transparent to space reporting tools (like e.g. 'df -h')?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Not sure if this requires a new thread, should have bagged more reserved posts on page 1, but have a new installation method using mmcblk0p3, have incorporated the binaries, init.d and conf into the installation. Although I'll need some clarifying of the permissions required for .conf (current set to 1000, 1000, 0644 the same as some other .conf files).

Attached is the adapted files for PA (working from 2.13b)

Instruction from post one stand, with a few adjustments: install.sh should be edited and saved as installext2.sh and saved in the same folder as install.sh;

init (within initrd) should be modded and saved into /kernel/bootsdext2/;

ROM name should be changed in init and installext2.sh

and any references to mmcblk0p2 (in modified init / installext2.sh) should be mmcblk0p3

Have #2 now (thanks, poyensa) so will update stuff there
[HD2 Android Q&A, Help & Troubleshooting and Genera] poyensa:
that is solved ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
New Installation method for All

Will need to confirm, but see attached ...

will update post #1 in due course.

edit. seems legit, any takers??

hopefully this was the only issue for some people and we can get some tests with lower class cards, again it seems that nilfs2 partition can only be made on a linux(ish) system, and if your using a rooted android rom then a linux(ish) system is what you've got.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Dhruna:
Can I use attached .zip for making the native sd version of PA 1.5b ?

Thanks.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Not really, more for use with ROMs that've already been adapted to NativeSD. You should follow the instructions here, that being said if you modify the instructions so that it reads mmcblk0p3 instead of mmcblk0p2 then you can use the zip to install into a third partition on the sdcard, which may be safer for test purposes.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Dhruna:
You mean that I have to follow the all the steps that the above thread has, in that there are few last steps that need linux for that i have to install linux and then try.

Thank you for your response.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
More or less yes, although there shouldn't be a need to use linux, you can use cygwin and dxixda kitchen, see here. Or you can simply edit the initrd.gz on device

#cd /INITRD/work
gunzip -c ../initrd.gz | cpio -i

find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
[HD2 Android Q&A, Help & Troubleshooting and Genera] Dhruna:
Thank you, Will try.
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
Yes it is simple and good idea but I prefer to do it on my linux laptop. BTW Is this "export" command really necessary?

P.S. Would it be worth including this functionality in your install script?

P.S.2. You complain there are no many takers... So I need tell you since moved everything on NILFS I can't see any point of having even any spare Ext4 partition. The one with NILFS curently supports 2 ROMs (BBCM7 & PA) which run pretty well and fast on Kingston class4 so far.

So what should be done at this stage, everything sould be now summarised concisely in some sort od HOW2 and what seems the most urgent now is incorporating the newst NILFS drivers into the kernel...
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
The export command runs automatically through terminal emulator,I think it is necessary so that the Path to the bin folder is set. Not 100% but I don't think android remembers where path is set to so need to entered each time, unlike Ubuntu/Linux.

If you mean, have it so that the installer formats the partition before installing, I might look into it but would rather have one master installer (i.e NAND_ANY_ANY from #2), and I'd need to find a way so that it doesn't repartition the nilfs2 partition before every installation. Having the installer with 2 partitions will also allow people to install to the first one (ext4) with an android rom and bins to create a nilfs2 partition, thus making the filesystem accessible to all (WP7.5, WM6.5+, users etc.) . And it should be useful for testing new ROM versions. (You don't need to use ext4 by the way, could be Nilfs2/Nilfs2; just need to put up some mmcblk0p3 initrd.gz's and install.sh's)

Can you confirm that the cleaner is working for you? And if so the exact permissions and locations for each file. Don't want to say it's done until this can be easily reproduced. And wouldn't mind an on device nilfs2 partition creation confirmation if your up for it; (I'll admit it was a fluke getting it to work).

And I wouldn't say I was complaining about there not being any takers, was just making sure that readers knew that the partition can be made on device; that being said 1500+ thread views, a dozen or so downloads and very little in terms of user reports or help in optimising it.

I have compiled kernels before but wouldn't know how to patch them / where to get the patches from, any help in this regard would be good.
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
Has WP7.5 any requirements to posses 3 partitions maybe?

So, do you mean first to install "normally" on Ext4 just for the purpose of (already having this installation) to format mmcblk0p3 as NILFS?

Hmm, why would anybody need have 2 NILFS partitions? ;)

Yes, it's working. Initialy you could doubt it as the free space reported by various tools (e.g. by 'df -h') kept getting increasingly narrower until certain level (perhaps ~10%). Then it didn't diminish any further or even slightly increased, even if I copied the whole BBCM7's folder as backup. So apparently "something" kept free space under control.

However why the reporting tools like 'df -h' are fooled by nilfs_cleanerd temporaries? It should be transparent for a user, shouldn't it? You may judge only by summing up all folders sizes given the present functionality...

all nilfs binaries are at xbin and set -rwxr-xr-x (so is /etc/init.d/04_nilfs either)

/etc/nilfs_cleanerd.conf has -rw-r--r-- perimitions

Please, another issue, as you can see the latest PA zip has 3 folders /boot* with initrd.gz. To which should NILFS-modded initrd.gz be copied?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Not sure what your asking about WP7.5, and yes for people without access to linux as a simple way to create it. If you could test it, by shrinking/moving your nilfs2 partition and creating a small ext4 one then format the ext4 while running of the nilfs2.

so thats 755 and 644, will have a look at what I've set in the installer (from #2), have

edit, so had those perms already with installer,

set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(1000, 1000, 0644, "/system/etc/nilfs_cleanerd.conf");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");

have added

set_perm(0, 0, 0777, "/system/etc/init.d/04nilfs");

to give it the same permissions as 97ppp

will change the installer on #2

should be bootsd, bootnand puts an initrd and zImage into NativeSD folder to boot NAND PA (although I don't think it works as yet.), and boot is whats installed to the nand boot partition.

you should be able to use the installer (NAND_ANY_ANY) from #2 to install it, just copy it over the PA nativeSD zip, and put the nilfs2 mmcblk0p2 initrd.gz into the /kernel/bootsd folder
[HD2 Android Q&A, Help & Troubleshooting and Genera] jerrysue:
Hi HypoTurtle,I've tyied your files of PA2.13b but failed to install. I just have a FAT32 and a nilfs partation, perhaps need to change your install.sh file. Right?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Which files are you using?

For the moment you need to download

The original ROM

The altered installer

The altered initrd.gz

Then copy the altered installer files (META-INF, kernel, system) over the ROM

And replace the initrd.gz in kernel/bootsd with the one altered one

Then flash selecting to install to the second partition (mmcblk0p2)

The install.sh from the altered installer uses 'mount -t auto' which works for me but if it doesn't for you then change it to 'mount -t nilfs2'
[HD2 Android Q&A, Help & Troubleshooting and Genera] Dhruna:
Can any one has the same set of files for PA1.5b specially installer and initrd.gz ?

Please share it.

Thanks.
[HD2 Android Q&A, Help & Troubleshooting and Genera] jerrysue:
Thanks for your reply.

I did everything as you said and copied install.sh from the altered install file to the root dircetory of the ROM. Now it runs OK.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Dhruna:
Can we use the ext2fsd tool for rom installation in windows machine?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Personally would wait until Xylo posts the ext4 version, but you could try to work with what we've got - no guarantees but:

Take the installer (NAND_ANY_ANY) from #2, cm9ight initrd.gz from post #3 (uploading now), and PA1.5 zip.

Change ROM_NAME to CM9ight in /kernel/install.sh within the installer zip (from PA), and copy the system folder from the PA zip into the installer and flash via recovery, choosing to install to mmcblk0p2.

If you mean the install.sh from the same zip as the initrd.gz then no that wasn't needed and not used, the one in /kernel/ (in the installer zip) is what is run. Any reports?

Not to install, think this sort of thing was mentioned towards the start of the NativeSD thread, before using an SD recovery was suggested. it can't be done due to symlinks and things which are made during installation.
[HD2 Android Q&A, Help & Troubleshooting and Genera] jerrysue:
I tried PA2.15,the install script file should be /kernal/install.sh.
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
Please, I'd suggest to keep some reservations towards these benchmarks.

I have used NativeSD ROMs on NILFS for 2 months already and my user experience shows somewhat different story!

To describe the speed in short: NILFS@class4 > Ext4@class10 :)

YES, indeed, ROMs on Ext partition with NILFS filesystem on cheaper class4 SD card perform way better than on class10 SD card formatted with Ext4 filesystem!

There must be something untrue about these benchmarks, and this is not the first time we got hints we should not trust them so ultimately. For instance, now reading the thread of a little different topic I've just come across the other reports casting doubts on value of such benchmarks, please compare how many people here diminish authenticity of benchmark results after applying their mods! The first quote of the series to mention:

"I'm trying it now on Tytung V2.7 and seems to works very well.!! this trick can show the limit of benchmarking system (they will give you low score respect the new general smoothness)"
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
I agree completely in terms of the benchmarks, in terms of speed I see no difference (although I did point out that from what I've read it could be good for lower class/quality cards), however I also saw no difference between nand and normal sd ROM, so maybe it's just me.

My phone needs some repair (flex-board I think) so can't test stuff, but plan to have it so that all that is required to change from ext4 to a nilfs2 installation (and/or f2fs once it gets of the ground) is a change to install.sh, (with initrd.gz being changed on the fly). Not sure if nilfs2 partition can be made via the installer (would probably need a modified recovery), but can try.

On a side note, I did have all the ROMs mentioned on the first page and they ran well, however if you look at them there are different kernels being used, and looking at /proc/filesystems some of them don't seem to have nilfs2 support?!? Not sure what going on here, but might explain why the cleaner wasn't working for me on some roms, suprised the rom ran at all.

And while you've mentioned that thread (not sure if your using the mod but:) - isn't Disable CPU the same as Force GPU? which is an option in developer settings in at least JB (and ICS)?
[HD2 Android Q&A, Help & Troubleshooting and Genera] jerrysue:
Hi HypoTurtle, I tried PA1.5 but failed because can't mount partition. Maybe the install script is wrong. I'll try again.
[HD2 Android Q&A, Help & Troubleshooting and Genera] ictimai:
Wow, the new filesystem really sounds good! However just to format a partition is too little to use it, isn't it? Speciffically, is f2fs already incorporated into the kernel?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Formatting is just about all we have at the moment, and marc1706 added f2fs on the bequest of Xylograph and securecrt and Xylograph moved to using mount auto instead of mount ext4 in preparation for when it goes mainstream.

Can't test anything at the moment (phone not working and misplaced), but should have a universal installer posted soon using the different modified method in the NativeSD thread.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Have added zip here that should modify any current NativeSD to work with nilfs2, still can't test so would appreciate reports if the rom installs, (will add in the binaries at some point).
[HD2 Android Q&A, Help & Troubleshooting and Genera] jerrysue:
Hi, I tried your zip to change PACman_leo_v1.1_div3 from ext4 to nilfs2. This is what I did:

1. copy NativeSD to NativeSD rom file.

2. edit the updater-script.

3. change rom name in romname.sh. Here mine is PAC

4. install the rom.

The installation finished successfully but can't boot. It frose when boot in NativeSD. After tyied HyperDroid_6.1.0_TTE_SeaderR9_NativeSD, I got the same result.

After back to WM6.5, I found the file size of initrd is only 164kb. Maybe there is something wrong in script.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Thanks for testing can you attach the initrd. That size seems about right, as we're working with the nand ramdisk which is smaller than the current NativeSD one (which is based on the old SD rom ramdisks).

Thanks Robbie P, I'll take a look, have attached a slightly altered nativesd.sh (remove the .txt) it also won't boot but should help with finding the problem. If you could use it and again attach the initrd.gz
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Hi HypoTurtle, i have the same as jerrysue, hangs on black htc screen.

i did not do jerrysue's step 3 so tried again after changing it.

have attached 2 dmesgs before and after change, and initrd.gz from nativesd folder

Edit; btw pacman 1.1
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
That initrd.gz seems to be the one that was in NativeSD prior to installing the ROM and the resulting non-booting is due to the kernel being changed, could you try clearing the root of the NativeSD folder on the sd card and trying again
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
ok, or do you want it from sdcard/nativesd/pac?

Edit;oops ignore attachments
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I deleted nativeSD folder on fat32 and re-installed the rom.

There was no initrd.gz installed to new nativesd folder (there was a zimage)

I am going to have to reboot ubuntu as my sdcard card isn't showing up any more using cardreader (i think due to not unmounting before removing:o)

Edit; I have attached initrd.gz from sdcard/nativeSD/PAC folder, i tried putting it in nativesd folder but it still doesn't boot (hangs on

white

htc screen), have attached dmesg.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Try the following nativesd.sh (again remove the .txt). Adding the romname to the start of the file and if that doesn't work also changing $ROM_NAME to the actual romname towards the end of the file. (romname.sh not used)

And Robbie P I think you missed one of the changes to the updater-script :

package_extract_dir("kernel/bootsd", "/boot");

i.e. need to change bootsd to boot in that line

Something is still not working though (perhaps adding 'busybox' before all the commands would fix it).

Edit: have attached NativeSD folder again, with slightly modified NativeSD.sh, as original romname in romname.sh, and modifications to updater-script required

Edit. found a couple mistakes re attaching folder, which would explain why the modifications don't seem to be made but not why there isn't an initrd.gz copied to NativeSD folder (unless it causes the script to fail)

One rouge / is present in attached zip, can you find it? answer on next page. Nativesd folders found here as they are edited
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
yep, missed that sd edit before:o

initrd.gz still fails to appear in nativeSD folder, so i pasted the one in PAC folder there. Now it reboots after

black

htc screen

Will now try to change name later in script

Edit; same as before, attached 2x *1.* files

will now try your new nativeSD folder

Edit2; same as before, not appearing in folder & it reboots after

black

htc screen, attached 2x *2.* files
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Any chance you also forgot to remove

package_extract_dir("kernel/bootsd", "/boot_dir"); ?

As that would explain why you have something in the PAC folder (which seems to be the unmodified nand ramdisk) and not also in NativeSD.

If the NatviveSD folder attached to previous post doesn't work then I guess that I've made an error somewhere in NativeSD.sh causing it not to run.

Think I'll make a new thread later today, which might help point out where I've went wrong (probably some command that can't run on device), and once it's working as is, it shouldn't be too much of a jump to convert non NativeSD NAND (non-AROMA) roms to nativesd, and from there to having it work for different devices, bringing NativeSD to outsiders.

Edit. Third times a charm the attached folder above has been changed and may have been fixed.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
here is my updater-script(.txt)

Edit; will try your edited nativeSD folder

Edit2; No charm I'm afraid. No initrd.gz in nativeSD folder...

Edit3; wasn't sure i took files between editions either so did it again and same result.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Thanks, don't know if you took the folder between editions, one up know should be fine. Seems script wasn't being run at all,might need to change placement of the added lines in updater-script to before RMNET but don't think that'll solve anything.

And if you could try removing the line:

/tmp/ramdisk/romname.sh

and replacing '${ROM_NAME}' with the romname

in NativeSD.sh
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
eek your post edited again 4.38

this is the last one i tried
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Apologies, was changing something at the bottom of the script when I noticed a rookie error towards the top and uploaded the changes before finishing what I was doing at the bottom, if there's any other changes I'll just add a modified nativeSD.sh.txt so it's clear something has been changed. (The one you used is broken.)

Thanks for the testing by the way, seem to have left a / in that I thought I removed, in nativeSD.sh the first sed has </ns/init.rs, could you make it <ns/iit.rc like the others and see where that gets us

Should be able to get my NativeSD zip as I modify it from here
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Re-DLed nativeSD folder, still the same. Shall i edit...

"And if you could try removing the line:

/tmp/ramdisk/romname.sh

and replacing '${ROM_NAME}' with the romname

in NativeSD.sh"

to confirm, should delete the above line & change

sed -i 's/rOm/'${ROM_NAME}'/g' <ns/init.rc >ns/mod5

to

sed -i 's/rOm/PAC/g' <ns/init.rc >ns/mod5

Edit; Sorry HypoTurtle I have to go out for about an hour. Perhaps we could continue by PM.