Bringup OMNI from CM tree. - Omni Q&A

Hey,
I was building OMNI from CM tree just patched couple of GPS hal related errors but can't seems to pass sepolicy errors they keep coming up.
First this comes up!
http://paste.ubuntu.com/7662158/
and then when i deleted that line other sepolicy errors comes up.
http://paste.ubuntu.com/7664916/
http://paste.ubuntu.com/766767
They didn't seems to stop one by one, and they make me to delete my whole device.te
Any help will be appreciated.

icoolguy1995 said:
Hey,
I was building OMNI from CM tree just patched couple of GPS hal related errors but can't seems to pass sepolicy errors they keep coming up.
First this comes up!
http://paste.ubuntu.com/7662158/
and then when i deleted that line other sepolicy errors comes up.
http://paste.ubuntu.com/7664916/
http://paste.ubuntu.com/766767
They didn't seems to stop one by one, and they make me to delete my whole device.te
Any help will be appreciated.
Click to expand...
Click to collapse
Just disable sepolicy in BoardConfig.mk. I suppose/believe you can boot a rom with selinux disabled?

I would suggest starting with selinux permissive and sepolicy removed, then work on adding it back in once your device is solid.
Honestly a lot of maintainers have stuck with permissive for the 4.4 cycle as we've had way too many other things to work on in terms of core device support and such. The 4.4 cycle has been, in general, a huge learning experience (and teambuilding experience) for Omni. There are a lot of things we wanted to do but haven't gotten around to because we had so many unexpected things to take care of.

Related

Bluetooth and UMS not working in homemade build

Hey guys,
Thanks for this great Omnirom! It is really snappy and running stable on my old device. I am running it on my 3 years old HTC Desire
I was only not able to compile with omnirom's android_packages_apps_Bluetooth. I guess that it comes from lacking support for legacy devices. When building CM-11 Bluetooth always worked fine for my device.
Furthermore USB mass storage is not working.. I have found a hint on xda, suggesting to enter within 'Terminal Emulator' app:
# su
# setprop persist.sys.usb.config mass_storage
# reboot
That did not work out for me.
if trying:
# setprop persist.sys.usb.config mass_storage,adb
at least ADB is working.
Any help is highly appreciated.
Thanks!
You should check your build tree and kernel to make sure things are building correctly in Bluetooth. Where did you get your kernel sources and config?
UMass is, as I understand it, deprecated. Without build configuration changes it is generally unavailable. You would have to check both that it was compiling in, as well as called out in your init.rc files.
---
Posted from whatever phone booted today
jeffsf said:
You should check your build tree and kernel to make sure things are building correctly in Bluetooth. Where did you get your kernel sources and config?
UMass is, as I understand it, deprecated. Without build configuration changes it is generally unavailable. You would have to check both that it was compiling in, as well as called out in your init.rc files.
---
Posted from whatever phone booted today
Click to expand...
Click to collapse
There may be legacy support items missing that are needed, it's up to maintainers of legacy devices to figure out what and submit to gerrit.
I need to come up with some formal documentation on completely killing UMS with fire.
jeffsf said:
You should check your build tree and kernel to make sure things are building correctly in Bluetooth. Where did you get your kernel sources and config?
UMass is, as I understand it, deprecated. Without build configuration changes it is generally unavailable. You would have to check both that it was compiling in, as well as called out in your init.rc files.
---
Posted from whatever phone booted today
Click to expand...
Click to collapse
First of all thanks for your replies.. highly appreciated!
I am sure that it's not a kernel issue cause it works with any other of my kk roms. It is the only stable kernel that runs kitkat on my phone: https://github.com/Evervolv/android_kernel_htc_qsd8k/
I will check my build tree and I guess that I will look into hardware/libhardware next..
Cheers!

Building Lineage OS 14.1 for Grouper - clang error

Hi everyone, I have decided to build LOS 14.1. I know builds already exist, but I thought I would like to do it myself to enable me to update to the latest sources easily.
I have taken @AndDiSa's kernel and device tree for AOSP-7.1.0, and modified them to be compatible (I believe anyway) with LOS sources.
However, when I build, I get a significant way through and then I get the error "clang++: error: unknown argument: "-mapcs" " (I have attached a screenshot of the actual terminal output - There was a lot of text I didn't understand above it)
I have searched and searched, but I cannot find any reference to this argument.
Any help would be much appreciated
Edit: By the way, if you want to see the sources, they are the grouper kernel and device trees on my github (https://github.com/thepiguy0)
@ThePiGuy probably you would like to have a look at my change request. This should help to solve the compile error
AndDiSa said:
@ThePiGuy probably you would like to have a look at my change request. This should help to solve the compile error
Click to expand...
Click to collapse
Thanks for the quick reply I have applied the patch now. I'll update you on the outcome
@AndDiSa following on from that, it does appear to have solved the compilation issue (it has now got further than it did last time). How come your fix hasn't been merged (I noticed that it was submitted last year)?
@ThePiGuy nobody felt responible to review and to merge the fix. I have had submitted two other changes. Not sure whether they are still needed to compile, ...
I have the impression the Nexus 7 is almost abandoned on LineageOS, but I might be wrong.
AndDiSa said:
@ThePiGuy nobody felt responible to review and to merge the fix. I have had submitted two other changes. Not sure whether they are still needed to compile, ...
I have the impression the Nexus 7 is almost abandoned on LineageOS, but I might be wrong.
Click to expand...
Click to collapse
It's a real shame, as LOS is generally one of the best ways to revive a device, and the nexus 7 2012 was immensely popular.
As for compiling, I have hit another error. It states that there is an unknown type name "aligned_u64" in the file if_packet.h which is located in the kernel, under include/linux/.
I have found the line, and it is under the hdr_v1 structure. How should I fix this? I have noticed that LOS default repos and your LOS branch have a different and much shorter version of this file
@ThePiGuy replace by "__aligned_u64" and it should compile as was already posted by @Charles IV
Hope the change works for you.
Most official Lineage development seems halted for grouper, although hazzer does seem to be doing a bit of meddling.
I also just bought a Nexus 7 for 5 LOSCoins, so maybe they're doing something with it
Charles IV said:
Hope the change works for you.
Most official Lineage development seems halted for grouper, although hazzer does seem to be doing a bit of meddling.
I also just bought a Nexus 7 for 5 LOSCoins, so maybe they're doing something with it
Click to expand...
Click to collapse
Your fix worked beautifully - I got to the packaging of the OS at the end (after modifying a few SEPolicies), and then something happened - it was so close
Edit: @AndDiSa any ideas?
@ThePiGuy looks as if you are trying to build the userimage formated as f2fs file system. I am not sure whether this is supported as I never changed there anything and, hostestly speaking, which is not of much use as you can always format the /data partition in recovery. If you have boot.img and system.img everything should be fine and you can flash them using fastboot.
AndDiSa said:
@ThePiGuy looks as if you are trying to build the userimage formated as f2fs file system. I am not sure whether this is supported as I never changed there anything and, hostestly speaking, which is not of much use as you can always format the /data partition in recovery. If you have boot.img and system.img everything should be fine and you can flash them using fastboot.
Click to expand...
Click to collapse
Ok I will do. I didn't change anything relating to the formatting of the userimage (not knowingly anyway), so I'm surprised that is has defaulted to that. Where would I change this to get it back to ext4?
@AndDiSa unfortunately once I flashed the System.img and boot.img, I got into a bootloop where it would show the google logo and unlocked padlock, flash and start again. Could it be due to outdated proprietary blobs? Would I be better off using unlegacy android blobs (they seem to be updated fairly frequently for such an old device)
@ThePiGuy I doubt that the blobs are the reason why ... If it remains on the Google start page it's an indication that there is either a kernel crash or that there are permission issues, i.e. your selinux configuration has some problems. Did you try to boot into TWRP directly and to have a look at /proc/last_kmsg ?
AndDiSa said:
@ThePiGuy I doubt that the blobs are the reason why ... If it remains on the Google start page it's an indication that there is either a kernel crash or that there are permission issues, i.e. your selinux configuration has some problems. Did you try to boot into TWRP directly and to have a look at /proc/last_kmsg ?
Click to expand...
Click to collapse
No I didn't (I'm very new to this - the only other thing I have built is for my G4, which just seemed to work without any issues)
Having had a look now, it looks like it is a kernel panic (I have attached the last_mksg with a .txt extension to get XDA to allow it)
@ThePiGuy which kernel sources do you use? I had similar issues years ago when I was trying to set up the Nougat-Kernel.
Can you please check whether you have the __BRILLO__ option set in system/core/init/Android.mk?
Code:
diff --git a/init/Android.mk b/init/Android.mk
index 67541b8..ff343e9 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -10,7 +10,7 @@ else
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_PERMISSIVE_SELINUX=0
endif
-init_options += -DLOG_UEVENTS=0
+init_options += -DLOG_UEVENTS=0 -D__BRILLO__
init_cflags += \
$(init_options) \
AndDiSa said:
@ThePiGuy which kernel sources do you use? I had similar issues years ago when I was trying to set up the Nougat-Kernel.
Can you please check whether you have the __BRILLO__ option set in system/core/init/Android.mk?
Code:
diff --git a/init/Android.mk b/init/Android.mk
index 67541b8..ff343e9 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -10,7 +10,7 @@ else
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_PERMISSIVE_SELINUX=0
endif
-init_options += -DLOG_UEVENTS=0
+init_options += -DLOG_UEVENTS=0 -D__BRILLO__
init_cflags += \
$(init_options) \
Click to expand...
Click to collapse
I have forked your kernel source (you can see my fork at https://github.com/thepiguy0/android_kernel_asus_grouper).
Unfortunately I can't see that file at all
@ThePiGuy that Android.mk is located in the system/core project in the init directory, not in the kernel.
AndDiSa said:
@ThePiGuy that Android.mk is located in the system/core project in the init directory, not in the kernel.
Click to expand...
Click to collapse
Ah yes I see it now. No I didn't have that option. I'll add it and see if it works
(Accidental duplicate post - see below)
@AndDiSa one thing that has just occurred to me - I have just noticed all the patches in your grouper manifest - will I need to apply all those patches if I use your sources?

Xposed x86_64 for Yoga Tab 3 Pro

Hi xda,
I've been working on building Xposed x86_64 for our tablet and, even if it's not working yet, the results look promising to me
The tablet is not booting, which could sound really bad, but actually, after applying some required patches to the original rovo89 code (https://github.com/rovo89), there are no scary errors in the boot log (i.e. kernel panic, raw level, art related, native code errors). :fingers-crossed:
The current issue is related only to some odex files not correctly generated for some system packages, which leads to a non booting UI, even if the tablet is actually up and running.
I will keep on working on it, but it would be great if someone here on XDA would be interested in helping me ( @alquez what do you think?), since there is not a lot of documentation and @rovo89 is quite busy.
Just write to me if you are up for it.
PS: here is the boot log with the failure I'm facing in the latest version I built: https://gist.github.com/Gia90/f1cc9170f423883a9384205305f39ce7
Any progress?

I need a little bit of help porting crDroid 6 to the sm-t350

I need a little bit of help portingh crDroid 6 to the sm-t350. Nubianprince started then got pulled away by work. I have initalized the crdroid repo, but i when i run repo sync i think it only downloaded like, 300 mb. i do have an android pie enviroment, does repo link resources? i dont know what is going on there. I will upload my roomservice.xml. I had to remove a couple lines from the original and manually clone them because it keeped giving me an error. the original is here https://github.com/Nubianprince/local_manifests/blob/master/crdroid-ten.xml .
Currently i am using this device tree: https://github.com/Nubianprince/android_vendor_samsung_gt58wifi most custom roms i see are using this: https://github.com/Valera1978/android_device_samsung_gtaxlwifi . I have not seen any non sm-5xx devices using it though, so i hesitate to switch. i worked out a a couple errors of things being defined twice, and then built. but i think i am missing something as the build fails with this: FAILED: ninja: 'out/target/product/gt58wifi/root/init.usb.configfs.rc', needed by 'out/target/product/gt58wifi/ramdisk-recovery.cpio', missing and no known rule to make it
Is there a "quick fix" to provide this file? I am not actually sure what i am missing, or what creates it.
Any help would be appreciated.
This file "init.usb.configfs.rc" is missing from your device tree, somewhere in one of your files you have the path pointing to "init.usb.configfs.rc" which does not exist. Let me know if that makes sense.
nubianprince said:
This file "init.usb.configfs.rc" is missing from your device tree, somewhere in one of your files you have the path pointing to "init.usb.configfs.rc" which does not exist. Let me know if that makes sense.
Click to expand...
Click to collapse
Yes, it does make sense. I just don't know enough about the android environment to know where the file, or what is pointing to it, would / should be.
Okay. I believe there is a missing, or many many missing makefiles. I found the file and manually copied it to out, and then the build fails with another missing file. Rinse and repeat, there are a ton of files not being put where they should be. Now what to do with that information, i am not sure ??. I tried including a couple of the make files from android 9, but they didn't make any difference.
oh yeah, and if i do lunch instead of brunch it fails with a different file missing: FAILED: ninja: 'out/target/product/gt58wifi/system/addon.d/50-lineage.sh', needed by 'out/target/product/gt58wifi/verified_assembled_framework_manifest.xml', missing and no known rule to make it
it makes no sense adding files to the "out" folder, fix the issues in your "device" folder check your device.mk file
Wow. That was really awful. I don't even know what i was thinking there. What i was trying to say, is that i was manual copying the files to see if it was just one or two not being copied. I have been comparing the Pie and Q makefiles to try to determine what file was supposed to be copying it to out, but i cant find it in Pie, all i know for now is that it is being copied in Pie but not Q. For now I'm gonna' keep looking for the correct file.
lividhen99 said:
Wow. That was really awful. I don't even know what i was thinking there. What i was trying to say, is that i was manual copying the files to see if it was just one or two not being copied. I have been comparing the Pie and Q makefiles to try to determine what file was supposed to be copying it to out, but i cant find it in Pie, all i know for now is that it is being copied in Pie but not Q. For now I'm gonna' keep looking for the correct file.
Click to expand...
Click to collapse
What device tree are you using, do you have it on Github?
nubianprince said:
What device tree are you using, do you have it on Github?
Click to expand...
Click to collapse
I am just using the device trees (ten branch) on your GitHub. I haven't made any changes that have gotten me anywhere so i haven't committed my local changes to my GitHub.
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
nubianprince said:
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
Click to expand...
Click to collapse
I have been away for a while and haven't followed along, but the last week I spent compiling ROMs. I also tried compiling Android 10 using "stock" lineageos gt58wifi and I got stuck at the logo as well. I also tried another device from the msm8916 repository and got stuck at the logo.
The "stock" gt58wifi build, as we all know, has problems with audio, bluetooth, smart cover, etc, etc in all versions 14.1, 15.0, 16.0 and won't even boot with 17.1.
When I first compiled it, it would fail due an error with a config.xml file. I submitted a patch, like others, but haven't seen anything yet.
https://github.com/Galaxy-MSM8916/android_device_samsung_gt58wifi/pulls
nubianprince said:
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
Click to expand...
Click to collapse
I'm working on SM-T560NU 17.1. It too was stuck at the boot logo. I built an eng build and found it was the hardware vibrator that was getting stuck in a loop. If you remove the vibrator hal from
/device/samsung/msm8916-common/manifest.xml
that should work on the SM-T350 because both platforms share the same msm8916 code?
I did build SM-T350 with 17.1 and was stuck at boot logo and gave up. However, I have not rebuilt it knowing this new information. I will try again with the above change in a few days?
So, as retiredtab has said, he got android 10 booting. But it has all the issues android 9 did: no camera, sound, Bluetooth, or Hal sensor (sort of, it can turn the device on but not off). The system ui is also a little funny on crdroid, not sure about lineage. I don't know how to fix these issues, or where the roots of the problems may lay. Do you have any suggestions for learning more about the android source code? I feel like the aosp docs are good, but you kind of have to know what you're looking for.
I think part of the problem with the SM-T350 is that there has never been a fully working build since day 1. Lineageos 14 had problems to begin with and they were never fixed and got carried over to 15, 16 and now 17. If stock Lineageos 16 was fully working, then getting it to work on 17 would be less of a challenge.
The most likely problem to no audio, camera, bluetooth etc is the Samsung proprietary blobs are not in the correct directories or the configuration blob files are pointing to the wrong directory.
When I face this problem, I find it helpful to look at a working roomservice.xml file and do comparisons.
If there is no working roomservice.xml like "stock" lineageos 14, 15, and 16 for the SM-T350, then I look at similar models. For example, the T550 is the bigger brother and it helps to look through it's roomservice.xml file for hints.
Remember that a compiler mainly checks for syntax errors, not semantic. If you make a typo, a compiler will flag that as an error, but if you write correct syntax, but put a file or files in directory ABC instead of XYZ, the compiler won't say anything.
Another thing that might help is doing a logcat of a working build and comparing it to a non working build. There might be a very obvious error message like "can't find audio.hw.msm8916 in directory /device/samsung/msm8916" or something like that.
Learning how to use tools like meld and diff help tremendously in finding file and directory differences in case you put the blobs in the wrong place. See
https://www.tecmint.com/compare-find-difference-between-two-directories-in-linux/
I used meld when troubleshooting the stuck at boot logo.
If you are a visual learner, I found the following youtube channel helping in learning the overall process of building ROMs.
https://www.youtube.com/c/AlaskaLinuxUserAKLU/videos
I think we have lineage 16 fully working. I think the part I'm having trouble with here is the difference between where the files are read from in Android Q vs P.
If I understood what you said incorrectly, please say so.

HELP!!! please!! compile bootable systemd msm-3.18 arm kernel

hello
For the past few weeks i have been working on porting sailfish os to the LG Aristo 2. Its been a pain too as i had no idea where to start. Any ports to lineage or otherwise never got past boot and after a some searching i could not find a repo.
Any way i have managed to accomplish building a repo on github where curious folks could look me up by my handle. I originally started the project to boot native ubuntu on an sd like the v10 and v20.
But now i have backed myself into a corner. i have been compiling the systemD kernel using msm-3.18 source thats been upstreamed for two weeks now and i still cant get a boot.img that wont boot straight to fastboot.
can some one please help me accomplish this task.
then maybe we can move on to the build errors
Duhjoker said:
hello
For the past few weeks i have been working on porting sailfish os to the LG Aristo 2. Its been a pain too as i had no idea where to start. Any ports to lineage or otherwise never got past boot and after a some searching i could not find a repo.
Any way i have managed to accomplish building a repo on github where curious folks could look me up by my handle. I originally started the project to boot native ubuntu on an sd like the v10 and v20.
But now i have backed myself into a corner. i have been compiling the systemD kernel using msm-3.18 source thats been upstreamed for two weeks now and i still cant get a boot.img that wont boot straight to fastboot.
can some one please help me accomplish this task.
then maybe we can move on to the build errors
Click to expand...
Click to collapse
You should go to IRC #sailfishos-porters, there you will find help from Jolla developers and from community
well i guess theres no help any where. the folks at telegram completely ignore me and are rude as f and if you say any thing about it they say you ate spamming for and claim you are the rude one. ive been ganged up on several times. irq doesnt seem to have enough people to help and i feel all hope is lost at this point.
on the other hand i have built a the whole rom completely and several times over but i cant get it installed and dont know how to see if the kernel works
ok im gonna keep trying to get help from here. I have gotten more help and made it farther in my abilities because of the help and info from this place than any other. Thank you
So this is where i am at. i have compiled Halium\Ubuntu touch several times over and worked it out with no compilation errors and including all of my sources.
But i cannot get it to ssh or telnet. I have followed all of the installation documents and i can see that its pulling the system.img and rootfs to data. i have entered my password on prompt its generated and pushed the rsa keys and every thing. but no go
i have checked the dmsg and kmsg after the attempts and no errors are reported.
so now im trying to go the route of the V20. I have an arm ubuntu 18.04 rootfs that i have unzipped and built up on the 2nd partition of my external sd. i installed every thing needed to build a kernel and any thing else i might need. i have msm-fb-refresher compiled and installed. I also have dev sys and proc mounted bound and and have made the devices using MAKEDEV. But when i try to build the kernel on my aristo 2 in the chroot i get these weird graphics characters and i have to restart my terminal to get my characters back.
in the mean time i compiled the kernel on my pc and had the modules installed to the chroot outside the android device and used update-initramfs to create an initrd.img exteacted it and made a boot.img that i put in the boot directory and installed to laf.
it will not boot stiil from laugh and goes to bootloader. but if i tell the chroot to reboot i get the error system cannot reboot with systemD as init cannot operate.
ok well still no help at any of the halium/ubuntu touch forums or telegram. But the bot said there was no kernel errors.
i have been looking at the lg v20 native ububtu mate rootfs and also the ectracted boot.img contents and i just dont know what it is thats causing it not to boot

Categories

Resources