yashsingh1/xdaforums huggingface dataset:
[Android General] lucki1000:
Thanks it worked, what makes this command?

---------- Post added at 06:15 PM ---------- Previous post was at 05:43 PM ----------

I have an overlay failure:

FAILED: /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/package-res.apk
/bin/bash /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/package-res.apk.rsp
AAPT2 link /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/package-res.apk
/media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/flat-res/device/motorola/cedric/overlay/frameworks/base/core/res/res/values_config.arsc.flat: error: resource string/config_deviceKeyHandlerClass does not override an existing resource.
/media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/flat-res/device/motorola/cedric/overlay/frameworks/base/core/res/res/values_config.arsc.flat: note: define an <add-resource> tag or use --auto-add-overlay.
/media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/flat-res/device/motorola/cedric/overlay/frameworks/base/core/res/res/values_config.arsc.flat: error: resource string/config_deviceKeyHandlerLib does not override an existing resource.
/media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/framework-res_intermediates/flat-res/device/motorola/cedric/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.
[ 56% 47308/83946] build /media/.../AndroidSource/aosp/out/target/product/cedric/o...er_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lo_strings.arsc.flat
AAPT2 compile /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/CellBroadcastReceiver_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lo_strings.arsc.flat <- packages/apps/CellBroadcastReceiver/res/values-mcc246-lo/strings.xml
[ 56% 47309/83946] build /media/.../AndroidSource/aosp/out/target/product/cedric/o...er_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lv_strings.arsc.flat
AAPT2 compile /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/CellBroadcastReceiver_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lv_strings.arsc.flat <- packages/apps/CellBroadcastReceiver/res/values-mcc246-lv/strings.xml
[ 56% 47310/83946] build /media/.../AndroidSource/aosp/out/target/product/cedric/o...er_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lt_strings.arsc.flat
AAPT2 compile /media/.../AndroidSource/aosp/out/target/product/cedric/obj/APPS/CellBroadcastReceiver_intermediates/flat-res/packages/apps/CellBroadcastReceiver/res/values-mcc246-lt_strings.arsc.flat <- packages/apps/CellBroadcastReceiver/res/values-mcc246-lt/strings.xml
ninja: build stopped: subcommand failed.
19:07:09 ninja failed with: exit status 1
[Android General] DJABHipHop:
look at you code for duplacate XML tag and make sure there no XML comments on line 1

and read this https://abhiandroid.com/ui/xml
[Android General] DJABHipHop:
Try google the error and see that you find or your probably missIng a file but it's hard to tell because I'm working on Lineage 14.1
[Android General] lucki1000:
In which code I should look?
[Android General] DJABHipHop:
Thats a haed one because I'm buliding LineageOS & not AOSP so I'd have to see the tree or reop to se the problem, all those LineageOS is much easer to build for then AOSP. But i think is somthing really really samll mistak causing a really really big error and those are usually the harder one to find did you try mka clobber before the build
[Android General] lucki1000:
Okay, [MENTION=7026648]AlaskaLinuxUser[/MENTION] can you help me by this error?
[Android General] DJABHipHop:
What is samsung doze & what does it do
[Android General] MrRob0t:
[MENTION=7026648]AlaskaLinuxUser[/MENTION]

You are a gentleman and a scholar my friend!

Now onto the next headache :)

Lineage 15.1

FAILED: TARGET_KERNEL_BINARIES
/bin/bash -c "(rm -rf /home/chris/android/lineageO/out/target/product/pme/system/vendor/lib/modules ) && (mkdir -p /home/chris/android/lineageO/out/target/product/pme/system/vendor/lib/modules ) && (rm -rf /home/chris/android/lineageO/out/target/product/pme/obj/PACKAGING/depmod_vendor_intermediates ) && (make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/htc/msm8996 O=/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-androidkernel-\" Image.gz-dtb ) && (if grep -q '^CONFIG_OF=y' /home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ/.config; then	echo \"Building DTBs\";	make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/htc/msm8996 O=/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-androidkernel-\" dtbs;	fi ) && (if grep -q '^CONFIG_MODULES=y' /home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ/.config; then	echo \"Building Kernel Modules\";	make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/htc/msm8996 O=/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-androidkernel-\" modules;	fi )"
make: Entering directory `/home/chris/android/lineageO/kernel/htc/msm8996'
make[1]: Entering directory `/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:130: warning: overriding commands for target `vdso_prepare'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:120: warning: ignoring old commands for target `vdso_prepare'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:130: warning: overriding commands for target `vdso_prepare'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:120: warning: ignoring old commands for target `vdso_prepare'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Leaving directory `/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ'
make[1]: Entering directory `/home/chris/android/lineageO/out/target/product/pme/obj/KERNEL_OBJ'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:130: warning: overriding commands for target `vdso_prepare'
/home/chris/android/lineageO/kernel/htc/msm8996/arch/arm64/Makefile:120: warning: ignoring old commands for target `vdso_prepare'

I attached the full log from the compile.
[Android General] AlaskaLinuxUser:
As the error says, you need to edit the file:

device/motorola/cedric/overlay/frameworks/base/core/res/res/values_config.arsc.flat: note: define an <add-resource> tag or use --auto-add-overlay.

For each failure listed in your output, by using add resource. You can read my write up on it here: https://thealaskalinuxuser.wordpress.com/2017/03/16/1438/amp/
[Android General] AlaskaLinuxUser:
Same answer that I just have lucki in the previous post. :good:
[Android General] AlaskaLinuxUser:
Just a little further down was the cause of the fail:

kernel/htc/msm8996/arch/arm64/include/asm/vdso.h:34:11: error: 'vdso_offset_sigtramp' undeclared (first use in this function)

(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \

So it is asking for something that has not been declared before, like saying do a trigonometry problem if you don't know what it is.... You either need to declare it or remove it.

If you are upgrading, this may have been declared in 14.1 by something, but is not in 15.1. :cowboy:

Great question. Doze is what allows your phone to sleep and save power when you are not using it.
[Android General] DJABHipHop:
Thank but I have another question when building multiple devices with the same SOC should I keep the board file generic or make the board accommodate all the devices with similar specs and is there prefrence
[Android General] AlaskaLinuxUser:
Great question. Yes and no.

You should make two folders, and call one <soc>-common, and one called <device name>.

On my gitlab, you can look at my life_xl device tree, which calls the msm8916-common tree. The common tree is the things that are the same for all snapdragon 410 SoC phones. Then, specific items for the life xl are in that separate device tree. If you look, you may find a common tree already exists. :good:
[Android General] DJABHipHop:
Thank for all the help & the video thay have help make my device tree much more stable then it perviously was 2-3 years ago, But I'll most definitely take that into account and proble restructure my repo accordingly if I deside to add more device in the feture that dont have the same camera both front and rear then move on to my rom.
[Android General] rajesh@xda:
How to clear cache ?

I export cache=1 during my previous build. "prebuilts/misc/linux-x86/ccache/ccache -M 75G"

Now i have updated my trees. I want to rebuild clean rom again and want to clear previous cache.!

How to do it.?:confused:
[Android General] lace_hvc:
Deleted
[Android General] DJABHipHop:
I want know what this file does because I want to edit it to my liking?

profile_default.xml

<profiles>
<profile
nameres="profileNameDefault"
uuid="0230226d-0d05-494a-a9bd-d222a1117655">
<ringModeDescriptor>
<value>normal</value>
<override>true</override>
</ringModeDescriptor>
</profile>
<profile
nameres="profileNameSilent"
uuid="e4e77d03-82ce-4417-9257-7d6c9ffb8fd1">
<ringModeDescriptor>
<value>mute</value>
<override>true</override>
</ringModeDescriptor>
</profile>
<profile
nameres="profileNameAutomobile"
uuid="6a181391-12ef-4f43-a701-32b11ed69449">
<!-- turn GPS on -->
<connectionDescriptor>
<connectionId>4</connectionId>
<value>1</value>
<override>true</override>
</connectionDescriptor>
<!-- turn Bluetooth on -->
<connectionDescriptor>
<connectionId>7</connectionId>
<value>1</value>
<override>true</override>
</connectionDescriptor>
</profile>
</profiles>
[Android General] lucki1000:
I don't have any files in "device/motorola/cedric/overlay/frameworks/base/core/res/res/" there are only folder, the output of ls:

ls device/motorola/cedric/overlay/frameworks/base/core/res/res/
values values-mcc302-mnc370 values-mcc302-mnc720
values-mcc302-mnc220 values-mcc302-mnc610 xml
values-mcc302-mnc221 values-mcc302-mnc640
[Android General] DJABHipHop:
Post the device repo to see thay should be there
[Android General] lucki1000:
Which repo?
[Android General] DJABHipHop:
Could it be that these files exist in lineageos & not in AOSP why not check the rom source to see if these files exsite
[Android General] AlaskaLinuxUser:
First, to answer your question: This clears it.

$ ccache -C

or this cleans it.

$ ccache -c

But, the beauty of ccache is that you don't have to worry about it. Only in the rarest of cases will it not recognize that you have changed a device tree file (I don't actually know of any, but it is *possible* ). So you are welcome to clear it, but you don't need to. :good:

Sure, take for example the profile for being in your automobile. When you choose that profile, it turns on the bluetooth and the GPS. But when you are using the silent profile, it mutes the ring volume. So, you would just edit the values and add functions that you want for a different profile you choose. Apps like tasker allow the user to have finite control over these functions. :cowboy:

Great, so now look at the files in the "values" folders and search for key words from your error in your logs. :good:
[Android General] DJABHipHop:
Thank but are there any resource I can take a look at with all the tags and value
[Android General] MrRob0t:
You are the best, working on my PayPal so I can start sending some beers your way. :cool:

Since I am only building for one device, and trying to learn as much as possible, I'm doing my best to keep everything clean, so I make new folder for say lineage 14.1 and lineage 15.1 and lineage 16 I recently repo synced, just to have it ready. I'm also keeping sort of a journal about everything, like when you told me to always search for "error" and "failed" (eventually all of it will come second hand, but for now, it's doing good for me). Also the fixes that were needed to get N roms to now build, as you pointed out since that file came from LineageOS, so it wasn't crdroid leaving their N source messed up as I wasn't really understanding at that moment exactly how things work, but I'm starting to get it!

I am learning so much! I sincerely thank you.

This kernel problem has really ruined my day! Lol jk, but I know I'm sooo close. Of course even once I get this fixed and even if it does build and boot, that's when the real fun will start. Working on my own kernel and other things I'd like to do. I want to move onto P But I'd like to nail this error on O before moving ahead. Google is our friend. Searching and reading is our best only way to learn. I know this post is getting long, I apologize.

I found some good help, and others having this issue on Google. The first thing I found was to try editing arch/arm64/kernel/vdso/gen_vdso_offsets.sh and change

's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/p'

TO

's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2 0x\1/p'

This unfortunately didn't work so as you kindly pointed out I need to remove or define what is missing. I'd prefer to define what's missing, I believe it shouldn't be too difficult I hope.

You filled my spoon, and am not expecting you to feed it to me, but after spending literally from the time I saw your response today til now been trying to build after making edits, and felt I was very close.

From my limited understanding I need to make a file called vdso-offsets.h with the value: #define vdso_offset_sigtramp 0x04e0

The kernel itself makes an empty file.

Learning the limited bit of smali that I've taught myself, Java is a bit tough as I basically did it backwards, lol.

I used to play around with HTC sense and editing the files for theming, then I moved onto adding mods, like long press back to kill.

I believe what I am needing to do is match define vdso_offset_sigtramp 0x04e0, but I am having no luck.

Id put everything I've tried but this post is long enough. :D

You make this fun again! :highfive:

Normally I'd throw in the towel at this point, and am close, but I know that this will pass and the feeling once it gets passed that 9% in the build, failing due to this error will make it all worth it. Thankfully, though, this does fail early in the build, so I'm not waiting 3 hours to see my edit didn't work, so in a sense I'm lucky. (trying to stay positive!)

I think I've seen it fail about 15-20 times today ?
[Android General] rajesh@xda:
Need info regarding github!

How to find the latest branch from github tree link.?

What is the term "commits" refer in the line " This branch is X commits ahead, Y commits behind".?

If i want to get updated branch from a tree should i need to choose the branch which have more commits ahead ? or simply a branch without any info regarding commits? I am building lineage 15.1

This is the tree link i am looking for https://github.com/althafvly/device_yu_tomato

Thanks:)
[Android General] Raj.S:
it's brilliant sir, it's very helpful.

can you one for adding features on a ROM like on lineageOS?
[Android General] hackmanf:
Big Thanks :)
[Android General] Ashish Gupta1999:
hello sir ,

this is Narendra Moody from your YouTube comments

i compiled twrp and red fox recovery for my device (Asus Zenfone lite l1 ) which is similar spec to xiaomi redmi 3s (land).

but my device is project treble supported and in the recoveries i compiled , i am getting following problems

1. unable to mount vendor partition

2. as device is encrypted i had to do a factory reset from twrp/redwolf doing so brings device to bootloop , unless i manually wipe only the data partition.

i followed the twrp tee of land as it has similar specs

device tree of land - https://github.com/TeamWin/android_device_xiaomi_land/tree/android-8.0

device tree of asus zenfone lite (my tree) - https://github.com/A2HI2H/android_device_asus_asus_x00r_5

how can i edit the recovery fstab to mount the vendor partiton and fix the 2nd point problem ,

also i flashed xposed framework systemless but one module Xprivacy was not getting started (shows to enable module in xposed) but i had already enabled that

here i am linking the following things of my devices

1. logcat - https://drive.google.com/drive/u/0/folders/1IkeYRawmWuDVCT_5c-YdaplqNnoKklru

2. original recovery.fstab file - https://drive.google.com/drive/u/0/folders/1IkeYRawmWuDVCT_5c-YdaplqNnoKklru

3.stock recovery image - https://drive.google.com/drive/u/0/folders/1IkeYRawmWuDVCT_5c-YdaplqNnoKklru

4.bootimage - https://drive.google.com/drive/u/0/folders/1IkeYRawmWuDVCT_5c-YdaplqNnoKklru

please take my issue in consideration

thank you :)
[Android General] youngAvJ:
[MENTION=7026648]AlaskaLinuxUser[/MENTION]

First of all thanking you for the awesome video tutorials on building from source. I'm learning from your guides.

I am trying to build unofficial validus rom for poco f1 for the first time. i followed all your steps but now i am stuck at one point. this error was poped up when building slim rom too.thats why changed to validus. I cant brunch my rom. attaching screenshot. No one from poco forum helped me with the situation. they don't even encourage. can you help me sir..??

Edit : same error with candy rom. ss attached
[Android General] AlaskaLinuxUser:
Good question. Well, a commit is anytime they change any of the files, e.g. when they push a commit. I have several videos about github and gitlab if you look on my channel, perhaps they will help.

Notice that you cannot go by date either, as on your linked repo, the nougat branch is newer than the Oreo branch.

As for being ahead or behind, it always compares the branch to the default branch, expecting that default to be the most stable, but that is usually not the case, as it is up to the repo owner to decide on the default branch. :good:

I should make more, but I did already do a few here:

https://www.youtube.com/watch?v=4Mn...u-vkgsj61U-Zv3fjzwZ&t=0s&index=47&app=desktop

A big you're welcome! :cool:
[Android General] rohitsinha12:
Well,if someone have any error,I know a group on telegram that helps in solving build errors. people can join that group.they can post their errors there.it'll reduce the headache of people

Group link:https://t.me/AndroidBuildersHelp
[Android General] AlaskaLinuxUser:
Welcome to the thread.

Your tree twrp.fstab is wrong, you have this:

/system ext4 /dev/block/bootdevice/by-name/system flags=display="System"

/vendor ext4 /dev/block/bootdevice/by-name/oem flags=display="Vendor";wipeingui

/system_image	emmc	/dev/block/bootdevice/by-name/system	flags=backup=0

/vendor_image	emmc	/dev/block/bootdevice/by-name/oem	flags=backup=0

But that grabs the same partition twice with two different file systems types. It can only be one or the other.

Also, per the original you showed me, vendor is:

/dev/block/bootdevice/by-name/vendor

But you listed it as oem instead. So I think you should change that for starters. :good:
[Android General] AlaskaLinuxUser:
Welcome to the thread.

You are running brunch wrong.

It should be:

$ brunch (ROM)_(device)-(type)

So for the galaxy s4 (as example):

$ brunch lineage_jfltetmo-eng

Or

$ brunch slim_jfltetmo-user

Or

$ brunch aosp_jfltetmo-userdebug

So try that. :good:
[Android General] K-alz:
Ok, so, this sounds amazing. I've found your channel and subbed to it. I've been into JS, Python, React JS and the likes for over 2 years now and I'm getting tired of the same thing. I've always wanted to work on the Android side, but I have three issues if you could help with:

1. I don't like Linux, I know that sounds absurd but I just don't like how I always have issues with it. I'd love to learn on my windows machine since it, relatively, has less issues than Linux.

2. For the life of me, Android studio would never install correctly on windows for me. No matter what I did or what videos I've watched. It always installs just fine, but then it starts giving me errors when I start working (following some older tutorials since there aren't really a whole lot of new ones out there). I mean do I even need Android studio to build ROMs? Or is there another platform that I could use? Sorry, like I said, I've never worked on Android before.

3. Which tutorial/playlist on your channel should I start with? There are more than one that refer to Android development.

Thank you so much for this. It looks like you have put a ton of work into it. I really appreciate it.
[Android General] youngAvJ:
thank you for the rly sir.

but not working.
[Android General] AlaskaLinuxUser:
I think this is what you need to do:

https://github.com/olrak2/android_kernel_huawei_hi6210sft/issues/1

If nothing else, you can make the needed file to continue the build, but the above link shows how to fix the shell script. :good:
[Android General] AlaskaLinuxUser:
Welcome to the thread.

1. You can use virtual box and follow my videos to set up Ubuntu inside it, but you cannot build android from windows without some firm of Linux virtual or emulated machine.

As for your dislike of Linux, android is Linux. The kernel is Linux. What you actually mean is you dislike GNU/Linux, or the operating systems like Ubuntu Debian or fedora. This preference I cannot help you with, it is your personal decision. :laugh:

2. You don't need android studio in any way shape or form to build custom ROMs. Android studio is a great tool used to make your own app.

3. I recommend this one:

https://www.youtube.com/playlist?list=PLRJ9-cX1yE1m8k9gztsQnnXDg1G4X1f6z&app=desktop

Or this one:

https://www.youtube.com/playlist?list=PLRJ9-cX1yE1l6eu-vkgsj61U-Zv3fjzwZ&app=desktop

Hope that helps. :good:

I see, and does your device tree exist? Does it have (in this case) a candy.mk file?
[Android General] youngAvJ:
I am trying to build unofficial candy. It not officially supported for beryllium.

I'm using los 16 as base.
[Android General] K-alz:
You, sir, are wonderful. Thank you so much. I have 5 laptops (thanks to my job lol) and I'm gonna have to dedicate one of them to run just Linux then follow the tutorials. Thank you again, for the quick reply and the wonderful work.
[Android General] AlaskaLinuxUser:
My friend, I don't think you understand any of the concepts that I put forward from the videos. Have you watched the videos? I recommend that you watch them. :good:

Great idea! :good:
[Android General] youngAvJ:
That's what I did sir.

I renamed every lineage to candy.

Example lineage_beryllium.mk to candy_beryllium.mk.

And there is no candy.mk file.

There is a device.mk file.
[Android General] lucki1000:
Error: /media/.../AndroidSource/aosp/out/target/common/obj/JAVA_LIBRARIES/telephony-ext_intermediates/classes.jar contains class file org/codeaurora/internal/IDepersoResCallback.class, which is not in the whitelist

how can i whitelist this?

And a sub question: I can still use the vendor, kernel and the device tree of lineage 15.1 on aosp 8.1 or?
[Android General] AlaskaLinuxUser:
It would appear then, that I owe you an apology. :cowboy:

Did you rename all lineage to candy inside the files too? Remember, lineage and not lineageos, as I have messed that up before.

And all old cm references to candy as well?

I think that is in build/core/tasks/check_boot_jars/package_whitelist.txt, but that is for aosp, it may be different for other ROMs, search your source directorys for package_whitelist and you should find it. Typically the file has instructions in it, but I just tried a quick web search and found several examples.

Subanswer:

Yes and no. Yes you can but will need to edit the tree to have aosp files instead of lineage files, and you may need an android_products file. :good: