yashsingh1/xdaforums huggingface dataset:
[Android] Rmontoya83:
I am trying to build a device tree from source for the LG style 2 plus k550 (ph2n)

I have the vendor kernel source and the android souce. It says in the folder to build the stock firmware I need the 6.0.1 tool chain.

Can I use both sources to build a device tree for cm. I tried to make otatools and it builds the folders. But I don't see the kernel or recovery there so I get build errors. I been using this video as a tutorial.

[youtube]Uw_caMHZRC4[/youtube]

Can someone please tell me what I'm doing wrong?
[Android] mihran_thalhath:
Delete!
[Android] Gaboros:
Does anybody has a guide about how to port AOSP device tree to CM (LineageOS) device tree?
[Android] Sarvesh@123:
Hello guys im completely noob with android development i had just tested custom roms

Can anyone will please tell me how to create a rom with ninja ? I tried to google this but there is not enough info about ninja :eek:
[Android] gtpitch:
I've been searching all day but can't seem to find the fix for this. Trying to build AOSP-RRO for OnePlus2. I have the source code, device tree, vendor tree and kernel all ready to go. I can't seem to figure out how to get past this error:

external/mm-dash/dashplayer/DashPlayer.cpp:2385:90: warning: format specifies type 'int' but the argument has type 'ssize_t' (aka 'long') [-Wformat]
DP_MSG_HIGH("DashPlayer::getSelectedTrack tracktype %d and SelectedTrackIndex %d",type,selectedTrackIndex);
~~ ^~~~~~~~~~~~~~~~~~
%zd
external/mm-dash/dashplayer/DashPlayer.cpp:46:51: note: expanded from macro 'DP_MSG_HIGH'
#define DP_MSG_HIGH(...) if(mLogLevel >= 1){ALOGE(__VA_ARGS__);}
^~~~~~~~~~~
system/core/include/log/log.h:156:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
^~~~~~~~~~~
system/core/include/log/log.h:453:38: note: expanded from macro 'ALOG'
LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:461:37: note: expanded from macro 'LOG_PRI'
android_printLog(priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:618:36: note: expanded from macro 'android_printLog'
__android_log_print(prio, tag, fmt)
^~~
external/mm-dash/dashplayer/DashPlayer.cpp:2407:9: error: no matching function for call to 'utf16_to_utf8'
utf16_to_utf8(str, len, (char*) data);
^~~~~~~~~~~~~
system/core/include/utils/Unicode.h:113:6: note: candidate function not viable: requires 4 arguments, but 3 were provided
void utf16_to_utf8(const char16_t* src, size_t src_len, char* dst, size_t dst_len);
^
11 warnings and 1 error generated.
[ 7% 735/9854] build /home/brett/aosp/out/target/pro...lus2/obj/APPS/framework-res_intermediates/package.apk
target Package: framework-res (/home/brett/aosp/out/target/product/oneplus2/obj/APPS/framework-res_intermediates/package.apk)

Any ideas?
[Android] DJKristy:
Is the Device tree,vendor tree and kernal tree for each device developed by developers or are they given by the device manufacturers
[Android] TimSchumi:
Kernel tree should be given by the manufracturer, but it most likely needs to be changed a bit by the developer.

Vendor tree is a collection of proprietary files, which we don't have the source too (and is mostly copied in parts from other devices). The vendor tree itself is created by the developer, but the files in it are mostly given by the manufracturer.

Device tree is developed by the Developers entirely
[Android] DJKristy:
So is there a thread or guide about making a device tree.
[Android] TimSchumi:
It's mostly trial and error.

But there is some good help for getting started with developing:

https://xdaforums.com/showthread.php?t=667298

https://xdaforums.com/showthread.php?t=915435

http://www.netmite.com/android/mydroid/development/pdk/docs/

The last two are outdated/contain some errors, but they should help you getting started.
[Android] DJKristy:
Can I use cm device tree to build ressurection ROM or aicp rom for the same device
[Android] NepoRood:
Yes, you just have to make some small changes to the make files. cm.mk to rr.mk, maybe some other small tweaks, that type of thing
[Android] Arvind7352:
Yes. Cakewalk.

You just need to change the ROM Specific things.

The Important one is under the file [ROM]_[DEVICE].mk OR [ROM].mk

PRODUCT_NAME := [ROM]_[DEVICE]

Where ROM represents the ROM's Codename in Source.

CyanogenMod -> cm

Orion -> orion

If you want to build AICP from a CyanogenMod Device Tree, Just replace things which contain this codename.

Other minor changes include Addition && Deletion of Overlays (overlays folder), Toolchain Configurations (BoardConfig.mk), etc.

Several Examples of such modifications are available, some of them (random) are listed below...

Orion

GZR Tesla

OmniROM

Take a look.
[Android] Gaboros:
I'm trying to port AOSP device tree to LineageOS. First I only tried with "make recoveryimage" but got

Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/gaboros/android/cm14.1/out/target/product/thor_k506/obj/STATIC_LIBRARIES/libbootloader_message_intermediates/export_includes', needed by '/home/gaboros/android/cm14.1/out/target/product/thor_k506/obj/EXECUTABLES/init_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

Can anyone help?
[Android] Infinity:
This is the normal & common error faced by many people now a days...(btw it is not related to porting device tree)
[Android] xtremelora:
Hello everybody, Happy New Year. I have been building CM13 from scratch for my device (LGV521 G Pad X 8.0).

I have been facing a lot of issues, solving one by one, sometimes using google sometimes asking to other developers. Unfortunately there is not a detailed guide on how to do this.

Now, Im facing this error:

error: ext4_allocate_best_fit_partial: failed to allocate 75 blocks, out of space?

Here the complete output: http://pastebin.com/JgwStqFi

The only viable solution I have found for this to alter this line on boardconfig.mk BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x08c60000 BUUUTTTTT I found this: https://github.com/opengapps/aosp_build/issues/13 and is not recomendable to do what I did (I don't have access to the bootloader to edit partitions). After I alter that line I overcome that error and I got the final CM13.zip, is flashable and thanks God my device did not brick but did not boot.

There is one developer who is helping me a lot and he told me that instead of altering that line I should declare some flags in order to reduce my system.img file, the problems is that I can not find a guide on how to do that.

Could someone help me with this?

I'm normally connected on #cyanogenmod-dev as xtremelora if you have a spare time from 7pm - 12am utc-6.

Thanks in advance.
[Android] maulik__p81:
http://pastebin.com/8SLRNyjv

Getting this error while compiling hexagonRom .

How to solve this error..??
[Android] Gaboros:
I see. But what is the solution? I didn't find anything about this with search.

I could build the official bullhead device tree, that's why I thought it's has to do something with mine.
[Android] Infinity:
Hehe... sorry i forget to tell you solution...

Commit changes made in github....
[Android] Gaboros:
I played around a little with generating the CM device tree from the boot.img and editing the files one by one. The error appeared after editing the BoardConfig.mk.

I'm continue with playing around what exactly caused this. :)
[Android] NicoAlt:
Building CopperheadOS for Moto G3 (osprey) fails: telephony-ext_intermediates/jar

Hello together, Happy New Year!

I'm currently trying to build CopperheadOS for the Motorola Moto G3 with Cyanogenmod's device tree and fixed already a lot of errors but currently it fails with the following message:

Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/telephony-ext_intermediates/javalib.jar', needed by 'out/target/product/osprey/dex_bootjars/system/framework/arm/boot.art', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

Can anyone tell me what I have to do? I found no information when searching for this error. Is the other code broken? Or does it is a problem with my setup?

Basically I'm working with a modified version of the osprey device tree and the msm8916 kernel tree that I edited to build/use the kernel in-tree (see official devices of CopperheadOS).

You can find more information in the GitLab repo "NicoAlt/copperhead_motorola_osprey" (I'm not yet allowed to post links).

When I successfully built CopperheadOS, I want to make it available to other users in the osprey subforum.
[Android] Infinity:
You don't have any custom rom available for your device???
[Android] Arvind7352:
Sync this repository,

https://github.com/CyanogenMod/android_vendor_codeaurora_telephony

Path to sync would be,

vendor/codeaurora/telephony

telephony-ext module is built from this repository
[Android] Infinity:
Many guys getting such error....(who are using cm related stuffs)

Solution: You have to check display-caf, audio-cad etc are presented or not...also commit lastest changes on from the sources this will solve error

---------- Post added at 03:41 AM ---------- Previous post was at 03:37 AM ----------

Brother are you following any guide for this??

(For such editing)

Note: if you think the error is due to such editing you done then use this command:

repo forall -c 'git reset --hard ; git clean -fdx'

Then repo sync

btw which device?
[Android] Gaboros:
No but I have fixed it. The I have build the kernel and CWM. CWM didn't worked, full blackscreen but kernel booted just fine. :)
[Android] Infinity:
Great! Hardworking...

Congratulations for kernel build...?
[Android] olus:
there is an aosp 7 build from team m.a.d. for the vernee thor.

gaboros want to build cyanogenmod14 coming from aosp7.
[Android] NicoAlt:
Thanks, I successfully fixed this error with the commit "a1b1c0" in NicoAlt/copperhead_motorola_osprey.

Now I'm facing the following one:

ninja: error: 'out/target/product/osprey/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_includes', needed by 'out/target/product/osprey/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed

But I'll try to fix it with the tips from Infinity. TTYL.
[Android] Infinity:
If successfully fixed also share solution to others also...
[Android] NicoAlt:
Like Arvind7352 said, I added the following line to the local manifest:

<project path="vendor/codeaurora/telephony" name="android_vendor_codeaurora_telephony" remote="cyanogenmod"/>
[Android] DJKristy:
I want to build cm ROM for a device which has no custom roms available.

Means no development for that device yet.

No development means no device , vendor and kernal tree.

Can I build all these and make a ROM for that device.

Is it possible that I can make kernal source on my own.
[Android] Arvind7352:
Kernel source on your own, impossible. You gotta need some Initial Kernel Source published by the OEM.

Else you can use Prebuilt Kernel (the kernel binary which can be derived from the device), but development wouldn't last long, you would need to make some changes in kernel and that's possible by having its Source Code.

Device and Vendor Tree are secondary concerns.
[Android] DJKristy:
so kernal source should be relaesed my manufactureres. otherwise no devlopment for that device,right?
[Android] Infinity:
Which device you have..?

You have to ask the company for kernel sources, and other stuff vendor , device tree you can build (little long process) [there are many tricks for porting roms]

Few days ago, there was an amazing guide on cyanogenmod.org but now it is no more...
[Android] magatxda:
You can still get some of it here: http://web.archive.org/web/20161224192643/https://wiki.cyanogenmod.org/w/Development

Make sure to donate to them :)

The violent teardown showed us how important it is to backup publicly available information.
[Android] DJKristy:
Iball q45
[Android] Arvind7352:
Yes.

You may be able to get a ROM with the same Android Version as on Stock booting, but for Higher Android Versions, modifications to the kernel become necessary. Device tree and Vendor can be worked by yourself.
[Android] Infinity:
I don't think iball release for you...

But don't lose the hope...

Beg for it???

Best of luck for the journey
[Android] knpk13:
Here is an archive of the CM website

http://xdaforums.com/moto-g/4g-development/rom-cyanogenmod-14-0-t3469103/post70284454

Also, the LineageOS wiki should be up soon.
[Android] aoleary:
Deleted
[Android] Ost268:
error 1:communication error with jack server (52) and 2:GC overhead limit exceeded and other error

1:change port SERVER_PORT_SERVICE=8072 to 8088 and change port SERVER_PORT_ADMIN=8073 to 8089

destination files 1)home/user/.jack; 2)/root/.jack-server/config.properties; 3)home/user/CM/prebuilts/sdk/tools/

2:change .bashrc and add

export ANDROID_JACK_VM_ARGS="-Xmx8192m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation"

for my PC RAM 8Gb

3: Save bashrc and reboot ubuntu
[Android] Gaboros:
I manged to compile my LinageOS port from AOSP but after flash it stuck at the splash screen. Not even the bootanimation comes in. What problem can cause this? Or how can I found out, debug it? I don't even have logcat.

The kernel works with the AOSP rom.
[Android] theviruz:
What can i do?
[Android] gtpitch:
Trying to compile AOSiP for Oneplus 2 and getting a bunch of dependency (I think?) related errors when trying to start the build - example:

ninja: error: 'vendor/aosip/products/configs/msm_irqbalance.conf', needed by '/home/brett/aosip/out/target/product/oneplus2/system/vendor/etc/msm_irqbalance.conf', missing and no known rule to make it

As best I can tell msm_irqbalance is in the path /vendor/oneplus/oneplus2/proprietary/bin

I'm not sure where to look or how to make it look there. It's not a .conf file or else I'd just copy it.
[Android] nicesoni_ash:
What's the easy way to add a precompiled library (.so) in my rom while building? Also if I want to edit a permission file in system/etc/permission where should I look for that file in local repo?

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android] NepoRood:
For both look to your device vendor folder
[Android] nicesoni_ash:
I understand that precompiled library can be added in pre-built folder and then make according changes in config/common.mk but the permission file I want to add has to be modified by only one line, how to do that?

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android] NepoRood:
I have a permissions folder in my device tree, then use product copy files in my device.mk to place them into builds. Same can be done with so files, mine are all in vendor though
[Android] DJKristy:
How to debug.

I know that logcat will show the error.

But what is done where to fix such errors.

In schools we debug programs by searching n fixing errors in the code.

Likewise are the errors corrected by fixing in android source code???
[Android] Has.007:
[MENTION=5991747]neonkat[/MENTION] [MENTION=6049586]Arvind7352[/MENTION] Hi, I'm facing this issue even though everything has been setup nd I adapted the device tree.

I'm building Liquid Dark 5.1

Any clues where I'm going wrong?

I've added the repos in roomservice.xml as well but I guess it doesn't read.

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

<!-- Device Tree -->
<project path="device/samsung/fortuna3g" name="ZIM555/android_device_samsung_fortuna3g" remote="github" revision="cm-12.1" />
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-12.1" />
<project path="device/samsung/qcom-common" name="CyanogenMod/android_device_samsung_qcom-common" remote="github" revision="cm-12.1" />

<!-- vendor -->
<project path="vendor/samsung/fortuna3g" name="ZIM555/android_vendor_samsung_fortuna3g" remote="github" revision="cm-12.1" />

<!-- Extras -->
<project path="hardware/samsung" name="CyanogenMod/android_hardware_samsung" remote="github" revision="cm-12.1" />

</manifest>
[Android] neonkat:
go to your device tree and find liquid.mk and open it and change

$(call inherit-product, vendor/liquid/config/common_full_phone.mk)

to

$(call inherit-product, vendor/liquid/config/common_phone.mk)
[Android] aoleary:
roomservice.xml being overwritten

Hi.

I want to include a custom kernel by default in to a ROM I am building, but when I do "brunch" my entry for the kernel gets overwritten by the ROMs default kernel.

How do I get around that, to force the custom kernel to be used?

TIA
[Android] NepoRood:
Remove default from repo, replace with custom. Check defconfig and don't brunch, mka instead...

Device, ROM, etc, need just a tad more info for a more complete answer :good:
[Android] aoleary:
The problem is that when I run "brunch h815", my roomservice.xml gets overwritten and it writes its default kernel entry into the roomservice.xml.

So if I do a mka it wont overwrite my default roomservice.xml?

What do you mean by check defconfig?

Device = H815

ROM = cypherOS 3.5.1

Kernel = Llama kernel
[Android] NepoRood:
Check your dependency make file then, again, What ROM, What Device? (links to device trees will help a bunch) I don't know your setup, lol
[Android] aoleary:
Added device info to previoyus ^post. Here is the roomservice it writes when I brunch:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="device_lge_h815" path="device/lge/h815" remote="aoscp" revision="n7.1" />
<project name="device_lge_g4-common" path="device/lge/g4-common" remote="aoscp" revision="n7.1" />
<project name="kernel_lge_msm8992" path="kernel/lge/msm8992" remote="aoscp" revision="n7.1" />
<project name="device_qcom_common" path="device/qcom/common" remote="aoscp" revision="n7.1" />
<project name="hardware_sony_thermanager" path="hardware/sony/thermanager" remote="aoscp" revision="n7.1" />
<project name="hardware_sony_timekeep" path="hardware/sony/timekeep" remote="aoscp" revision="n7.1" />
<project name="proprietary_vendor_lge" path="vendor/lge" remote="aoscp" revision="n7.1" />
<project name="proprietary_vendor_qcom_binaries" path="vendor/qcom/binaries" remote="aoscp" revision="n7.1" />
</manifest>
[Android] NepoRood:
Device Tree? Is it not on Git? Once again, I don't know what you have going on with your local machine...

rm -rf .repo/local_manifests/roomservice.xml

Then, "rm -rf" anything else that is causing problems, re-sync, build without brunching (I'm stabbing in the dark, BTW)
[Android] Has.007:
Yes! That fixed the error. But now I'm getting another error in make.

http://pastebin.com/FV4cziha

You can see the screenshot as well.

Thank you very much, you're always helping it really means a lot. :)

Edit: Seems like the problem is here with package-export.apk (See the screenshot)

Should I comment these lines out nd try building again, I'm not sure if this is an important app or what should I do?
[Android] Has.007:
You need to change the Kernel path in your device tree. Change kernel path nd Defconfig as well in your device tree.
[Android] Infinity:
adding new device help

Hi there,

I have a question on how to add new device to source...

The situation is ... I already add redmj note 3 tree n all in local manifest. Now I want to add new device say moto g4 plus...

So here should I edit the same manifest and add moto g4 plus tree n all there

OR make a new room service for this...?

Thanks!
[Android] aoleary:
Hi.

So you are saying to modify my roomservice to download the kernel to a different path than "/kernel/lge/msm8992", is that correct, then modify my defconfig file to reflect this new path?
[Android] Arvind7352:
There's an error just above that which specifies that an overlay in Device Tree doesn't exist in the source.

The error also provided the file's location and line number which errored. Search for that line and remove it.

The error which you think to be it, is the consequence of the error above it (the one I mentioned).

(Any) Manifests are collectively parsed, the default manifest is parsed, then the local manifests are parsed. SoWhether you create multiple (local) manifests, or create a combined (local) manifest, It doesn't matter.
[Android] NepoRood:
the problem is with the overlay, it says so in your screen shot

---------- Post added at 09:13 AM ---------- Previous post was at 09:06 AM ----------

All can be in same file, personally though, I like to keep my stuff separate. Any name.xml file in the folder "local_manifests" will be read as roomservice (as long as it's calling repos)

Example:

I have one called: remove.xml

this removes all the projects that I don't need in order to build for my device(s), Darwin, hardware, packages, etc. It's fairly generic and it works for a lot of different ROMs

I also have one for each device: quark.xml, x10.xml, 8127.xml, etc...

This calls to my git repo and also pulls in other things related in order to build, also works with other ROMs

Regards,

Nepo

[MENTION=6049586]Arvind7352[/MENTION]

lol, sorry, I'm a slow typer...
[Android] gtpitch:
Can someone help me with this? Trying to build AOSiP for oneplus2 and using codeaurora telephony but keep getting this error and I don't know where to look or how to fix

Error: /home/brett/aosip/out/target/common/obj/JAVA_LIBRARIES/telephony-ext_intermediates/classes.jar: unknown package name of class file org/codeaurora/internal/IDsda.class
[Android] Has.007:
Thank you I commented it out nd it fixed the error probably but unfortunately another one pops up. This one seems to be with the Messaging app but I'm not sure what to do with this one.

http://pastebin.com/Z54CAQMz

I attached the screenshots for easiness please have a look. :)

Edit: Someone else built this ROM for another variant of my device nd his built didn't have the Messaging app. Maybe this is some error with source?

Yes fixed it with Arvind's help but something new this time. :silly:
[Android] kn06497:
please help DU 7.1.1 :confused:

frameworks/native/cmds/installd/installd.cpp:53:1: error: static_assert failed "Size mismatch."
static_assert(kPropertyValueMax == PROPERTY_VALUE_MAX, "Size mismatch.");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target thumb C: iw <= external/iw/cqm.c
target thumb C: iw <= external/iw/bitrate.c
target thumb C: iw <= external/iw/wowlan.c
1 error generated.
make: *** [/home/kn06497/DU/out/target/product/grandprimeve3g/obj/EXECUTABLES/installd_intermediates/installd.o] Error 1
make: *** Waiting for unfinished jobs....
[Android] Infinity:
Give logcat then i can guess

---------- Post added at 08:57 AM ---------- Previous post was at 08:56 AM ----------

Do repo sync 100%

(See if it is 100% syncing or not)
[Android] MiyamuraNEET:
"git://github.com/CyanogenMod/android.git -b cm-11.0" <<< How do I get a git like this?
[Android] TimSchumi:
Do you mean how you get a GitHub Repository, or how you clone this to your pc?