yashsingh1/xdaforums huggingface dataset:
[Android] DiamondJohn:
Not really a question of help on building, but, I am building crDroid android 10 (literally as I type its at 17% ....18%...). Its missing a feature I have come to depend on and was wondering iof anyoneknows of a ROM that they build that is Android 10, that has the upper lock-screen shortcuts?

Actually, I dont think crDroid has the lock-screen weather in a more graphical/colour format. Its only appears to be an outline.

Is anyone building a ROM that has both of these in Android 10? ie upper lock-screen shortcuts and graphical weather? I do not wish to be running exposed, and is one of the reasons I build highly customisable ROMs
[Android] DiamondJohn:
I am building crDroid, Android 10, for an unsupported device.

The userdebug build went fine with no issues stopping the build. So, I thought I would try a user build. Thats when things went bad.The build stopped at >90% on an selinux conflict with a never allow. Looking into it further, I found there were hundreds of conflicts, that were not stopping the userdebug build. Looking into it even further, I found the following setting.

export SELINUX_IGNORE_NEVERALLOWS=true;

Which is set to true on userdebug builds. I have also found the setting

export SELINUX_IGNORE_NEVERALLOWS_ON_USER=true;

Now, setting these both to true, allows me to push through the never allow SELinux conflicts, however, I am now concerned about what it is actually resulting in?

Do these settings mean the "never allows" are actually being ignored in their entirety, OR does it mean the never allow is enabled, but the conflicting allow is specifically allowed? ie does it "punch"a small strategic hole in the never allow? or does it blow the never allow away completely?
[Android] DiamondJohn:
I am building crdroid (Android 10/LOS17.1) which is LOS based, so I would project that it would be the same/similar for all LOS based ROMs. and I have found similar lines in what I would presume are AOSP from google.

If I am reading it correctly, it seems to be the worse worst case of what I originally thought.:eek: Could someone check / confirm what I am finding? but the fact that a user build fails on conflicting SE policy lines conflicting with neverallow lines (on a user build) supports the case pretty strongly.

userdebug Builds, which is what most would build, and is being released by devs for users, totally ignores the never allow lines of SELinux policies.

eg device, sets SELINUX_IGNORE_NEVERALLOWS := true

https://github.com/crdroidandroid/a...2502d408e7ee55f596fc951e60e45c/BoardConfig.mk

...snip...
# We modify several neverallows, so let the build proceed
ifneq ($(TARGET_BUILD_VARIANT),user)
SELINUX_IGNORE_NEVERALLOWS := true
endif
...snip...

and in the compiling code

https://github.com/crdroidandroid/android_system_sepolicy/blob/10.0/Android.mk

...snip...
# keep concrete sepolicy for neverallow checks
[B]# If SELINUX_IGNORE_NEVERALLOWS is set, we[COLOR="Red"] use sed to remove the neverallow lines before compiling.[/COLOR][/B]
...snip...
ifeq ($(SELINUX_IGNORE_NEVERALLOWS),true)
$(hide) sed -z 's/\n\s*neverallow[^;]*;/\n/g' $@ > $@.neverallow
$(hide) mv $@.neverallow $@
endif
...snip...

So it appears that all the neverallows are commented out/removed

On the test userdebug build I did, when i check for SELinux denials, after running a few hours, I only get less than 10. Which confirms to me things are not being blocked.

No one appears to mention the fact that these userdebug builds have a "broken" SELinux.

Am I missing something? is this something I have only become aware of recently, and is a well known state by everyone else?

I would also guess that some of the requirements for security patches would be implemented in the neverallows, so any ROM built as userdebug would not truly meet the security patch, that the ROM would purport to support.
[Android] platinumthis:
I need a littel help, what this error means, what i have to do

build/make/core/dex_preopt_config.mk:162: error: fopen failed.

14:45:56 dumpvars failed with: exit status 1

#### failed to build some targets (2 seconds) ####

I typed brunch command

And yeah DiamondJohn´s question was first :D
[Android] DiamondJohn:
And my post is No. 10002, so that would be 5001 questions before me. There is no order of first come first served.:good:

Have you run

source build/envsetup.sh;

and lunch?

lunch ${DEVICE_PEFIX}_$DEVICE-userdebug

fopen is a pretty base C function, so my *guess* would be it is trying to open a non existent file, because some environment variable has not been set.
[Android] platinumthis:
Sure I run the envsetup but I lunch brunch Instead
[Android] platinumthis:
I get the info that this product could not be found but in brunch it works i Also Build Android 10 but after repo sync i just dont work
[Android] TimSchumi:
Removing the neverallows doesn't break SELinux. After all, SELinux denies everything by default, and you would have to add a rule first for allowing a specific action.

The point of neverallow is to ensure that nobody ever creates a rule that is in violation of what they thought is best for security (i.e. the thing that is defined in the neverallow as "this should not ever be allowed"). Removing that statement doesn't mean that it's allowed automatically, it's more of a safeguard for the people writing the SELinux rules.

However, when working with older devices or blobs, you can't always work within the constraints of those neverallows. That's what that flag is for. While you are removing all of the neverallows with this flag, you are probably violating only a select few of them.
[Android] DiamondJohn:
[MENTION=7331587]TimSchumi[/MENTION] THANKS for cleaning that all up.:good::good::good:

That was one of the things I did not understand/know. i was worried that it wasn't the case, as the running ROM has so few denials in the logcat; i was worried (wrongly:o) that it was basically running with no denials.

that makes a lot of sense, and also means that it would build using a safer option than what I was asking/mis-understanding.

Thats what got me worried,, is that the violation of neverallows were actually of the order of 1700!

...snip...
[2020-10-07 12:21:49] libsepol.report_failure: neverallow on line 20 of system/sepolicy/public/cameraserver.te (or line 10913 of policy.conf) violated by allow mediaserver cameraserver_service:service_manager { add };
[2020-10-07 12:21:49] libsepol.report_failure: neverallow on line 1 of system/sepolicy/public/camera_service_server.te (or line 10780 of policy.conf) violated by allow mediaserver fwk_camera_hwservice:hwservice_manager { add };
[2020-10-07 12:21:49] libsepol.check_assertions: [B][COLOR="Red"]1706 neverallow failures occurred[/COLOR][/B]
[2020-10-07 12:21:49] Error while expanding policy
...snip...

Although, doing a quick check, I think that collapses to around 42 never allow lines, being in conflict with a larger set of allow lines.
[Android] platinumthis:
Hey guys i got an error when launching brunch, what this means?

10:28:45 Build sandboxing disabled due to nsjail error.

/bin/bash: uname: Kommando nicht gefunden.

/bin/bash: date: Kommando nicht gefunden.

/bin/bash: date: Kommando nicht gefunden.

/bin/bash: date: Kommando nicht gefunden.

/bin/bash: uname: Kommando nicht gefunden.

build/make/core/envsetup.mk:138: error: Unable to determine HOST_OS from uname -sm: !.

10:28:45 dumpvars failed with: exit status 1
[Android] BigBrother84:
Hi,

I'm learning how to build custom ROMs.

I successfully built aosp following official sony guide for my device. Then I wanted to build crDroid 10.

(Finally I want to build halium and then Ubuntu touch for this lovely small phone :) but firstly I need to understand processes)

My device is sony xperia xz1 compact (codename "lilac"), useful links are:

https://github.com/whatawurst/android_device_sony_lilac - device tree, manifest with kernel, vendor etc. in readme.md

https://github.com/crdroidandroid/android/tree/10.0 - crDroid

http://docs.halium.org/en/latest/porting/first-steps.html - halium porting guide (read more about halium project here)

My building device is ordinary laptop with xubuntu 18.04 with 12gb RAM and 12Gb SWAP, building on external hdd through usb3 as disk is too small. I know it's ****ty but my main computer is broken.

Following this guide I initialized crdroid, synchronized repo, added local manifest folder with xml file where kernel, device tree etc were in ~/crdroid/.repo (manifest copied from linage device tree from readme.md) then `repo sync`.

After that I flashed lineage from XDA thread on device and extracted vendor blobs using included script in device tree repo (adb). (Findable in readme.md below the manifest)

Then I didn't rename files AndroidDevice.mk etc. as crdroid is based on lineage. (is it ok)?

Finally `. build/envsetup.sh` and `brunch lilac`

It stared building and after 4 min, error occurred:

FAILED: ninja: 'vendor/sony/lilac/proprietary/etc/public.libraries-sony.txt', needed by 'out/target/product/lilac/system/etc/public.libraries-sony.txt', missing and no known rule to make it
18:51:25 ninja failed with: exit status 1

Could you help me learn how to build it? :) (TBH, my goal is to learn how to build custom roms, especially Ubuntu touch, understand the processes, I'm not focused on crdroid)
[Android] NepoRood:
It tells you the problem in the error:

'vendor/sony/lilac/proprietary/etc/public.libraries-sony.txt', needed by 'out/target/product/lilac/system/etc/public.libraries-sony.txt', missing and no known rule to make it

Can you not use the vendor from your AOSP build? Instead of running the extractor script?
[Android] DiamondJohn:
SOLVED -- read two posts below.

i am trying to build havoc-os pie (ie LOS 9), by 'downgrading' the device tree from something used to build crDroid ie LOS 10, I am getting the following error thus far:

https://hastebin.com/fiquyesufo.yaml

[2020-10-20 16:59:58] FAILED: /home/diamondjohndroid/android/havoc_pie/out/soong/build.ninja
[2020-10-20 16:59:58] /home/diamondjohndroid/android/havoc_pie/out/soong/.bootstrap/bin/soong_build -t -l /home/diamondjohndroid/android/havoc_pie/out/.module_paths/Android.bp.list -b /home/diamondjohndroid/android/havoc_pie/out/soong -n /home/diamondjohndroid/android/havoc_pie/out -d /home/diamondjohndroid/android/havoc_pie/out/soong/build.ninja.d -o /home/diamondjohndroid/android/havoc_pie/out/soong/build.ninja Android.bp
[2020-10-20 16:59:58] panic: package "android/soong/generator" already has a package context
[2020-10-20 16:59:58]
[2020-10-20 16:59:58] goroutine 1 [running]:

anyone got ideas where i should be looking?
[Android] DiamondJohn:
OK, I worked this specific one out.

I looked into the error message a little further (ie I read it:o), and so opened the file "/home/diamondjohndroid/android/havoc_pie/out/.module_paths/Android.bp.list" in gedit.

I found that the compiler had found 3 copies of my devices android.bp. The first is the obvious one it should of found in the device specific directory. However, the second one was one that was sitting in my TRASH! and hence the duplicate; simply emptied my trash to remove that one. I also had a third copy by my own doing, in that I copied the old device tree into ".devices" (ie a hidden directory), so I could refer to it if I had any problems. I removed the two additional copies, and that got me past that error.

Unfortunately, there is a LOT more to do with the ".bp" files to make it work. Way too much than I had hoped.:crying:
[Android] 2C.LiryC:
Hi all.

Back here because of an error I can't understand. :confused:

My system can build lineage 17.1 to its success, but fails on building Havoc-OS with this error which confuse me :

Checking ".../kernel/xiaomi/ginkgo/scripts/gcc-version.sh" lines 26 & 27, I find this :

Could it be a missing specific package of gcc ? Or clang ?

In this case which one(s) should I get, please ?

Here's what a "gcc-v" returns :

And "clang -v":

Any hint, please ?
[Android] ParanoidNemo:
I think you should post the entire gcc-version.sh file because clearly the problem is a missing command and the 2 line posted "just" define 2 different variables. Probably the real error is located at the $compiler variable.
[Android] 2C.LiryC:
I also wondered about posting its all content instead of the only quote I did.

So, here it is:
[Android] ParanoidNemo:
Ok the script takes an argument to choose the compiler, so the problem is not here but you have to search for where the script is called and see why the relative argument for compiler is not passed.
[Android] ela1103:
wow its awesome .im waiting for this long time
[Android] cpt_Sherman:
Stock device: galaxy grand prime g530h

Port device: galaxy j3 pro j110

Android version:5.1.1

Issues: no sound at all, cant play music(no app for such files even if music player is installed), if i try to play music from player, it lags a lot; wifi passwords aren't saved after reboot, cant make videos (maybe because of sound issue)

Replacing mixer_path doesn't help. If somebody needs logs, i can send it( log is full of knox-related errors)
[Android] adinechin:
Hi everyone, I would like to know what is the best way to sign a build with our own keys ?

I already generated my own keys with :

subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
mkdir ~/.android-certs
for x in releasekey platform shared media; do \
./development/tools/make_key ~/.android-certs/$x "$subject"; \
done

Now I want to use it directly in my build. I tried different things but nothing worked...
[Android] adinechin:
Ok so I answer to myself, the successful way I found is to add this line in BoardConfig.mk (in device tree)

PRODUCT_DEFAULT_DEV_CERTIFICATE := /<your_path>/.android-certs/releasekey

And then do a full clean and full build

make clobber && make clean
brunch ...
[Android] Jespert:
Hello all, I get the following error when trying to build CM10.1 on Ubuntu 20.04. Does anyone know how to fix?

/home/jesper/android/cm-10.1/out/host/linux-x86/obj/STATIC_LIBRARIES/libcts_audio_quality_intermediates/libcts_audio_quality.a(ClientSocket.o): In function `ClientSocket::readData(char*, int, int)':
/home/jesper/android/cm-10.1/cts/suite/audio_quality/lib/src/ClientSocket.cpp:83: undefined reference to `fcntl64'
/home/jesper/android/cm-10.1/cts/suite/audio_quality/lib/src/ClientSocket.cpp:88: undefined reference to `fcntl64'
/home/jesper/android/cm-10.1/cts/suite/audio_quality/lib/src/ClientSocket.cpp:134: undefined reference to `fcntl64'
collect2: ld returned 1 exit status
make: *** [build/core/host_executable.mk:19: /home/jesper/android/cm-10.1/out/host/linux-x86/obj/EXECUTABLES/cts_audio_quality_test_intermediates/cts_audio_quality_test] Error 1
[Android] cpt_Sherman:
Platform:msm8916

Stock: galaxy grand prime g530h los 13

Port: galaxy j5 15 android 6.0.1 tw-mm

Issue:

Trying to boot, but stuck at splash logo. Looked through the log and see that it cant find some files that are already there
[Android] DiamondJohn:
SInce it dioesnt boot, I am assuming you do mean last_kmsg.

By "splash logo", as opposed to bootanimation, that implies something deeper than the rom.ie the bootloader.

As for not finding files, have you also checked the permissions on these files that exist? And maybe they "exist" AFTER the ROM is actually looking for them. Are you certain they exist when the boot looks for them? and not just when
[Android] cpt_Sherman:
Xda didnt upload my log, so here it is, sorry

165.1 KB file on MEGA

mega.nz
[Android] zappigan:
It's my understanding that the device tree is supposed to produce the original file structure from the stock rom. So it copies stuff to vendor to make it look like the original vendor partition, is this right?

My device also has a product partition. I extracted from super.img the following: system.img, vendor.img and product.img. A & B sides, although B side was mostly empty. Android 10.

The question is, does it make sense to copy files to - and use - the product partition in my device tree or should I just merge product and vendor so that I only use the vendor partition? :unsure:
[Android] adinechin:
Hi, could anyone help me ? I've already built several ROMs from source for my device (Lenovo Vibe K5 Plus / A6020), and I'm trying to build CalyxOS : https://gitlab.com/CalyxOS

The build is successful, as I only manage to generate *.img files, I flashed them directly via fastboot (boot.img and system.img), but I have the attached logcat at boot, and I don't see the boot animation.

Thanks !
[Android] DiamondJohn:
I did not read your log, but, I would only flash he ROM using a custom recovery such as TWRP. And thyat would be a CLEAN flash, which fastboot wont do.
[Android] adinechin:
The fact is that the build gives me only img files, so I cleaned every partition with twrp, and then I flashed with fastboot
[Android] MPK99:
Hello sir. Reference command seems won't work for now.

Here's the output :

~/lineage $ cd ~/pixelext && repo init --reference=~/lineage --depth=1 -u https://github.
com/PixelExtended/manifest -b eleven
Downloading manifest from https://github.com/PixelExtended/manifest
error: Could not read 3b3bee1952b8f8a14521cd605336fdce5085f0e6
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 0), reused 2 (delta 0), pack-reused 0
error: Could not read 3b3bee1952b8f8a14521cd605336fdce5085f0e6
fatal: Failed to traverse parents of commit 582a7d3c9012e63b03a611a04a86d7925776071a
error: remote did not send all necessary objects
manifests: sleeping 4.0 seconds before retrying
error: Could not read 3b3bee1952b8f8a14521cd605336fdce5085f0e6
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 0), reused 2 (delta 0), pack-reused 0
error: Could not read 3b3bee1952b8f8a14521cd605336fdce5085f0e6
fatal: Failed to traverse parents of commit 582a7d3c9012e63b03a611a04a86d7925776071a
error: remote did not send all necessary objects
fatal: cannot obtain manifest https://github.com/PixelExtended/manifest
~/pixelext $
[Android] Dhanush.15:
can anyone explain me this part
[Android] MPK99:
Under <manifest> and </manifest> you have manifest body...

<project path= here you need to provide the project url that can be found inside the remote repository fetch.
[Android] aliabadi97:
Hi

I'm new to porting android and working with lineageOS.

There is a file in device tree named <proprietary-files.txt>

I searched everywhere but can't find how to create it.

Also I know there are some blobs that we need, but blobs in vendor partition of stock rom in all devices are so bigger than these files in device trees. How to find which of them are useful?

notice: I'm familiar with TheMuppets or some other repos. I want to extract them manually from stock rom.
[Android] MPK99:
Use Android Tools 8th tool.
[Android] aliabadi97:
Thanks!
[Android] Tech180:
Does anybody have any idea how to solve this error?
[Android] Atanassoww:
Is it hard to port Custom Custom for another device?
[Android] nilkanth.marshiwane:
Complete guide for custom rom development.
[Android] kevinygod:
They is only boring, also you need of knowledge with Linux and Git
[Android] namhoang235:
https://xdaforums.com/t/guide-how-t...sources-from-other-roms.3844972/post-86207423

Any dev help me (noob) from this error when build please (to kernel compile part)
[Android] namhoang235:
what is the different between brunch and time brunch sir? i (a noob) see sometime brunch and sometime time
[Android] DiamondJohn:
I ihavent used it5 myself, but its simply a wrapper to return timiung details of another command,=. so time ls would return the timiung details of the ls command.
[Android] namhoang235:
oh thank you
[Android] namhoang235:
oh thank you, another question, can you give me hint for this error?

https://xdaforums.com/t/guide-how-t...-from-other-roms.3844972/page-6#post-86207423
[Android] Atanassoww:
I need a total complete tutorial of make an Unofficial version of some rom.
[Android] MarkG_108:
Hello. I have been trying to build LineageOS for Nexus 5 (codename hammerhead). I have done this successfully before, but now I am stuck. Here is the error I receive:

Starting build with ninja
ninja: Entering directory `.'
ninja: warning: phony target '-*-' names itself as an input; ignoring [-w phonycycle=warn]
ninja: error: /home/mark/android/lineage/out/build-lineage_hammerhead.ninja:410877: multiple rules generate /home/mark/android/lineage/out/target/product/hammerhead/system/etc/gps.conf [-w dupbuild=err]

make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/mark/android/lineage'

I attempted to find the source of "-w dupbuild=err" to change this into "-w dupbuild=warn". To find it, I ran the following command, which found three files:

grep -rnw '/home/mark/android/lineage' -e '-w dupbuild=err'
grep: /home/mark/android/lineage/prebuilts/ninja/darwin-x86/ninja: binary file matches
grep: /home/mark/android/lineage/prebuilts/ninja/linux-x86/ninja: binary file matches
/home/mark/android/lineage/build/soong/soong.bash:43:"prebuilts/ninja/${PREBUILTOS}/ninja" -f "${BUILDDIR}/build.ninja" -w dupbuild=err "$@"

So, I edited "soong.bash" changing it to "dupbuild=warn", deleted the two ninja files, and ran repo sync again, and then tried the build, but I received the same error.

I use Debian Bullseye to try to make this build, with Python 2.7.18 as the default, along with openjdk version "1.8.0_292". I use this site as my guide for building: https://wiki.lineageos.org/devices/hammerhead/build

I'm not sure how to search for and edit the source that creates the rules that are supposedly duplicates. I'm not sure what I should try next to fix this. All suggestions are welcome.
[Android] namhoang235:
make bacon -j3 | tee ~/<your path>/build.log.txt

this help you see the log clearly
[Android] namhoang235:
try to build a kernel first. lol. i'm still not have the first success of my rom, but kernel seem like easier