yashsingh1/xdaforums huggingface dataset:
[HD2 Android SD Development] aleks3008:
This is NativeSDBootV4.zip file. How can I install it?

I`m running WM on NAND and PA on SD /.ext4/. Everything running very smoothly and much faster than previously on SD.

Please, for us WM users, give us some tutorial like step by step for multiboot.

Thanks in advanced.
[HD2 Android SD Development] ayysir:
its a apk file... if you downloaded through phone chrome or other browsers change .zip to .apk
[HD2 Android SD Development] Xylograph:
Have you tried GParted for linux related partition (resizing) stuff ?
[HD2 Android SD Development] ric69:
:confused: Witch number is the last version ? in 9.1.1 free Home edition it's not possible for me (tried with 2sdcards) :rolleyes:
[HD2 Android SD Development] Dhruna:
you can use MiniPartition Tool - free edition. it allows you to careate ext4 partition and does formating too.

Thanks,
[HD2 Android SD Development] ictimai:
Yes, Guys... however the big question is which one from all these partitioning tools takes care about both partitions and filesystems (both: fat32 and Ext4) alignment... This seems important because according to many reports could influence data write rate by up to 16%.
[HD2 Android SD Development] melando:
Based on our early experience it is still important to format the ext4 partition using the 4EXT Recovery tool before first install as NativeSD
[HD2 Android SD Development] clio94:
Τhis is normal if you run clk.As allready has been said,clk doesnt read directly from sdcard.So the steps required to use this great app in clk are

1.Select from app the nativesd rom,you want to switch

2.Go into recovery and flash flash_sboot_v2.zip

Until clk will be able to read directly for sdcard we must everytime that we want to change rom to flash again sboot partition or we can use latest clk version from kokotas and flash tboot,vboot to be able to boot to another nativesd rom while rebooting device
[HD2 Android SD Development] ric69:
I agree with this, there is an option in EXT4 recovery to check alignment, there were some errors on my sd-ext made by gparted, and it seems my device is smoothness now :cool:
[HD2 Android SD Development] amateur_no1:
Has anyone ported tytung's nexusHD2 ics v2.7 to nativesd? I'd like to try this rom by this new method. Thanks.
[HD2 Android SD Development] Magic2010:
I'm sure you will find your answer if you search a bit...instead of asking the same question in all threads.
[HD2 Android SD Development] wis1152:
I have:)
[HD2 Android SD Development] ad2003:
Hi Wis - and? Is it working? Can you upload it?

Another Question:

How could I e.g. flash a modded market app or kernel to a native rom?

thx!

AD
[HD2 Android SD Development] kwag:
NILFS

@securecrt

Could NILFS be used on the second partition instead of ext4?

That would be much better, from the overall performance point of view, and would also increase (by far!) the life of the microSD cards.

BTRFS would be an overkill for this, and we already have NILFS in the kernels (I know, because I asked tytung back on 2nd February 2011, 03:08 PM for it, and he compiled it in. )

Thanks
[HD2 Android SD Development] HypoTurtle:
Having a stab at this now, need to switch cards anyway. Only problems would be if kernel stuff is needed, and that it may be difficult to create a backup and difficult to create the partition in the first place for most people.

In the porting from NAND instructions is it correct that the /kernel/boot/initrd.gz needs to be adapted or is this just referring to the NAND rom and it's the one in /kernel/bootsd that is relevent to nativesd?

Edit: seems to have installed fine, just not booting as yet

Okay it's booting now, will add instructions if required, will see how it stands up, only using it with a class 4

Minor update - some minor screen discrepancies during setup in upper left/right corners but seems to be cleared up now, build is runnning fast, but that mey be just due to being fresh install, will run some benchmarks

Benchmarks

Benchmark, class 6, 1st AOKP ROM released, ext4

System Test = 3398 ; SD card read/write = 13.6/8.0 MB/s
PassMark Performance = 816 ; Internal Storage read/write = 14.7/13.1 MB/s External Storage r/w = 15.1/8.27 MB/s
AnTuTu = 2741 (typical SDROM score) SD card r/w = 9.7/7.4 MB/s

Benchmark, class 4, updated (current) AOKP ROM, nilfs2

System Test = 3117 R/W = 12.4/4.2 MB/s
PassMark Performance = 755 Internal r/w = 9.57/1.34 MB/s External r/w = 15.5/3.23 MB/s
AnTuTu = 2717 R/W = 13.3/3.2 MB/s

Not sure if drop in internal write speed can be attributed to nilfs; as external write speed is also significantly less, so we can put this down to the class.

kwag any chance of some references to backup the claims of the benefit of nilfs over ext4? I couldn't find much.
[HD2 Android SD Development] wis1152:
Kernel/bootsd is relevant to native sd
[HD2 Android SD Development] HypoTurtle:
Thought as much, think Robbie had problems while doing a port as he thought it was the other folder that was relevant, it's still not booting though using nilfs2 rather than ext4, any other mount scripts I'm missing? Just the one in init (as well as the on in installer).

In terms of tutorials, there is one in the general section for dual booting wp7 and nativesd from scratch, you may want to add a link on page one, I'll add it here shortly
[HD2 Android SD Development] Xylograph:
@ all

So I've been thinking and skrewing around with some stuff the last couple of days using the NativeSD method which resulted in the following stuff:

Since the /root directory of the EXT partition is getting cluttered with all these nice NativeSD ROMS and developments (this is certainly true for nand a2sd users) I thought it would be actually better to put all this stuff in a seperate folder..

I've named that folder 'NativeSD' (what else)

After that I thought it would be better to give devs their own folder to avoid 'rom_name' duplicates in the future.. (wouldn't it be fun if all devs would call their NativeSD rom 'ICS' ? :rolleyes:)

After that I thought of a better way to share apps and app-data between NativeSD roms and since it's not recommended to share app-data between the different android operating systems I came to the following conclusion which I have running right now :

# This is an example of the complete system layout on the EXT partition when using NativeSD:
#
# System structure:
#
# /NativeSD/DEVELOPER/
# /REDUX/
# /system
# /data
# /PA/
# /system
# /data
# /AOKP/
# /system
# /data
#
# Shared application and data structure:
#
# /NativeSD/SHARED/
# /app <-- shared app folder for all NativeSD roms
# /GB/
# /data <-- shared app data folder for NativeSD Gingerbread roms
# /ICS/
# /data <-- shared app data folder for NativeSD IceCreamSandwich roms
# /JB/
# /data <-- shared app data folder for NativeSD Jellybean roms
#
#
# Define the name of the developer, rom and os below

dev_name="XYLOGRAPH"
rom_name="REDUX2"
os_name="GB"

Any thoughts ?

I left the sdcard/NativeSD folder structure intact for the great 'NativeSDBoot' app of datagr for switching roms which brings me to the following:

Great work once again m8 !!

But...On second thought and regarding the above the ROM deleting stuff would probably be better off in a 'seperate app'

Don't get me wrong, because it's really great stuff you are bringing in here for free, but I think the whole folder structure could or should be changed for future purpose..

I don't know how securecrt feels about this, but I think there is a slight chance someday one could get corrupted installations, because 'dev1' accidentely used a same 'rom_name' as 'dev2' and I think that's not acceptable..

And if you would decide to continue development of this great app or make a seperate 'NativeSDManage' app it would also be cool if there is an option to backup (copy contents to /sdcard/NativeSD/backup for example) besides deleting roms alone :D

Thanks again !
[HD2 Android SD Development] kwag:
Sure!

Here you go: http://www.ibm.com/developerworks/linux/library/l-nilfs-exofs/index.html

"Log-structured file systems and SSDs

Log-structured file systems are an ideal format for solid-state disks (SSDs), which are made up of NAND flash. The fundamental problem with flash is that it has a limited number of write and erase cycles. Because the log writes over the entire device, it levels the writes over the device and thus minimizes erase cycles. For this reason, log-structured file systems perform very well on SSDs (sequential writes) and also provide better wear-leveling."
[HD2 Android SD Development] HypoTurtle:
NILFS2 instead of ext4 for AOKP and PA

Fair enough was looking more for a comparison between the two (edit found this comparison) but at least there doesn't appear to be a downside. AOKP rom running smoothly here, no issues apart from the initial squares in top corners during setup,and no usb wifi (I'm using the div2 build - I'm sure the fixed ramdisk is included?)

I'll make the modifications to PA and upload the changed files, and leave it at that, waiting for the new base filestructure.

Edit. Okay, PA installed have attached the install.sh and ramdisk (to copy to /bootsd/kernel/), rather not post how to make the nilfs2 partition itself, if you can't do that you probably shouldn't be using it. adb not working here either, that seems to be the only issue, could use another view i.e. with battery drain, data connection etc. (I've always had a rather fast draining battery)

Edit. Thought I should at least post the AOKP one as that's been done too
[HD2 Android SD Development] kwag:
I should have pointed out that the real benefit of nilfs2 over ext4 is on the way it writes to the media. Not really a speed advantage, but the way it will extend the life of the media (microSDs included). And also nilfs snapshots are a bonus :)

Does that mean we'll be able to test this on a nilfs2 formatted partition? ( Hope I'm not asking too much :D )

Thanks
[HD2 Android SD Development] HypoTurtle:
Have AOKP and PA installed in mine now, my method may change (to remove one of the mounts), but it's working, and working well.
[HD2 Android SD Development] kwag:
Thanks! :victory:

Anxious to get home and try it out!
[HD2 Android SD Development] Xylograph:
Thanks for the testing, benchmark and bringing this up guys !

However, since we want this method to be as 'user friendly and os independend' as possible.. how should a regular 'name_of_hd2_os_here' user format to that specific 'nilfs2' ?

Even if it would be better I suppose we still need a recovery able to partition/format/backup and restore that specific format..?

Anyway, it seems quite some (wannabe) users don't understand a thing about the current method or find it scary somehow already..
[HD2 Android SD Development] HypoTurtle:
I completely agree, thought I'd give it a shot as my last attempt at using another filesystem (squashfs) failed but also made me aware of the other supported filesystems (but didn't think they could be used as the main filesystem), not aware of any other way than using terminal in a Linux desktop to create the partition so definitely not 'user friendly and desktop os independent'.

Have to say though haven't had much joy in the past in restoring ext via recovery (have had to do it manually). CWM seems to have had nilfs support for a while, like this one for example, also seems to work in the cwm touch one but needs to backup everything i.e nand stuff, need the advanced backup stuff from 4ext
[HD2 Android SD Development] kwag:
With any Linux OS, because nilfs (nilfs2) has been a part of the Linux kernel for a very long time :)

Nilfs is already built in.

Every utility (gparted/Disk Utility) already has the option to format/read/write nilfs.

And last but not least, the advantage over every other Linux file system (except btrfs) is the life span of the media. In this case, microSD cards will last much longer with nilfs than with ext3/ext4.
[HD2 Android SD Development] 2alive:
great.
[HD2 Android SD Development] ayysir:
where can i get twrp sd version you have converted?
[HD2 Android SD Development] ad2003:
that would be great! :good:
[HD2 Android SD Development] HypoTurtle:
Pulled (possibly incorrectly) due to me, so have attached a copy, use with caution, if you really need touch try the CWM touch found in Xylograph's recovery folder
[HD2 Android SD Development] ayysir:
thanks bro, will try this. twrp is my favorite recovery, now need a recovery that can boot into the different roms in nativesd folder so i dnt have to rush to a cpu to put back pa ramdisk and kernel back to boot
[HD2 Android SD Development] securecrt:
nilfs is faster?
[HD2 Android SD Development] kwag:
On some read benchmarks, it is.

However, the strongest point is in the way it writes to the sd card. It a log filesystem, so the lifetime of the media is greatly extended.

It would be great to benchmark different apps on the phone with nilfs2 and ext4, to see the diffs. But I definitely prefer the way nilfs handles the storage. It was desigmed for SSD, so microSD cards will benefit from this.

I'm currently installing on another microSD card to do some tests.

Thanks to all, and thanks HypoTurtle for the test builds!
[HD2 Android SD Development] HypoTurtle:
Have only ran ext4 on a class 6 and on a non-freshly formatted class 4; and have ran nilsfs2 on the same class 4 but freshly formatted, so can't make a direct comparison but it seems to be. The comparison I posted was the only one I could find where Android was being used, all others are using Linux and nilfs2 seems to be slower for the most part. No freezes or reboots as yet (well might've had 1 with MIUI but I think that was ROM related), anything you suggest to tax the system?

For recovery I think we need CWM 6.*.*.* ported.
[HD2 Android SD Development] onlinegames:
Hi all ROM developers/modders,

It seems there are a few like me for whom SecureCRT's instructions to convert the NAND ROM to NativeSD ROM are not clear. The instruction for RAMDISK modification suggests renaming the original "init" to "init.android" and include the shell script provided by SecureCRT as "init". However, none of the converted ROMs contain the modifications mentioned above.

Based on Xylograph's suggestion, I installed dsixda's kitchen and was able to modify the ROM like adding/removing stuff from the ROM etc. but still the process of modifying the RAMDISK itself is not clear. The install.sh and update-script portions of the modifications are clear (to me). Could someone explain the modification of the initrd in more detail?
[HD2 Android SD Development] kwag:
Well, just finished installing ( The PA Rom ).

The speed is definitely noticeable, specially when I opened my pictures gallery with QuickPic and all my pictures poped up WAY faster than before :) (EDIT: This is ROM related. Not fs, as pics are on FAT partition )

More tests need to be done, but after using nilfs on my PC for over a year (on some flash USB drives and some external USB drives), I'm confident that the overall speed of this filesystem blows away ext4 (on average), and produces less wear on our external SD cards. And that is very important. Not to mention that no fsck or the need to read a journal file in case of a system crash, as is with ext3/4.

nilfs2 is basically a crash proof fs, similar to zfs or btrfs.

This should have happened a LONG time ago :laugh:

Thanks you again!!!!!!!!!!!
[HD2 Android SD Development] securecrt:
I format my SDcard to EXT4 without Journal. I will compare to nilsfs2 when I have time

this is an old web page about the ext4 vs nilfs2

http://www.phoronix.com/scan.php?page=article&item=ext4_btrfs_nilfs2&num=1

I can not see any significent improvements with nilfs2.
[HD2 Android SD Development] kwag:
There are!

If you just disabled the journaling on ext4, it means a power fail (crash, etc.) can trash your filesystem.

This is also true with ext3 without journaling, as was the case with the old ext2. Power fail usually meant data/metadata corruption.

This is not possible with nilfs2, and no fsck is required.

And that's the biggest plus, not to mention snapshots. But snapshots I guess are an overkill for a phone, but nevertheless they are there.

nilfs2 was really designed for solid state media, and as it is already integrated in the Linux kernel, why not use it to our advantage? :)
[HD2 Android SD Development] securecrt:
http://www.phoronix.com/scan.php?page=article&item=linux_32_nilfs2&num=1

another benchmark comparison.

the nilfs2 is slower than ext4. I will use the ext4 for serval monthes without jounal to see when it will crash my system ;)
[HD2 Android SD Development] kwag:
Run a heavy I/O disk benchmark with ext4 disabled, and see how much slower it is compared to nilfs ;)

Then, in the middle of the benchmark, pull the battery!

I guarantee that after 2 to 4 times (if you're lucky!), your phone will no longer boot, and you will have to reformat the sd card.

Try that with nilfs, and you will always recover, no matter how many times you try! :)
[HD2 Android SD Development] melando:
I agree as a user ... we need a recovery able to format and restore backups to whatever file system is used
[HD2 Android SD Development] securecrt:
It's not the typical use case. Most of the users will not try to damage their SDCARD.

the defect of missing journalling for EXT4 is the data consistance after unexpacted losing power on device.

Some of the cases can occur on HD2

1. SOD (sleep of death) in this case the write/read should also stop, it should be safe to pull out the battery.

2. Hot Reboot . in this case the linux kernel still alive the file system is still safe if user not pull out the battery and wait the android boot up

3. Battery drain from 20% to 0% suddenly(bad battery case) and the device shutdown automaticly by itself, it is also safe for file system as the android will do the file sync before shutdown

4. user pull out the battery and the system is writing files . this will cause problem but most of people will not do this except he/she want to break the SDCARD.:laugh:
[HD2 Android SD Development] ShadowXPde:
Hi,

I'm using this rom on ext4 partition now. Very good job and it is very fast.But when I use Navigon, it has many freezes and it stops work. I run a benchmark on my htc with the result: ~2,5mb write and 6,8 mb read speed. Is that okay or do I need a faster SD card?
[HD2 Android SD Development] securecrt:
you should pay attention to the following items:

Make sure you are using the good quality of the SDCARD , dont use very cheap crap sdcard!

chose Class4 or higher sdcard

4K alignment partition
[HD2 Android SD Development] HypoTurtle:
Those are the comparisons I found earlier, so was expecting a slow ROM at least after some use, but it's not. Found this which pretty much confirms what I was thinking; log-based file systems (nilfs and btrfs) may be of use for lower quality / lower class cards, probably no real benefit with the higher classes.

Not sure if I'm seeing things but it seems to be sucking up a lot of memory, kwag you have more experience here (I hadn't used nilfs2 before yesterday); do you see the same / is that normal. Where are the snapshots saved? can't use the commands to list them and think they may not be getting cleared.
[HD2 Android SD Development] kwag:
Well, I think we're going to have a problem here!

I can't see a daemon called "cleanerd", so I think it hasn't been compiled into the Android Linux utilities.

Basically, the default time of one hour is set by nilfs to protect snapshots, and because there's no running clearend, the SD will eventually fill :(

So I guess we're screwed (for the time being), unless the nilfs utilities are compiled in and then we won't have any problems.

The "protection_period" variable could be set to a value lower than 1 hour, forcing a faster GC cleanup, and then the snapshots wouldn't fill up the log.

Here's some info: http://www.nilfs.org/en/man5/nilfs_cleanerd.conf.5.html

Sorry!, but thanks a LOT for the efforts :)

Hopefully some day we'll have full support for this, because this IS a file system that was properly designed for SD/SSD/Solid State memories.
[HD2 Android SD Development] Xylograph:
I've just ported the latest N1 twrp recovery v2.2.1.4. and must say this is a pretty neat recovery with a nice file manager included which takes away the 'need' to delete roms from within a ROM, since you can just mount your sd-ext partition in this recovery and delete/copy/move stuff from within the recovery file manager :D

Now I only have to test the '(sd-ext) rom flashing' with this recovery and will post it for further testing..

I will update the example package when I find some more time and will include a 'unpacked ramdisk' with the most important files/changes needed.

The only advise I can give you is to forget the renaming init to init.android stuff, since most of the init files are not compatible..

Instead pick a ramdisk from one of my roms and keep all the folders intact, change the init file/script, use the init.android included in the NativeSD ramdisk and make rom specific changes to the rest of the files, but keep the mounting stuff in the other files (init.rc) like the NativeSD ramdisk..
[HD2 Android SD Development] securecrt:
I am still have no idea why most of the init files are not compatitble. It is weird, and hard to debug as the system is not up, no log can be printed out.
[HD2 Android SD Development] Xylograph:
I have no idea either..

On a side note:

Maybe we (and all NativeSD users) can ask some help with 'easy and user friendly rom porting' to boonbing..

I was just thinking that his portadroid stuff could also be used to port nand roms to the NativeSD method with some modifications ofcourse..

Since he has more experience with 'roms on sd' maybe he also knows the reason of why most init files are refusing to work...
[HD2 Android SD Development] HypoTurtle:
Don't give up yet, had already seen that stuff and figured we need those binaries, have found some that seem to work, (thought I'd have to do something complicated like cross-compiling myself). will make another ramdisk later, is there any way to check if its working? don't have lscp so can't use that.

kwag, giving up for the moment, not sure whats needed, tried some stuff within the ramdisk but can't say if its working (or needed), have attached the stuff i found (thanks to unhelpful for these), the conf file may need editing, just copy the binaries to a bin folder (/bin or /system/xbin), fix permissions and the run, see if you have any luck with them.

Edit. seems to be running properly, with the .conf in /etc (and the other files in /system/xbin), but could use some confirmation, only have ~750MB thats gone walkabout now (have set it to continually clean). It might be with the other roms? have only applied this to AOKP.
[HD2 Android SD Development] seaman2k:
i have twrp touch v2.1.1 but i wounder is there is a diff with your v2.1.1.4 cause 2.1.1 works great with me like u said file manager is great it can show sd-ext after u mount it :) so is there is more i hope to know what could it be in 2.1.1.4

ohhh.. is there is anyway to unpack&repack initrd on windows 7:confused: if pls tell me cause i make a search on xda but i couldn't find
[HD2 Android SD Development] Xylograph:
I am sorry... I mistyped it there.. will change it :)

It is version 'openrecovery-twrp-2.2.1.4' and I don't think it's available for our HD2 at least not a working one, am I right ?

Anyway I have found a version 2.2.2.2 which I am trying to port now.. check the twrp2 site for all changes...

Use dsixda kitchen when using windows for un/packing the ramdisk..
[HD2 Android SD Development] seaman2k:
woooooow ..if u can port v2.2.2.2 with keyboard support it will be good ....and if u cant we still have 2.1.1 touch and do what we need :) i can uplode it but i like to forget it when u give us v2.2.2.2 :p

about initrd.gz i have dsixda and i can unpack boot.img but i couldn't do for initrd i will try to find my way on it i know u r so busy:)
[HD2 Android SD Development] Xylograph:
I have v2.2.1.4 already done... so you guys can have at least that version if I fail with the v2.2.2.2

But it's going pretty well actually :D
[HD2 Android SD Development] seaman2k:
can we have 2.2.1.4 now at least we test it till u find away to port 2.2.2.2 :p