yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] voland:
Well, my goal is to run M 6.0.1 with swap on NAND in hope that this will solve Leo's small RAM and next performance problems unloading apps to swap on slow SD (even on UHS-I card there is slooooow in REAL working environment). Earlier I successfully recompiled kernel for 4.2.2 with dalvik-cache on NAND - performance was increased significantly.

Of course, partitions /system and /userdata I've planned to locate on two SD ext4 partitions, preferably with f2fs format both. Recovery planned to be on SD too, as DirectSD in /recovery (with zImage and initrd.gz, no haret.exe). Booting is planned to act from SD too - from /DirectSD folder, made by Aroma Installer (too with zImage and initrd.gz, no haret.exe). Well, only /misc and /cache partitions are left, if I forget to /dalvik-cache.

I do not know reasons and usability of /misc partition, and earlier ROM functioned correctly without it. Nevertheless I tried with it and without - result was the same.

Actually, I've found out, that partitioning scheme is not important - actually nothing run successfully with DirectSD method, in contrast to NativeSD (with haret.exe).

My own partitioning scheme was simple:

swap raw|asize allsize

Then I have tried variant with /misc and /cache:

misc ya 1M
cache ya 10M
swap raw|asize allsize

And there is "usual" flash.cfg, used by philipped346:

misc ya 1M
recovery rrecov|ro|nospr 8M recovery-leo.img
boot yboot|ro 9M
system ya 370M
cache ya 5M
userdata ya|asize|hr allsize

There size of /recovery is set there to 8M, and its ok, because size of recovery-leo.img, supplied by philipped346, is 8.028.160 bytes. Although, quite right it should be

recovery rrecov|ro|nospr [B]filesize [/B]recovery-leo.img

to exclude doubts about partition size.

Nonetheless I was thoroughgoing and try all cases, including Robbie P's 13M setting for /recovery. No luck however - nor starting original thinhx2's Recovery from SD's /recovery with 2. Boot AD SD, neither starting philipped346's Recovery from NAND with 8. AD Recovery, do not move me far than Go Go Go! message.

Edit 1:

I have tried also with another SD card, with ext4 partitioned/formatted by another tool or by TWRP Ext itself. No positive result.

Edit 2:

Even when I run Aroma through TWRP Ext (loaded from SD with haret.exe) and install M 6.0.1 to two ext4 partitions successfully, OS never goes far than Go Go Go!. :confused:

Edit 3:

Re-partition SD to FAT32+Ext4+Ext4+Swap, Install M 6.0.1 through TWRP Ext. Installation successful (???): Script succeed: result was [@ Please reboot.]. Start OS from /DirectSD (initrd.gz was copied correctly = from /boot/extfour directory of RRcm13_v3.zip). No luck either.

Desperately try to start with haret.exe in NativeSD mode, with non-modified startup.txt. But nothing works far then Load done! 123456 Go Go Go! :(

DMESG to SD gives zero-sized file.

Please do not quote whole message in your replies. Thank you.
[HD2 Android NAND Development] Robbie P:
3.0 kernel doesn't work with haret.exe, it never has , it must be booted from magldr (or clk). How can you boot usng haret if you don't have wm6.5 in NAND?

The RR rom I posted/modified for magldr does not work with f2fs, the fstab in initrd.gz needs to be edited. I haven't done this for f2fs yet.

Interesting trying to use swap in NAND, I thought it needs to be formatted as a swap partition, not as a raw one??

Edit; you could try putting the initrd.gz from macs18max's cm13 boot/ftwofs folder into /sdcard/directsd if you want to try 2 f2fs partitions, it should work.

have to go out, will look into it later.

Edit; have attached mac's f2fs directsd initrd.gz
[HD2 Android NAND Development] thinhx2:
Hello,new source rom from Dev Viet Nam (hehe, iam from Viet Nam)

https://github.com/hexagonrom
[HD2 Android NAND Development] gujiangjiang:
My God！My HD2 has Android6.0

从我的 iPhone 发送，使用 Tapatalk
[HD2 Android NAND Development] EvilMegaDroid:
Since your testing android version on HD2 , if you find one that got smooth UI tell me , i tried quite a feq but they all start to lag badly in UI only GB works fine
[HD2 Android NAND Development] thinhx2:
Not fast,not stable but smootg and happy. After euro 2016 complete,i will comeback
[HD2 Android NAND Development] moliva_85:
Tytung's kitkat work well with Google app's
[HD2 Android NAND Development] EvilMegaDroid:
The problem i have with android 4+ on HD2 is that if i try to do something and then use the UI for example if i open an app then try to pull notification bar down it will lag as hell , and that happens with every android ive tried so far , maybe i should give a try to this since it uses a new kernel xD
[HD2 Android NAND Development] voland:
Stuck on "Go Go Go!"

Maybe you right, but during installation of SlimROM JB 4.2.2 I see "Bootloader: Haret" message (please see 1st attachment).

In addition, Aroma installer (in case of SlimROM) always creates NativeSDdirectory and always put haret.exe there, even if I delete it manually. And yes, I have no wm6.5 in NAND.

1. Well, SlimROM has 2.6.32 kernel, so if you right, than why magldr should not successfully load 3.0 kernel? I believe kernel must be started from some address in RAM, and this address is calculated incorrectly at my device.

2. Why even Recovery do not load from SD nor from NAND? Recovery has no kernel at all. This is the main question. I believe RR will start when this question will solved.

3. May RR be installed by TWRPext at all? Maybe whole problem lays in way of installation. TWRP is cLK-based, and TeamWin Recovery based on...?

4. Is this possible to include choice of DirectSD and NativeSD methods in Aroma installer please? Whatever is the reason of DirectSD installation method malfunctioning, switching to NativeSD method may resolve the problem. NativeSD although requires only 1 ext partition.

Problem with f2fs has been allegedly solved in some of earlier posts, but nonetheless I tried RR even with ext4. Aroma installer was finished correctly, on sdExt "system" directory was created, on sdExt2 "data" directory was created, but unfortunately, "data" directory was empty, and this is very strange, may that be the reason of no start? Final result was the same - stuck on "Go Go Go!".

BTW, when I tried to install RR to one ext4 partition (like in NativeSD), installer told appropriate error message, but "Exit" button does not work.

I had not found "swap" type of partition in DAF definitions (please read DAF.txt in 2nd attachment).

Thank you, although I already had tried f2fs kernel before, extracting it from RR .zip. Extracted kernel differs from yours, but finally I was not able to make Aroma installer to see f2fs partitions at all. I tried to format it as F2FS on Ubuntu 14 and 16, or by Apps2SD utility under Android and then duplicate by R-Drive on Windows, but it is still not understandable by Aroma installer (run from TWRPext!).

Is TWRPext able to read F2FS at all? Before Aroma started, I always saw 2 "Unknown filesystem "f2fs"" messages. So at this point probably I have no Recovery, which is able to understand f2fs and install RR.
[HD2 Android NAND Development] Robbie P:
Hi voland, will try to answer as best I can. Firstly the zImage is the kernel and the initrd.gz is the ramdisk, you say kernel when you mean ramdisk

Not sure if you are trying to boot the JB slimrom still. The 2.6.* kernel in the rom wont support f2fs. Not sure which recovery you are using either

Hope this helps:D

---------- Post added at 06:41 PM ---------- Previous post was at 06:25 PM ----------

I have ordered a new phone, CAT S60, and am awaiting delivery in the next week or so when it is released. I will still have my hd2 for testing etc of course, still love my hd2:D
[HD2 Android NAND Development] thinhx2:
Verry hard to tell bro,but very easy to say:

1 format partitions on nand of htc hd2 is yaffs2,only support 4.4 and old.

2. New version android dont run with yaffs2 ,only support ext4 and f2fs,bro can see:

+ 4.4: https://github.com/maniacx/android_device_htc_leo/blob/cm-11.0/ramdisk/fstab.htcleo

+ 5.x and up: https://github.com/maniacx/android_device_htc_leo/blob/cm-13.0/ramdisk/fstab.htcleo

3. Htc hd2 is device run windows mobile,same all device windows mobile, htc hd2 can run android with: haret.exe+zimage+initrd.gz. i see in meta inf of all rom android run on nand,ziamgr+initrd.gz move to 2 partitions ,i thing magldr is 1 haret.exe in nand can read 2 partitión of zimage and initrd.gz in nand

4. [MENTION=2473151]macs18max[/MENTION] use htc hd2 inter(512mb rom,thiss version run android with system on nand and data on sdcard and size system partition magldr max size is 450mb (maybe i forget) dotn install rom 5.x and up because size of system rom very big ~5-600mb dont install on nand,he hack to install on sdcard. I no have idea to install rom have big system size on system nand mini size

5. I see device tree for sony 2011 by legacy xperia team, system partitions can run with yaffs2 but they repartitions system size to can flash rom,now i miss magldr max size is 450mb,very mini to install rom.

If bro have idea,tell me
[HD2 Android NAND Development] Robbie P:
Seems [MENTION=385965]daedric[/MENTION] managed to get swap working on NAND on htc Kaiser here http://xdaforums.com/showpost.php?p=9719702&postcount=17

but not sure how since mount command does not seem to have type swap

I tried it in Macs18max's CM13 and had no luck, I/O errors

However I have managed to make it work on a CM7 sd build with a bit of editing

I have been reading that swap-on-nand makes the nand wear out quicker than having either just system or data on it. Luckily I have no bad blocks on my hd2 so far, and having the yaffs2 file system preserved in the nand partition might help with wear levelling, not sure.

Attached a couple of screenshots of CM7 terminal commands

Will try again with marshmallow rom when I have time.
[HD2 Android NAND Development] voland:
Thank you [MENTION=3629322]Robbie P[/MENTION] for previous detailed explanation. I am feeling as n00b :)

And still do not know reason of "misc" partition existence. Would you explain please?

I see that our mind follows parallel routes, so please take a look on that. What about put in init.d some script e.g. "95nandswap" like this:

#!/system/bin/sh

# swap partition "swap" of type "ya" must be created in NAND by DAF or another tool
# type "swap ya|asize|hr allsize" in flash.cfg before flashing by DAF.exe
# swapfile file also must be created on device
# we must write to file, not directly to partition, because of no "swap" partition type for MTD defined
swapfile="mtd@swap/swapfile"

# swapsize in KB (max. 512KB for Leo EU)
swapsize=524288

if [ ! -f "$swapfile" ]; then
dd if=/dev/zero of=$swapfile bs=1024 count=$swapsize
mkswap $swapfile
fi

# start using swap
swapon $swapfile

# parameters for system tweaks
swappiness=90
vfs_cache_pressure=100
dirty_background_ratio=5
dirty_ratio=20
dirty_writeback_centisecs=500
dirty_expire_centisecs=200

# do system tweaks
busybox sysctl -e -w vm.swappiness=$swappiness
busybox sysctl -e -w vm.vfs_cache_pressure=$vfs_cache_pressure
busybox sysctl -e -w vm.dirty_background_ratio=$dirty_background_ratio
busybox sysctl -e -w vm.dirty_ratio=$dirty_ratio
busybox sysctl -e -w vm.dirty_writeback_centisecs=$dirty_writeback_centisecs
busybox sysctl -e -w vm.dirty_expire_centisecs=$dirty_expire_centisecs

exit 0

According to your experience, $swapsize must be 305619 KB/blocks, but I seen no flash.cfg for your Leo - maybe yaffs partition in mtdblock3 have 298MB, and the rest is occupied by mtdblock1 and mtdblock2.

I suggests the next flash.cfg:

swap ya|asize|hr allsize

Sorry, I cannot test, still not able to run Recovery nor Android with kernel 3.* :(

Have to say: once the Recovery was started, occasionally, after I put another SD card in Leo. Full of joy, I sit to dinner, than restart Leo... and everything gone again :eek:
[HD2 Android NAND Development] Robbie P:
here is flash.cfg

misc ya 1M
recovery rrecov|ro|nospr 9M recovery_leo.img
boot yboot|ro 5M
swap ya 300M
cache ya 5M
userdata ya|asize|hr allsize

Just used a nand recovery and edited the system line.

also need to use loop device.

The terminal in marshmallow rom doesn't seem to like loop devices, keep getting I/O errors. Going to have to re-flash RR rom I think, my CM13 has xposed (not working, framework not found) in it and it might be messing things up.

No idea what misc in nand does. It certainly is not used in NativeSD or DirectSD roms.

Can't think why your recovery is not working.

Edit; here is what worked with cm7

#make directory in root and file in dev folder
mkdir /nand3
touch /dev/loop3
#symlink loop device to file
mount --bind /dev/block/loop3 /dev/loop3
# mount 4th nand partition to new directory
mount /dev/block/mtdblock3 /nand3
# make image file and format with zeros
dd if=/dev/zero of=/nand3/swapfile.img bs=1024 count=305616
# change perms so as not world writable for security
chown root:root /nand3/swapfile.img
chmod 0600 /nand3/swapfile.img
# loop into swapfile
losetup /dev/loop3 /nand3/swapfile.img
#set up and switch on swapspace
mkswap /dev/loop3
swapon /dev/loop3
[HD2 Android NAND Development] voland:
So, it's clear why 300K+ blocks, not 500K+. Strange is, that it is exactly 305619, not 307200=300*1024. Some extra "self-recovery-aimed" 0.5% is reserved by system within 300M?...

Excellent! Is CM7 system became more responsive in memory management?

I think you must not use loopback device if MM do not like loop devices. You can directly set file on yaffs as swap instead. In your case

mkswap /nand3/swapfile.img
swapon /nand3/swapfile.img

Manual told: "mkswap sets up a Linux swap area on a device or in a file."

I hope MM still understand yaffs, although @thinhx2 show no such row in fstab.

I will try this on Slim 4.2.2 in meanwhile. I desperately do not understand why my Recovery freeze during load. Tried totally everything what I can imagine as reason. If that would been corrupted RAM/NAND, Slim4.2.2 would crashed constantly. But it did not.

Is there some possibility to post-examination, e.g. turn on dmesg for write to SD during a boot? "Dmesg2SD" from magldr creates just empty log.
[HD2 Android NAND Development] thinhx2:
Mm only understand yaffs format on systen partiton(i thing is can run wwith yaffs because device sony xperia 2011 run MM with yaffs format on system. Here: https://github.com/LegacyXperia/and...30-common/blob/cm-13.0/rootdir/fstab.semc),MM data only work with ext4 or f2fs(same new android phone),but system partition hd2 tool kit support only max is 450mb (i miss,maybe i forget,need confirm),dont install rom 5.x,6.x because size of system rom mini is ~ 600mb

This idea only can work on tmobile hd2 with nand 1gb,dont work on htc hd2 internal nand 512mb

If can mod hd2 tool kit resize system partition up to 7-800mb. I thing can hack MM run on nand
[HD2 Android NAND Development] Robbie P:
on RR rom with terminal I have "invalid argument" when trying swapon, same with CM13

See screenshots

I can't mount the file without defining the type, and I think that is why swapon doesn't work, because it is seeing a yaffs2 formatted file

Note that I already have swapfile in nand with the correct permissions. remaking this file does not change the "invalid argument" message when trying swapon.

Not sure what to try next.
[HD2 Android NAND Development] voland:
:confused:

1. Try "-f" parameter - it would reinitialize swap space

2. Try "-U" parameter with UUID instead of filename

3. You can check swap working by command

cat /proc/swaps
[HD2 Android NAND Development] Robbie P:
f and U are not options in swapon apparently, see screenshot

with cm7 swap-on-nand I couldn't really see a difference tbh, don't really have a lot of stuff on it anyway. I suppose the real test in marshmallow would be to lose the lagginess after gapps are installed.

Another way of getting a bit more speed might be to use squashfs to compress /system or parts of it as in this rom http://xdaforums.com/showthread.php?t=881937

with AUFS to make it writeable. I have been trying the sd build today and it is not bad, battery not as good as gingerbread but only 1 day use so can't really tell. Not entirely sure how to get it to work, but assume that kernel would need to support it and would need to add the binaries.
[HD2 Android NAND Development] 63nu1n3:
thank you for bringing it to old hd2... hats off devs
[HD2 Android NAND Development] EvilMegaDroid:
are you guys working on swap in nand? If so will it be usable on older roms like ics or JB and what would the perfomance gain be if we put it there and not in sdcard
[HD2 Android NAND Development] thinhx2:
No bro
[HD2 Android NAND Development] -leo-:
i dont think this is a good idea as hd2 is old enough, and this will do harm to the nand chip, and it will die more quickly....... XD
[HD2 Android NAND Development] voland:
:(

Of course you can see some difference only when you will load many aps and system began to swap.

Yes, this is good, stable and fast ROM, although bit too candy for my taste.

I using 2.3.7 now with MIUI interface (http://xdaforums.com/showthread.php?t=1484003) and this one is good enough for old apps.
[HD2 Android NAND Development] voland:
Dalvik cache on NAND

Guys, I am still not able to start MM on my HD2 (see posts above, GoGoGo stuck problem), so I cannot develop swap on NAND further, at least there in MM ROM.

Instead of this, I offer boost of OS by placing dalvik-cache on NAND. As reslt, all apps will load significantly faster.

There 2 things you must to do:

1. NAND repartition using DFT NAND Partitioning tool with next flash.cfg:

misc ya 1M
cache ya 10M
dalvik-cache ya|asize|hr allsize

1.A. If you chose to have recovery written to NAND, do not forget to place your recovery.img to DFT directory and add this line before line with "dalvik-cache" partition definition:

recovery rrecov|ro|nospr filesize recovery.img

2. Add few lines in init.rc from ramdisk in appropriate places:

mkdir /dalvik-cache 0771 system system
mount yaffs2 mtd@dalvik-cache /dalvik-cache nosuid nodev

and

mkdir /data/dalvik-cache 0771 system system
symlink /dalvik-cache /data/dalvik-cache

Unfortunately, I cannot ungzip initrd.gz from MM due to unexpected error. But I sure thinhx2 or Robbie P will be able to try to apply proposed fix and test it, if anyone will be interesting of course.
[HD2 Android NAND Development] EvilMegaDroid:
would this work in other roms apart MM? Also i use ext4 script so does it stores dalvik-cache to sdcard or nand?And how do i use this with black clk because i can't use DFT there if im not wrong Sry for my noobines
[HD2 Android NAND Development] voland:
Yes, it certainly works especially on another ROM (I has been practicing on http://xdaforums.com/showthread.php?t=2305164). Oppositely, as I wrote, I am not able to run MM for some mystery reason, so I cannot say certainly that this improvement will work on MM.

What do you mean by "ext4 script"?

Commands I published there must be run during very early stages of OS initialization. You may use your own script (mean not changing directly init.rc), but still you need to inject it to initrd.gz IMHO, or at least run it before system began to use dalvik-cache = run those apps (including system apps and services), precompiled by Dalvik Java VM to machine-code, and situated in dalvik-cache partition, whenever this partition lay - on MTD/NAND or ext4/SD.

Sorry, cannot help, I use Magldr 1.13 and have no experience with clk, so I do not know whether it is possible to repartition NAND by clk Also I don't know how to set HD2 to Flash mode by clk for DFT connection and flashing.
[HD2 Android NAND Development] EvilMegaDroid:
i mean having /data on sdcard , ive done research online and found out that Dalvik is stored on data folder so in sdcard for me , also the problem is that i don't know how to repartition since i have black clk and the only way to install it is from a nbh file
[HD2 Android NAND Development] Robbie P:
Dalvik on nand is a good idea. It has worked on other ROMs before. But I think since this ROM mounts stuff using fstab in initrd.gz, we should do the same.

voland, the reason why you have errors unzipping magldr ramdisk is because it has 6mb of zeros at the start. You have to cut them out first.

Will try to edit magldr ramdisk tomorrow, if I have time.

Evilmegadroid, black clk is made to repartition nand, there is a menu option for it. The only problem is that you have to boot the ROM from its own nand partition, eg sboot, etc.

The only reason we are booting from magldr is that it has been tested from magldr. The original ROM may well boot from clk, don't know.
[HD2 Android NAND Development] EvilMegaDroid:
ive found a way to create that partition via a tool ive found in CLK thread , now do i need to compile clk myself to edit init.r or edit the init.rc of kernel/rom i mean where am i supposed to find init.rc (got lost here xD)
[AT&T Samsung Galaxy S 5] nate39:
This doesn't always happened but pretty much daily I will turn on my screen after being home for hours on my home wifi only to find out it has been on 4g lte the whole time. I have smart switch on so I don't know what else to do. Does anyone else have this problem? thanks
[AT&T Samsung Galaxy S 5] skyrocketeer:
I think the problem IS smart switch. try turning it off. Another thing you could look at is in the advanced Wi-Fi settings, there is an option called "Keep Wi-fi on during sleep" Make sure that is set to 'Always'
[AT&T Samsung Galaxy S 5] nate39:
I answered this from my tablet I thought but I guess it didn't take. I turned off smart switch and it seems to have helped but now I have to remember to switch it myself. This never happened with my s3 or s4. But thanks
[Android General] deanfourie:
http://consumer.huawei.com/nz/mobile-phones/support/downloads/huawei-p8lite-nz.htm
[Android General] elgaita:
Has anyone of you tried to upgrade this version (ALE-L02C183B130) to MM6 & EMUI 4 with ROM : C636B530?

(https://xdaforums.com/p8lite/general/huawei-p8-lite-ale-l02-marshmallow-t3381201)

Were you successfull?

Does it work ok in device:ALE-L02(new-zealand) "single SIM" ?

Thanks in advance , Regards, EG
[Verizon HTC 10 Questions & Answers] legaldeejay:
In the Messages app, under Notification settings, I have "Play notification sound" unchecked, but when I receive a text message, it will still make the Notification sound. The only way to prevent the sound is to set the "Notification sound" to silent or unchecking "Received notification" which disables showing the notification in the status bar. I have tried basically everything (i.e. restarts, hard reset, checking and unchecking), except for a factory reset. Is anybody else having this issue or any ideas?
[Verizon HTC 10 Questions & Answers] legaldeejay:
FYI, I've confirmed this is a firmware issue and hopefully will be fixed in a future update. So anybody who has this phone should be experiencing the same issue.
[Miscellaneous Android Development] elix9000:
Hello, I have put in a little time to try and port Cm12 to our device . I will allow you to know this ROM is for the Blu Life One X(2016)(L0070UU) only!!

Disclaimer: I am NOT responsible for any damaged,bricked,etc. devices.

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

Link to Gapps:http://opengapps.org/?api=5.1&variant=nano

Note: TWRP MUST BE USED!!!

The status of this rom : Bootlooping,sadly

Whats working: unknown yet:D:D:D:D:D:

Whats not working: Unknown yet :D:D:D:D:D

Credits: [MENTION=3784300]BlueFlame4[/MENTION]

[MENTION=5132229]xpirt[/MENTION] [MENTION=7479464]retsen444[/MENTION](For fixing the rom not flashing issue)

If I missed any credits please let me know, thanks
[Miscellaneous Android Development] idontkn1:
Very cool. I'll play with it this afternoon. I assume that we will need to flash gapps as well?

Here is a link...

http://opengapps.org/?api=5.1&variant=nano

Update:

I'm getting the following error when flashing in TWRP 3.0.

'Could not find "META-INF/com/google/android/update-binary' in the zip file" error.

Does not look like rolling back to 2.8.7 will accomplish anything either after reading post below.