[Q] Building AOSP (not CM) for the OPO, is it possible? - ONE Q&A, Help & Troubleshooting

Hi, I've just received my OPO on the 27th. I was really interested in Android development when I had my Nexus 5 and started building my own AOSP ROM, I've been looking into doing the same for the OPO but am unable to find an actual way of building AOSP with Google's code. I know OPO released their AOSP kernel source here: https://github.com/OnePlusTech/android_kernel_oneplus_one and CyanogenMod has thiers here: https://github.com/CyanogenMod/android_kernel_oneplus_msm8974 but I'm unable to work out a way of including these into my AOSP build and I would prefer to not build CM.
Note: I'd like to build AOSP myself, I'm fully aware that there is a current official OPO build available.
Thanks in advance,
Lewis

LewisD94 said:
Hi, I've just received my OPO on the 27th. I was really interested in Android development when I had my Nexus 5 and started building my own AOSP ROM, I've been looking into doing the same for the OPO but am unable to find an actual way of building AOSP with Google's code. I know OPO released their AOSP kernel source here: https://github.com/OnePlusTech/android_kernel_oneplus_one and CyanogenMod has thiers here: https://github.com/CyanogenMod/android_kernel_oneplus_msm8974 but I'm unable to work out a way of including these into my AOSP build and I would prefer to not build CM.
Note: I'd like to build AOSP myself, I'm fully aware that there is a current official OPO build available.
Thanks in advance,
Lewis
Click to expand...
Click to collapse
It's advisable that you create your own tree from the CAF MSM8974 using CM GPS and other drivers and build CAF AOSP. Otherwise, it's close to impossible/very difficult. Pure AOSP is again near impossible/very difficult for non nexus devices.

Thank you very much for the reply, so building AOSP is pretty much impossible then?
I was having a look around on the internet last night and came across this: http://developer.sonymobile.com/kno...uild-aosp-kitkat-for-unlocked-xperia-devices/
Would there be a way of adapting this guide to allow for an easier build process of AOSP for our device? The other confusion that I face is if it's impossible to build AOSP for the OPO then how are ROMs such as this available?

LewisD94 said:
Thank you very much for the reply, so building AOSP is pretty much impossible then?
I was having a look around on the internet last night and came across this: http://developer.sonymobile.com/kno...uild-aosp-kitkat-for-unlocked-xperia-devices/
Would there be a way of adapting this guide to allow for an easier build process of AOSP for our device? The other confusion that I face is if it's impossible to build AOSP for the OPO then how are ROMs such as this available?
Click to expand...
Click to collapse
VanirAOSP uses CM trees as of now. Again, CAF AOSP is basically AOSP for non nexus Qualcomm devices., and any experienced dev can whip up a tree and get it working. Also, reaally good devs can/may be able to port AOSP if they wanted. It's a matter of whether they want to do it or not.
That link is for Sony devices only because Sony already provides CAF trees as an OEM so devs can build.

rudi_j7 said:
VanirAOSP uses CM trees as of now. Again, CAF AOSP is basically AOSP for non nexus Qualcomm devices., and any experienced dev can whip up a tree and get it working. Also, reaally good devs can/may be able to port AOSP if they wanted. It's a matter of whether they want to do it or not.
That link is for Sony devices only because Sony already provides CAF trees as an OEM so devs can build.
Click to expand...
Click to collapse
Ah yes, I see what you're saying now. Thanks for clearing this up for me! I just noticed when I looked at the VanirAOSP ROM thread that it states CM for it's credits, haha. I apologize for my ignorance.

Hello
I would like to create my first rom for oneplus one but without modification from OMNI or CM, basically vanilla rom. but I have some doubts.
Can I create a rom based on AOSP with device tree from OMNI/CM right?
Thanks!

Related

[DEV] Porting kernel 3.10.x to d2 for Lollipop

As we know, Android Lollipop is being released soon, and it requires a kernel that is 3.10.y, which is not available for our device. I'm not great with kernels and would in no way consider myself a kernel developer, but I have applied the neccessary patches to get the kernel version up to 3.10.0, which can be found here https://github.com/frap129/android_kernel_samsung_d2. Because I'm not a kernel developer, I am looking for some help in at least getting this kernel somewhat ready before the release of 5.0, so we can all get the latest update ASAP. Any and all help is apreciated!
Does your kernel compile and boot on cm11? If it does, there shouldn't be much problems in getting it working on L.
Any news? Does it compile?
frap129 said:
As we know, Android Lollipop is being released soon, and it requires a kernel that is 3.10.y, which is not available for our device. I'm not great with kernels and would in no way consider myself a kernel developer, but I have applied the neccessary patches to get the kernel version up to 3.10.0, which can be found here https://github.com/frap129/android_kernel_samsung_d2. Because I'm not a kernel developer, I am looking for some help in at least getting this kernel somewhat ready before the release of 5.0, so we can all get the latest update ASAP. Any and all help is apreciated!
Click to expand...
Click to collapse
nope android 5.0 doesnt require new kernel, you could build it on 3.0.y like i am doing on my Note 2 oh and as far as i know new nexus devices are still on 3.4.y
Ivan_Meler said:
nope android 5.0 doesnt require new kernel, you could build it on 3.0.y like i am doing on my Note 2 oh and as far as i know new nexus devices are still on 3.4.y
Click to expand...
Click to collapse
yes, but the new Samsung tablets (at least) are being shipped with the 3.10.x kernels.. 'course they're still running kitkat at the moment, but definitely cannot wait to see if/when they get kit kat.
I'll have to report back later after I take pictures of the 'about phone' page lol [if you want proof anyway]
frap129 said:
As we know, Android Lollipop is being released soon, and it requires a kernel that is 3.10.y, which is not available for our device. I'm not great with kernels and would in no way consider myself a kernel developer, but I have applied the neccessary patches to get the kernel version up to 3.10.0, which can be found here https://github.com/frap129/android_kernel_samsung_d2. Because I'm not a kernel developer, I am looking for some help in at least getting this kernel somewhat ready before the release of 5.0, so we can all get the latest update ASAP. Any and all help is apreciated!
Click to expand...
Click to collapse
ztotherad said:
yes, but the new Samsung tablets (at least) are being shipped with the 3.10.x kernels.. 'course they're still running kitkat at the moment, but definitely cannot wait to see if/when they get kit kat.
I'll have to report back later after I take pictures of the 'about phone' page lol [if you want proof anyway]
Click to expand...
Click to collapse
I know samsung does things like that (i have few other devices from them) but hey thats samsung and they are lazy so they dont want to update kernel version after device is relesed so they do this not to feel outdated on softwere side
Whoops! I read somewhere that the newly expanded SELinux permissions had some dependency on the 3.10.y kernel. Oh well, I guess Ill just test it anyways so I can brag that I have a newer kernel than anyone else if it works
frap129 said:
Whoops! I read somewhere that the newly expanded SELinux permissions had some dependency on the 3.10.y kernel. Oh well, I guess Ill just test it anyways so I can brag that I have a newer kernel than anyone else if it works
Click to expand...
Click to collapse
That would definitely be awesome! Be sure to report back your results. I'm not an experienced ROM or kernel developer, but I'll be attempting on bringing a pure AOSP 5.0.0_r2 to my GS3. I'm not sure how successful I'll be, but my first step involved me planning on copying over our vendor repo from CM's M11 or M12 release (whenever that gets out) and trying to build Lollipop against it.
polarEskimo said:
That would definitely be awesome! Be sure to report back your results. I'm not an experienced ROM or kernel developer, but I'll be attempting on bringing a pure AOSP 5.0.0_r2 to my GS3. I'm not sure how successful I'll be, but my first step involved me planning on copying over our vendor repo from CM's M11 or M12 release (whenever that gets out) and trying to build Lollipop against it.
Click to expand...
Click to collapse
I was planning on working on that as well over the weekend.
polarEskimo said:
That would definitely be awesome! Be sure to report back your results. I'm not an experienced ROM or kernel developer, but I'll be attempting on bringing a pure AOSP 5.0.0_r2 to my GS3. I'm not sure how successful I'll be, but my first step involved me planning on copying over our vendor repo from CM's M11 or M12 release (whenever that gets out) and trying to build Lollipop against it.
Click to expand...
Click to collapse
You will need to change many things in device tree to get it compile oh and dont forget to disable cm overlays
Ivan_Meler said:
You will need to change many things in device tree to get it compile oh and dont forget to disable cm overlays
Click to expand...
Click to collapse
I'm very new to the AOSP build process and didn't have much luck last night getting the CM device sources to play nicely with AOSP. I'm finding it difficult to find any relevant guides on porting over the CM device trees to pure AOSP. If you or anyone else can help by explaining the process or pointing to a guide that I may have missed, I'd be grateful. Plus the more people we have collaborating on his, the better our chances of getting Lollipop on our devices.
I'm working on porting 5.0 to our phone, tweaked the device tree and got the build running but (as expected) i'm running into SEpolicy hell. The new selinux implementation in lollipop is proving to be trouble. I've just made a few more edits and the build is moving along, I'll post results shortly.
If anyone cares to help I'll walk you through what I've done so far. One thing to note is you need to adjust vendorsetup.sh to say full_d2lte-eng instead of cm_d2lte-eng and create AndroidProducts.mk that points at full_d2lte.mk (you can use the hammerhead device tree as a reference to do this)
That will get your device tree to regester properly. If you don't do the above you'll get a "no config makefile found" error when you try to select d2lte with lunch.
As far as the actual tree, you're gonna wanna grab device/samsung/d2lte, device/samsung/msm8960-common, vendor/samsung/d2lte, vendor/samsung/msm8960-common, vendor/cm, vendor/cyngn, and kernel/d2.
You'll also need a couple things from /hardware, namely hardware/samsung. There's a couple things you'll need to remove from msm8960-common in /device, I can't remember the specific file name but the error message will tell you.
Follow those instructions and you'll get where I'm at, with the build crapping out on SEpolicy
Restl3ss said:
I'm working on porting 5.0 to our phone, tweaked the device tree and got the build running but (as expected) i'm running into SEpolicy hell. The new selinux implementation in lollipop is proving to be trouble. I've just made a few more edits and the build is moving along, I'll post results shortly.
If anyone cares to help I'll walk you through what I've done so far. One thing to note is you need to adjust vendorsetup.sh to say full_d2lte-eng instead of cm_d2lte-eng and create AndroidProducts.mk that points at full_d2lte.mk (you can use the hammerhead device tree as a reference to do this)
That will get your device tree to regester properly. If you don't do the above you'll get a "no config makefile found" error when you try to select d2lte with lunch.
As far as the actual tree, you're gonna wanna grab device/samsung/d2lte, device/samsung/msm8960-common, vendor/samsung/d2lte, vendor/samsung/msm8960-common, vendor/cm, vendor/cyngn, and kernel/d2.
You'll also need a couple things from /hardware, namely hardware/samsung. There's a couple things you'll need to remove from msm8960-common in /device, I can't remember the specific file name but the error message will tell you.
Follow those instructions and you'll get where I'm at, with the build crapping out on SEpolicy
Click to expand...
Click to collapse
Wow, this is awesome. It sounds like you've gotten the furthest than any of us. I appreciate the instructions, but is there any chance you could push your repos to GitHub? And do you think the SELinux stuff you're running into has anything to do with our device being on the 3.4 kernel instead of 3.10?
polarEskimo said:
Wow, this is awesome. It sounds like you've gotten the furthest than any of us. I appreciate the instructions, but is there any chance you could push your repos to GitHub? And do you think the SELinux stuff you're running into has anything to do with our device being on the 3.4 kernel instead of 3.10?
Click to expand...
Click to collapse
It's not a kernel thing so much as a device tree thing. (Kitkat vs lollipop) the policy.conf (along with a few other things) in the device tree is designed for kitkat and isn't playing very nice with the 5.0 source. I'm trying to bang it out a bit by swapping a few C and header files in the build core.
As for my last build, my tweaks got me past where I was but now I'm hanging on a new set of SElinux errors.
I've been at this for less than 12 hours so given that timeframe this looks promising.
I'm trying to think of what the best way to go about this is. I could either try to adapt the tree for the new source or I could try to adapt the source for the old tree (use KitKat SElinux implementation on lollipop). The latter would have more success with root but the former is the correct way to do it (and would get us cyanogenmod 12 faster once they start nightlies, as I can push the changes to gerrit)
Restl3ss said:
It's not a kernel thing so much as a device tree thing. (Kitkat vs lollipop) the policy.conf (along with a few other things) in the device tree is designed for kitkat and isn't playing very nice with the 5.0 source. I'm trying to bang it out a bit by swapping a few C and header files in the build core.
As for my last build, my tweaks got me past where I was but now I'm hanging on a new set of SElinux errors.
I've been at this for less than 12 hours so given that timeframe this looks promising.
I'm trying to think of what the best way to go about this is. I could either try to adapt the tree for the new source or I could try to adapt the source for the old tree (use KitKat SElinux implementation on lollipop). The latter would have more success with root but the former is the correct way to do it (and would get us cyanogenmod 12 faster once they start nightlies, as I can push the changes to gerrit)
Click to expand...
Click to collapse
Again, any chance you can post your source? You don't have to try and work on it on your own. The more people that look at the progressions you made, the better our chances are at success.
polarEskimo said:
Again, any chance you can post your source? You don't have to try and work on it on your own. The more people that look at the progressions you made, the better our chances are at success.
Click to expand...
Click to collapse
I'll push what I've got to github after this experiment
Cyanogen is updating sources to lolipop right now and omni has semi working source so it will be easier to port 5.0 since we wont need to edit device tree that much
Ivan_Meler said:
Cyanogen is updating sources to lolipop right now and omni has semi working source so it will be easier to port 5.0 since we wont need to edit device tree that much
Click to expand...
Click to collapse
Yes but, they have a tentative deadline of dec. 1st to start pushing out the first nightlies. We likely won't be in the first wave either, since d2 is now 3 generations out of date.
I'd much rather just port aosp and have it in 2 weeks rather than wait 3 weeks to even begin work.
Side note. If/when I get this working I'm calling it PotatOS
Managed to work past my problem with SElinux for now, the build has now moved on to... another set of errors!
Build currently hangs at this:
Code:
host C++: libutils_32 <= system/core/libutils/StopWatch.cpp
host C++: libutils_32 <= system/core/libutils/String8.cpp
host C++: libutils_32 <= system/core/libutils/String16.cpp
host C++: libutils_32 <= system/core/libutils/SystemClock.cpp
host C++: libutils_32 <= system/core/libutils/Threads.cpp
host C++: libutils_32 <= system/core/libutils/Timers.cpp
system/core/libutils/Timers.cpp: In function 'nsecs_t systemTime(int)':
system/core/libutils/Timers.cpp:43:13: error: 'CLOCK_BOOTTIME' was not declared in this scope
build/core/binary.mk:618: recipe for target 'out/host/linux-x86/obj32/STATIC_LIBRARIES/libutils_intermediates/Timers.o' failed
make: *** [out/host/linux-x86/obj32/STATIC_LIBRARIES/libutils_intermediates/Timers.o] Error 1
#### make failed to build some targets (01:19 (mm:ss)) ####
Going to bed, will get back at it in the morning. Source should be up on github by tomorrow night
Restl3ss said:
Yes but, they have a tentative deadline of dec. 1st to start pushing out the first nightlies. We likely won't be in the first wave either, since d2 is now 3 generations out of date.
I'd much rather just port aosp and have it in 2 weeks rather than wait 3 weeks to even begin work.
Side note. If/when I get this working I'm calling it PotatOS
Click to expand...
Click to collapse
I'm with you on that, I'd rather have pure AOSP than buggy CM nightlies. Also interesting choice of ROM name lol. Thanks for your hard work and I'm looking forward to pulling down your repos so I can take a stab at these compile-time issues.

Q : Pure AOSP + Caf rom is possible?

Hello Everyone. I'm just N5 nomal user during 2years and I had question so write this text.
I googled about AOSP / Caf and understood like this.
AOSP was handling by google, have some feature.
Caf was handling by qualcomm, more performand and seek stabilization.
Question is, Pure AOSP+Caf rom is possible?
Developers offfer to us CM-Based Caf (hammerhead-caf) but I didn't heard about AOSP + Caf.
Did I have wrong thinking?
As I told, I'm just commly n5 user Please expain easily.
Have a nice day.
kwjhgjh said:
Hello Everyone. I'm just N5 nomal user during 2years and I had question so write this text.
I googled about AOSP / Caf and understood like this.
AOSP was handling by google, have some feature.
Caf was handling by qualcomm, more performand and seek stabilization.
Question is, Pure AOSP+Caf rom is possible?
Developers offfer to us CM-Based Caf (hammerhead-caf) but I didn't heard about AOSP + Caf.
Did I have wrong thinking?
As I told, I'm just commly n5 user Please expain easily.
Have a nice day.
Click to expand...
Click to collapse
I think we cannot. CAF and AOSP are in two different line. If they can be combined, there must be a version of android like that now
Moto g 2014 has an aosp caf http://forum.xda-developers.com/moto-g-2014/development/aosp-caf-6-0-t3284309
muitenphale said:
I think we cannot. CAF and AOSP are in two different line. If they can be combined, there must be a version of android like that now
Click to expand...
Click to collapse
But we already use CAF lines rom, like CM-Caf.
Dev. said, Basement is AOSP-CM and put in CAF source to it.
I had more curious why Dev. are don't use AOSP, just connect with cm
CataHd said:
Moto g 2014 has an aosp caf http://forum.xda-developers.com/moto-g-2014/development/aosp-caf-6-0-t3284309
Click to expand...
Click to collapse
oh... Already annouced in MOTO G! thread . Even they have a little bug, impressive.
If I have 1 excellent computer, maybe try to build...refer other people's post T_T
Anyway THX for your link

Will community continue to develop to this phone after cyanogenmod is done in 6 days?

Will community continue to develop to this phone after cyanogenmod is done in 6 days? As some of you may know Cyanogen inc had lots of issues so they decided to shutdown the company after 7 years of work. Some of the official devs started to tease a cyanogenmod reborn, named Lineage OS. You can find them on twitter, facebook, google+ and their new site lineageos.org . The site is still wip but i hope that Lineage OS will be developed for this phone and i dont have to throw my phone off the window just cause i dont have the latest update
As the source code will still available and the team is willing to continue, I see no reason for stopping, as long as our device maintainers support this device. But it may slow down a bit for a while, it's been a major transition after all. And rest of the custom ROMs might get affected too. Better to stay tuned in every thread possible, ours is not so big
Broadcasted from Zeta Reticuli
Gravemind2015 said:
As the source code will still available and the team is willing to continue, I see no reason for stopping, as long as our device maintainers support this device. But it may slow down a bit for a while, it's been a major transition after all. And rest of the custom ROMs might get affected too. Better to stay tuned in every thread possible, ours is not so big
Broadcasted from Zeta Reticuli
Click to expand...
Click to collapse
youre right. i guess ill make sure im in the latest nightly in the next days if anything happens
The question is will CyanogenMod continue to live now that they have lost all support from Cyanogen, including build servers, monetary, and technical support... CyanogenMod will be renamed to LineageOS... The biggest problem is all development on Moto G 2015 (and many other Moto devices) is based on CyanogenMod, and there is no other source at this time. How will that play out? We don't know yet...
A well formed (and informed) answer from Stack Exchange's Android Enthusiast group:
CM's own blog is unreachable now, but XDA-Developers already summed it up and clarified some important bits:
All monetary and infrastructural support for CyanogenMod from Cyanogen Inc. will cease. -> CyanogenMod will no longer receive nightly builds after December 31st... unless the team finds another host to build nightlies.
The CyanogenMod team will not continue official development on the project.
CyanogenMod will rebrand as LineageOS.
Since it's clear that Cyngn is going in a new direction, Cyanogen OS will almost certainly have no future, since it's not community-driven in the first place. CyanogenMod, on the other hand, will live a bit longer, until Lineage dawns (or fails).
Click to expand...
Click to collapse
Wasn't Omnirom a fork of CM after the creation of Cyanogen Inc? As I recall all the developers were upset over going commercial and the future of cyanogenmod. Lineage OS would in essence be a fork of Cyanogenmod as well. I think it will really depend on whether they can find funding for some build infrastructure and how many developers jump on board.
acejavelin said:
The question is will CyanogenMod continue to live now that they have lost all support from Cyanogen, including build servers, monetary, and technical support... CyanogenMod will be renamed to LineageOS... The biggest problem is all development on Moto G 2015 (and many other Moto devices) is based on CyanogenMod, and there is no other source at this time. How will that play out? We don't know yet...
A well formed (and informed) answer from Stack Exchange's Android Enthusiast group:
Click to expand...
Click to collapse
The repositories are being mirrored (probably 'forked' is the correct term) into linageOS so I think we'll have a copy of our source code. And they said the source code for CM would still be available.
https://github.com/LineageOS?tab=repositories
Broadcasted from Zeta Reticuli
BTW, it isn't ending on Dec 31st like most people thought... it's ending prior to Dec 31st... They lost DNS and Jenkins yesterday, the blog is gone (so no reference to the official posts), official Cyanogen and CyanogenMod websites are down, and probably more that I haven't noticed mentioned yet are gone already.
But https://download.cyanogenmod.org is still live.
What would be the status of other custom roms that are based on cyanogenmod. Would they be affected ?
aa1010 said:
What would be the status of other custom roms that are based on cyanogenmod. Would they be affected ?
Click to expand...
Click to collapse
Of course...ALL ROMs for this device, except stock based ones, use the CM device tree and base code... Will LineageOS replace that? Right now it appears that way but time will tell.
To be honest, if CM/LineageOS doesn't make it... Probably 80℅ of all ROMs out there will disappear as we know them today, we really don't know the long-term effects this will have on the ROM community.
Some dumb questions:
1. LineageOS is the same team as CM?
2. There's a release date for the lineageOS and it will be compatible with moto g 2015?
3. To keep updated is better to wait or change to an AOSP based rom since AOSP will still be releasing?
h0ttentot said:
Some dumb questions:
1. LineageOS is the same team as CM?
2. There's a release date for the lineageOS and it will be compatible with moto g 2015?
3. To keep updated is better to wait or change to an AOSP based rom since AOSP will still be releasing?
Click to expand...
Click to collapse
1.2.3 i dunno but i hope everything will be fine
h0ttentot said:
Some dumb questions:
1. LineageOS is the same team as CM?
2. There's a release date for the lineageOS and it will be compatible with moto g 2015?
3. To keep updated is better to wait or change to an AOSP based rom since AOSP will still be releasing?
Click to expand...
Click to collapse
1. Yes, to a point... for more information look at http://lineageos.org/Yes-this-is-us/
2. We don't know yet, they do not have build servers at the moment
3. I would wait, there is little chance of getting a working AOSP device tree at this time, but we will just have to wait and see.
The point is, right now we don't know exactly how this is all going to play out... we need to have patience and just see what happens.
---------- Post added at 01:29 PM ---------- Previous post was at 01:12 PM ----------
I would suggest everyone following this thread, look here: http://forum.xda-developers.com/2015-moto-g/general/cyanogenmod-to-lineageos-t3526944

Device tree and kernel

I have been running AOSP preview 2 on EMUI 9.1 STF-L09. This build was created by openkirin and runs smoothly. However, upon a polite request from openkirin I was told that I was not able to use their device tree and sources for unknown reasons.
My question is to anybody even with mild experience what I can do. I spotted a kernel tree for kirin 960: https://github.com/wirmpolter/device_huawei_kirin960-common along with the two: https://github.com/wirmpolter/device_huawei_hi3660 and https://github.com/wirmpolter/proprietary_vendor_huawei_kirin960-common
The other alternative is to use https://github.com/phhusson/treble_experimentations if this is more stable. I could try merging the two.
However, I have never done any Dev work before so I just wanted to stay of by building my own stable AOSP and then trying to get pixel experience to work

How big is the BlissROMs source code file for building unofficial build for ARM devices? Also help about building from the source code.

I want to build my unofficial build for my phone, HTC Desire 816. But I have a limited data plan, and I worried I will running out of my data by downloading a huge source code with unnecessary files for other architectures, phones etc. And I'm just need the ARM and important files.
Also I got these repos from Tarkzim's forum at LineageOS unofficial for HTC Desire 816:
Device tree
Kernel
Vendor
Well, I didn't have any experience at Android development. So maybe can someone give me a guide too?
I'm just know the preparations on the documentation and it's ready, but the steps are confusing for me.
Or maybe if peoples are have their time maybe can someone make the official build?
Maybe it such out of BlissROMs, but I really want to Blissify my phone. Because LineageOS are too plain, no good features like smart charging etc. It just looks a normal Android build from AOSP source.

Categories

Resources