yashsingh1/xdaforums huggingface dataset:
[HD2 Android SD Development] seaman2k:
pls give us the way to repatriation sd to test it ...what i mean i will replace your files into rom zip file and i will install it from recovery does it will install into NILFS2 partition automatically or what ..pls clear it tom me to test it
[HD2 Android SD Development] securecrt:
I guess you are using class 4 sdcard ?
[HD2 Android SD Development] kwag:
Yes it is, crap isn't it! :)

I thought it was a class 10!, but it performs pretty well, I would say.

I'm buying a class 10 (or better SD) later today, but now I'm going to bed! (It's 6:17AM here, and I'm like this :eek:

See you all later! :)
[HD2 Android SD Development] securecrt:
thanks man, good night :)
[HD2 Android SD Development] HypoTurtle:
Not for the initial install the partition mounts using the same mount script used for mounting ext, just the same old mount. (Unsure if there's any benefit using mount.nilfs2) The bin files have been attached on the main thread but i think all we need is the nilfs_cleanerd bin in /system/xbin, nilfs_cleanerd.conf in /etc and a init.d script.

In terms of modifying recovery, was trying to change it so that when it tries to initiate the bin to make a ext partition it instead uses the mkfs.nilfs2, haven't succeeded yet, but does this seem feasible? (It's a dirty way I know but could be useful)

Have a look at the thread here, haven't got round to changing where it says ext in aroma to nilfs2 so if you have a nilfs2 partition set as the second partition (with the diffs attached in the thread) or third (with the CyX one attached here), just select to install to ext and it'll install to the nilfs2 partition.
[HD2 Android SD Development] Xylograph:
And the results are..

Ok guys,

I am done 'benchmarking' the same rom (clean install) on the same 16gb sandisk class 4 card using NAND, EXT4 and NILFS2.

Besides this benchmark and unlike most of the reports here using nilfs2 I wasn't all that impressed by the overall responsiveness of the ROM.. this was probably due to the fact my whole partition was filling up/full in just a couple of minutes although I've included the binaries, .conf file and initd script in the rom.zip.

It clearly needs additional symlinking/permissions...

But,

I have some good news for all the 'nilfs2 freaks' around here...

While I was testing it I became a little bit frustrated with the fact I couldn't see the contents of my nilfs2 partition so I modified 4ext recovery, since it's the only recovery able to mount 2 'ext' partitions.

As a result you can now mount 2 'ext' partitions using this modified 4ext recovery no matter if it's ext3, ext4 or nilfs2 and browse it via (Qt)ADB..

I haven't tested the backup and restore features yet (since I only needed the mounting stuff) so be carefull with this modified recovery, since it's made for ext4 partitions in the first place !

I have made it available for sd use only, since I don't recommend flashing this recovery to nand and everyone can use it at their own risk and for testing purpose only !

Download RecoveryMOD.zip (unpack to the root of your sdcard and boot it the usual way)

Have Fun !
[HD2 Android SD Development] seaman2k:
what about twarp i think it is able to mount ext also ...i use your last twrp 2.2.2.0 and works great
[HD2 Android SD Development] HypoTurtle:
I agree for the most part, forgot to say that cyanox seem to eat up the memory faster than most of the other roms. Haven't been able to get the cleaner to run on anything but AOKP, so that's why I haven't included them in the diff files yet.

It's mounted as /NativeSD like the ext4 version (and as /nilfs) and can be seen there in a root browser or am I missing something.

Thanks for this will give it a try later.
[HD2 Android SD Development] Xylograph:
I think the twrp mounting stuff is deeper inside the recovery and not that easy accessible.. ~I will still have to dig deeper in that for the yaffs2 boot stuff which is not working yet...

Also twrp can only mount 1 'ext' partition.. I for one do not want nilfs2 as my only ext partition for sure !

This must have something to do with proper symlinking and permisson settings in the updater-script..

You mean from within android or from within recovery?

I suppose you are using a recovery based on or modified by arif-ali if you mean recovery ?

Your welcome ;)
[HD2 Android SD Development] wowrlz123:
I have a problem i was using 2 roms and i removed one of them by deliting it from the nativesd folder on the sd card, but now i dont have free space on the sd ext partition cuz the data of the deletet rom is still there like apps, games and system data. How to delete it or remove it? Thanks in advance.
[HD2 Android SD Development] Xylograph:
You could have used datagr application to delete the ROM..

Now you have to delete it either via a root-explorer from within android or (Qt)ADB on your computer..

I suppose securecrt will update the 1st post with the latest version of the app soon..
[HD2 Android SD Development] duhhh:
won't boot ,just restarts :eek:

WM 6.5
[HD2 Android SD Development] Xylograph:
The first 4EXT recovery I made available for sd does work for you guys, right ?

I have removed the mounting of /nand partitions and 'replaced' the /cache partition to sdcard..

This version is only usable for sd installation and mounting (no nand stuff)

Download RecoveryMOD2.zip (unpack to the root of your sdcard)
[HD2 Android SD Development] duhhh:
only this one works for me on WM 6.5

yes RecoveryMOD2 works,but see only fat partition
[HD2 Android SD Development] ictimai:
However EXACTLY which ROM is this about? I've tested only your PA on Kingston class4 and the results were the opposite.

What's more, the CyanoX with HypoTurtle's initrrd & install.sh couldn't boot after being installed on NILFS at all...

In fact, yet about the PA in question: I haven't done a clean install on NILFS but rather copied previously installed well running system from Ext4 onto NILFS and applied the modifications the Kwag's way. The difference is really striking!

Maybe is the way you installed the ROM why you've gotten the different outcome? Or maybe is this because of different ROM or SD brand?
[HD2 Android SD Development] Xylograph:
That's correct.. go into mount menu and you'll be able to mount your 'sd-ext' and if you have one 'sd-ext2' partition..

---------- Post added at 05:45 PM ---------- Previous post was at 05:43 PM ----------

It's CyanMobileX rom.. and that way of installing a rom you are linking to is a 'workaround' I am not willing to do that way ;)

All 3 benchmarks are based on a clean install > install benchmark > run
[HD2 Android SD Development] giovanne:
@Xylo,

thanks for the Benchmark.

Only to compare - NativeSD JB 2.0 on ext4 - Sandisk Class4 32GB (not fresh formated/installed, everything as it is at the moment ;)

AnTuTu Result - see attachement. (Results may differ in detail in each run - for you although?)

Waiting for class10 benchmarks results ;)
[HD2 Android SD Development] datagr:
The 1st post has already the latest release v4_1 that has the delete function, mate. :)

I have also noticed that you didn't include the last version in your CM7 rom so maybe that's why he couldn't delete the 2 roms.

You are all free to use my app in your roms so the users can switch or delete the installed roms. :)

---------- Post added at 05:04 PM ---------- Previous post was at 04:58 PM ----------

Here is your solution.

While running any rom (NAND or nativeSD) do the followings :

1) Go to sdcard/nativeSD with any file explorer

2) Go in one of the folders that you will see there

3) Copy all the files that you will see inside that folder

4) Go back to sdcard/nativeSD

5) Create a new folder and name it with the same name that your deleted rom had

6) Do the same steps (1 to 5) for the 2nd rom that you deleted

7) Download and install the v4_1 app from the 1st post

8) Now you can delete those 2 roms by using the app and free space in the ext4 partition :)
[HD2 Android SD Development] securecrt:
the result is as expacted, maybe someone can update the nilfs2 driver then maybe can have better performance on nilfs2.
[HD2 Android SD Development] omek07:
Xylo hello

Can we use this from nand rom ??? Or we have to use it throuth the native sd ???

I have 1 Native rom and i want to delete and install another ...

Thank you
[HD2 Android SD Development] datagr:
Yes you can use it from NAND rom normally. :)
[HD2 Android SD Development] bojanbl:
makeboot.sh file creates boot.img, sboot or any other boot.img from initrd.gz and zimage

So I think I could in terminal use commands:

su

makeboot.sh /makes boot image from initrd.gz and zimage

flash_image sboot /sdcard/s_boot.img /using sintax: flash <partition> [ <filename> ]

for example.

Is this possible with your app? Could you make something for testing and pm me?
[HD2 Android SD Development] datagr:
Stay online for half hour I will have something ready to test. :)
[HD2 Android SD Development] wowrlz123:
How to add SWAP ?
[HD2 Android SD Development] datagr:
test this file pls and tell me if it works for you.

put the makeboot.sh in nativeSD folder

put s_boot.img in your sdcard root path

go to app, switch rom, don't reboot, click CLK button, then reboot

apk removed
[HD2 Android SD Development] bojanbl:
It says "Error, probably folder doesn't exists"?

Tried on AOKP JB and PA ICS
[HD2 Android SD Development] datagr:
new apk for test.

Put mkbootimg.sh and mkbootimg from the flash_sboot_v2.zip in the root of your sdcard

then do switch

then click CLK button

then reboot

again redownload!

I forgot to give su privilege in the CLK button commands! :P

Removed for future testings
[HD2 Android SD Development] ictimai:
It's obvious but maybe it'd help to trace the bug...
[HD2 Android SD Development] bojanbl:
I found out what is mine problem with flashing

mkbootimg and mkbootimg.sh cannot be in sd card because you cannot assign privileges to them...

I copied mkbootimg to SD-EXT (it could be any other NAND folder)

then executed following

chmod 777 /sd-ext/mkbootimg

/sd-ext/mkbootimg --kernel /sdcard/NativeSD/zImage --ramdisk /sdcard/NativeSD/initrd.gz --cmdline "$cmd" --base 0x11800000 -o /sdcard/s_boot.img

flash_image sboot /sdcard/s_boot.img

I am new in linux and shell scripting so if I said something wrong please correct me but I am doing my best ;)

EDIT: I couldn't boot from sboot partition, I get only HTC logo ....
[HD2 Android SD Development] ictimai:
So, has the driver been obsolete for all these efforts NILFS-NativeSD-related and what else could we expect from the newest version? How to integrate the newest driver and into what - into kernel? If anybody knows how then please do something! It is worth trying as Extr4 is fs for mechanical hard drives not for flash memories...
[HD2 Android SD Development] timmymarsh:
@datagr

Thanks for the advice mate, reformating partition worked a treat, why it was bad on the first format I don't know but sometimes sh1t just happens right? (all part of the fun in hacking lol)
[HD2 Android SD Development] ictimai:
is AOKP the same as PA? Forgive me I find it confusing... If so, then indeed PA is working good on NILFS but it is the only ROM I've made to run smoothly on NILFS so far (however with 2-cards copying workaround rather than through clean install)
[HD2 Android SD Development] Xylograph:
what is 'the bug' exactly ?

I hereby nominate you sir to 'Nilf' of the month.. not to confuse with 'milf' that is..

They are both different ROMS (check the links @ these rom threads.. they are there for a reason) , but they share an almost identical evervolv system base so.. if it's working on PA it should also work on AOKP which I believe is also confirmed by HypoTurtle..
[HD2 Android SD Development] TruePlaya:
Antutu 2918 with tytung ICS v2.7 on Samsung 32gb class10 card. HD2 smartassv2 governor oc 1036MHz.

Thank you developers for NativeSD! HD2 is flying! :)
[HD2 Android SD Development] ictimai:
you are welcome

just need have WM together with reliable and fast Android, so far as I can see Android as a second system can be only on SD, so NativeSD is probably the best option and only NILFS could guarantee reliability and being save for data. Ext4 at any unexpected moment would vaporize all useful information had been collected regularily using the phone...
[HD2 Android SD Development] Robbie P:
resize ext4 partition with wm6.5 in nand

I managed to resize my ext4 partition without using linux on pc

backup to pc the fat32 partition and then create enough space on sd fat32 by deleting stuff to backup sd ext partition

use 4ext recovery sd "advanced backup sd ext" to backup to sd card

copy clockworkmod folder from fat32 to pc

In recovery, use advanced partition sd. (I tried to use minitool partition but could not resize the partition, which is why i am writing all this;))

select "remove partitions and start from scratch". I do not recommend doing this with wp7 in nand as it may wipe your sd ext2 partition. There may be another way around this, I am open to suggestions:o

Re-install "4ext recovery sd" to sd card

put clockworkmod folder on sdcard

in recovery advanced menu use advanced restore sd ext

(delete clockworkmod folder to save space)

restore your fat32 files

all done.

Sorry if this is a bit obvious to some. But it may save some ppl installing ubuntu via cd, wubi etc. although I heartily recommend them to do so:)
[HD2 Android SD Development] Szczepanik:
Partition Manager 12 Free Edition allowed me to resize my ext4 partition without using linux on pc but I did loose the contents of my ext4 partiton!

Cheers

Tom
[HD2 Android SD Development] securecrt:
I must say something about this again.

1. the pics, doc files, movies and all the downloaded files from mobile devices will be stored on the FAT32 partition. so what ever filesystem are running your android on the data security can't be improved as you can't change the fat32 parition to nilfs or ext4. what you can do is to buy a good quality of SDCARD (such as sandisk)

2. the nilfs is not a common filesystem at current stage for most of the users, and the nilfs driver is obviously outdated, we need more time to upgrade it from kernel level, I hope you "nilfs fans" can take some time to upgrade it.

3. if the ext4 partition corrupt for some unknow reasons, what will be lost? for me I think is only the sms but I backup it to my google accout every week. other infomations such as the contacts , calendars , emails can be found on the cloud when you login to google accounts. what I need to do is to format the partition, reinstall the system and all the apps(which already be backup on my PC and Titanium Backup) It is not a big deal for most of the users

4. The NativeSD basic idea is for users to install and run the system on SDCARD easy and get performance boost if they are using a high class(6 10, or UHS-I) sdcard. from the benchmark the nilfs is slower than ext4 now. (pay attention to the Database IO item it is 10% slower than ext4 )

5. Is the ext4 really so weak and easy damaged? I can't make a garentee that it is 100% reliable. I am still doing some test. I have disabled the journaling on ext4 and that means if the file system will be broken I will lost my data surely,but fortunately I still can use my phone without data corruption.

6. should we be so care about the data integrity on a mobile device? I don't think most of the users will store their very important data on the mobile device only. we surely need to backup our data to the PC regualarly as if you lost the mobile device one day you will lose everything!

7. if the NativeSD ext4 fail, we can still use our HD2, as we have a backup system on the NAND. :) (the NativeSD don't touch the NAND system this is by design)

For the nilfs2, it could be a good filesystem, I don't want to stop you guys to contine the discussion and making progress on it but this thread is mainly focus on the NativeSD method. I hope you guys can start a new thread to continue this great job I will drop by that thread and study. Maybe after some time we can integrate it to NativeSD but not for now.
[HD2 Android SD Development] Xylograph:
Thanks for your guide Robbie,

I would like to give people some additional advise when they don't feel like moving all of their data to pc again.

Just so you know..backing up data to pc/cloud is always a good idea, since I read all of these horrifying posts about the EXT4 partition which could explode from time to time..

Get yourself a copy of gparted live (I have it installed on a bootable USB and is working great) and boot it up using a computer...

With that tool you can resize about everything (fat32,ext4) without losing data..

If you might have noticed between all the rattling about milfs2.. I've made you guys a modified 4EXT recovery which is able to mount 2 'ext' partitions no matter what (for our device/kernel supported) FS is on it.. Just so you know.. with normal 4EXT recovery you can only mount EXT3 or EXT4 partitions..

That said.. Let's discuss all future development regarding this subject in the thread HypoTurtle made yesterday.. Maybe you can make something easy, working and flashable for all people to give it a try and let them decide if this is really worth all the trouble..

Since you know so much about it.. that shouldn't be a problem.. feel free to use one of my roms as an example ;)

Thanks.
[HD2 Android SD Development] kwag:
Thanks Xylograph!

That's all I need now, as I can just write a script to stuff in the binaries on any ROM, once the instalation is complete and just retouch the initrd ;)

I haven't tried your recovery yet, but I'm about to do that now.

BTW, I use "Gnome Disk Utility" for partitioning. My version of gparted (Current version in Linux Mint Mate 13) doesn't have a nilfs2 option.

And please, let us know how to format a "milfs2", as you posted?, because I'm sure we'll need some other "tool" to do that! :angel: :cyclops:

Cheers!
[HD2 Android SD Development] datagr:
Thank you for the testings!

If someone can manage to do all the procedures from the terminal emulator and post them step by step

then I can implement the functions on the nativeSDmultiboot app so even the clk users can use the app too. :)
[HD2 Android SD Development] HypoTurtle:
No testing here (on magldr) but from bonjanbl's instructions what I'd change is putting mkbootimg and flash_image into a bin folder. flash_image as far as I'm aware i's included by default.

In terms of securecrt trying to implement this for other devices, I think his intention would be to have the prebuilt boot.img within the ROM folder in NativeSD, thus requiring just

flash_image boot /sdcard/NativeSD/$rom_name/boot.img

for the switch between ROMs.
[HD2 Android SD Development] securecrt:
yes it is
[HD2 Android SD Development] datagr:
Can someone describe me how a regular clk user switch manually roms?

I will try to figure a custom way from scripts and terminal commands to do it automatic through the apk. :)

Thanks in advance for the help.

If there is a nativeSD clk guide that would be the best guidance. :)
[HD2 Android SD Development] HypoTurtle:
It would be an adaptation of the install procedure, have attached there mkbootimg.sh and updater script, but in short it is searching for a startup.txt then from the folder it's in combining the initrd.gz and zImage into a s_boot.img in /tmp then flashing it into the sboot partition.

mkbootimg.sh

[SIZE="1"]#!/sbin/sh

# Check what folder is used by the sd version
cd /sdcard
grep_cmd=`find . -maxdepth 2 -type f -name "startup.txt" | sed -e 's/\/startup.txt//g'`
if [ "$grep_cmd" == "" ]; then
exit 1
else
for folder in $grep_cmd; do
if [ -f "${folder##/}/initrd.gz" ] && [ -f "${folder##/}/zImage" ]; then
C="${folder##.}"
fi
done

if [ "$C" == "" ]; then
exit 1
else
cmd="rel_path=${C#/} nand_boot=0"
cd /sdcard$C
sed -rn '{
/#/ !p
/cmdline/ {
p
q
}
}' "startup.txt" > temp.txt
while read LINE; do
cmd=`echo "${LINE##*cmdline }"`
done < temp.txt
rm -rf /sdcard$C/temp.txt
fi
fi

cd /tmp
chmod 777 *
# Make an image file from zImage and initrd.gz with the correct command line arg in order to be used later in updater-script
/tmp/mkbootimg --kernel /sdcard$C/zImage --ramdisk /sdcard$C/initrd.gz --cmdline "$cmd" --base 0x11800000 -o /tmp/s_boot.img[/SIZE]

updater script

[SIZE="1"]assert(unmount("/cache"), ui_print("Formatting cache..."));
format("MTD", "cache");
ui_print("Wipping dalvik-cache...");
delete_recursive("/data/dalvik-cache");
ui_print("Formatting sboot...");
format("MTD", "sboot");
ui_print("Mounting sdcard...");
mount("vfat","/dev/block/mmcblk0p1","/sdcard");
ui_print("Extracting tools...");
package_extract_dir("tools", "/tmp");
set_perm_recursive(0, 0, 0777, 0777, "/tmp");
ui_print("Writing sboot...");
assert(run_program("/tmp/mkbootimg.sh"),
write_raw_image("/tmp/s_boot.img", "sboot"),
delete("/tmp/s_boot.img"));
unmount("/sdcard");
ui_print("Done!");[/SIZE]
[HD2 Android SD Development] datagr:
So the procedure is :

1. Get name folder of the rom that user wish to switch (easy part)

2. Create a /tmp folder in the root of the ext4 (don't execute if folder already exists)

3. Copy mkbootimg.sh and mkbootimg in /tmp folder (easy part)

4. Combine the initrd.gz and zImage into a s_boot.img (I don't know which is the command to do this action in terminal emulator and do I need this s_boot.img or it will be created from the combine procedure?)

5. Give proper permitions to the folder (easy part)

6. sh /tmp/mkbootimg.sh (easy part)

7. flash_image /tmp/s_boot.img sboot

8. reboot

Is that correct?
[HD2 Android SD Development] securecrt:
the sboot is used for boot from SDCARD by clk design ?
[HD2 Android SD Development] clio94:
Yes.In latest versions we can also use tboot,vboot,wboot and a multiboot menu while reboot so we can select which rom we want to boot

See here http://xdaforums.com/showpost.php?p=31707749&postcount=1286 please
[HD2 Android SD Development] securecrt:
so the clk works like all the stock android bootloader, the multibootapp need to write the boot.img to the sboot and user select the sboot as the boot parition once, everytime swithing to another os just rewrite the sboot content with the correspond boot.img.

if the user want to boot from Nand , just select the boot partition to boot, am I right ?

if the multiboot app can support this, then for the Desire and Nexus One users should also very easy to have the multiboot feature and NativeSD ROMs.
[HD2 Android SD Development] clio94:
Yes you are right.
[HD2 Android SD Development] datagr:
Tonight I will update the app but please someone post if possible the sequence of the required commands to use.