yashsingh1/xdaforums huggingface dataset:
[Android] DiamondJohn:
SEPolicy no longer compiling, worked fine yesterday

I have been building LOS based Nougat ROMs for my phone successfully for a few months now, however, all of a sudden, some small changes I have made weeks ago (SELinux additions), have just started to cause "syntax errors" :confused:

As part of my changes to the device tree, I add a couple of SEPolicy files, allowing selected items to occur under SELinux enforcing. These changes have all been compiling fine, up until today.

For example, the following line

allow batt_health proc:file { read };

causes

:ERROR 'syntax error' at token 'allow' on line 39963

Its really confusing, as the syntax is very similar to other lines within the default device tree, and as I said, it was compiling fine yesterday. I could understand if it was some conflict with a neverallow line or if the device "batt_health" did not exist, but they are there.

Any ideas what might be the cause?
[Android] SanketMohapatra:
Anybody here having successfully develop TWRP recovery for MT 6582 device?

My device is Micromax Canvas l a108 and I want to Port the recovery to my phone because I don't have any knowledge of anything regarding toolchain or all those things
[Android] HritikSH:
Yup, I have made CM 11 for Micromax A99 though with some errors.:silly:

Here you could get CWM for your phone.

https://xdaforums.com/android/development/cwm-recovery-micromax-a108-l-t2867010

Hit thanks instead of saying thanks;)
[Android] pix106:
Did you use BOARD_HAS_MTK_HARDWARE flag for your CM11 build ? If so, did you have a build error about libpmem ?
[Android] SanketMohapatra:
that CWM recovery is a very old version and doesn't support the Android Marshmallow ROM so I think it is of no use to me but I wanted to update into the newer version of the CWM so that it will be usable but I don't know how to do it
[Android] DiamondJohn:
Then read and ask on the correct thread

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

https://xdaforums.com/android/software/guide-how-to-compile-twrp-source-step-t3404024

This is a ROM thread NOT a recovery thread.
[Android] HritikSH:
Yes I have set that flag to true but got no build error.

---------- Post added at 03:17 PM ---------- Previous post was at 03:10 PM ----------

Yes I would suggest you to go for TWRP as CWM does not support many functionality as TWRP and if you just want to port recovery then extract your recovery.img using kitchen and do the required changes just Google them

And yes as said by [MENTION=5417899]DiamondJohn[/MENTION] you will get more support over that thread.
[Android] SanketMohapatra:
Thanks bro I will definitely remember your advice
[Android] NVDX11:
Delete this folder device/xiaomi/mido/data-ipa-cfg-mgr and build!
[Android] DiamondJohn:
I worked this out for myself, and thought I would post in case someone else comes across the same behavior.

I later realised I did make some additions to the SEPolicy files since my last compile. They were taken from GitHub and not from logs (ie the device) so were not valid. The last one in the additions was also missing the semicolon at the end, so the error would show up as the first line of the next file (which was the source of extra confusion as to what actually triggered the error).
[Android] Arjun KalyanRam:
Can we build for raspberry pi by following this thread
[Android] milox_x:
Hi guys, I'm syncing repo for my future rom and I already removed some things from repo with local_manifest but I would like to know how to include apps from github to my build process? I mean replacing for example Trebuchet with Lawnchair which is on github ;). Thanks in advance.
[Android] LilBlinx:
Somehow, it started the build without the deleting. Thanks for this anyway
[Android] FSadino:
Add lawnchair repo to your local manifest and add this code to your "device". mk

PRODUCT_PACKAGES += \
Lawnchair

Don't forget to remove Trebuchet and delete their repo to save local storage
[Android] DodoGTA:
I think that Lawnchair has no Android.mk file, so one would have to add that file or this method wouldn't work
[Android] milox_x:
So do I need to add "Lawnchair" to PRODUCT PACKAGES or not? Is there maybe a guide for android.mk?
[Android] FSadino:
Oh!! I didn't saw that.

Yes, Android.mk file is needed to produce the apk file

---------- Post added at 07:35 AM ---------- Previous post was at 07:33 AM ----------

Get Lawnchair apk file and unpack
[Android] ZVNexus:
When I try to do mka bacon it says

[ 99% 1097/1098] glob vendor/extras/soong/Android.bp

ninja: error: '/home/nexus/du12/out/target/product/oneplus3/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_includes', needed by '/home/nexus/du12/out/target/product/oneplus3/obj_arm/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes', missing and no known rule to make it

15:07:20 ninja failed with: exit status 1

make: *** [build/core/main.mk:21: run_soong_ui] Error 1

New to this, don't know exactly what this means. I have been getting error after error while trying to build.
[Android] FSadino:
Missing blobs?
[Android] ZVNexus:
I don't know :( I have all the stuff in du.dependencies so I don't know if that would be an issue.
[Android] FSadino:
Do you know what is device blobs and how to extract them?
[Android] ZVNexus:
I have heard of blobs but don't really know their exact purpose and no I do not know how to extract them.
[Android] FSadino:
Read step 9

https://xdaforums.com/showpost.php?p=70897626&postcount=1&nocache=1&z=1122725517870413
[Android] ZVNexus:
and that you are in the ~/android/system/device/your_device/codename folder.

This folder does not exist for me. I have an android folder in home but its just the sdk folder.
[Android] FSadino:
How can you be asking for help with one error if you don't even have your build environment prepared? Did you read any tutorial how to build or you are writing random commands on terminal??
[Android] ZVNexus:
Just checked I already have the proprietary blobs, I got the from the Muppets I believe and put them in /vendor/oneplus.
[Android] aoleary:
Bootloop during startup process..

Hi guys.

I built Screw'd v4.0.0 last night, however, it bootloops.

Here is what I modified to get it to build

https://github.com/aoleary/android_device_lge_d855_Oreo/tree/screwd

https://github.com/aoleary/vendor_screwd/tree/o/products

My manifest

https://github.com/aoleary/Manifest/blob/master/screwd

I have a feeling that I have might have misconfigured one or more of the makefiles.

I based my makefiles as much as I understood on the bullhead tree, since that is also an LG device (Nexus 5x).

https://github.com/ScrewdAOSP/device_lge_bullhead

The only log I could get of the bootup process was the ksmg output. adb logcat wouldnt connect during the bootup process

https://hastebin.com/sibupomoxo.vbs

Any help appreciated..

---------- Post added at 07:25 ---------- Previous post was at 06:29 ----------

Can you share your local manifest?

Also, did you sync o8x or o8x-caf?

Coz o8x is only for Nexus/Pîxel devices. I have a D855 so I synced o8x-caf
[Android] ZVNexus:
I synced o8x-caf, as thats what it said in du_dependencies.
[Android] aoleary:
And your manifest?
[Android] ZVNexus:
Sorry im new, I have a manifest folder is that what you want? Or is it a file like manifest.xml in .repo?

Or are you just looking for this

https://github.com/DirtyUnicorns/android_manifest
[Android] aoleary:
Within .repo, create a folder called local_manifests.

Inside that folder, create a file called zOP3.xml, for example.

Add the following lines to that file:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_hardware_qcom_audio" path="hardware/qcom/audio-caf/msm8996" remote="github" revision="lineage-15.0-caf-8996" />
<project name="LineageOS/android_hardware_qcom_media" path="hardware/qcom/media-caf/msm8996" remote="github" revision="lineage-15.0-caf-8996" />
<project name="LineageOS/android_hardware_qcom_display" path="hardware/qcom/display-caf/msm8996" remote="github" revision="lineage-15.0-caf-8996" />
</manifest>

Then sync again and build..

The reason I ask you to name the xml file with a "z" is that the reading of xml files is alphabetical, so by naming it with a "z" it ensures that this file is read at the end and not overwritten by the default DU repos..

I have had the same "libaudiopolicymanager_intermediates" error before and it was recommended to me to sync those repositories..

If you get a build issue again with the same error, then change the path in the zOP3.xml to hardware/qcom/audio, hardware/qcom/media, hardware/qcom/display.

Whenever you get this type of error message, it means you are missing a repository that it needs, so you need to sync something to your build..

missing and no known rule to make it

Let me know how that goes..
[Android] ZVNexus:
After I do that, to sync I just do breakfast oneplus3 then mka bacon?

*edit* nvm im dumb sorry its just repo sync right

---------- Post added at 04:04 AM ---------- Previous post was at 03:52 AM ----------

build/core/base_rules.mk:238: error: hardware/qcom/audio/hal: MODULE.TARGET.SHARED_LIBRARIES.audio.primary.msm8996 already defined by hardware/qcom/audio-caf/msm8996/hal.

This is a new error, but I am no longer getting the other one so thats good. I assume that I should just delete the copies?

*EDIT*

I deleted all copies and I no longer get those errors.

Now I get the same one I got before. At least I think.

[ 99% 1097/1098] glob vendor/extras/soong/Android.bp

ninja: error: '/home/nexus/DU/out/target/product/oneplus3/obj_arm/SHARED_LIBRARIES/libtinycompress_vendor_intermediates/export_includes', needed by '/home/nexus/DU/out/target/product/oneplus3/obj_arm/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/import_includes', missing and no known rule to make it

04:16:22 ninja failed with: exit status 1

make: *** [build/core/main.mk:21: run_soong_ui] Error 1
[Android] aoleary:
I would modify the xml you created and change the path in the zOP3.xml to hardware/qcom/audio, hardware/qcom/media, hardware/qcom/display

Then repo sync again

I think by deleting the folders at OS level, you will go down a rabbit hole of creating other errors.
[Android] ZVNexus:
nexus@nexus-ASUS:~/DU$ repo sync

warning: redirecting to https://github.com/DirtyUnicorns/android_manifest.git/

fatal: duplicate path hardware/qcom/audio in /home/nexus/DU/.repo/manifest.xml
[Android] aoleary:
At this stage, since this is an officially supported device, you are better off asking on the DU Google+ page, or on telegram, in the chat https://t.me/dirtyunicorns

The maintainer is the lead DEV of DU, Alex Cruz

Quote the original "libaudiopolicymanager_intermediates" error that you got..
[Android] ZVNexus:
Alright, thanks! I linked the error awhile ago in a comments thread and someone pointed me to the telegram thing but as I didn't use telegram I came here. Probably gonna install it now.
[Android] moozer:
I want to get in on this, but struggling finding sources for my device.

If anyone can help, I have Samsung Galaxy A5 2017 (A520F) codename a5y17lte.

Some of the guides I've tried to use to setup a build environment on Linux are outdated and many repos won't download and I keep getting errors.

Any help or direction will be greatly appreciated
[Android] NepoRood:
For build environment, I recommend: This, using Ubuntu 16.04 and needed packages. I also have posted an updated package list somewhere in this thread already :laugh:

For your device, there are a lot of Samsung devices on Github, do a search there and find one as close to your device as possible (same chip, screen size, etc...) and go from there
[Android] xenreon:
As you've already been told, and for a more in depth/quick process you can try this

About the device sources, if there's none in GitHub then you'll have to try looking for a device that has similar hardware as yours (the soc and architecture, camera, display etc.) And try to make necessary modifications to that to work with your device (no guides on this, it'll differ from device to device).
[Android] ZVNexus:
I was using o8x not o8x-caf. rip I am so stupid. Build goes good now.
[Android] aoleary:
How did you figure out that you had synced o8x?

The main thing is that it's now working, and at least you learnt a few things..

It's by making mistakes and encountering errors that we learn when building ROMs
[Android] ZVNexus:
I figured it out by linking error in the Telegram. I couldn't type in the DU telegram, but I was linked the Android builders chat. Guys were really helpful and immediately said you are using o8x not o8x-caf. It was way easier doing it that way, instead of git cloning all the repos I needed for my device I could now just do lunch and there my device was! No errors throughout. Was so happy :D. Its fun. There are some ROMs I have taken a liking to but were never updated in XDA but when I check the Github it appears it has been updated. This means I can just build all the ROMs myself right?

Only thing I didn't like was how long it took to build. 2 hours and 30 minutes. Thinking about upgrading my PC. :/

Theres this one bug with the ROM that it a very niche complaint but its slightly annoying. When you lock your device it takes 7-8 seconds (this is consistent) for you to be able to fingerprint unlock your device.
[Android] pix106:
What is "caf" ? I often saw this about chromium, beeing a Qualcomm optimized version of the browser, but I don't understand what it is when we're talking about building a rom.

To speed up your builds, use ccache, many GB, so your next builds will be faster.
[Android] aoleary:
Officially supported devices are always much easier to build as the device trees are already synced when you do a repo, so all the hard work is done..

If your device is not officially supported then you need the xml file in local_manifests, and a bit more manual work..

My first build of Oreo took about the same time and then subsequent builds took about 25 minutes.

Regarding the bug, Oreo isn't officially released by DU so obviously still a work in progress..

Also, can you PM me the link to the Android builders telegram channel?
[Android] ZVNexus:
I actually don't know lol I just hear it mentioned in ROMs, like an AOSP + CAF ROM. Here is something I found: a custom branch of the Linux kernel to better support the Qualcomm chipset.
[Android] aoleary:
All's I know is from a ROM building point of view that the Nexus/Pixel devices are non-CAF, and everything else is CAF..
[Android] Daziboy:
Hello I would like to ask if anyone can link me to guides for getting the vendor,kernel and device tree for non supported devices(I have the umi max) I have a stock rom as the recovery.img the boot.img and the build.prop

Also my phone is the downgraded version of the umi super (maybe that could help )

Thank you in advance
[Android] aoleary:
Go to page 1
[Android] Daziboy:
Yes but there isn't anything about my device on github so I can't make the manifest like showed or can I ?
[Android] FSadino:
Everything is caf... I mean.. Everything!! ;)
[Android] pix106:
What does caf stand for ?
[Android] FSadino:
qualcomm
[Android] spookcity138:
Code Aurora forum.

And not all devices are caf.
[Android] DodoGTA:
Like devices with Samsung Exynos, MediaTek, HiSilicon Kirin etc. SoCs
[Android] pix106:
That's what I found before, but I couldn't, and still don't, understand what "forum" has to do with device trees and ROM building.

I'll just accept it :)
[Android] showcheap:
This is was great,, wait for next step :angel:
[Android] TheUltimateNoobist:
http://xdaforums.com/showthread.php?t=2059939

This is the one mabye :D

---------- Post added at 12:47 PM ---------- Previous post was at 12:35 PM ----------

http://xdaforums.com/showthread.php?t=1978211 :/ It already exists.

Source for that : https://github.com/venkatkamesh/android_device_lge_ally
[Android] kris_92fr:
Hi

Thanks for your work

If you want i create a virtual machine for dev with kitchen

You can see it on my Blog http://kris-android.com/blog/rda_kitchen_vm/

Kris
[Android] caspboy:
No, this rom is has a lot of issue, like wifi and data don't work in the available build, the dev removed the latest stable build - but the source contains everything for a working one. How could I retrieve it and build?
[Android] TheUltimateNoobist:
Retrieve the source that I mentioned in my earlier post?

Go to that link, login, fork that repository. Open terminal :

mkdir LG_ALLY_SOURCE

cd LG_ALLY_SOURCE

git clone https://github.com/username/android_device_lge_ally.git

This will retrieve it to LG_ALLY_SOURCE

Unfortunately I don't know how to build :/ Since im working on something similar, ill post it to inform ya
[Android] Hashbang173:
Still get this:

i686-linux-gcc: error trying to exec '/home/joshua/aicp/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../libexec/gcc/i686-linux/4.6.x-google/cc1': execv: Argument list too long
make: *** [/home/joshua/aicp/out/host/linux-x86/obj/EXECUTABLES/mkbootimg_intermediates/mkbootimg.o] Error 1
[Android] RVR:
stupid question ... but u r using 64 bit right?
[Android] Hashbang173:
yes
[Android] RVR:
Give me the name of the iso
[Android] Hashbang173:
I'm using trusty tahr: ubuntu-14.04-desktop-amd64.iso

I guess i could start all over and use 13.10 if neccessary.
[Android] RVR:
hmm ..never faced such an issue ... try 13.10 .. or do u hv any other source code?
[Android] Hashbang173:
Ok I'll set up 13.10, I'm syncing CM11 right now, my device (otterx) is fully supported on cm11.
[Android] jackeagle:
Hello ,

Thats the reason i said to use Ubuntu 13.10 Only coz 14.04 has some issues :)
[Android] Hashbang173:
Should have used it to begin with, just felt lazy and already had the 14.04 iso on my computer. Should have known the download would be fast and only take 3 minutes. Would it be ok to copy the aicp folder I made on ubuntu 14.04 to ubuntu 13.10? Or would it be safer to just resync?

Edit: Ubuntu 13.10 is still installing so i can't do anything on it yet.
[Android] jackeagle:
You can do that but i prefer to resync has if one file is corrupted your sync will be useless so resync to be on safer side :):)
[Android] Hashbang173:
gcc version

Maybe this has something to do with it, see how to versions are different, would this casue the error?:
[Android] nofx161:
After syncing and patching ist The next step compiling? And if so how dies it work? Thanks
[Android] razer679:
i will reserved this!!
[Android] GalaxyAceIIIuser:
Can I Use My External Harddisk To Build Android ?
[Android] RVR:
Is ur Kernel tree gcc 4.8 compatible??? Ask ur Kernel devs... They'll tell u
[Android] saintxseiya:
Thanks guys!

i found most of the hubs containing, but at pac had the cherrypick feature.

So only thing remains is code crunching, i am amused NOT :D

Cheers,

Saint
[Android] adel pro:
thanks :D
[Android] rootsuperuser:
You're Awesome :d
[Android] sanioclement:
Awesome guide.
[Android] rahul8040:
How to add External APP prior TO Build Process!

Thank you everyone for this Great Guide!

But Now all i want to know that how to simply add any External APP into the Build prior to Building processes!

please help me by sharing the detailed Instructions of How to do it! i have already followed this GUIDE! But really couldn't Get so FAR!

So, please Help i really want to add a launcher in the CM12 BUILD!

Thank you!​
[Android] tobitege:
[MENTION=5572676]rahul8040[/MENTION]: look into your rom vendor folder under config for make files that list PRODUCT_PACKAGES.

For CM look here: vendor/cm/config/common.mk
[Android] Deep Nox:
I need a Local manifest for galaxy note 8 n5100, help please.
[Android] akhilnarang:
Check the posts on first page
[Android] katinatez:
[MENTION=2040569]jgcaap[/MENTION]

http://xdaforums.com/showpost.php?p=59268762&postcount=8500

I believe your asking me how to add multiple toolchains without deleting or removing toolchains after a repo sync. Correct?

It's all done in the local_manifests you could add as many tool-chains as you want as long as the path is set to a different folder name. Basically you cant have 2 folders named 4.8.

Here is an example, so you look at the paths and since none of these have the same identical path I can repo sync all of them.

<!-- TOOLCHAIN Linaro 4.9-->
<project name="temasek/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.9" remote="github" revision="linaro-4.9-arm-eabi" />
<project name="temasek/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" remote="github" revision="linaro-4.9-arm-linux-androideabi" />

<!-- TOOLCHAIN SaberMod 4.8-->
<project path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" name="UBERUTILS/arm-linux-androideabi-4.8" remote="github" revision="master" />
<project path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" name="UBERUTILS/arm-eabi-4.8" remote="github" revision="master" />

<!-- TOOLCHAIN SaberMod 4.9-->
<project name="katinatez/sm-arm-eabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-eabi-4.9" remote="github" revision="master" />
<project name="katinatez/sm-arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/sm-arm-linux-androideabi-4.9" remote="github" revision="master" />

and this is how you remove a default toolchain and replace with another in the same spot, that way you don't have to change anything in build repo

<!-- Sabermod lp Toolchains -->
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" />
<project path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" name="SaberMod/arm-eabi-4.9" remote="github" revision="master" />
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" />
<project path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" name="SaberMod/arm-androideabi-4.8" remote="github" revision="master" />

I need to stress these are only examples some of these toolchains have been removed or no longer exist.

Good luck
[Android] jgcaap:
Thanks will have a read. Very helpful!
[Android] jgcaap:
<!-- LINARO TOOLCHAIN -->
<project name="Christopher83/linaro_toolchains_2014/arm-cortex_a15-linux-gnueabihf-linaro_4.9.3-2014.12" path="prebuilts/gcc/linux-x86/arm/arm-eabi-linaro-4.8" remote="github" revision="2014.12" />
<project name="ArchiDroid/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-linaro-4.8" remote="github" revision="linaro-4.8-arm-androideabi" />

I believe it's something like this right? :)
[Android] ##W4TCH0UT##:
Just change your arm-eabi path to "prebuilts/gcc/linux-x86/arm/arm-eabi-linaro-4.9" since your downloading a 4.9.3 toolchain.

Regards
[Android] jgcaap:
i gave the name of 4.8 to the folder there :p but is 4.9.3

---------- Post added at 02:29 PM ---------- Previous post was at 01:54 PM ----------

i activated a o3 flag and gave me this error. anyone know whats about?

frameworks/av/media/libstagefright/codecs/amrwbenc/src/isp_az.c:69:14: error: array subscript is above array bounds [-Werror=array-bounds]
[Android] saintxseiya:
Hi,

anyone tried and succeeded to add google apps directly to their builds for cm12?
[Android] jgcaap:
I'm learning this has some bugs. Decided to delete the source from manifest and just sync when I feel the need. Now trying a new linaro tool chain. Should be able to build with o3 after... I'll wait and see :)
[Android] rahul8040:
thanks bro! but how to add that app into the build? like i should decompile it and then insert it in packages>app

and then after that? what's the next step? can you please please explain! i can totally use Teamviewer for HELP from anyone who knows about this! thanks
[Android] :
I need help

I build CM12 for ks01lte and I get the problem
[Android] ##W4TCH0UT##:
Simple way is to add the app to vendor/<ROM name>. Search around github to find the method. You can't decompile the app and simply add it to packages/apps.

Regards
[Android] jgcaap:
i sthere a way of removing apps which are built by default? If yes could you give me an example of how to do it correctly? thanks
[Android] saintxseiya:
You are using the wrong revision, or source in your local_manifest

---------- Post added at 01:04 AM ---------- Previous post was at 01:03 AM ----------

alter the common.mk and delete the Folders in packages/app
[Android] FSadino:
You right, caf comes only from Qualcomm so all devices with Qualcomm sources are caf