yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] multiwirth:
My hd2 is dead...

But i´ll buy a new one if i found a cheap offer.

It was a nice phone.

CM14 on it... i don´t think this would be usable at all.

Not with zram, not with oc.

This phone is too old.

CM14 on the samsung galaxy s3 makes more sense.

1,4Ghz quadcore is a big difference to the hd2´s poor single core and the ram is the biggest problem.

It´s also not really fast to boot from external sd card.

I had many lags with data2ext on kitkat. And yes, it was a great class 10 card with 10mb/s read/write.

The internal memory is too small for actual android, but would have the best stability and performance.

I had a nand rom (completly on the nand after some modifications) and cm10.1 complete on the sd card.

The sd card rom runs really bad while the cm9 nand rom runs fast and smooth.
[HD2 Android NAND Development] drtikv:
wow, you're pretty cool man
[HD2 Android NAND Development] ultramag69:
This was a seriously kickass phone...

Was so sad when mine finally bought the farm...

Anyone who thinks otherwise, this is a ten year old phone... It's a beast...

If only there was an easy way to expand the RAM...
[HD2 Android NAND Development] Myrmeko:
You are amazing.

The fact that this phone can run every single version of Android is simply incredible.

Why not try enabling zRAM or try an app from Google Play called Swapper. Swapper helps a lot on Gear S CM12.1 because it has only 512MB RAM too.

And i guess you could overclock it up to 1.2GHz, use Gapps Nano with no auto-sync and disable wakelocks with Greenify.

Edit 1:

Try L Speed to speed up the UI. Set the display resolution to 360P or 240P to not load up the CPU/GPU.

It only needs Bluetooth/Wifi and calls (optionally mobile data). No need for in call-audio, because we could activate the speaker mode. Bluetooth/Wifi for sending files and browsing the internet from the main phone.

And no need for Camera (only if you want/have time). Only 5MP and is too wibbly wobbly. Lol.

Software video decoding is enough for YouTube in 360P/240P, i guess?

And maybe GPS, in case somebody wants to use it as a car GPS.

Everybody, look around XDA for speed tweaks and mods on XDA. Everything from apps to build.prop tweaks and performance scripts are good.

A battery optimizer would be good as well, because the speed tweaks will consume the battery.

Edit 2:

Why not zipalign and odex?

And here are some tweaks:

http://xdaforums.com/showthread.php?t=2630242

http://xdaforums.com/showthread.php?t=1916098
[HD2 Android NAND Development] moralesnery:
This device is harder to kill than a damned cockroach! Android 7!

You are the envy of all the Android scene, congratulations, even if it was only an experimental boot.
[HD2 Android NAND Development] vibbuz:
it'll be like 3 years or more I'm not checking the hd2 forum.. I'm still using a cm11 rom as a music player, this phone simply don't want to die!

you guys still working on it are great, I remember Robbie P you were helping others as well when I first quit this forum. might aswell try a new rom, the htc 10 is not funny enough to work on compared to the hd2!

it feels like being back home haha
[HD2 Android NAND Development] TheImpossible:
You're a ****ing genius!!!!!! The HTC HD2 will never die!!!!

Great job!!!
[HD2 Android NAND Development] macs18max:
Hi guys. Compile Aosp rom this time.

Android 7.1 Booted.

Only display and wifi work. But barely crawls

https://youtu.be/dhocFpHT1ZI

Bootanimation I got from here http://xdaforums.com/galaxy-grand-duos/themes-apps/boot-animation-t3468013

Pixel launcher I found in xda here http://xdaforums.com/nexus-6p/themes-apps/flashable-zip-pixel-launcher-goodies-t3484455
[HD2 Android NAND Development] thinhx2:
Thank you
[HD2 Android NAND Development] thinhx2:
Android 7 no support legacy ril?
[HD2 Android NAND Development] Alio99:
Amazing!!!

You are doing а great job! The speed of operating right now doesn't matter. In fact HD2 got 7.1, the 7 years old device running the newest o.s., which should not have been run on it!!! You're show to other people, that they make a fool of marketers, and there are Legends like htc HD2 that break down dirty hopes and there are Developers like you, who can do AMAZING work.

Thank you!

Please keep on working with our Legend, named htc HD2
[HD2 Android NAND Development] mahir555:
AMAZING :good: :good:

keep this work up , pls you are really inspiring ;)
[HD2 Android NAND Development] Myrmeko:
This is so amazing!!! Android 7.1 on a 7 year old phone!

Please post a download link.

Is good enough to play around with. :)
[HD2 Android NAND Development] Titanic52:
macs18max; Please post a download link. many thanks

NAND/NativeSD ROM
[HD2 Android NAND Development] Robbie P:
Here http://xdaforums.com/hd2-android/nand-dev/nougat-7-1-nov-13-2016-kernel-3-0-101-t3499369 it is DirectSD.
[HD2 Android NAND Development] gmsamdani:
Can You please build A custom
[HD2 Android NAND Development] Cheque:
nice work mate.

CM13 looks fluid, any chance to help you with fixing feratures?
[HD2 Android NAND Development] shugaoye:
Robbie, may I know how to you get the kernel log (dmesg that you captured)?
[HD2 Android NAND Development] Robbie P:
Important to switch off the phone, or use the reset button under battery cover, do not pull battery else log will be lost, then;

magldr>10.Services>2.Dmesg to SD

You will find dmesg.txt on sd card
[HD2 Android NAND Development] shugaoye:
Thanks!
[HD2 Android NAND Development] thedruid808080:
problem....

When i arrive at point 8. Boot AD SD ...android load...123456 Go go go! but anything happend; what i do wrong?
[HD2 Android NAND Development] Derpmochump:
how to run this degoogled?

i dont want goggle apps

hehe never mind i didn't notice that you can select not to install it
[HD2 Android NAND Development] macs18max:
Updated source on OP
[HD2 Android NAND Development] moliva_85:
Today's attempts were unsuccessful .. Tomorrow I'll try again and will report
[HD2 Android NAND Development] gilbert32:
maybe it's the xda theme :)

they should use 2013 theme to find the 5 start-to-be-pressed button and the newsworthy thread button :)
[HD2 Android NAND Development] macs18max:
Gilbert. Do you want to port ubuntu-touch just for fun? I am currently working on sources.

I have already built the image. but having trouble installing

very complex installation process.
[HD2 Android NAND Development] J0SH1X:
my hd2 was stolen :( i loved this device it will never die out
[HD2 Android NAND Development] gilbert32:
OF COURSE!

This, i agree. did you see evervolv post about installing ubuntu touch? maybe we can do it like bravo
[HD2 Android NAND Development] werty100:
Why we dont try to build firefox os it will run very good on hd2 , ubuntu is very heavy for old htc hd2 .

Also i think we are not on the way i9000 with AOSP and kernel live oc with new governos and gcc 5.2 works like a charm very fast with gapps and all roms are AOSP becouse i think cm are very heavy , they have similat hardware so it should go like i9000 but htc hd2 with LP is unusable with gapps
[HD2 Android NAND Development] Snow000man:
I just voted top star for this build. Hope we can have this for our HD2. Another flavour OS to conquer :) Looking forward for a release (alpha, beta, etc).

---------- Post added at 07:24 PM ---------- Previous post was at 07:24 PM ----------

I will test this if you can get the phone/messaging working :fingers-crossed: as I still use this as my daily driver. Can't install without phone/messaging working.
[HD2 Android NAND Development] Spaqin:
I actually back in the day had Ubuntu (I'm pretty sure it was it, cause I could get to the ****ty Ubuntu UI) installed for the lulz, it was with Gnome instead of unity, and actually... it was quite usable. Sure, it didn't support charging as USB Host was used instead, but audio worked, wifi worked, 3G worked, and Iceweasel was a full-fledged browser.

And since I still have my HD2 and it's not my daily anymore, I will give this ROM a try later!

Especially considering there's no 6.0 port for my "new" fancy LG :E

macs18max, have you considered this?

xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616

It might be a bit faster than the official Google crap.
[HD2 Android NAND Development] macs18max:
I was looking around, I think we are amongst the first legacy device to boot cm13....
[HD2 Android NAND Development] werty100:
I will like to see ubuntu phone on hd2 pelase can you put instructions and ZIP
[HD2 Android NAND Development] gujiangjiang:
i can‘t believe my my eyes

see the video on the youtube,it works so smoothly!
[HD2 Android NAND Development] thinhx2:
now my htc hd2 die touch screen and maybe flash rom bro?
[HD2 Android NAND Development] jpg3927:
thanks

thanks for good rom
[HD2 Android NAND Development] hinxnz:
Hi, from my experience if formatting sdcard in Android it formats the whole card and not just the fat32 partition. If you adopt sdcard as internal storage, to format in recovery again you need to format back to portable again in Android.

I don't have this device but I make a mod that does this I think what you describe on M for the sensation. I have data mounted on sd-ext and using sdcard normally.

I do this by changing voldmanaged flags for example this disables adopted storage by excluding the encryptable flag and changing auto to 1 which is for partition number and noemulatedsd is because of the sdcard is not internal.

Changing the partition number from auto to 1 fixes the sdcard error your experiencing.

# SD card
/devices/platform/msm_sdcc.3/mmc_host/mmc1* auto auto defaults voldmanaged=sdcard0:1,noemulatedsd
[HD2 Android NAND Development] redsmith:
No freaking way, just saw the news on XDA Portal. I've never had an HD2, but I have come all the way from the N6P forums to pay my respects to the devs and the king itself. Long live the king! I still remember my HTC Desire (bravo) fondly, good times!
[HD2 Android NAND Development] hirencj:
This Phone Indeed Is A Legend .. Love This Phone .. But since a year...
[HD2 Android NAND Development] parthabhatta:
I am still a proud and excited owner of this greatest device and I salute all the great devs and xda-developers for keeping this legendary device alive. Thanks to HTC too for manfacturing such a futureproof device.

I am excited to try this ROM but I am on dual boot with NRG WM6.5 ROM and a NATIVESD Kitkat version developed by the great tytung. Will surely give this a try if a native SD version comes out.

Thanks to [MENTION=2473151]macs18max[/MENTION] for extending this device's life.
[HD2 Android NAND Development] DarkStone1337:
Impressive :)

Glad to see the HD2 is still getting some love
[HD2 Android NAND Development] googlephone:
Congratulations. It's on the xda frontpage.
[HD2 Android NAND Development] Robbie P:
Thanks hinxnz

I changed the auto to 1 in fstab but still get the "Corrupted SanDisk SD Card" notification, and still have the emulated "sdcard" in file manager. I can't see my stuff on the FAT32

the only difference I see with your line and the one I have in fstab is msm_sdcc.2 instead of 3. Not sure if this makes a difference. does it?

Thanks DarkStone1337 for your work, I still use a SuperRAM sd build for a daily:good::highfive:
[HD2 Android NAND Development] efebe:
Congratz macs18max!!!

http://www.xda-developers.com/htcs-legendary-hd2-receives/

Every HTC HD2 owner must be proud of you and everyone else who has made this possible!
[HD2 Android NAND Development] WTF?:
do the Marshmallow treatment to the HTC Desire-Z (aka T-mobile G2) - that really was the most awesome phone ever made by HTC!!
[HD2 Android NAND Development] methuselah:
Heads off those who still own this beauty.... HTC lives still on the hearts of many.... I am amazed what this phone was developed by HTC in those years.....
[HD2 Android NAND Development] hinxnz:
I guess your build needs updating as changes that were merged aren't yet in your build or either that your sdcard isn't linked/configured in the first place, does it work with a standard installation using sdcard with one vfat partition? What I did with the fstab entry works with builds after 29/11 if using an sd-ext, otherwise you get the same error. Different setup I presume so different numbers.
[HD2 Android NAND Development] vivebatu:
This thread is going places people! Got featured on GSMArena ...super show!!! HD2 is probably the greatest smartphone ever made ....can't understand how HTC could so spectacularly botch up after such a lead over others ..sorry if off topic

http://m.gsmarena.com/sixyearold_htc_hd2_receives_android_60_port-news-15355.php
[HD2 Android NAND Development] mosi hd2:
wow wow wow ...

niiiiiiiiiiiiiiiiiiiiiiiiice ...

downloading ...

thanks greeaaaaaaaaate max...

u are niiiiiiiiiiiiiiiiiiice ...
[HD2 Android NAND Development] philipped346:
hello mosi , welcome again;)
[HD2 Android NAND Development] mosi hd2:
hi dear philipped ... i'm glad to see u again

I am very surprised and im happy ... we have android 6 on hd2 and its so nice
[HD2 Android NAND Development] ariebower:
Thanks macs18max for updating HD2 thread, I hope will get release version of this ROM..?, the taste of Marshmallow
[HD2 Android NAND Development] amin44:
This phone just won't die.

This is what? The 20th OS to run on the HD2?(copied from [MENTION=4670039]LLStarks[/MENTION] )
[HD2 Android NAND Development] F.E.K.:
Great phone, too good to die ;)

G6-L11
[HD2 Android NAND Development] bart.found:
Just wiped some dust from my old toy! And ready to flash!!!

maybe one day windows 10 mobile will land on our old device! :D
[HD2 Android NAND Development] JohnM109R:
Don't hold.your breath

Sent from my A0001
[HD2 Android NAND Development] bart.found:
ahahah

---------- Post added at 01:01 AM ---------- Previous post was at 12:14 AM ----------

just flashed, can confirm the SD bug.. and also playstore and browser FC.. there will be another cm13 build? I could test! ;)
[HD2 Android NAND Development] multiwirth:
Can i install this with clk or black clk?

MAGLDR is not my favourite
[HD2 Android NAND Development] moliva_85:
only MAGLDR for now!
[HD2 Android NAND Development] i_4_u89:
htc hd2 android 6.0

Thanks macs18max this is nice but we r waiting for stable build rom ,sim not working yet so can soon is possible ?
[HD2 Android NAND Development] mahir555:
thanks for this great effort man

i hope so soon there will be a fully ( even semi) working build.

meanwhile how can i put any apk inside this rom to install it? browser fc ( no download)..play store fc .. email ( for apk attachments) fc ?
[HD2 Android NAND Development] thinhx2:
Update?
[HD2 Android NAND Development] macs18max:
My apologies.

Christmas season. Very busy.

Will be able to provide an update after new years.

Spezi77 has got phone calls working on his htc desire, but still no data. Hopefully he solves data and camera issue, and since we use nearly same hardware, it shud work for hd2 too..

As for me, i'm busy until 2 week of Jan it seems.
[HD2 Android NAND Development] i_4_u89:
ok Thanks macs18max merry christmas we r waiting for 2nd update with fixed build Roms
[HD2 Android NAND Development] mahir555:
aaah.. can't tolerate all that wait .. but U must enjoy your time to get us a good update ofcourse.

have a nice time man ??
[HD2 Android NAND Development] dimanpt:
Great work Mac as always! I hope you will continue to support the legacy of the HD2, here is my video about this build!

https://www.youtube.com/watch?v=d2mFKfQxleQ

Happy new year!

intoSmartphones Toderici
[HD2 Android NAND Development] Robbie P:
Not had much time to play with this.:o

Found this post http://xdaforums.com/showpost.php?p=64282458&postcount=751 which says the 20151212 build fixes sim and therefore data and calls (ours is 20151115) on the note 4

Also, I noticed that camera.qsd8k.so was missing in /system/lib/hw, it was there in lollipop. I put it in the rom but the camera still FCs. is something else missing?

I also tried booting the DirectSD rom from nand and formatting the FAT32 to ext4, now instead of "corrupted sandisk sdcard" I get "unsupported sandisk sdcard". I still think we need to use the "internal memory" on our data partition. I have read of "sdcard fixes" on other phones with cm13 but not sure if it helps us, since we are running android from the sdcard.

Edit; have attached a dmesg and log from before adding the lib.
[HD2 Android NAND Development] mahir555:
update needed

hope to see near update gys ?
[HD2 Android NAND Development] ch3mn3y:
When creating sdext1 & 2, which one is set by system/tecovery as /system, and which as /data? Coż I set 1GB sdext and 4GB sdext2, but Internal Storage is only 1GB
[HD2 Android NAND Development] Robbie P:
As you have probably guessed sdext1 is for data and sdext2 is for system
[HD2 Android NAND Development] thinhx2:
complete
[HD2 Android NAND Development] macs18max:
I don't use localmanifest but I directly copy paste folders

But I will make post one for you
[HD2 Android NAND Development] thinhx2:
fixed
[HD2 Android NAND Development] macs18max:
Scroll a little higher more in ur terminal and find what is the error message. you will see error:

post what is shows after error:
[HD2 Android NAND Development] macs18max:
[MENTION=6358345]thinhx2[/MENTION] have you compiled and booted android rom before for this device or any other device?
[HD2 Android NAND Development] macs18max:
I think you didnt apply my patches. or they didnt get applied properly.

The issue is that qcom_bsp is getting applied, and we do not use it.

remove lines 23-26 and 31-38 from this file here https://github.com/ResurrectionRemix/android_build/blob/marshmallow/core/qcom_target.mk

in other words open file build/core/qcom_target.mk and remove the following lines.

qcom_flags += -DQCOM_BSP
qcom_flags += -DQTI_BSP

ifneq ($(filter msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
# Enable legacy graphics functions
qcom_flags += -DQCOM_BSP_LEGACY
# Enable legacy audio functions
ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
qcom_flags += -DLEGACY_ALSA_AUDIO
endif
endif

Do not forget to "make clobber" before you rebuild
[HD2 Android NAND Development] macs18max:
Add this as your local_manifest

<?xml version="1.0" encoding="UTF-8"?>

<manifest>
<project path="device/htc/leo" name="maniacx/android_device_htc_leo" revision="cm-13.0" />
<project path="kernel/htc/leo" name="maniacx/android_kernel_htc_leo" revision="cm-13.0" />
<project path="hardware/qcom/audio-caf/qsd8k" name="maniacx/android_hardware_qcom_audio" revision="cm-13.0-caf-qsd8k" />
<project path="hardware/qcom/display-caf/qsd8k" name="maniacx/android_hardware_qcom_display" revision="cm-13.0-caf-qsd8k" />
<project path="hardware/qcom/media-caf/qsd8k" name="maniacx/android_hardware_qcom_media" revision="cm-13.0-caf-qsd8k" />
<project path="external/stlport" name="CyanogenMod/android_external_stlport" groups="pdk" remote="cm" />
</manifest>
[HD2 Android NAND Development] thinhx2:
Fixed
[HD2 Android NAND Development] macs18max:
Seems like qcom_bsp and qcom_sti flags are still enabled somewhere. Did you remove it from qcom_target.mk like I ask you to? Do you have any sources?
[HD2 Android NAND Development] macs18max:
[MENTION=5091819]spezi77[/MENTION]

I have included this commit

https://github.com/spezi77/android_device_htc_bravo/commit/e48d690e6c9845f24dd0f48092ec01bce3e0f699 and also using your telephony and ril repo.

Have a look attached logcat and dmesg

I have this in my dmesg

init: Service 'ril-daemon' (pid 1373) exited with status 1

Also kindly check if you this in your log

1-05 17:58:26.104 1380 1380 E RadioService: couldn't load radio module radio.primary (No such file or directory)
[HD2 Android NAND Development] spezi77:
Now, I recall that I took a few kernel related updates from OpenDesire project. Look at my changes from 27 th Dec:

https://github.com/spezi77/android_kernel_htc_qsd8k_3.0/commits/cm-13.0

We need a new netlink msg type for IDLETIMER. And I think that Per-UID cpu time statistics are also necessary.

Best of luck!
[HD2 Android NAND Development] werty100:
how can i apply patch to cm13 source for compiling
[HD2 Android NAND Development] macs18max:
[MENTION=6358345]thinhx2[/MENTION] [MENTION=4240105]werty100[/MENTION]

I will describe how I do it. There might be easier ways to do this which I don't know of but this is how I do it.

If you open your explore you will see all the files under "HOME" directory (folder)

I have created one folder name cm13 initialized repo and repo sync so that we have downloaded all aosp/cm file need.

Under "HOME" folder I have created another folder name "patch_cm13" in this folder I have stored all my patches.

For example the patch for frameworks/native repo is named as "frameworks_native.patch"

To patch frameworks/native you can just type in terminal

cd ~/cm13/frameworks/native; patch -p1 < ~/patch_cm13/frameworks_native.patch

But after patches are applied it becomes difficult to repo sync sometimes. so I have created a text file. and when I want to repo sync I just remove patch repo sync and reapply patch by checking out a branch leo

cd ~/cm13/bionic; git checkout . ; git clean -df
cd ~/cm13/build; git checkout . ; git clean -df
cd ~/cm13/hardware/libhardware; git checkout . ; git clean -df
cd ~/cm13/frameworks/native; git checkout . ; git clean -df
cd ~/cm13; repo abandon leo_patch
cd ~/cm13; repo sync -j8

cd ~/cm13/bionic; git checkout -b leo_patch; patch -p1 < ~/patch_cm13/bionic.patch
cd ~/cm13/build; git checkout -b leo_patch; patch -p1 < ~/patch_cm13/build.patch
cd ~/cm13/hardware/libhardware; git checkout -b leo_patch; patch -p1 < ~/patch_cm13/hardware_libhardware.patch
cd ~/cm13/frameworks/native; git checkout -b leo_patch; patch -p1 < ~/patch_cm13/frameworks_native.patch

cd ~/cm13

So all I do is copy the text and patch in terminal and it will do the job removing existing patch, syncing to latest cm source and applying patches again. (Currently I have created 4 patch in bionic, build, libhardware and native)

First 5 lines removes previous patches applied

6 line syncs to the cm repo

lines 7 to 10 re-applies patch.

Sometimes if patches fails to apply you may have to create a new patch so that they apply properly.
[HD2 Android NAND Development] macs18max:
I will share some tips to make compilation less frustrating

I do not use brunch but use old styles lunch instead.

step how to do build using lunch

make clobber
. build/envsetup.sh
lunch cm_leo-userdebug
make otapackage -j4

make clobber > clean removes any previously compiles files/libs to compile a fresh build

make otapackage > compiles the ROM and puts it in a flashable zip.

But if you are I compiling ROM for the first time, here is what I do to make things less frustrating.

In my experience most of the errors during compilation of rom are related to device related files and the codes that we change to make it compatible with out device. (CM almost never has compilation errors)

So if you directly compile using "make otapackage" chances are these error will show up in the end or middle of the compilation process. the entire compilation process on my device take around 3-4 hour. so you can imagine after 2 hours of compilation you have an error then you fix the code and recompile wait for another hour and then you get the second error and third and it goes on until you have fixed all compilation error. This becomes really time consuming. So I built device specific modules first before I compile the whole ROM.

First I built bootimage (kernel ramdisk) and recovery

make bootimage recoveryimage -j4

see if it compiles. fix any errors related to it. again do

make bootimage recoveryimage -j4

If every thing is fixed I move to comple the next modules such as audio modules, display modules, sensors, gps , media related. See full list below

make bootimage recoveryimage -j4
make libhardware libhardware_legacy -j4
make audio.usb.default audio.a2dp.default audio.primary.qsd8k -j4
make surfaceflinger memtrack.qsd8k gralloc.qsd8k copybit.qsd8k hwcomposer.qsd8k libgps librpc gps.htcleo sensors.htcleo lights.htcleo -j4
make libstagefright libscheduling_policy libaudioflinger libserviceutility libaudiopolicyservice libaudiopolicymanagerdefault libaudiopolicymanager -j4

If all these files compiles without any error. then finally I do

make otapackage -j4

Hope this helps