yashsingh1/xdaforums huggingface dataset:
[Android] quake73:
I'm trying to build a few CAF based roms for Xiaomi Mi9T Pro (raphael). They all behave the same - they get stuck at boot animation. I've attached some logs from the boot process of XPerience ROM (https://github.com/TheXPerienceProject). I have successfully built AOSP based roms, they work fine but the CAF ones don't, with the exact same combination of vendor/kernel/device tree. I'd appreciate if anyone can look at logs. I tried to figure out what's wrong, I can see 'android.frameworks.sensorservice@1.0::ISensorManager' is mentioned a lot of times.

Thanks.
[Android] xYOSIYAx:
What about the latest android versions? Any special android version i need? Or is it just the latest one in this guide and up
[Android] Tyakrish:
Is this guide still relevant for building new android versions ?

People who learnt from this guide, and are now excellent rom builders: Is there any additional material you referred when you learnt building as a beginner ?

I have heard of people building ROMs on some google cloud service. Is it free ?

Are there any free alternatives to Google Cloud ?

I want to start building, but I have heard Google Cloud requires credit card. But I don't have a card.

Any suggestions, from some of you experienced rom builders would be very helpful for me to begin...
[Android] MoistPicklez:
+1 on this, would love to get back into building ROMs myself.
[Android] adinechin:
I personally build my ROMs on my personal computer in a virtual machine with Virtualbox. You need 8GB of RAM at least though I think.
[Android] Tyakrish:
I have an i3 6th gen clocked at 3.7ghz with 2 physical cores and hyperthreading so 2 logical cores. RAM is 8GB. Though its very much possible to build on this hardware, the time for building will be a lot. I have heard people keep the computer on for an entire day and even more on low spec hardware. Does it take a lot of time for you as well ?

With virtualbox it would be even slower. Dual boot with Linux, is something which I would do.

Bandwidth and Network speed is also a major issue for me. My family starts shouting whenever I use it for network intensive tasks, because speed gets reduced for them :(
[Android] NepoRood:
Dual booting is your best option, for the required packages to build, get them from Google, here

You may need more packages depending what you are building for, but this is a good start
[Android] saski4711:
I'm trying to build crdroid 6.0 for beryllium and hit a snag:

hardware/interfaces/audio/common/all-versions/default/service/Android.mk: error: "android.hardware.audio@2.0-service (EXECUTABLES android-arm) missing com.qualcomm.qti.bluetooth_audio@1.0 (SHARED_LIBRARIES android-arm)"

the missing libs however are in place:

find . -name "*com.qualcomm.qti.bluetooth_audio@1.0*"
./vendor/xiaomi/sdm845-common/proprietary/vendor/lib64/hw/com.qualcomm.qti.bluetooth_audio@1.0-impl.so
./vendor/xiaomi/sdm845-common/proprietary/vendor/lib64/com.qualcomm.qti.bluetooth_audio@1.0.so
./vendor/xiaomi/sdm845-common/proprietary/vendor/lib/hw/com.qualcomm.qti.bluetooth_audio@1.0-impl.so
./vendor/xiaomi/sdm845-common/proprietary/vendor/lib/com.qualcomm.qti.bluetooth_audio@1.0.so

Prior I get some warnings about nsjail but as far as I understand this is not fatal:

PRODUCT_SOONG_NAMESPACES=vendor/xiaomi/beryllium vendor/xiaomi/sdm845-common device/xiaomi/sdm845-common vendor/xiaomi/sdm845-common hardware/qcom-caf/sdm845
============================================
12:46:02 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
12:46:02 Please let us know why nsjail doesn't work in your environment at:
12:46:02 https://groups.google.com/forum/#!forum/android-building
12:46:02 https://issuetracker.google.com/issues/new?component=381517
============================================

I have no issues building crdroid 5.10 on the same machine. I'm out of ideas. Any clues where to look for the cause?

Thx in advance
[Android] andybones:
I am currently building N, P, and Q/10 ROMs using an old, slow hand-me-down HP Omni 220 All-In-1 PC.

Specs include:

2.6GHz Intel Pentium G620 CPU (dual core)

4GB RAM

1TB Hard Drive - 500GB Windows / 500GB Ubuntu

Ubuntu 14.04 / Windows 7 - dual boot

Rough Build tmes starting with a fresh compile, or after *make clean"

N --- 2-2.5 Hours

P --- 2-3 Hours

Q --- 2-4 Hours

N and P ROMs built with more or less the basic setup.

For Q to build, it took some playing around with the setup. But once you figure it out, it's not a problem.

Maybe this can give some hope to others with older machines like myself.

Happy building!
[Android] anshumanxda:
how did you solved that metalava error while building Q?
[Android] andybones:
It took forever and many many initial 4+ hour builds doing 'make - j1' so can really see the errors.(like legit 20+ compiles at least that took over 4 hours, lol) It would crap out at like 95%, etc. Very annoying and crazy amount of time, but was totally worth it.

I just basically kept tweaking my build environment.

I honestly didn't really run into any serious metalava issues.

Mainly was running out of heap space.

My main thing is api right now, I have to do the make update api almost every build, which isn't the best method I know, but haven't seen any issues.

P Roms always built fine.

I don't remember everything I did.

For Q ROMs it took me a while to get a compile.

I use export _JAVA_OPTIONS="Xmx2048m" and just comment it out for N Roms. I had to add to my .profile, .bashrc wouldn't pick it up.

So my method was a fresh reboot of PC, doing - j4, or just a regular compile, iiirc - j4 is how it's setup stock. This would stop at different % due to PC overload and heap errors.

I'd then reboot the PC fresh again and restart the build with make -j2. If no issues then it would compile. Build times fresh went from 6+ total to cut in half to 3-4 tops total and didn't need to reboot.

Uploading sources from lineageos Gerrit is huge help for me. A lot of testing, etc.

JVM limits memory to 2GB when running metalava if I recall correctly.

I see a couple of options you can try out:

soong: java: Specify larger heap size for metalava

Disable doc generation

Remove apicheck.mk

This tmp file is always good to stay up-to-date with as well. This helped me out a lot, making sure I had everything needed and the right revisions.

I actually had an easier time building crdroid than los17. Took me a few builds to get everything correct, but just keep at it, you'll get what works for your environment and the needed changes. I would keep a list of what you change, I wish I did. Android folder and .repo/manifests need match before repo syncing, this was something new I learned.

Hopefully this post was of use for you, added just about anything I could remember. I'm now at the part where I'm able to start adding MODs in. I actually just got VoLTE working on N, pretty excited about that as my battery is going and need all the extra juice I can get. So try to have fun and not burn yourself out! Please keep me posted by mentioning me with [MENTION=2586080]andybones[/MENTION] in any follow up posts. I hope to hear good things. :good:
[Android] xYOSIYAx:
Anyone know what the difference is between this and building Q roms. Which java version do i get for Q and what is the command
[Android] NepoRood:
Give this a read, there are other links on the page as well
[Android] martin dsouza:
Android ROM Development From Source To End

this seems interesting and took some weight-age on which we can act upon. else every other traps you in a bugs!
[Android] Dilshad969:
I have followed all your steps. I need to ask you a thing.

Porting a ROM will require the downloading of such huge source files.

Like I have read somewhere that you can take the base ROM as any CM ROM of a dev and then port it. Please correct me if I am wrong.

And by the way the Guide is awesome.
[Android] katinatez:
Yes, huge download of source files. And yes you can port someone else ROM to your device.

The way you do that is repo sync ROM dev manifest. Then add your own device tree repos in local_manifest.
[Android] akhilnarang:
I think he means porting as in taking 2 devices ROMs zips, copying some files here and there, and rezipping

That porting, this thread is actually ROM building, not porting :p
[Android] OfficerJimLahey:
Hello,

I know this has been answered before, but I tried those suggested and still no go. Here is what I am getting:

joel@oven:~/carbon$ make carbon
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
CARBON_VERSION=
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.16.0-4-amd64-x86_64-with-debian-8.0
HOST_BUILD_TYPE=release
BUILD_ID=KTU84Q
OUT_DIR=/home/joel/carbon/out
============================================
/home/joel/carbon/out/target/product/generic/obj/APPS/SignatureTest_intermediates
"ebtables is disabled on this build"
find: `src': No such file or directory
find: `bootable/recovery/res-720': No such file or directory
No private recovery resources for TARGET_DEVICE generic
build/core/tasks/kernel.mk:91: **********************************************************
build/core/tasks/kernel.mk:92: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:93: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:94: * BoardConfig.mk file *
build/core/tasks/kernel.mk:95: **********************************************************
make: *** No rule to make target 'carbon'. Stop.
joel@oven:~/carbon$

Here is the snippet of my BoardConfig.mk:

# Kernel [Build]
TARGET_KERNEL_CONFIG := doubleshot_defconfig
TARGET_KERNEL_SOURCE := kernel/htc_doubleshot
BUILD_KERNEL := true

...and proof my defconfig exists:

joel@oven:~/carbon$ locate doubleshot_defconfig
/home/joel/carbon/kernel/htc_doubleshot/arch/arm/configs/doubleshot_defconfig
joel@oven:~/carbon$

What is missing? Any suggestions?

EDIT:

Convinced now I should be focusing on the "No private recovery resources for TARGET_DEVICE generic" notice, as if my custom device tree means squat. Is there a way to specify a device tree over a generic tree, or am I stuck having to download the repo again (as mentioned in another thread)?
[Android] tecno789:
Sorry for ignorance, but why is this so huge? The output file is generally 250 mb..... [emoji29]
[Android] OfficerJimLahey:
The source code plans for every circumstance I guess. On the kernel level, there is code there for every possible computer, embedded system, phone, whatever included, and the config to tell the compiler which pieces to use (80MB download - compressed - to make a 2MB to 3MB compiled kernel). I am assuming that is the case for the ROM source as well, which is what makes for the ~14GB download (even though compiled, you are only using ~250MB).
[Android] mohit310:
Becauses sources are usually bigger and once compiled they have only machine code. Also the 250 mb is compressed file system which will get uncompressed in your phone.. That's the nature of the beast.
[Android] mohamed786:
[MENTION=6109902]mohit310[/MENTION] plz clearify the error

command 'syn' requires repo to be installed first.

Use "repo init" to install it here.

i already installed the repo but it still asking install repo init....

how can i install...
[Android] banerjeeayan1996:
Can anyone tell me is it necessary to have the windows version also in 64 bit or just Ubuntu 64 bit is needed in vm.
[Android] mohamed786:
ubuntu is enough (64 bit)
[Android] akhilnarang:
Kernel source isn't 80, its ~550mb
[Android] Dilshad969:
I know it's an off topic thing but got no better place to ask this.

Like my phone already has a CM12 developed by a developer. I am asking that I want to port a AOKP ROM by this this CM12 ROM as the base ROM. SO would I need to download the whole bunch of the 10-15 GB file of CM12 and AOKP.

IF not then can you tell me what will work? And if you can I would request you to provide me with any guide which tells in detail how to port ROM. I googled it and many got different methods like changing some files, using android kitchen, etc.

I need some guide which would help me port ROM in a method bit like this the GIT stuff one.
[Android] RVR:
You need to download only the aokp source ... And follow post no 9 of this thread ..modifying the cm device tree for other roms
[Android] OfficerJimLahey:
Oops, was paying too much attention to the zipped linux source when I wrote this, which stable is currently an 80MB download.
[Android] tecno789:
I can't download source of resurrection remix, what is the right command?

Thanks
[Android] akhilnarang:
repo init -u https://github.com/ResurrectionRemix/platform_manifest.git -b lollipop5.1
repo sync

Check this.
[Android] mohit310:
Repo init is usually run from a directory which you created for rom. For e.g. If you created directory myrom then go inside the directory and run repo init - u url - b branch.

Once done you should see hidden manifest folder.

Then run repo sync inside the directory.

Before running above make sure as sent earlier that repo should be in the path
[Android] tecno789:
sorry, i would like understand.. why have i put platform_manifest after link resurrectionremix? does should be download with this : https://github.com/ResurrectionRemix , doesn't ?

thanks for all
[Android] mohit310:
If you see the link for RessurectionRemix they have many repositories.

https://github.com/ResurrectionRemix

Let me give you a analogy. The link https://github.com/ResurrectionRemix is like a root folder and there are many folders underneath it.

The folder that repo works off in this case is platform_manifest as it contains xml which has information for repo command to know where to pull the sources.

So you need to pull that folder so that repo can work its magic.

Hope this is clear.
[Android] rulim34:
Managed to compile Pixel Experience Q ROM, but stuck on Google logo when booting. Anyone knows the solutions?
[Android] NepoRood:
Quick glance shows that you have a ton of SELinux denials, I'm not well versed in that area. For preliminary builds, you should be building permissive, you'll still have the denials, but it may boot.

Do you have a link to the trees you are building with?
[Android] DiamondJohn:
Good idea, but I think its already permissive.:(

01-06 07:58:41.569 327 327 I init
: type=1400 audit(0.0:7): avc: denied { setattr } for name="wifi"
dev="mmcblk0p49" ino=131095 scontext=u:r:vendor_init:s0
tcontext=u:object_r:wifi_data_file:s0 tclass=dir
[B][COLOR="Red"]permissive=1[/COLOR][/B]
[Android] rulim34:
Already change to permissive. Still cannot boot. Then my tester tried to flash the vendor patch and SUCCESSFULLY booted. But there are some bug like qualcomm.qcrilmsg keep stopping. Btw I use lineage-16.0 Device Tree and Vendor Tree to build android 10. Do you know what I have to change?

Device tree : https://github.com/rulim34/android_device_xiaomi_riva

Vendor tree :

https://github.com/rulim34/android_vendor_xiaomi_riva
[Android] rulim34:
Sorry double post, here is some logs
[Android] optimumpro:
Q comes with its own Java.
[Android] cailloud:
Android pie uses openjdk java 9 right?
[Android] DiamondJohn:
Use GLONASS on GLONASS "enabled" device?

At this stage, I am looking for a broad strokes kind-a answer, nothing particularly specific.

My Current phone (and my previous phone) both had GLONASS "enabled" positioning sensors. I say that word in quotes as although the devices could see and connect to the GPS and the GLONASS satellites, ONLY the GPS satellites were/are ever used in a fix. Previously, I thought it was some military restriction regarding consumer devices (as used by military personnel) connecting to Russian based satellites. However, my mother recently purchased a Nokia 7.1 and it uses both GPS and GLONASS satellites to derive a fix, so, obviously I was mistaken or the restriction has been lifted.

So, my current device (a Samsung S4 gt-i9506) can connect to the GLONASS satellites but they are not used to attain a fix. I am, hoping that this failure is due to the android source and not the modem firmware (which "see's" the GLONASS satellites)

The question is if my line of thinking is correct, and if it is going to be possible to apply a fix to my device source to enable GLONASS in attaining a fix?

Maybe if someone has a github source for a device that definitely does use GLONASS to attain a fix might be a starting point (I do understand the source will be directly related to the different modem and hardware, just a starting point). Or even better would be a commit that switches it on :victory:, but that would be almost dreaming.:silly:
[Android] hhrokarvi:
Hey guys,

My specs: i5-7200u, 8gb RAM, 8gb Swap.

Able to build pie in 3.5 hours without ccache

It hangs around metalava stuff due to RAM usage while building crdroid 6. I saw that [MENTION=2586080]andybones[/MENTION] was able to build on his lower spec laptop.

How do I remedy this without needing to buy more RAM...

Thanks in advance.
[Android] DiamondJohn:
I have a heap of memory, so I am running a little blind here, but have you tried increasing the size of the swap file?
[Android] hhrokarvi:
It's an HDD, so the system lags, hangs a lot.
[Android] nubianprince:
Add the following to your .bashrc export _JAVA_OPTIONS="-Xmx5G -Xms5G"

Find out how many cores your cpu has

Open terminal type nproc

When building use -j(# of cores divide by 2)
[Android] hhrokarvi:
It went a couple more steps, then got stuck again.

Sorry if my question is noobish, when I entered command "brunch shamu -j2" it gave me an error.
[Android] nubianprince:
Try m -j2 && brunch shamu
[Android] DiamondJohn:
My understand was that in your original post, you were complaining about RAM, not HDD performance, and hence my response.

As for slow HDD performance, one thing I have done which made a HUGE difference,, is pushing varuious parts of the disk/file locations onto separate independent drives.

I build on a win7 64b VBox. If you have some spare USB portable drives, I do the following to enable parallel reads/writes during a build, so my disks aren't thrashing. It makes a really big difference to my build times. Some of my drives are even mounted partitions sitting on USB2 (ie not even USB3). My PC has an overload of USB ports.

See the following posts where I have (hopefully) explained it before.

https://xdaforums.com/chef-central/...evelopment-t2814763/post80063815#post80063815

https://xdaforums.com/chef-central/...evelopment-t2814763/post73609875#post73609875
[Android] hhrokarvi:
Thanks to you both for helping. I was able to build with "breakfast shamu && mka bacon -j2" easily. Took ~2 hours but time was never an issue for me. :highfive::victory::D
[Android] ParanoidNemo:
POSP porting problems | Xperia X

Hi all,

had some time to continue trying to port POSP to xperia X and I'm stuck with this error for around a week now. I've tried everything that have been come to my mind but nothing seems to work.

Here's the error, just at the start of the build:

[370/976] including hardware/qcom/data/ipacfg-mgr/sdm845/hal/Android.mk ...
build/make/core/base_rules.mk:260: error: hardware/qcom/data/ipacfg-mgr/sdm845/hal: MODULE.TARGET.SHARED_LIBRARIES.liboffloadhal already defined by hardware/qcom/data/ipacfg-mgr/sdm845/hal.
12:41:26 ckati failed with: exit status 1

And here rom source and my local manifests, device, platform and common repo:

ROM: https://github.com/PotatoProject (building baked branch AKA Pie)

local manifests: https://github.com/ParanoidNemo/local_manifests/tree/android-9.0.0_r46

device: https://github.com/ParanoidNemo/device-sony-suzu/tree/p-mr1

common: https://github.com/ParanoidNemo/device-sony-common/tree/p-mr1

platform: https://github.com/ParanoidNemo/device-sony-loire/tree/p-mr1

I understand the error (if it could be described that way but I cannot solve it because it seems to loop on itself, the specific path is the only containing that library so I don't know what to do).

Removing the offending project from syncing (I don't know if is needed for POSP) create errors for the sdm845 platform, removing subsequent projects (gps and media) or simply editing the Android.mk file to make it not searching for ipacfg create a missing dependency on wlan (don't really know if related because I've search for ipacfg-mgr and didn't find anything useful for understanding what actually do) and build with ALLOW_DEPENDENCIES=true still generate other problem at the start of the build.

Any suggestion will be very helpful.

Thanks in advance.
[Android] Simon1511:
Hello, when building crdroid 6 my PC (Ryzen 5 1600, 16GB DDR4, 250GB SSD) takes really long to build. When I was building crdroid 5, building took around 30 minutes. For crdroid 6 it takes 1 1/2 hours. Im using ccache and I have cleared its cache before, but after 10+ builds it still takes long.

Any ideas?
[Android] DiamondJohn:
Have you checked if the issue (as a first port of call) is disk bound or CPU bound? ie which is running at 100% causing the other one to wait. and compared that between the two builds?
[Android] NepoRood:
ccache native support was dropped with Android 10, are you sure it's setup properly?
[Android] Simon1511:
When I clear ccache, its cache will be filled after one or two builds, so I think thats not the problem.

All of my CPU cores are running at 100% utilization when building.

So when native support has been dropped, isnt there a possibilty to get it back? (Maybe "export USE_CCACHE=1" in build directory or so?