Kernel Hardening - Verizon Galaxy S 5 Q&A, Help & Troubleshooting

What's up XDA?
I was wondering, how do you use kernel hardening? Or, in more understandable terms, how do you max out the security of the kernel? I heard that CopperheadOS does the same things. Since i want to build my own kernel from LineageOS source code ( or other places, tell me where!), I want to make this happen. I've wanted and have looked into android security solutions for a while now and this will hopefully give me a kickstart in the right direction.
Thanks!

Related

Building from Cyanogem source and flash to atrix

Hello everybody,
I'm an Android app developer for some time, but from some time ago until now I have been tweaking the framework, trying to enhance, customize and maybe correcting bugs, so I'm working on the emulator, but I would like to test it on my device (Atrix).
Since I'm a newbie on this matters and I found plenty of threads and sites/blogs, I got a little confused on what are the steps to be made, specially because I would like to build from source as to have my modifications flashed. I'm aware of the hardware implications for my specific device, so I decided to use a reported working rom source code for my device, but i'm a little lost. I thoutgh to be using Cyanogem but I don't know the specifics.
Since I already have the source code AOSP, I think It would be painful to make it work on my device (drivers, kernel, so on...).
I just want (for now) see my framework modifications on device. Anyone could point me to the right direction?
I thought of using this firmware here.
Thank you all.

How to build AOSP for Motorola devices?

I am having trouble finding decent instructions for getting the sources for a standard build for Motorola devices, specifically for athene.
I have built for Freescale products before and it usually involves some combination of repo init and patches, but that doesn't seem to be the case for Motorola.
I know the kernel and other sources are available on Github (https://github.com/MotorolaMobilityLL), but I don't see a manifest repository there. Nor can I find a device repo.
The closest thing to instructions I found was this readme (https://github.com/MotorolaMobilityLLC/readme/blob/master/MMI-MPJ24.139-23.4.txt) (xda wont let me post links, I'm too new a user here).
I am starting to suspect that Motorola is being as lazy as possible and only fulfilling the bare minimum of open source obligations, and thus doesn't provide a device repo, or manifest repo, etc.
Is that the case? I am new to running builds for standard phone manufacturers - are ROM developers around here forced to do legwork filling in what the manufacturers refuse to publish?
Or am I just missing the rest of the instructions from somewhere?
I have the same issue, did you ever manage to successfully complete a build? Thanks.
TheGreatCabbage said:
I have the same issue, did you ever manage to successfully complete a build? Thanks.
Click to expand...
Click to collapse
Nope, my impression of the situation remains the same, though I have not re-investigated. I would like if someone more knowledgeable confirmed though.
It is a shame, as I would really like a "known good" base to work off of and put in root support and remove unnecessary softwares in a legitimate way.
You *can* build LineageOS for athene: (https://wiki.lineageos.org/devices/athene/build)
I ran LineageOS for several months, but eventually switched back to stock. Has some strange issues in regards to texting (seems to only work when making a call).
Thanks for your reply. I've just managed to build Lineage OS for my device, and it seems to work ok.
I was previously using Resurrection Remix OS (which I didn't build, just downloaded a zip) and it worked very well, so if I have any issues with Lineage then I'll try to restore my TWRP backup of RR.
I wish I could use the AOSP codebase directly, though...

Port of lineageOS

Hello Guys,
Today I woke up with a new idea; I want to port LineageOS to the LG V20 version H990DS. I was tinkering with this idea for about one year, but never actually wanted to make the step. Until today. I used LineageOS and CyanogenMod since 2012.
The reason why I want to create the first port is because I have the time at the moment, so why not help the community? I do have four years of programming skills C/C++. Run Linux as daily driver etc... Do know how to use git, linux, autotools etc... The tricky part however is: I never compiled a Lineage OS rom from source and I don't think the compiling would be a problem, but the LG V20 H990DS isn't officially supported. My question is: Where do I start to program? How can I compile and build a working Lineage OS for the LG H990DS. Are there any good website I can read from?
I saw this:
https://www.youtube.com/watch?v=MGI3NSJFtKA&feature=youtu.be
https://forum.xda-developers.com/chef-central/android/how-to-build-lineageos-14-1-t3551484
http://www.lineageosrom.com/2017/01/how-to-build-lineageos-rom-for-any.html
https://www.reddit.com/r/LineageOS/comments/6iie9l/how_to_compile_lineage_os_141_for_unsupported/
https://www.reddit.com/r/LineageOS/comments/684qkp/help_noob_compile_lineageos/
So to make it easy: I want to program a working LineageOS for the LG H990DS, but don't have any understanding about where to start. I do have four years of programming skills, not so much, but know C and C++ well.
Thanks in advance,
Maurice
English isn't my native language, sorry for grammars.
someone help this man up.
Did you check the existing LineageOS thread?
https://forum.xda-developers.com/v20/development/dev-cm14-t3509953/post74550386#post74550386
If you want to help, I'd suggest asking him if there's anything you can do.
Thank you for your response. I do watch that thread, because I want lineageOS for the h990ds device. The problem however is that I don't want to jump right into the code. I want to know what I am doing with each line of code. At the moment I think I have to change some things in the kernel so that it can boot, but I don't know if that's true. And there is so many documentation about how to compile lineageOS, which I don't want to do. I want to program and compile lineageOS. Every tutorial skips the program parts and just compiles lineageOS.
So maybe a good programmer can give my some advice? Where to start and where can I find some documentation?
Best regards,
Maurice
Welcome!
First off, I recommend using Ubuntu 16.04 (I personally use 16.10 however). Be sure to follow the guide you linked from chef central carefully.
For the dual SIM variant, I don't believe any current source exists. Although with the similar hardware and if you have decent skills, you could get it going.
Take a look at the existing v20 trees:
V20-common: https://github.com/LineageOS/android_device_lge_v20-common
Msm8996-common: https://github.com/LineageOS/android_device_lge_msm8996-common
H918 (as a reference): https://github.com/LineageOS/android_device_lge_h918
Kernel: https://github.com/LineageOS/android_kernel_lge_msm8996
Vendor: https://github.com/TheMuppets/proprietary_vendor_lge
Those are the basics to check out. Now I did see someone converted the H918 tree to H990. Here's a link to that for reference: https://github.com/android-device-lge-h990/android_device_lge_h990
You will definitely need to make a custom defconfig in kernel sources. The device tree changes should be rather easy. You'll need to pull vendor files from stock and import the drivers and dts files from stock kernel source. If/when you get a working kernel and device trees there's a 99% chance you will need to Port other drivers and vendor files as stock files don't play nice in aosp. If I were you, I'd start looking through commit history on GitHub to see how the other devices we're brought up. That is how I learned everything.
Also, git will be your best friend when bringing up large projects, like kernel. Learn git, get comfortable with it. Cherry-picking and merging is what keeps us going.
Best of luck!
I suppose you could say there are dueling work-in-progress H990 trees since the other one is: https://github.com/x86cpu/android_device_lge_h990
The one you pointed to is mine. I was hoping for some collaboration with @x86cpu on there (in theory @x86cpu also has permissions to modify that repository, assuming I've set things up correctly). While the initial steps have been done, it is not finished! Some issues are left for getting LineageOS operational on H990 devices.
Of crucial note the modem fix in its current form is unacceptable to LineageOS (despite working). I've got two variants of one solution almost ready, but they're yet ready.
Thank you for your answer and I will look into it. I sure hope that I can help you some day, but first I want to understand the repository. After that I will help you both to code.
Really thank you and I will do my best to catch up with you.
As for the Ubuntu version. I personally use arch Linux (with plasma), because I like it more than Ubuntu. I don't think that's a problem and else I will compile the Ubuntu programs to arch. And I know my way around got. Use it for about 4 years now and now what merging/branching rebasing etc means and know how to use it.
@emdroidle I could help

Rom request (Dot OS)

Hello, i was in the process of finding out how to compile Dot OS rom to share here but realized that my my computer isnt strong enough to do so. Is there anyone willing to compile the rom for those of us who would like to use it? please and thanks. Also, if asking for a rom is in violation of anything please remove this post ;D
That would be great
I am actually planning to do a personal build of DotOS, if I succeed I will share it. (this only depends on my internet connection - which is slow: I will probably buy a VPS to do so).
That great yes
I didn't see this beforehand but I'm actually compiling a build of Dot-OS 2.4 based on 8.1 oreo Right now.
By all means, if someone was planning on maintaining unofficial builds be my guest. Still, I'll post my build on this comment when it's done in an hour or so.. Made with los tree, kernel and muppets vendor.
edit: I removed my build because of some issues with system overlays
AnierinB said:
I didn't see this beforehand but I'm actually compiling a build of Dot-OS 2.4 based on 8.1 oreo Right now.
By all means, if someone was planning on maintaining unofficial builds be my guest. Still, I'll post my build on this comment when it's done in an hour or so.. Made with los tree, kernel and muppets vendor.
edit: well here is my build based on the mentioned sources https://androidfilehost.com/?w=files&flid=279723
Click to expand...
Click to collapse
I actually wasn't planning to maintain it, you are free to do so. I successfully built my own version as well, but I have some issues with DotUICenter - basically the overlays do not work.
I am trying to download your build but AFH has a temporary mirror and it's extremely slow (60 to 80KB/s). Do the overlays work on your build?
Hello Any news about rom thanks
jet-27 said:
Hello Any news about rom thanks
Click to expand...
Click to collapse
Well I've personally discontinued work due to some overlay issues that I don't have the time to look into and fix.

Copperhead OS, where to get?

Hello!
For couple of days I am looking for copperhead OS for Nexus P6, can't find anything. I tried to build but can't even find the source. I am following tor project instruction "Mission Improbable: Hardening Android for Security And Privacy". And I need factory image for Nexus P6. Maybe you could help me out? (official downloads are down)
ShevronMob said:
Hello!
For couple of days I am looking for copperhead OS for Nexus P6, can't find anything. I tried to build but can't even find the source. I am following tor project instruction "Mission Improbable: Hardening Android for Security And Privacy". And I need factory image for Nexus P6. Maybe you could help me out? (official downloads are down)
Click to expand...
Click to collapse
Copperhead is dead.
Search reddit for the drama.
The good news is that the project was rebooted https://old.reddit.com/r/GrapheneOS/
The bad news is that there is no Nexus support. Only Pixel devices.
I suspect you're better off with LineageOS because it will include the latest upstream security patches.
Do you think I can substitute LineageOS ROM in this "mission-improbable-hardening-android-security-and-privacy" ? It's a tested system, not sure if the security updates gonna make any significant difference in solid TOR gated device.
I am still looking for a CopperheadOS angler(Nexus P6 compatible) ROM, maybe someone could share, if they know where to get, or have a copy around somewhere?
ShevronMob said:
Do you think I can substitute LineageOS ROM in this "mission-improbable-hardening-android-security-and-privacy" ? It's a tested system, not sure if the security updates gonna make any significant difference in solid TOR gated device.
I am still looking for a CopperheadOS angler(Nexus P6 compatible) ROM, maybe someone could share, if they know where to get, or have a copy around somewhere?
Click to expand...
Click to collapse
I don't know the answer to that since I don't understand the implications in regards to TOR.
You might want to drop the question at the GrapheneOS reddit on what they would suggest or if there if any chance for a Nexus 6P rom.
You might also consider buying a second hand Pixel.

Categories

Resources