yashsingh1/xdaforums huggingface dataset:
[HTC 10 Guides, News, & Discussion] austevo:
Does this mean we'll have CM soon? Will it be as painful to develop on as the Galaxy series?
[HTC 10 Guides, News, & Discussion] fix-this!:
if you guys get aosp running ill buy this device. nice work.
[HTC 10 Guides, News, & Discussion] squid2:
Status Update

I've continued my work on porting CyanogenMod to this device, and have made significant progress. A usable release will still be a while away though.

You can watch my progress here:

https://github.com/sultanqasim/android_device_htc_pme

https://github.com/sultanqasim/android_vendor_htc_pme

Currently working:

Display

WiFi

Bluetooth

Sensors

Audio through bluetooth

Broken:

Audio through built in speakers or headphones

RIL

Fingerprint sensor

Camera

Various other smaller things

I haven't yet gotten to trying to get the RIL or fingerprint sensor working, and there are obvious things yet to be done on them. They are on my to-do list for this week. I also plan on looking into certain issues with source built SDM libraries (I'm currently using prebuilt sdm libs to workaround the issues with rendering layers).

For the camera, I've fixed the obvious types of issues (missing symbols and dependencies) though it isn't working right now. How much effort it will take to fix is hard to predict. If anyone would like to try fixing the camera, any assistance would be welcome.

Audio is the big roadblock. HTC has a history of messing with audio hardware, and this device is no exception. HTC used a similar combination of rt5501 and tfa9897 (like) amplifiers for the M7, M8, M9, and A9 (and maybe other devices). A bunch of other devices from other manufacturers also use similar amplifiers. People may recall a lot of time and effort going into fixing audio on these devices, particularly on the original One M7. The subsequent devices in the family all built on work put into the M7.

For this device, HTC switched to a new amplifier, the TFA9888, and dropped the rt5501. The TFA9888 is a very new chip, with no public documentation (other than an uphelpful short data sheet) or available drivers. Thus, I will need to do a lot of fresh original reverse engineering to build a custom amplifier HAL. This will be a time consuming process. I'm waiting for kernel sources so that I can build a kernel with special logging to see what the stock ROM does to configure the amplifier. I will then try to understand and mimic the operation of the stock HAL. I will also see if I can obtain documentation and/or drivers through other means.
[HTC 10 Guides, News, & Discussion] squid2:
Sneak Preview Build

For the morbidly curious, I've uploaded my latest test build. I do not recommend flashing it. As described in the previous post, critical functionality, such as audio, RIL, and camera are broken. If you're still curious and don't depend on your device being functional, you can try this build.

Flashing instructions:

In TWRP, reformat the userdata partition as unencrypted ext4. Go to Wipe->Advanced Wipe, select data, click on repair or change filesystem, change file system, and choose ext4.

In TWRP, go to Wipe -> Advanced wipe, and erase system, data, dalvik, and cache

Flash CM13, and optionally gapps

Reboot

If it gets stuck on the boot animation for over 10 minutes, you can try going back to TWRP, and then using it to zero out your userdata partition (run cat /dev/zero > /dev/block/bootdevice/by-name/userdata for a few minutes). After zeroing out userdata, try to boot CM13. If it bootloops without getting to the boot animation, hold Vol+ and Vol- together to enter the booloader menu, go back into TWRP, and reformat userdata as ext4 again. It should boot after doing this.

Once again, I don't recommend flashing this. This is very broken pre-alpha quality software. I am not responsible for rendering your device inoperable.

Download link: http://www.mediafire.com/download/980dvfvlu7zdzjx/cm-13.0-20160516-UNOFFICIAL-pme.zip
[HTC 10 Guides, News, & Discussion] Captain_Throwback:
At least kernel source is out now, so you can start working on that :).
[HTC 10 Guides, News, & Discussion] spunkfaucet666:
Wow, that's incredible. Thanks for your hard work!
[HTC 10 Guides, News, & Discussion] Captain_Throwback:
Also, the CAF source from which the HTC kernel is based is this: https://us.codeaurora.org/cgit/quic/la/kernel/msm-3.18/?h=LA.HB.1.3.1_rb1.11

(in case you didn't have it already)

EDIT: As identified in logcat -

05-10 12:33:51.073 1901 2282 I Adreno : QUALCOMM build : 4d8478c, I7b6ba47bd6
05-10 12:33:51.073 1901 2282 I Adreno : Build Date : 02/09/16
05-10 12:33:51.073 1901 2282 I Adreno : OpenGL ES Shader Compiler Version: XE031.07.00.01
05-10 12:33:51.073 1901 2282 I Adreno : Local Branch : mybranch18178856
05-10 12:33:51.073 1901 2282 I Adreno : Remote Branch : quic/LA.HB.1.3.1_rb1.11
05-10 12:33:51.073 1901 2282 I Adreno : Remote Branch : NONE
05-10 12:33:51.073 1901 2282 I Adreno : Reconstruct Branch : NOTHING
[HTC 10 Guides, News, & Discussion] riz157:
Looking forward to this mind you I'm quite happy with sense ui
[HTC 10 Guides, News, & Discussion] Ajfink:
Kind of surreal that we still see commits from Linus Torvalds. :p
[HTC 10 Guides, News, & Discussion] lagittaja:
Well, yeah kinda. But he is being sponsored by the Linux Foundation so he can work full-time on improving Linux and he still is the Big Daddy of Linux kernel.
[HTC 10 Guides, News, & Discussion] epsix:
Who's Linus Torvalds? Man... That name is ancient founder of Linux....
[HTC 10 Guides, News, & Discussion] Zenns:
request a audio hal from htc? reverse engineer is meh but hey if you can get it to be 100% to stock then why not.

camera hal would be nice to look at too :D given the crappness of CyanogenMod Camera app no idea if it improve over Snap but hey would nice to see the progress, also I never own a HTC device are the bootloader unlock by default ? what is S-OFF etc
[HTC 10 Guides, News, & Discussion] NICG:
Love how fast HTC gets kernel source out. Can't wait to see the progress of CM. Thanks mate your work is greatly appreciated!
[HTC 10 Guides, News, & Discussion] squid2:
That's great to hear. I had been checking their site every couple days but had no idea when it would come out. I'll be at it this weekend. HTC stripped comments from a lot of the kernel as usual, though I'm prepared with a script I wrote a while back to add back stripped comments.

EDIT: My stock kernel with git history and comments added back is now up: https://github.com/sultanqasim/android_kernel_htc_msm8996/commits/stock_1.21.617
[HTC 10 Guides, News, & Discussion] mr turtle droid:
OK. I'm SUPER lost in this,i heard that if you wiped the data partition you lost signal permanently??and is there a fail-safe like Odin??I know this might be the wrong forum but I really want some light on this if you don't mind sharing
[HTC 10 Guides, News, & Discussion] george241312:
Awesome work dude cant wait till it becomes usable.= :good:
[HTC 10 Guides, News, & Discussion] tessut:
What's working on this Dev ROM and what not ?
[HTC 10 Guides, News, & Discussion] mcwups1:
Of course.

Sprint. Always Sprint.

Guess I'll keep waiting!

Did you use the ARM64 gapps by chance? I'm guessing it wouldn't matter, since it probably would not flash to begin with.
[HTC 10 Guides, News, & Discussion] Thisismyringtone:
Yep hah always the last one available
[HTC 10 Guides, News, & Discussion] gmoe65:
I can't seem to get the gapps to flash

I get an error, any idea on what I can do to make this work?

Thanx in advanced
[HTC 10 Guides, News, & Discussion] stonew5082:
What error do you get? You did 64 version right?
[HTC 10 Guides, News, & Discussion] gmoe65:
Yes it was version 64,but I've been trying for the last three hours with this and no win ,and it was error 7 I think
[HTC 10 Guides, News, & Discussion] stonew5082:
Oh ok. Didn't sounds like the right error code. Check again.

Have enough free space? Running latest twrp?
[HTC 10 Guides, News, & Discussion] gmoe65:
Calm down sun!! I'll have to go back and see exactly what it is

---------- Post added at 05:39 AM ---------- Previous post was at 05:36 AM ----------

I have plenty of space and 3.0.25,my bad its 3.0.26
[HTC 10 Guides, News, & Discussion] gmoe65:
OK I had to do a wip twice and that fixed the lil problem.:cool:
[HTC 10 Guides, News, & Discussion] krassermensch:
May it be possible that you selected the wrong arch? Your HTC 10 is an ARM64 device if you don't know. Which GApps did you try?
[HTC 10 Guides, News, & Discussion] gmoe65:
I got it taken care of ,but thanx 4 replying:good: I just updated my TWRP to the latest
[HTC 10 Guides, News, & Discussion] stonew5082:
Hehe nice
[HTC 10 Guides, News, & Discussion] PippoX3:
Ehm... I'm spending my time only on AOKP now... dunno how Carbon is now... sorry.
[HTC 10 Guides, News, & Discussion] stonew5082:
Carbon seems dead atm. Look at their Google community.
[HTC 10 Guides, News, & Discussion] malenurse.sb:
I am on Verizon as well and have tried all the builds with different combinations of wiping. All the builds bootloop for me too.
[HTC 10 Guides, News, & Discussion] danjull:
Ok, so I have adb working so I can get logs. Still not sure what's going on with the verizon model and why it won't boot. But here are some logs if someone wants to take a look:

Logcat: http://pastebin.com/BAhGLzux

dmesg: http://pastebin.com/7FPHDcKh

kmsg: http://pastebin.com/WcRtVSkL1

Logcat and dmesg just stops at the end of the pastes. kmesg loops.

Bad links fixed
[HTC 10 Guides, News, & Discussion] tbalden:
Second and third link says

This page has been removed!

Check them please
[HTC 10 Guides, News, & Discussion] tbalden:
Double oops
[HTC 10 Guides, News, & Discussion] SacredDeviL666:
and welcome to CM side of HTC 10 your presence is :good:
[HTC 10 Guides, News, & Discussion] danjull:
Fixed
[HTC 10 Guides, News, & Discussion] i$tickitinyour$u$hi:
someone already tried the unofficial cm13 rom from "rc420head" ?

dont see any thread about it in the HTC 10 forums.

https://www.androidfilehost.com/?w=files&flid=96202
[HTC 10 Guides, News, & Discussion] vitokes:
I was going to give it a shot but it's from 8/16. I expected the same problems.
[HTC 10 Guides, News, & Discussion] schreckles:
I haven't, but I used some of his stuff on the G4, 2 phones ago. His AOSP stuff was pretty good on that phone, but I would be willing to bet he didn't post anywhere due to the alpha-ness of it. I'm pretty certain it will have the same bugs that all the other CM-based builds have at this point, being an upload from 2 weeks ago. Curiosity may get the best of me when I get home tonight, though. I've already flashed every other available ROM, and I'm dying for CM/AOSP. And of course, if I check it out, I'll report back.
[HTC 10 Guides, News, & Discussion] razrlover:
New commits are plentiful for last few days but audio hal commit isn't merged from info on another thread. Can't wait myself as well
[HTC 10 Guides, News, & Discussion] squid2:
Status Update 4

Christopher Palmer and company have been keeping very busy and have done a bunch of things, including fixing the cellular modem and switching to graphics drivers that avoid the need for custom HALs. Chris has also been working on an amplifier HAL and is almost there, but he was still having some issues getting the speakers to work. This morning, I decided to try replaying captured I2C command sequences for the amplifer on CM13, and remarkably, that was enough to make the speakers work! I will work with crpalmer to fix up his amp HAL so that we have a proper solution (this is just a temporary hack build I made this morning).

Here's a link to my test build from this morning (where speaker audio can be made to work): https://www.mediafire.com/?rzd39humn72xlq9

To make audio work, run the following commands in a root shell (ignore any unexpected response prompts):

amp_loader /etc/tfa9888_init.asq
amp_loader /etc/tfa9888_enable.asq

Give big thanks to crpalmer for all his efforts.
[HTC 10 Guides, News, & Discussion] morpheus620:
What's with the camera and the microphone?

Is there something new?
[HTC 10 Guides, News, & Discussion] rav101:
Great work [MENTION=3857343]crpalmer[/MENTION] and [MENTION=6485916]squid2[/MENTION]!!!

The bug list is definitely being destroyed in quick succession!

Out of curiosity (and I know it is way to early for any serious chat), has there been much success in getting the HTC camera app working with aosp/cm based roms on previous HTC devices? I remember during my time on the HTC M8 that going to CM roms meant a reduction in quality although I don't know if it subsequently changed after I moved phone. Additionally, I know that a developer Sultanxda was able to get the camera quality on CM to a level that surpassed the stock camera abilities on the Oneplus One. Is that type of card on the table based on the developers we have on the HTC 10?
[HTC 10 Guides, News, & Discussion] schreckles:
That's one issue, that with (almost...nexus and phones with a Google Play Edition excluded) all phones I've had it's basically a "wait and see how close developers can get to stock." There's really no telling until they work out much more important bugs and can finally focus on the more minor details like camera quality. (I know, not a very helpful answer, but we'll just have to wait and see.)

You guys are freaking beasts! I know some here complain about "why is it taking so long" but they seem to forget that this is pretty much the same every go-round. Y'all are flying through getting everything up and running. I need to stop being so lazy and teach myself to contribute to the cause.
[HTC 10 Guides, News, & Discussion] sototallyjarrett:
Amazing work, man! Thank you so much for this! Out of curiosity - with the newest update does this mean headphone audio works properly as well?
[HTC 10 Guides, News, & Discussion] gillim74:
Anyone get the newest build to boot on verizon yet?
[HTC 10 Guides, News, & Discussion] danjull:
No boot yet. I've started over from scratch with the HTC vzw kernel source and got the same results. Extracted the vendor blobs today from stock rom to check for vendor fail...
[HTC 10 Guides, News, & Discussion] gillim74:
Stupid verizon
[HTC 10 Guides, News, & Discussion] krassermensch:
I made a beanstalk build last night with my cm Kernel for the HTC 10 featuring BLN by [MENTION=3088420]tbalden[/MENTION] and Sound control by [MENTION=4684315]flar2[/MENTION]

Also I added many upstream patches and my custom Version of Kernel Adiutor. Furthermore I moded the system UI a bit. If someone's interested I can share it with you...

And let's not forget to honor [MENTION=4738396]sultanqasim[/MENTION] as well as [MENTION=3857343]crpalmer[/MENTION] for their work on the trees to make the hardware components work with CM based ROMs ;)
[HTC 10 Guides, News, & Discussion] rav101:
Would it make sense to include the updates from sultan this morning and re-upload? That would mean it would include a way of getting workable sound as he (I think sultan is a he, apologies if not) described a few hours ago?

Edit: also good job buddy!!
[HTC 10 Guides, News, & Discussion] krassermensch:
I cannot find any commits by those two since the time I synced their sources last time. I started building at 4:30 of German time this morning. So the build's finished after about 19 hours. I will first try out if everything works and maybe I will also add a script to the flashable zip but yeah... If everything seems to be fine and you guys want this build I'll upload it to beanstalk's AFH...
[HTC 10 Guides, News, & Discussion] rav101:
No problem buddy,

I didn't know it took soo long to sync the sources.. Just adds to the level of respect I have for you guys!!

I will give it a spin tomorrow as I'm calling it a night now but do what to help out where I can :good:

Edit: do you know what kryo optimisations arter is referring to from AOSPA recently? https://mobile.twitter.com/arter97/status/767779600923447297

This is for the oneplus 3 ROM he has but I guess CPU optimisations in a CM ROM could be transferred over?
[HTC 10 Guides, News, & Discussion] squid2:
Status Update 5

I worked on putting together a crude amplifier HAL to automate the configuration of the audio amplifier. On this new build, both speakers and headphones should work properly out of the box. You can see my audio amplifier code here: https://github.com/sultanqasim/android_device_htc_pme/tree/cm-13.0/amplifier

Download link: https://www.mediafire.com/?jmktdga17szfy7n

Here's a (non-exhaustive) summary of known issues and what's known to work:

Working:

Display

Headphones

Bluetooth

WiFi

Capacitive keys and fingerprint home

Video decoding

Fingerprint sensor

LEDs

Sensors

Cellular radio

Speakers

Broken:

Camera

NFC

Microphone

Polish (SELinux, performance tuning etc.)
[HTC 10 Guides, News, & Discussion] tbalden:
Nice, thanks for the attribution. Sooner or later I'll feel the urge to jump into AOSP and churn out some kinda kernel for it. Kudos to all who works on the heavy lifting for a working device and kernel tree, like [MENTION=3857343]crpalmer[/MENTION] [MENTION=4738396]sultanqasim[/MENTION] and [MENTION=6485916]squid2[/MENTION] It's as usual, so many custom hardware/drivers and initializations and user space magic by the OEM, I can feel the weight. Congrats with the progress, this is rounding out really well
[HTC 10 Guides, News, & Discussion] pasatmalo:
Hi, thank you very much for working on cm for the htc 10 because you are doing a big favour to a lot of people, and are you thinking on making cm 14 any time soon?

Thanks.
[HTC 10 Guides, News, & Discussion] rav101:
Whilst I'm not involved in the development, I would imagine the key focus at the moment is to get Marshmallow fully working. Once this has been achieved, then the dev's can think about Nougat.

I wouldn't want to comment on the other point about fully functional ROM as many might see this as asking for an ETA which is a big no no on these forums.
[HTC 10 Guides, News, & Discussion] dj_chapz:
1. Never ask for ETA. Ever.

2. It will be ready when everything will be fixed.

Ive tested the build, and although the sound from headphones is perfect, the sound coming from the speakers is awfully distorted. Its practically impossible to understand voice outputed through the speakers.

Don't get me wrong, I'm just giving feedback. :)
[HTC 10 Guides, News, & Discussion] squid2:
This is on my last build (Sept 2)? Speakers should sound perfect on it. Sounds like the amp was getting programmed while I2S clocks were off. If you were manually ruinning the commands on the previous (Sept 1) build while audio wasn't running, that would make sense, but the amp should be programmed correctly on the new build. Sound is perfect for me on new build. Is anyone else having bad speaker sound on the new build?
[HTC 10 Guides, News, & Discussion] RedNak71:
This is awesome guys!! I wish I had the skills to help out, unfortunately I don't. To the devs working on this, I'm betting others like me who are excited to get this would be willing to donate $$ if there are things you need to help move this along. Just let us know how we can help.
[HTC 10 Guides, News, & Discussion] dj_chapz:
Yes, its the Sept 2 build. I will PM you with a sample. If there are some logs or info I could provide them.
[HTC 10 Guides, News, & Discussion] squid2:
Does the sound volume appear to be the same at 1/4 volume as full volume? That's the usual symptom of an improperly programmed amp. Maybe it's a timing thing with my HAL replaying commands too quickly for your amp to handle them, in which case adding sleeps might work. The proper HAL crpalmer's working should deal with this.

Try rebooting and seeing if this bad sound is consistent. If it is, you can try the Sept 1 build. Start playing some audio, and then run the amp_loader commands in the Sept 1 build while audio is playing. If it still sounds bad when you do it manually while sound is playing, PM me the on screen output of the amp_loader for initializing the amp.

Question for others: is the sound proper or distorted for you? If it only works on my device, then maybe some device specific numbers are being back and forth in the amp programming process interfering with dumb replay (perhaps mtpkey responding to mtpdataB). If it works on some devices but not others, then it's probably a race condition.

For reference, this is how it behaves on my device: https://www.youtube.com/watch?v=k0IRFWYrrtc The video makes volume sound low, though it's just the mic of what I'm using to record, it's the same as stock in person.
[HTC 10 Guides, News, & Discussion] dj_chapz:
Its the same, both low and high volume, Youtube video or a song in audio player. After rebooting the issue remains. Will try the Sept 1 build and report back.
[HTC 10 Guides, News, & Discussion] dj_chapz:
[MENTION=6485916]squid2[/MENTION] Sept 1 build gives the same results, headphones work, speaker distorted.

Heres the log:
[HTC 10 Guides, News, & Discussion] rav101:
Does anyone know how to download from Mediafire on a phone? When I load up in chrome (either in mobile or desktop mode) and press download, nothing happens??

Alternatively does anyone have a mirror?
[HTC 10 Guides, News, & Discussion] squid2:
Thanks, that log was helpful. I see the issue: NXP put in some sneaky replay protection where the amp gives a device specific value you have to xor and return for the amp to respect the commands.
[HTC 10 Guides, News, & Discussion] squid2:
Try mounting system as rw, and replacing the /etc/tfa988_init.asq with this version (after unzipping). This file is specific to your device. Then re-run amp_loader (while music is playing) on the Sept 1 build with the new file. Run both this file and then the usual tfa988_enable.asq file too.
[HTC 10 Guides, News, & Discussion] dandan2980:
So does no mic = no phone calls I'm ready to try these out cause I can live without a camera but not phone calls
[HTC 10 Guides, News, & Discussion] rav101:
I think hands free Bluetooth is working but I'm not sure that is a workable solution to make this a daily ROM. I guess you would need to take a call on that (pun very much intended)
[HTC 10 Guides, News, & Discussion] dj_chapz:
Damn you're good! Sound is now fully working, distortion is gone :good:

How easy is to make this general for every device? As I understood, this works with my device but may not on others...?
[HTC 10 Guides, News, & Discussion] rav101:
Out of curiosity, which version of the HTC 10 do you have?
[HTC 10 Guides, News, & Discussion] dj_chapz:
As my signature says, EU unlocked.
[HTC 10 Guides, News, & Discussion] rav101:
Ah right thanks.

I'm on XDA Labs at the moment so can't see signatures :D
[HTC 10 Guides, News, & Discussion] i$tickitinyour$u$hi:
i have the same device :p
[HTC 10 Guides, News, & Discussion] rav101:
Me too as it turns out. I know Squid2 is based in Canada so I guess the question is how many different versions require different files and how to code for that. All stuff I'm sure squid and the team will get figured in no time :svetius:
[HTC 10 Guides, News, & Discussion] lightninbug:
Just a question. I mean no harm.

Why is it that the audio and speaker are getting fixed before phone and camera? Is it because that is the order in which it's needed to fix? Or is it easier to fix the audio rather than the camera and phone?

I'm not complaining, just a question I have for myself.
[HTC 10 Guides, News, & Discussion] rav101:
I guess the dev's know the answer but I think it's down to what was next on the list (in no specific order) after the easy fixes have been done.

I think the sound of the HTC 10 would have been hardest to fix because the amps used in this phone are new and early on there was little documentation. I'm speculating but I guess they started with the hardest task??
[HTC 10 Guides, News, & Discussion] stonew5082:
Phone is working. The problem was you couldn't hear or say anything, but you can still make calls. I called myself and got a blank voicemail
[HTC 10 Guides, News, & Discussion] dj_chapz:
First of all, phone is working (I presume you mean cellular).

Second, camera is in 99% the hardest thing to fix, so I presume its better to do everything that can be fixed easy before, so it can be tested and adjusted while the main devs turn focus on the camera. I'd say its the optimal organization of time.