Github help - Android Q&A, Help & Troubleshooting

I have a kernel that I need to merge MM-mr2 in. So I have my kernel and MM-mr2 in my github. I just need to merge mr2 into my base. I have googled my a** of and havent had any luck. Someone who could help with the commands it would be greatly appreciated

Not sure I am tracking completely. I'll do what I can to answer your query.
From what you are describing, you have 2 branches, Master and MM-mr2 for your kernel. Refer to Basic Branching and Merging and more Visual explanation here.
The critical thing to know is that, both should be your branches. If one of them is owned by someone else, then you will be required to create a Pull Request.
Basically here are the steps you'd follow.
Checkout your master Branch where your other branch is going to be merged.
I assume MM-MR2 is another branch in the same repository Tree. If so, just issue ,
Code:
git merge MM-mr2
Now issue git status command to see the merge resulted in conflicts. It most likely will depending on what MR2 had that master did not.
Resolve the conflicts, then issue,
git add -A
this will add all the modified files to your commit. At which time you can do
git commit --amend
which will create a new commit on the master branch. This you can push to your git.
Oh and FYI, this thread is a good resource to me. [Guide] How to use Github

Perseus said:
Not sure I am tracking completely. I'll do what I can to answer your query.
From what you are describing, you have 2 branches, Master and MM-mr2 for your kernel. Refer to Basic Branching and Merging and more Visual explanation here.
The critical thing to know is that, both should be your branches. If one of them is owned by someone else, then you will be required to create a Pull Request.
Basically here are the steps you'd follow.
Checkout your master Branch where your other branch is going to be merged.
I assume MM-MR2 is another branch in the same repository Tree. If so, just issue ,
Code:
git merge MM-mr2
Now issue git status command to see the merge resulted in conflicts. It most likely will depending on what MR2 had that master did not.
Resolve the conflicts, then issue,
git add -A
this will add all the modified files to your commit. At which time you can do
git commit --amend
which will create a new commit on the master branch. This you can push to your git.
Oh and FYI, this thread is a good resource to me. [Guide] How to use Github
Click to expand...
Click to collapse
Heres my github https://github.com/APOPHIS9283
I need to merge shamu-mr2, into Project-Rachel

apophis9283 said:
Heres my github https://github.com/APOPHIS9283
I need to merge shamu-mr2, into Project-Rachel
Click to expand...
Click to collapse
Merging two repos is a immense undertaking. Not that it can not be done. But it means enormous amount of work. It is not the same as merging two branches, as I assumed earlier.
Would you care to explain why those two repos need to be merged? Is there a set of commits from one that you'd like in the other ?

Yeah my kernel is pretty much marshmallow. I need to bring in marshmallow mr2 to have it up to date with Google

*BUMP*

Anyone?

apophis9283 said:
Yeah my kernel is pretty much marshmallow. I need to bring in marshmallow mr2 to have it up to date with Google
Click to expand...
Click to collapse
In that case, do a Diff on github.com and choose those two to compare. That will create a Pull Request that you can merge. Please see this Tut.

Perseus said:
In that case, do a Diff on github.com and choose those two to compare. That will create a Pull Request that you can merge. Please see this Tut.
Click to expand...
Click to collapse
One last question. Sorry Github and such has always beena weak point.
https://android.googlesource.com/kernel/msm/+/android-msm-shamu-3.10-marshmallow-mr2/
I try to fork that but there doesnt seem to be a way

apophis9283 said:
Yeah my kernel is pretty much marshmallow. I need to bring in marshmallow mr2 to have it up to date with Google
Click to expand...
Click to collapse
apophis9283 said:
One last question. Sorry Github and such has always beena weak point.
https://android.googlesource.com/kernel/msm/+/android-msm-shamu-3.10-marshmallow-mr2/
I try to fork that but there doesnt seem to be a way
Click to expand...
Click to collapse
Trust me when I say, I HATE Git for the obnoxious, inane and downright silly errors it throws at me. You're not the first and most definitely not the last.
As to that link, unfortunately you will need to download a archive (See that .tgz link up top ? ). Expand the contents locally, then create a dummy repo in your own Git via web. Then Push the local unzipped folder to that Repo. The end result on Github should look exactly like what is at that link. Here's a Link that might help.

Perseus said:
Trust me when I say, I HATE Git for the obnoxious, inane and downright silly errors it throws at me. You're not the first and most definitely not the last.
As to that link, unfortunately you will need to download a archive (See that .tgz link up top ? ). Expand the contents locally, then create a dummy repo in your own Git via web. Then Push the local unzipped folder to that Repo. The end result on Github should look exactly like what is at that link.
Click to expand...
Click to collapse
I created a dummy github account and forked mr2. No matter what I do I cant even see mr2 as an option. This has been so frustrating I just dont have the patience to deal with it anymore. I truly appreciate your time

Thanks to xanax droid. I literally had to type in 4 commands and bam. I was fone that quick

Related

build cm10.1 kernel

anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
ztotherad said:
anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
Click to expand...
Click to collapse
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
jt1134 said:
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
Click to expand...
Click to collapse
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
ztotherad said:
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
Click to expand...
Click to collapse
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
jt1134 said:
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
Click to expand...
Click to collapse
haha yeah, cause a few months back you said i had to sync the whole source.
it sounds like you've been working your ass off. lol
but that's definitely awesome. it makes it easier on us all.

[Kernel Source / Tutorial] Custom Kernel 101

This thread is NOT for general Q & A about using the kernel or configuring a specific version.
This thread IS for sharing source code or attempting to apply debugging to code changes.
In English: This is what a development thread really looks like. No downloads, No user manual.
Note to Mods: OT is welcome, so long as it is relevant to the kernel developer experience
Building the kernel 101:
A clean branch with only the build tools, ramdisks, and MacOS updates is at:
https://github.com/StarKissed/starkissed-kernel-trlte/tree/master
The stockish branch adds Linux patches, mainline updates, and SELinux mods
The deported branch is the customized version described in the OP feature list
You are going to need a few things, especially if building this kernel for MacOS.
GCC 4.7 (This is the version Samsung's documentation listed)
An updated mkbootimg (Must have DTS support)
A dtbtool (Included in the source, but only for Linux)
Insomnia (Not a requirement, but it will help you in the long run)
For MacOS, the tools are available from the following repositories:
https://github.com/StarKissed/android-toolchain-eabi-4.7
https://github.com/StarKissed/starkissed-build-tools
Let's jump ahead a moment for those of you who have built kernels and notice your boot.img is only around 11 MB while the versions you see listed here are all roughly 14 MB. This is where the new mkbootimg and dtbtool are necessary.
Attempting to retrieve the commandline arguments from the boot.img will not tell you one important piece:
Code:
./dtbtool -o dt.img -s 4096 -p ../scripts/dtc/ ../arch/arm/boot/dts/
chmod a+r dt.img
mkbootfs (ramdisk creation)
mkbootimg (mkbootimg params) --dt dt.img
This takes the DTSI that was built into a dtb as one of the first steps in the compile process and turns it into an image that is appended to the end of the boot.img. The dt.img just happens to be about 3 MB. (11 MB + 3 MB = 14 MB)
If you grabbed the original Samsung kernel source, you may notice that their default compile script directs the build to an "out" folder in the root of the kernel directory.
The obvious advantage to this is that their clean command runs into some errors, so the clean process is simply deleting the "out" folder and making a new one.
This doesn't work for a lot of the custom components you may want to add to your kernel, though. Some modifications, such as intelli-thermal, rely on a subdirectory that is referenced in the Makefile.
Building to this out folder will result in an error because it cannot find the output of that component, but building in the tree, or actual source, will also result in an error. The lesser of two evils is to fix in-tree builds.
Code:
Instructions for TRACE_INCLUDE_FILE in include/trace/define_trace.h say
"the path is relative to define_trace.h, not the file including it".
Fix in-tree compilation by making the path relative to define_trace.h.
What this means is that when you have a line that refers to the TRACE_INCLUDE_PATH or an include reference to a file that uses a relative location instead of a global, these need to be updated
The only two files that currently require updates in the stock source code are
Code:
drivers/scsi/ufs/ufs_test.c
#include -> #include "../sd.h"
and
Code:
drivers/video/msm/mdss/mdss_mdp_trace.h
#define TRACE_INCLUDE_PATH . -> #define TRACE_INCLUDE_PATH ../../drivers/video/msm/mdss/
If you want to be able to debug your kernel, you will need to enable last_kmsg.
Open up the arch/arm/configs/apq8084_sec_defconfig and add
Code:
CONFIG_SEC_DEBUG_NOCACHE_LOG_IN_LEVEL_LOW=y
CONFIG_PRINTK_PROCESS=y
CONFIG_SEC_DEBUG_LOW_LOG=y
More to come soon...
This is a great idea!
Looking fwd to seeing this thread take off...it will be very interesting for sure.
Sent from my SM-N910W8 using Tapatalk 2
@ktoonsez im back ready to play my man 
 @twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
I use git am -3 so that any issue defaults to a merge then git mergetool to resolve it.
Switching the index in the dtsi that was modified was the only change to show it that I remember needing.
https://github.com/StarKissed/stark...mmit/695abe187620acf513b33237042925d60a99f0c1
friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
Im back too.
ktoonsez said:
Im back too.
Click to expand...
Click to collapse
right on
any thoughts my man?
friedrich420 said:
right on
any thoughts my man?
Click to expand...
Click to collapse
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to
ktoonsez said:
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to
Click to expand...
Click to collapse
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..
friedrich420 said:
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..
Click to expand...
Click to collapse
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2
ktoonsez said:
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2
Click to expand...
Click to collapse
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)
I got lost in Freedom Wars for a bit. I need to figure out an issue with thermal then I'll be back
friedrich420 said:
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)
Click to expand...
Click to collapse
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip
ktoonsez said:
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip
Click to expand...
Click to collapse
Unfortunately same bahavior my man..
friedrich420 said:
Unfortunately same bahavior my man..
Click to expand...
Click to collapse
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
EDIT:
The guy I am testing with has the "G".
ktoonsez said:
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
Click to expand...
Click to collapse
the F...
friedrich420 said:
the F...
Click to expand...
Click to collapse
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.
ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?
twistedumbrella said:
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.
Click to expand...
Click to collapse
I started with stock N910F ramdisk in version "C", version "D" went back to my original universal ramdisk you can try the "C" and see if anything changes:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014C.zip
friedrich420 said:
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?
Click to expand...
Click to collapse
That is exactly what I just merged in so the "D" that wont boot for you is pretty much the same thing, lol. See what happens on the "C" version which is stock N910F ramdisk.

Repo change from one android version to new android verion

I have a repo with android cm-12.1 as branch.
Now i want to update this repo to new CM version 13.0 without downloading the whole repo again.
Is that possible?
Unfortunately, no. Too many differences in the code bases.
MJPollard said:
Unfortunately, no. Too many differences in the code bases.
Click to expand...
Click to collapse
Okay,what happens if init a new branch (cm-13.0) in the same repo directory.
Is it faster than new repo?
Sent from my Micromax bolt
A27 using XDA Free mobile app
svprm said:
Okay,what happens if init a new branch (cm-13.0) in the same repo directory.
Is it faster than new repo?
Click to expand...
Click to collapse
Even if you could do that (and I'm not sure you can), the new branch would probably have to sync every single package over again, so you aren't really saving any time (and would likely cause major headaches). I think you really would be better off creating a completely new repo.

How To Compile OmniROM For My Device?

So, after destroying a tremendous amount of data and a whole lot of wait, I finally synced the whole OmniROM 6.0 source code via repo. Now I want to compile it for my device XOLO BLACK (Codename: BLACK) so, can somebody tell me how I can and what am I gonna need (I mean files, like vendor files, kernel etc.)?
Also, how can I extract its device tree? Because it's not available online.
You will need the full kernel source code to even begin and everything I have found says it is not released. Without it you are out of luck.
zelendel said:
You will need the full kernel source code to even begin and everything I have found says it is not released. Without it you are out of luck.
Click to expand...
Click to collapse
No no, kernel is here: https://github.com/hiveinside/xolo_kernel
What do I need now?
NutVolt said:
No no, kernel is here: https://github.com/hiveinside/xolo_kernel
What do I need now?
Click to expand...
Click to collapse
You will need the device tree as well as working on the errors in the kernel as they come up and they will. Also you may have to fix any issues with the source as it only contains the open source parts. Check out some of the building tuts on the site.
It will not be a simple matter of adding the kernel and stuff and then building. It normally takes weeks of bug hunting and fixing to get it to even boot.
zelendel said:
You will need the device tree as well as working on the errors in the kernel as they come up and they will. Also you may have to fix any issues with the source as it only contains the open source parts. Check out some of the building tuts on the site.
It will not be a simple matter of adding the kernel and stuff and then building. It normally takes weeks of bug hunting and fixing to get it to even boot.
Click to expand...
Click to collapse
I know it's gonna take long but if I can't even start then I'll feel very bad, all the hard work I've done to just fetch the source.
Anyway, how can I make a device tree? Can you teach me?

[REFERENCE] Pixel XL kernel source with linux-stable (3.18.124)

Introduction
Hello everyone, this is a thread to introduce both users and kernel developers to the concept of linux-stable as well as give developers some tips and a tree to either merge into their own, use as a base, or just as a reference. Feel free to ask questions and enjoy!
What is it?
linux-stable is, as the name implies, the stable branch of the Linux kernel, the base of Android. The phone could not run without the Linux kernel (at least not without reworking a lot of stuff). The Android kernels are based on the longterm stable trees:
Longterm
There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees.
Click to expand...
Click to collapse
Source: https://www.kernel.org/category/releases.html
All Linux development happens on the master branch, which is governed by Linus Torvalds. When issues are discovered there, the fixes are applied then backported to these various stable trees for consumption. It is not uncommon for a fix to need to go back a few years.
There is a LOT more information available in the notes repo in the android-linux-stable organization if you care to learn more in-depth: https://github.com/android-linux-stable/notes
What does this mean for me?
If you are a developer, this means you should be merging these changes into your own tree. These are vetted, stable fixes to real world problems and they are being handed out for free. It does not take long to get up to date (as you can just merge this tree directly into your own or do it yourself using the tree as a reference) and once you are up to date, there is usually a release once every two weeks, give or take. I provide a rebuttal to a lot of various complaints here. If you still feel like there is a good reason not to do this, please let me know, I'll be happy to try and debate on it!
If you are a user, it means that you should be looking for and using kernels that have these fixes, as it shows the developers care for your security and stability. The current version for this device is 3.18.100 and the current version upstream is 3.18.124 so all you need to do is go into Settings > About phone and look at the kernel version to know if you are up to date.
How do I use?
If you are a developer, the reference tree is located in the android-linux-stable organization: https://github.com/android-linux-stable/marlin
This can either be merged into your existing kernel tree if you have one or be used as a fresh base. You do not need my permission to use it nor do you need to give me credit (although it would be appreciated).
If you are a user, use a kernel that has the changes added in!
Getting notified about updates
There are a few ways to get notified of linux-stable updates:
The linux-kernel-announce mailing list: http://vger.kernel.org/vger-lists.html#linux-kernel-announce
The android-linux-stable Telegram channel: https://t.me/alsupdates
Subscribe to this thread
Follow me on Google+ or Twitter
Getting help
If you have any issues with getting these changes into your tree or want to ask a question, there are a few different ways to do it:
Post in this thread
Join the linux-stable support chat on Telegram: https://t.me/joinchat/C1UAJ1EMSX31PCFdwLnOSg
File an issue either in the android-linux-stable notes repo or the android-linux-stable repo for this device
When requesting help, please give some solid details as to what you are struggling with, as I am happy to provide assistant and clarity but not to do something for you (unless I screwed up).
3.18.88 has been merged in.
3.18.89 has been merged in.
3.18.90 has been merged in.
Thanks bro
3.18.91 has been merged in (conflict notes).
Thank you to the developer .I have a question
Witch kernel have wireguard for pixel XL?
pixel52 said:
Thank you to the developer .I have a question
Witch kernel have wireguard for pixel XL?
Click to expand...
Click to collapse
Not something appropriate for this thread, but if you look at the OP of 2 of the XL kernels they mention wiregard support
3.18.92 has been merged in.
Nevermindthelabel said:
Not something appropriate for this thread, but if you look at the OP of 2 of the XL kernels they mention wiregard support
Click to expand...
Click to collapse
Search op for custom kernels a few do and sorry i posted to wrong quote sorry bro
3.18.93 has been merged in.
3.18.94 has been merged in (conflict notes).
3.18.95 has been merged in.
The OP has been updated, including some more information for users as well as some more ways of getting help and notified of updates! Enjoy
3.18.96 has been merged in.
For some reason I have to set selinux to permissive to work is that normal I can't get it to compile any other way
joeeboogz said:
For some reason I have to set selinux to permissive to work is that normal I can't get it to compile any other way
Click to expand...
Click to collapse
I'm not sure I understand, what do you mean set to permissive to get it to compile? You're compiling on the computer.
nathanchance said:
I'm not sure I understand, what do you mean set to permissive to get it to compile? You're compiling on the computer.
Click to expand...
Click to collapse
Yes I compile kernel with a ROM but it throws sepolicy error then I set to permissive it compiles.
joeeboogz said:
Yes I compile kernel with a ROM but it throws sepolicy error then I set to permissive it compiles.
Click to expand...
Click to collapse
Well does it build without using this kernel and without permissive?
Sent from my Google Pixel 2 XL using XDA Labs
nathanchance said:
Well does it build without using this kernel and without permissive?
Click to expand...
Click to collapse
I figured it out thanks

Categories

Resources