Need help wrapping my head around building AOSP for HTC One M9 - One (M9) General

Hey folks,
I know most people have already given up on this phone because it didn't sell well and doesn't have much support. But like the rest of us still browsing this forum, I still have my M9 and still believe it can be improved. I am currently working on a project to build a clean AOSP rom (without any kinky modifications, just a nice stock rom built directly from the AOSP sources.)
I've never undergone such a project, and I've been reading a lot about the steps necessary to realize this goal. I've been following Sony's excellent AOSP building guide so far. I have the android sources downloaded, all I'm missing are the proprietary files (from the device itself, most likely) and the ability to set up the proper device trees/manifests. I was planning to use the Cyanogenmod device tree because a lot of work has gone into it and, given that my M9 is currently running one of the CM13 nightlies, is pretty stable and works with new device firmwares. I know there is already a guide on the Cyanogenmod wiki for building CM for the M9, but I am not building CM at all, I want to build a 100% stock AOSP rom.
Can anybody help me proceed from here? I've downloaded the https://github.com/CyanogenMod/android_device_htc_hima-common tree and put it into device/htc/himaul but I'm not sure where to go from here. The extract-files.sh script does not work (because there is no CM helper script). Does anyone have any experience with this sort of thing?
Thank you very much in advance. I hope this will help everyone as I know many people have been looking for a non-CM AOSP rom for this phone (some do not agree with CM design philosophies). I definitely plan to share this rom and write a guide to help other projects when this is figured out.
I look forward to hearing back,
vivremetrique

Hi, I have no idea on doing roms, but you could help be your tester ...
whatever you need, talk me
---------- Post added at 10:22 PM ---------- Previous post was at 10:19 PM ----------
It would be good to make a ROM Nougat if possible

AOSP 100% and cyanogenmod device tree are totally different
I don't know what does it take to have a full aosp working rom, but I'm sure that CM code has nothing to do with it.
anyway, with the right work it shouldn't be so hard since m9 shares hardware with nexus 6p...

Frug01 said:
[/COLOR]It would be good to make a ROM Nougat if possible
Click to expand...
Click to collapse
Yes, the sources I will be building from will be Nougat sources (7.1 experimental sources). Thank you for offering to test once this is done.
throcker said:
AOSP 100% and cyanogenmod device tree are totally different
I don't know what does it take to have a full aosp working rom, but I'm sure that CM code has nothing to do with it.
anyway, with the right work it shouldn't be so hard since m9 shares hardware with nexus 6p...
Click to expand...
Click to collapse
I mean the operating system will be 100% AOSP, but obviously since this is not a Nexus/Pixel device the device tree will not be included in AOSP... The device tree/proprietary files have nothing to do with the actual user experience, they are simply needed for support of the hardware/stock kernel if desired/camera or wireless firmware. I don't see the sense is rewriting these from scratch given the time and effort already put into them by CM devs/those in the Cyanogenmod threads in this forum.
It would be great if some of you could help gather helpers for this project. It seems that properly setting up the device and getting ready to build the rom are all that is missing, so I'm hoping this goes relatively quickly.

So I believe I've made some progress. I downloaded the htc vendor files, the htc msm8994 kernel files, the hima-common tree, and the himaul tree. There is still something missing, because running the "lunch" command warns that it cannot locate the config makefile.
I found references to cm in cm.mk in device/htc/himaul/cm.mk but I don't know what to replace them with and I don't want to download the whole CM source tree as well.
Can anyone shed some light on this issue?

I can't help you, but that is a very good idea! Hope you can solve this issue.

Nice project, I would love to see AOSP Nougat on our M9! I'm not a dev who could help you with the building process, but maybe the dev of the CM14 port for M8 could give you an advice. Good luck!

I think you are underestimating the efford and skills it needs. Even with official Kernel Source released it took some really effort to make for example the camera work. If you don't know hot to setup a device tree for an existing rom, then I feel the skills required exceeding the ones you have. I don't want to offend you, but maybe it's better to take a step back an learn how to add this to an AOSP Marshmallow rom, instead of thinking about porting it to Nougat. If it would be that easy, wouldn't a ready to use Nougat Version of any other popular Rom for the m9 be out already?

Any telegram group of One M9???
Enviado desde mi HTC_M9u mediante Tapatalk

Adromir said:
I think you are underestimating the efford and skills it needs. Even with official Kernel Source released it took some really effort to make for example the camera work. If you don't know hot to setup a device tree for an existing rom, then I feel the skills required exceeding the ones you have. I don't want to offend you, but maybe it's better to take a step back an learn how to add this to an AOSP Marshmallow rom, instead of thinking about porting it to Nougat. If it would be that easy, wouldn't a ready to use Nougat Version of any other popular Rom for the m9 be out already?
Click to expand...
Click to collapse
That effort would.not be wasted. Once the solution to the camera problem is solved, it's solved for all versions, not just Marshmallow. We can reuse the kernel source and firmware blobs in N. I reckon that we don't have a rom because nobody is working on it.

If it would be that easy, why isnt there an official (or even inofficial) cm 14 for m9 out, as it already got an official cm 13? If everything you needed would be to just switch everything else to cm 14 and reuse the mm kernel source and blobs?

Adromir said:
If it would be that easy, why isnt there an official (or even inofficial) cm 14 for m9 out, as it already got an official cm 13? If everything you needed would be to just switch everything else to cm 14 and reuse the mm kernel source and blobs?
Click to expand...
Click to collapse
Because there is almost zero demand for one. People in the CM13 thread are actively discouraged from even mentioning CM14. How can we develop the ROM if we don't have anybody working on it?
Given CM's automated device tree preparation system, I doubt it would take more than a simple source tree update to Nougat to start compiling a 7.x ROM (whether it works perfectly or not, it would be a start).

Well then I would say, a way to start might be to try compile a booting cm 14 for the m9. Last time I looked there has been at least a device tree prepared for cm 14. I guess that would be the easiest way to test, if you might be succesfull with it

Any news @vivremetrique ? Or did you drop the project?

While it is possible to build cm14.1 for the M9, I was unable to make it see the sim card after days of trying. something in libril or possibly the firmware I have makes it not work.

Trainwr3ck said:
While it is possible to build cm14.1 for the M9, I was unable to make it see the sim card after days of trying. something in libril or possibly the firmware I have makes it not work.
Click to expand...
Click to collapse
If it is the same Problem I had with a CM13 based rom, then the build.prop is missing some Values to detect network. I took them from a working one and put them in the BoardConfig by hand

can't help, but my hopes are so high for this one!

Related

Developing Discussion | ROM & Kernel Dev./Port.

Hi Everybody
after some weeks Trying developing ROM's and Kernels i almost Give up... the kernel developing to MTK SoC is too much different compared to qualcomm SoC's (To me at least...) after compile more than 10 kernels to Run at my phone i only get Bluetooth and Radio FM not working with random reboots annoying frequently... but a real modifications to get this phone more smooth usage fail every time...(if you only compile the original source kernel it will run exactly like original kernel...)
I'm too n0#b alone to get everything running at developing process(kernel or ROM dev.).. at qualcomm phones(Xperia Acro S and Xperia L), i get more things running correctly with much more help from others Developers... but not released anything because it will be more from the same as others releases...
so if anyone here have more knowledge about that developing process things i have the Kernel Source and ROM platform to our phone...
---
i already try make CM12.1 run too.. but don't boot =#.. and if get work soon will be too much unstable to release, like my kernels =#
i will try port CM12.1 from @fire855 using that tutorial
the other possibility is try make compile the CM12.1 using our sources with modification from this ROM
but i will need help to make it compile right =#
so.. i will like have a discussion about that process with you guys... if anyone have some experience to help our phone have more custom's things to don't be locked with Original stuff/performance only.. if anyone have a useful guide, video or tutorial to compile anything to MTK SoC's it will be great too :highfive:
I appreciate your effort! I don't know much about MTK personally, but there is a thread on 4pda about porting CM 12.1 to MTK processors.
http://4pda.ru/forum/index.php?showtopic=671898
Sent from my VIVO AIR using Tapatalk
Ilxaot said:
I appreciate your effort! I don't know much about MTK personally, but there is a thread on 4pda about porting CM 12.1 to MTK processors.
http://4pda.ru/forum/index.php?showtopic=671898
Sent from my VIVO AIR using Tapatalk
Click to expand...
Click to collapse
already started try port CM12.1 ... but will not work too much things... almost every sensor will not work because that cross-firmwareOS port (CM Modules Drivers have a different compilation process =#) what i can do is try upgrade our source kernel using other MT6592 Sources to can compile the CM12 to our device... but again i will need find Module Updates drivers(blob) from other phones sources... =#
and my status with that right know is fixing a lot of errors while i compiling the kernel... i don't reach the inHouse ROM Compilation to than can get more Errors on logs to fix to release a simple Almost "stable" rom to how want test if it works properly to everyone... but don't push me to get that finished.. i work everyday and when i have time i try my best to develop that :highfive:
and release a unstable ROM/kernel is a wrong because maybe can brick someone phone because my errors (ramdisk modifications, and partition table map when installing the rom)... or we can wait BLU release the Lollipop with Hope because on twitter( @ UKkazam) tell me about no lollipop updates to this phone =#
i Tweeted to [@ KazamUK] asking they about lollipop updates and receive two replays... One say about newer updates to fix bugs on OS but not about lollipop and other saying "unfortunately, not upgrades to newer Android versions will be released"... otherwise [@ BLU_Products] Replay this "Please stay tuned on our social media for future updates, thanks!"... so... we have a faith about BLU brings Lollipop to our device? i don't have sure but with lucky it will happens :highfive:
...
and the porting CM12.1 ROM don't worked with me... bootloop =# and CatLog is extremely confuse =#
Kernel source link not working
I have an opportunity to make a PORT CM12 for BLU VIVO AIR in two days. A neighbor of mine bought a VIVO AIR and I will do whatever is necessary to get the ROM on the device.
I helped the BLU VIVO IV the users to have CM12. But as the device was not mine, so I could not fix some bugs. In the same epoch I talked to a BVA User and helped the kernel issue. He had given me feedback in relation to not have phone signal and not be able to replace the IMEI. But as I had no time, and the phone in my hands, the CM12 ROM stood with him.
Currently, it is quite possible that after CM12 MT6592 to be 95% stable in most of these devices Socs, the VIVO AIR may also have.
Once I have the device in hands, I'll let you guys know if CM12 can be available for all users VIVO AIR.
But if anyone know a actually already exist a ROM CM12 for VIVO AIR and clones.... Let me know...??
That would be awesome and I'm sure as me a lot of users are going to be happy about it
Sent from my REVIVED VIVO AIR using XDA mobile app

Advice on Purchase

Hello,
I'm strongly considering picking up a LePro 3, but I do have some concerns. I understand that the stock software isn't very good and I'm looking towards the community to create excellent ROMs for this device, but I do have some questions:
Do we have a clean method for root/unlock/recovery?
Is there anything stopping developers from putting together ROMs that are optimized for every aspect of the phone? i.e. enough source from LeEco?
How would you say developer support is for this device? I'm a fan of official ROM builds instead of using unofficial. Has anyone announced upcoming support for this device that I can look forward to?
Aside from that, feel free to mention anything else I should be aware of before purchasing the phone!
Thanks so much!
Do we have a clean method for root/unlock/recovery?
I have no idea what you mean by clean but if you can use adb then yes we do. If you are looking for a one stop shop all in one unlocker then the answer is no. look here for current method:
http://forum.xda-developers.com/le-pro3/how-to/flashing-guide-roundup-leeco-le-pro-3-t3511901
Is there anything stopping developers from putting together ROMs that are optimized for every aspect of the phone? i.e. enough source from LeEco?
I believe all source code has been released.
How would you say developer support is for this device? I'm a fan of official ROM builds instead of using unofficial. Has anyone announced upcoming support for this device that I can look forward to?
There is minimal development currently. One person is trying to build a Nougat 7.1 Rom. That's a pretty big feat so it will probably be a while. Look here:
http://forum.xda-developers.com/le-pro3/how-to/7-1-progress-t3511474
There is a developer that posted a debloated version of the x720(international version) of this rom already. It will work on our x727(US version). It is an older version though so there's that. Look here:
http://forum.xda-developers.com/le-pro3/development/rom-google-edition-cydras-t3514742
xiton said:
There's a CM 13 rom here based on the chinese x720. Look here:
http://forum.xda-developers.com/le-pro3/how-to/cm-13-lex720-t3508015
Aside from that, feel free to mention anything else I should be aware of before purchasing the phone!
This is literally the smallest compilation of threads I've ever seen for a phone so starting a new thread to ask these questions is pretty silly. Since it's the holidays, I've been nice and responded to what could have easily been found in a couple of minutes.
Click to expand...
Click to collapse
Thanks for the reply.
The reason I compiled these questions were because I was hoping for more specific answers and some clarity. Perhaps I wasn't clear enough my initial post and for that I apologize.
I was reading what seemed to be conflicting information about the recovery software and process in which to flash it to the device. It looked as if there wasn't any goto method or specific TWRP version to go with and that this was still somewhat experimental.
It's good to know that the source has been released. I was seeking info about LeEco and people were saying that they didn't release source code for their phones as company policy.
While I've visited the ROM forum section, I was hoping someone would have insight into official ROMs instead of what currently exists there.
For the US model Le Pro 3 (X727) I would recommend using this (http://forum.xda-developers.com/le-pro3/development/x727-model-persistent-bootloader-unlock-t3500388) method to unlock the bootloader. That's what I did and had no issues. From there you can use TWRP to do a full wipe and install the ROM of your choice. Of course, I would recommend taking a backup of everything before doing this.
I'm running that CM 13 build with no issues on my X727. It's also possible to get the IR blaster working if desired.

whats the difference between the two maintainer and builder?

whats the difference between the two maintainer and builder?
there are a lot of nougat roms but they are all not official...as far as i understand because there ie no maintainer. but there are builder. so whats the difference.
almost every s model including the minis have official nougat
Maintainer is a developer, somebody that actually knows programming and also has some experience with it. He or she is the one that fixes device specific bugs.
A builder is just that, somebody that builds the ROMs. Anyone can build a ROM, it doesn't require any programming knowledge.
And there are various guides on how to do it too, you only need a Linux system with decent performance, otherwise it might take some hours only to build one ROM zip.
The Maintainer job is purely a voluntary one. So somebody has to volunteer to become the Lineage maintainer for the S4. But this is not all. He or she also needs to be accepted by the Lineage team, because they don't just take anyone. You need some experience for it.
Another reason we have no official Nougat is because there are still some bugs (such as the reboot bug) and the Lineage team doesn't accept that from what I heard. Oh, and they want cleaner code too.
So yeah, I don't know if he will have any official Nougat any time soon, if ever.
But just because we don't have official Nougat doesn't mean we don't have developers. We still have some people that do some developing for the S4.

OMFG

Builders thread only!!
Looking for pioneer compilers. I know I'm capable of bringing los 15.1 to kiwi but I lack the resources at this time to build.
For those who already have trees set up I can guide u through commits to make a successful compilation.
Use this thread for commits and compilation inquiries only!!
1. Check commits from los for same chipset on kernel and device config.
2. Trial build on your private tree before making commits to github.
3. Never post untested builds.
All the commits are out there. Our respective builders on los have so many other devices to build for.
I've pioneered lg and Samsung devices w help from @ShadySquirrel to unsuspecting platforms.
dave71670 said:
Builders thread only!!
Looking for pioneer compilers. I know I'm capable of bringing los 15.1 to kiwi.
For those who already have trees set up I can guide u through commits to make a successful compilation.
.
Click to expand...
Click to collapse
Not to spam but ,compilation is a thing but will it boot correctly ?
I have trees. See your PMs.
To add more detail...
We're already compiling and have plenty of logs. Everything bootloops at ROM logo. See github.com/kiwi-o
Great to see you guys trying, fantastic !
Keep up the great work guys. Maybe this will become one of those great legacy phones.
Are you still working on this guys? I haven't seen any commits for a while
TheRealIntence said:
Are you still working on this guys? I haven't seen any commits for a while
Click to expand...
Click to collapse
odds are yes, but its an old device and a crappy budget one so dont get your hopes up. i just got a 1+5t 128GB for $475 USD. i suggest you move on and find another device. the devs will probably succeed in porting Oreo but it will take along time since its not a very easy thing to do.
you should check in maybe every few weeks and if you really want oreo on this device, i suggest that you donate to the kind devs that develop for this device. btw, they do this for free so keep that in mind. cheers!
Do you need beta testers for lineage 15.1 ?
ljukigrobar said:
Do you need beta testers for lineage 15.1 ?
Click to expand...
Click to collapse
There's nothing to test, because it bootloops.

Development of Android 8 ROM

Hey all you Sharp 306sh users!
I love this phone and decided to start a ROM port to Oreo 8.0.0!
To date here's what i got
1. Device tree built
2. ASOP stock rom built successfully
Here's what I need to get done next
1. Access bootloader to flash images
2. Test for vendor blobs needed so I can make the vendor tree (if required)
Your help on this would be greatly appreciated as I am just getting my feet we in this process, this is a great phone and I would love to see it updated.
Please let me know if you are interested in helping with this project!
Edit 8/6/2018: Device tree is on Github,
https://github.com/RobertCC18/sharp-306sh-rom
More to come once kernel is built!
Edit 10/12/2018:
I am uploading the first test build so I can get some help with the debug. THIS ROM IS GETS STUCK AT THE SHARP BOOT LOGO AND IS NOT READY FOR PRODUCTION DEVICES!!!!
That being said, any help and logs that you can send are greatly appreciated.
This zip can be flashed through TWRP, check the downloads section
XDA:DevDB Information
Android 8 Rom [stock], ROM for the Sharp Aquos Crystal
Contributors
RobbotCC
ROM OS Version: 8.x Oreo
ROM Kernel: Linux 3.10.x
Based On: AOSP
Version Information
Status: Testing
Created 2018-07-15
Last Updated 2018-10-12
Great! I´ve got a 306SH model, i can be a tester... waiting for your first zip :highfive:
Awesome.
I tried this exact same thing before, but gave up soon after I couldn't diagnose what stopped my device from booting with my custom ROMs, as I could never find the logs.
It looks like you're making more headway than me, so I'd love to test it, or even just help out.
Keep on going! A GitHub would be great progress.
Update 7-4-18
Update - 7/24/2018
Recompiling Kernel with debug drivers included - current compiled kernel missing RAM Console support
Github repo coming soon!
Great! Always wanted a custom room on this phone. I can test it and try it out too
Good progress.
Make sure to keep us updated, once you have a GitHub repo, development should speed up.
I'm sure there are a few techies with this phone that would love to contribute to your ROM, myself included.
By the way, you said ASOP instead of AOSP in the original post.
Rhioun said:
Make sure to keep us updated, once you have a GitHub repo, development should speed up.
I'm sure there are a few techies with this phone that would love to contribute to your ROM, myself included.
By the way, you said ASOP instead of AOSP in the original post.
Click to expand...
Click to collapse
Thanks, whoops on the typo!
Been busy with work but hoping to upload device tree, kernel base and current build, waiting for kernel to finish building with RAM console drivers.
Update 8/6/2018
Github Created
https://github.com/RobertCC18/sharp-306sh-rom
Device tree is added, kernel coming soon!
About accessing the bootloader to flash images, I believe we've done this before.
Tewilove, the man behind rooting the 306SH managed to access it, and made a custom one to flash, if I do remember correctly.
https://forum.xda-developers.com/aquos-crystal/general/temp-root-306sh-t3129456
Worth a look.
No development in a while. We all hope you're still there.
I visited the Github and just found it to be text files and folders. Could you possibly post the WIP kernel or other vendor blobs on there,
so we have at least a basis to begin work on?
Thanks,
This is an amazing idea. My 306SH is rooted and ready for action.
Rhioun said:
No development in a while. We all hope you're still there.
I visited the Github and just found it to be text files and folders. Could you possibly post the WIP kernel or other vendor blobs on there,
so we have at least a basis to begin work on?
Thanks,
Click to expand...
Click to collapse
Yes I am still here and working on this, just haven't had much time lately. I will try to get the kernel and vendor blobs up within the next few days
Been waiting for a custom ROM for this phone. I'm ready to test it
Any update on the development of the ROM??????
Any progress?
Status Update
dzvxo said:
Any progress?
Click to expand...
Click to collapse
Hey everyone,
Sorry for the delay in development but I hit a major snag with the kernel build and am still working on overcoming it. The needed defconfig is missing so I found one that should get us close, at the very least it should allow us to see the RAM debug messages on boot failure.
Also, my internet has been to slow to upload the kernel to github but I have an upgrade and should be able to get it uploaded within the next couple days.
Please share any information that you find regarding this phone here on XDA and beyond, any info you can provide will help me get this up and running faster!
Hey, how's everything going? Any luck?
What's up with it?
Hey All,
Sorry for the delayed responses, this phone seems to be a lost cause. But I am not a quitter lol!
I am hopeing to get back into the swing if things here in the next few weeks and will post more updates and files here shortly
Current problems:
No debugging enabled
Kernel needs patched to support Android 6+
We wish you the best of luck!

Categories

Resources