yashsingh1/xdaforums huggingface dataset:
[Android] albertoduqe:
Hi friends!

One question I can't find answer to looking around... How do you build rom, from a working directory in which you have synced two different branches of same source, for one of the branches? I mean, I am in the last stages of having viable roms of a couple of sources (Legend and AimRom), nougat. Both sources have released Oreo and I am syncing. But then... How does it work when I want to build nougat or oreo and not the other one?

Thanks :)
[Android] aoleary:
The error tells you the problem. The variable is defined both in frameworks/native/cmds/dumpstate and in frameworks/native-caf/cmds/dumpstate, so you need to remove the variable from one of them...
[Android] cmadd132:
Yea he'll

---------- Post added at 09:57 AM ---------- Previous post was at 09:55 AM ----------

yea that's wha

Rights you feel me dats all day

---------- Post added at 10:00 AM ---------- Previous post was at 09:57 AM ----------

Yea dats wats up

---------- Post added at 10:03 AM ---------- Previous post was at 10:00 AM ----------

He'll yea that's

He'll yea
[Android] albertoduqe:
Sorry mate but: what would you be meaning? :eek::rolleyes:
[Android] aoleary:
You cant do this at build level. One folder per version.

You will have to delete your build folder and resync Oreo from scratch..
[Android] albertoduqe:
Alright, thanks!

I had read elsewhere that you just repo synced several branches and that at building the correct files were used depending on branch a I was missing the part of how exactly you specified that for building. But yeah I must've misunderstood...
[Android] aoleary:
Maybe you're confusing it with github where there can be multiple versions, but it's not like that at file level. Imagine the trying to have different versions of the same files at OS level..
[Android] albertoduqe:
Yep, it make sense... But as I really do not know (yet) the inner workings of repo, git, or even lunch/brunch, etc, I thought it might be possible and I would just didn't know how it happened.

Thanks then!

I am currently almost there with building two different roms for Lithium and trying to make my head around applying security patches, which right now is promising to be even more difficult for me than the actual syncing and compiling :)
[Android] DiamondJohn:
i *THINK* you can switch between multiple file version within the SAME BRANCH (using a git "checkout", if you have downloaded all and not just head), but you can't have two branches within the same folder. If you remember when you initialized your folder, you specified a specific branch, and only that branch.

repo init -u git://github.com/xxx/manifest.git [B][COLOR="Red"]-b ZZZZZ[/COLOR][/B]
[Android] DJKristy:
Is Oreo go sources out.

I heard that some Devs are working on lineage go sources. But when I checked lineage os github I didn't see any go branch.
[Android] DodoGTA:
It's a build configuration in Android 8.1 sources (and thus LineageOS 15.1)
[Android] NepoRood:
Resync, Omni and DU packages are not building at this time. Or, you can edit the the common.mk file in the vendor folder if you don't wanna sync.
[Android] HaarisTheBoss:
I need help building lineage os 15.1 for the pixel 2.

i keep getting stuck on this error. Can anyone tell what is going wrong here?

https://pastebin.com/Zjx9dYzh
[Android] quake73:
/home/haaris/lineageos/out/soong/build.ninja.d -o /home/haaris/lineageos/out/soong/build.ninja Android.bp

fatal error: runtime: out of memory
[Android] HaarisTheBoss:
I guessed that was it.

But i tried configuring jack as well. That too didnt help

So does that mean i need to get more RAM?
[Android] quake73:
You should have at least 8GB although I've read somewhere that it is possible to build a rom with only 4gb (and with lots of swap space). How does your machine compare to thse numbers? :)
[Android] HaarisTheBoss:
Ah thats it. I have 4gb.:(

Ill try seeing if swap space helps it to build.
[Android] quake73:
Eh, that's too little. At least put your swap on another hard drive. Or as an alternative, some people use google's cloud as a build machine, I think it's free for the first year.

https://xdaforums.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430
[Android] Qiangong2:
As long as you use make -j1, you shouldn't run into issues with 4gb of RAM
[Android] Pierre2324:
Do you know how I can update my kernel from nougat to oreo? I know its about kernel binders but I dont really know about updating do I only need to cherry pick binder commits?
[Android] HaarisTheBoss:
Do i just type that "make -j1" in terminal.

Coz it gave the same error when i did :(
[Android] Akhilesh S V:
Try make -j1 otapackage
[Android] linusdan:
Hello peoples!

I'm trying to compile Slim7 to I9100. I'm almost there (the compilation has reached 43%), but this error appeared in the image. I adapted as needed. Does anyone have ideas on how to fix this?

My device trees:

galaxys2-common: https://github.com/dansnts/slim_device_samsung_galaxys2-common

i9100: https://github.com/dansnts/slim_device_samsung_i9100

repo of hardware config utilized: https://github.com/SlimRoms/hardware_samsung
[Android] smart-t78:
sync your sources and try again;)
[Android] NetfariousIntent:
Building AOSPA for Samsung Galaxy A3 6, think i have a problem here...

pastebin.com/Nj1wP1ce
[Android] EdricChan03:
Errr... What files do I remove? I'm having the same issue, just that I'm building Android Oreo 8.1.0 for Galaxy Note 3

[ 0% 196/33828] AAPT2 link /Volumes/android/out/target/product/hlte/obj/APPS/framework-res_intermediates/package-res.apk
FAILED: /Volumes/android/out/target/product/hlte/obj/APPS/framework-res_intermediates/package-res.apk
/bin/bash /Volumes/android/out/target/product/hlte/obj/APPS/framework-res_intermediates/package-res.apk.rsp
warn: ignoring density 'hdpi-v4' for -c option.
warn: ignoring density 'xhdpi-v4' for -c option.
warn: ignoring density 'xxhdpi-v4' for -c option.
/Volumes/android/out/target/product/hlte/obj/APPS/framework-res_intermediates/flat-res/device/samsung/hlte-common/overlay/frameworks/base/core/res/res/values_config.arsc.flat: error: resource array/config_safeModeDisabledVibePattern does not override an existing resource.
/Volumes/android/out/target/product/hlte/obj/APPS/framework-res_intermediates/flat-res/device/samsung/hlte-common/overlay/frameworks/base/core/res/res/values_config.arsc.flat: note: define an <add-resource> tag or use --auto-add-overlay.
error: failed parsing overlays.
[ 0% 201/33828] APK certs list: /Volumes/android/out/target/product/hlte/obj/PACKAGING/apkcerts_intermediates/lineage_hlte-apkcerts-ea43f25597.txt
ninja: build stopped: subcommand failed.
11:33:42 ninja failed with: exit status 1
[Android] darjwx:
You don't have to remove files, you have to remove some lines. The overlays you have to remove are written in the log you just send. If you point me to your tree I can give a hand though.
[Android] EdricChan03:
Err... I'm building it locally...

Anyways, do I have to edit this portion in the specified file?

/Volumes/android/out/target/common/obj/APPS/framework-res_intermediates/proguard_options --min-sdk-version 27 --target-sdk-version 27 --product default -c en_US,en_US,cs_CZ,da_DK,de_AT,de_CH,de_DE,de_LI,el_GR,en_AU,en_CA,en_GB,en_NZ,en_SG,eo_EU,es_ES,fr_CA,fr_CH,fr_BE,fr_FR,it_CH,it_IT,ja_JP,ko_KR,nb_NO,nl_BE,nl_NL,pl_PL,pt_PT,ru_RU,sv_SE,tr_TR,zh_CN,zh_HK,zh_TW,am_ET,hi_IN,en_US,af_ZA,am_ET,ar_EG,ar_XB,az_AZ,be_BY,bg_BG,bn_BD,bs_BA,ca_ES,cs_CZ,da_DK,de_DE,el_GR,en_AU,en_CA,en_GB,en_IN,en_XA,en_XC,es_ES,es_US,et_EE,eu_ES,fa_IR,fi_FI,fr_CA,fr_FR,gl_ES,gu_IN,hi_IN,hr_HR,hu_HU,hy_AM,in_ID,is_IS,it_IT,iw_IL,ja_JP,ka_GE,kk_KZ,km_KH,kn_IN,ko_KR,ky_KG,lo_LA,lt_LT,lv_LV,mk_MK,ml_IN,mn_MN,mr_IN,ms_MY,my_MM,nb_NO,ne_NP,nl_NL,pa_IN,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,si_LK,sk_SK,sl_SI,sq_AL,sr_Latn_RS,sr_RS,sv_SE,sw_TZ,ta_IN,te_IN,th_TH,tl_PH,tr_TR,uk_UA,ur_PK,uz_UZ,vi_VN,zh_CN,zh_HK,zh_TW,zu_ZA,normal,hdpi,xhdpi,xxhdpi --preferred-density xxhdpi --version-code 27 --version-name 8.1.0 -R

It's actually very long. Also, I can't post links because of that requirement thing of XDA
[Android] darjwx:
No.

Take this as an example of what you have to do.

https://github.com/CarbonROM/androi...958f5cd#diff-380e537acdaedd487ca1adb49d020f7e
[Android] EdricChan03:
I've found the string-array located in "device/samsung/hlte-common/overlay/frameworks/hlte-common/overlay/frameworks/base/core/res/res/values/config.xml" and commented it out. It works until I get an error about SELinux

system/core/init/util.h:29:10: fatal error: 'selinux/label.h' file not found
#include <selinux/label.h>
^~~~~~~~~~~~~~~~~
1 error generated.
[Android] darjwx:
You have to update some init stuff in the last version. Probably, something similar to this commit:

https://github.com/LineageOS/androi...49e9e31#diff-e37f0136aa3ffaf149b351f6a4c948e9
[Android] albertoduqe:
OK so I keep trying but can't make myself work the security patching stuff...

Say I want to apply this: https://android.googlesource.com/platform/frameworks/base/+/4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5

Following what I found in this guide and others, I need the proper git fetch reference, like what you find searching in the https://android-review.googlesource.com, for example:

git fetch https://android.googlesource.com/platform/frameworks/base refs/changes/24/527324/1 && git cherry-pick FETCH_HEAD

But how do you get that for the security patches listed in the bulletins? I guess the first part of the git fetch reference is easily guessed and in this case it'd be the same because they point to the same folder/s. But the "refs/changes/..." part?

Is it necessary to look for the patches in the bulletin in the android-review?

This is a full-time job just to apply security patches then... :)

Thanks!
[Android] EdricChan03:
Hmm... Can't find such a file in "init/Android.mk". (At least on the Github repo for hlte)

There's only just "init_hlte.cpp"

I'm building LineageOS 15.1 for Galaxy Note 3 (hlte).

EDIT: Looks like it's in "android_system_core"
[Android] EdricChan03:
Here's a bit more info:

FAILED: /Volumes/android/out/target/product/hlte/obj/STATIC_LIBRARIES/libinit_msm8974_intermediates/init_msm8974.o
/bin/bash -c "prebuilts/misc/darwin-x86/ccache/ccache prebuilts/clang/host/darwin-x86/clang-4053586/bin/clang++	-I device/samsung/hlte-common/include -I system/core/init -I device/samsung/msm8974-common/init -I /Volumes/android/out/target/product/hlte/obj/STATIC_LIBRARIES/libinit_msm8974_intermediates -I /Volumes/android/out/target/product/hlte/gen/STATIC_LIBRARIES/libinit_msm8974_intermediates -I libnativehelper/include_deprecated \$(cat /Volumes/android/out/target/product/hlte/obj/STATIC_LIBRARIES/libinit_msm8974_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /Volumes/android/out/target/product/hlte/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=krait -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -fvisibility-inlines-hidden -std=gnu++14 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -Wall -DANDROID_TARGET=\\\"msm8974\\\" -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /Volumes/android/out/target/product/hlte/obj/STATIC_LIBRARIES/libinit_msm8974_intermediates/init_msm8974.d -o /Volumes/android/out/target/product/hlte/obj/STATIC_LIBRARIES/libinit_msm8974_intermediates/init_msm8974.o device/samsung/msm8974-common/init/init_msm8974.cpp"
[Android] albertoduqe:
OK I answer myself. No idea if it's the only way, but I made it work looking for the relevant security patches in the review and cherry-picking the coincidential ones. In the review what I find is usually in the form of a "Snap for 4455544 from kasdhf98ayfsdnbf897q4yrhf8sd to [branch]", in which usually there are a whole bunch of different patches for the same project.

To have a working LegendRom build for Lithium I am only missing (I hope) the gapps backup to work. I have found the script and used several different methods so that it ends up where it should (in system/addon.d), but still doesn't work. Any ideas on this one?

The thing is: gapps package comes with the survival script, but not in all roms it works. Legend is one of those. So, the thing is: what is needed in the rom's source (working tree) to make it work? What's in Lineage, or DU, etc? Or where to look for it? Because I even repo synced lineage (cm-14.1) but cannot find anything...

Thanks.
[Android] antariksh:
What is pinning the blobs?

Can someone explain this please.
[Android] DiamondJohn:
Pre-built ignored

OK, going a little crazy here with what should be a simple pre-built apk.

I am building a ResurrectionRemix ROM (LOS based), and have added the following to the vendor/cm/prebuilt/common/Android.mk file

include $(CLEAR_VARS)
LOCAL_MODULE := KAModReborn
LOCAL_MODULE_OWNER := rr
LOCAL_SRC_FILES := app/$(LOCAL_MODULE).apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)

However, it does not get included in the ROM output:confused:, and doesnt even appear anywhere in the build log output, or raise any errors/warnings. What makes it even more confusing is that I also added another APK (MiXplorer.apk) in the EXACT same way, and that worked perfectly first time:silly:

I have checked, and i do not have any spurious spaces at the end of the LOCAL_MODULE variable, and the casing is correct (I copied and pasted the name from the file itself). Also, I have placed the APK in "vendor/cm/prebuilt/common/app/KAModReborn.apk", so it all seems good to me. Its exactly what I did for the other pre-built I added, and what is done for the other default pre-built APK's already included in the ROM.

What the heck am I missing/doing wrong?
[Android] quake73:
In different roms, the build breaks with this ANDROID_DATA error:

dex2oat F 01-28 04:39:10 37661 37661 utils.cc:762] ANDROID_DATA not set and /data does not exist

Any clues?
[Android] alphamale:
build error

Can someone help getting following error.

https://hastebin.com/upudakifet.php

I have the file in directory
[Android] quake73:
Maybe it looks for the file in another location.... I see this line above:

PRODUCT_COPY_FILES vendor/google/taimen/proprietary/etc/permissions/privapp-permissions-taimen.xml:system/etc/permissions/privapp-permissions-taimen.xml ignored.

Do you have the folder vendor/google?
[Android] Albe96:
Help Please-->> https://hastebin.com/jijikimilo.sql

Trying To Bring Up Oreo For Samsung Galaxy Note 5
[Android] alphamale:
Yes i do. How do i fix?
[Android] quake73:
In the lineage device tree for taimen, I found a line in device.mk:

PRODUCT_COPY_FILES += device/google/taimen/privapp-permissions-taimen.xml:system/etc/permissions/privapp-permissions-taimen.xml

Do you have that line in your device.mk file in device/google/taimen?

If no -> add it and try again.

If yes -> I'm out of ideas :)
[Android] NepoRood:
You can try to add this to one of your device makefiles (ie: rr_device.mk):

PRODUCT_PACKAGES += \
KAModReborn
[Android] albertoduqe:
Anyone would care to share the trick(s) for building an AOSP rom? I mean, I have a few viable projects with LOS based roms but each try with an AOSP source (Cardinal, GZOSP, Aquarios...), I struggle to even make it start the building. The few times I manage for it to run till ninja entering the directory, sooner than later it fails, usually sooner with one of those errors "some file is needed by some other file and there's no rule to make it".

I mean, I can of course provide logs or whatever but my question is: is there some basic stuff to take into account that's fundamentally different for AOSP roms compared to LOS?

I of course talk about building one of the custom AOSP sources for a non supported device...
[Android] Hlcpereira:
Well there's, like remove LineageSDK/CMSDK of CMActions/LineageActions or Doze and Configpanel, remove device_HardwareWakeKeys and any other things from overlay/overlay-lineage, and remove audio_effects if your device tree/common-tree have it. ROMs like AOSCP have to do more different things on Oreo, but nothing that you can't handle it. Just searching on github to see what you have to do it's enough.
[Android] albertoduqe:
Thanks for the answer. Sounds like a good starting point. I guessed some things were there making trouble and shouldn't be there because the errors point that way but of course I still don't know enough about source and the inner workings of it all.

I'll have to see how to do that "searching on github" exactly ... :)

Thanks again!

By the way: any tip on where to look for the gapps backup missing whatever to make the 70-gapps.sh work? I mean, I manage for it to be in the addon.d folder, it has proper permissions, I followed a couple of commits I found that seemed to be missing details in mu source for it to work... But still, script doesn't get executed...

How do I find where something like that is defined in LineageOS source, for example?

:)
[Android] alphamale:
error

Keep getting this error how do i add this? Im missing the msm directory

https://hastebin.com/tinageriho.vbs
[Android] DiamondJohn:
I think this was it. I checked my vendor/cm/config/common.mk (ie the rr_device.mk) file and I saw that I had added the other pre-builts, so just missed doing it again for this file. Thanks. I haven't rebuilt it yet, but it's pretty clear it will be the cause.

----------edit-----------

Yep. finished a build, and it all worked as expected. thanks.
[Android] DiamondJohn:
Maybe add the following to your local manifest?

https://github.com/omnirom/android_hardware_qcom_msm8998
[Android] NepoRood:
Glad you got it, however, it'd be better to add your custom apps device side, instead of in the source. If the RR team change the common.mk file, you'll get a sync error when you resync.

The apps and makefiles can all be in your personal device and/or vendor trees :good:
[Android] DiamondJohn:
Your right, however, RR have ceased development of Nougat (which is what I am building), in favor of the Oreo branch. The device tree on the other hand I think is still being changed (its not LOS nor RR but a single dev). So illogically, but true, it just so happens, I think that changes to the RR vendor is less likely to occur and thereby cause conflicts.
[Android] xenreon:
Still, doing such changes device side is a cleaner approach and will prevent even the "maybe" problems from occurring.
[Android] alphamale:
I added it from somewhere else still getting error https://hastebin.com/qurugisuba.coffeescript
[Android] quake73:
You need to sync it to your local hardware/qcom/msm8998 folder (under aosip, not under aosip/platform)

You now have aosip/platform/hardware/qcom/msm8998......it should be aosip/hardware/qcom/msm8998....modify your local_manifests (change the "path", leave the "name" as it is), resync and try again.
[Android] alphamale:
Thanks that fixed it, but a got a different error
[Android] albertoduqe:
Deleted.
[Android] Jay_B:
Hi Guys,

I am trying to compile LOS 14.1 for my Mi Max2.

Since there is no vendor tree available as of now I used the blobs from my phone which is already running a LOS unofficial.

The problem is when I start compiling I am getting this error.

Checking build tools versions...
find: ‘/home/android/android/system/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory
build/core/Makefile:34: warning: overriding commands for target `/home/android/android/system/out/target/product/oxygen/system/bin/fmhal_service'
build/core/base_rules.mk:320: warning: ignoring old commands for target `/home/android/android/system/out/target/product/oxygen/system/bin/fmhal_service'
build/core/Makefile:34: warning: overriding commands for target `/home/android/android/system/out/target/product/oxygen/system/lib64/hw/consumerir.default.so'
build/core/base_rules.mk:320: warning: ignoring old commands for target `/home/android/android/system/out/target/product/oxygen/system/lib64/hw/consumerir.default.so'

Please check screenshot.

And then it starts building.

I think its related to wifi, bluetooth and IR.

I am not sure and need help in putting the required files in the correct folders.

Thank you.

Jay
[Android] DiamondJohn:
To state the obvious, ask the dev of the unofficial ROM you are currently running for his source location, if its not already identified in an XDA thread you possibly got the rom from.

Would this be a source: https://xdaforums.com/showpost.php?p=70660578&postcount=2 I found that with a simple internet search. Or is the Max2 a completely different device

os go straight to a search of github:

https://github.com/search?utf8=✓&q=xiaomi_vendor_oxygen&type=

PLEASE everyone, stop using photos of your screen! copy and paste into www.hastebin.com or such. Make it easier for people to help you, and you will have a better chance at getting help. Its in your own interest.
[Android] Jay_B:
Thank for the quick reply..

The source you mentioned is for Mi Max 1 (Hydrogen). I am trying to build for Mi Max 2 (Oxygen).

Used the device tree from here : https://github.com/miuipower/android_device_xiaomi_oxygen.git

Kernel tree : https://github.com/LineageOS/android_kernel_xiaomi_msm8953.git

And extracted the vendor blobs from my phone which is already on unofficial LOS made by xuefer https://xdaforums.com/mi-max-2/development/linageos-14-1-mi-max-2-t3634864.

Sorry about the screenshot, posted 1st from my phone here used the screenshot. Then edited post from my PC and updated pasted the code.

Thank you again.
[Android] NepoRood:
Those warnings and overrides at the beginning of a build are common and nothing to worry about.
[Android] Jay_B:
Thank you appreciate the help.
[Android] DiamondJohn:
The second link I provided is a search on Github for oxygen, and it came up with 4 options.
[Android] albertoduqe:
Uups, sorry, I had not seen that the first missing dependencies were from vendor/xiaomi/scorpio ... I have to look into that.

Anyway, surprisingly I got a flashable oreo build for Lithium. Those first errors zi bypassed deleting the lines giving them, the only thing I could do because I do not know where those libraries must be found...

The rom gets in a bootloop of course. I will try get a log dumb and come back for help.

If anyone, anyway, wants o share with me where the shared or static libraries are in the android source, why those dependencies were missing... it would be a great help.

Thanks!