How to implement A510 from Git to compile the Rom? - AOKP Q&A

Hi,
I've setup an own partition with ubuntu and prepare the system with the Git from AOKP.After reading some files (Readme in the git) I've initialize the git, that I've download all devices and driver. Uncomfortable I didn't found the 2 subs "device_acer_A510" and "vendor_acer_A510". Also after "lunch" I didn't see something from Acer nor from the CPU type T30. ..
Before I want try to add an own subdirectory or make some own changes, I want try to compile the Rom from the current source.
Could someone tell me, where is my mistake or what I've forgotten?

Related

Google Android Development

TIME TO MOVE ON
i wil be on xperia section
i am happy that i could help this section
Best Regards, Happy Cookling and Programing!
Hy all
I started this tread because the interest to android is growing
I invite all people with linux knowledge or C programing skills to join
If you know some hardware programing is better
We need
- developpers
- testers
i will not post an guide how to setup the compiler and set variables
if you dont know this stuff please stick to Google Android thread and dont post here stupid questions as IT IS READY / WHEN WILL IT BE READY
WE DO THIS IN OUR SPARE TIME AND WE HAVE FAMILY AND LIFE
So shell we invite the penguin to our phones?
WIKI Page
(Thanks Bikor_gj)
http://wiki.xda-developers.com/index.php?pagename=Niki_Android
GIT Trees
Vogue
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-vogue
MSM
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-msm-2.6.25
Reserved For Messages
Build Instructions for the ones that want to help
- Create working dir:
Code:
mkdir ~/android-kernel
- Go to the dir:
Code:
cd ~/android-kernel
- Clone the Linuxtogo GIT:
Code:
git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
- Go into newly created dir:
Code:
cd ~/android-kernel/kernel
- Create a new branch, call it htc-msm and link it to the official htc-msm development branch:
Code:
- Descend into the "main" android dir:
Code:
cd ~/android-kernel
- Get toolchain:
Code:
wget http://www.codesourcery.com/gnu_too...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- maybe you need to rename the just downloaded file (because after .tar.bz2 wget has added ?lite=arm). (HINT FOR LINUX-NEWBIES: USE TAB TO COMPLETE KNOWN FILENAMES!! - In this case type: mv arm(TAB) arm(TAB) -> backspace till 'bz2' is the last word)
Code:
mv arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2\?lite\=arm arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- unpack the toolchain:
Code:
tar -xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- ascend again into the 'kernel' directory:
Code:
cd ~/android-kernel/kernel
- make the kernel:
Code:
git checkout -b htc-vogue origin/htc-vogue
You also have to use
Code:
make vogue_defconfig ARCH=arm
- export path so the newly downloaded toolchain will be used instead of your default compiler (which would compile for your computer instead of your phone):
Code:
export PATH=~/android-kernel/arm-2008q1/bin:$PATH
- make the zImage-file:
Code:
make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Now the zImage file is created inside the directory kernel/arch/arm/boot.
When uploading this to your phone, remember that you only have to replace the zImage after each kernel build - the Linux environment on top of the kernel can just stay the same, so initrd (which is the ramdisk filesystem) can stay the same.
BR
Reserved For Kernel Status
Kernel status
no more power button //thanks biktor_gj
nike mtype added
audio working
call working
data working
sms unknown //due to keyboard and ts
keyboard screwed // somethings not right needs investigation
OnSreenKeyboard working
Touch screwed // SOLVED
when this kernel probelms will be solved i will release the new kernel
I have knowledge of both C and linux so I vollunteer
hi,
i can be a tester... also i have some little linux knowledge...
I have limited knowledge of both c and linux, so I possibly could help.
It seems useful however to setup an SVN or something, so even 'non-registered' developers can write patches and submit them for review. You can set up such an SVN for free at assembla.com, together with a wiki, TRAC and more. They even say you can ask for more storage space and stuff if your project is an open-source project.
If you have such an SVN developers like me can help without making any false promises of some sort.
I hope you know what I mean, it sounded better in my head
i know linux and i can do beta tester. i'm studying engineering too.
i also know linux and a bit of C...i can do testing too.
as you already know, I'm in too for development...
i will try the new kernel asap...
I tried this kernel and indeed, the keypad works on mine!
(touched the TS though, just because you said I wasn't allowed ) It froze, so reboot...
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
the_fish said:
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
Click to expand...
Click to collapse
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
man, awesome!!! good job, jerpelea. keys work great!!
graey said:
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
Click to expand...
Click to collapse
ok... the onscreen keyboard would be ok for the time we have to wait
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Boylen said:
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Click to expand...
Click to collapse
I think he is just saying that because it's easier for people to use??
works fine for me on vanilla debian
new kernel works fine screen still too responsive keys work calls work
it works! but after few minutes my nike is auto-turned off :O
garsim said:
it works! but after few minutes my nike is auto-turned off :O
Click to expand...
Click to collapse
i guess we have turn the auto turn off in wm to unlimited or run it on usb plug...

[Q] how to compile tun.ko?

can anybody tell me how to compile tun.ko for any rom? what would i need to download/install etc? any help would be appreciated. thanks!
get the kernel soruce and check config file for tun
in .config file search for "TUN" keyword, change Y to M, run make menuconfig, save, compile.
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
daggerxXxsin said:
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
Click to expand...
Click to collapse
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
okay so first thing is to setup a build environment. gotcha. will work on that.
Sent from my GT540 using XDA App
Gene Poole said:
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
Click to expand...
Click to collapse
Hi Gene, i want to ask, if we cannot find the config.gz file from the device, is it imposibble to get the tun.ko working?
Or if it possible, can you tell me how to gain some configuration, that used by the tun.ko, so we can set the config from menuconfig correctly?
I`ve tried to compile tun.ko for a device, the insmod working fine, but when the vpn try to use the tun, it is crash, it raise segmentation fault.

[TUTORIAL][WIP] Working with GIT and GITHUB for Android Source

Working with GIT and GITHUB
for Android Source
I want to start by saying that I am no EXPERT on GIT, but I believe the best way to learn is through trial and error. Through my trials and errors, this is what I have found that works when working with Android Source Code (AOSP).
I started my Android Development basically porting and hacking Android Operating Systems for the HTC Thunderbolt. In my opinion I learned the basics plus some, and was able to create stable builds, which most users found enjoyable to operate. In my quest to further improve my Android development skills, I moved on the next step in Android Operating System development, build a custom AOSP ROM from source. I soon started browsing other developers GITHUB repositories and tried my best to figure out what was going on behind the scenes, in order to share my code with others and visa versa. This lead me to setting up a development platform, downloading the latest (at the time ICS) source and then compiling everything, to obtain, a fresh updated ROM. Obviously, the next step was editing the code to my liking and then trying to figure out how to update my code (push) to Github for version tracking and also hosting purposes. I shopped around on the net for GIT tutorials, and for the life of me, I could not figure out how to make things work the way they should. After doing research on the REPO command (which I came to find was basically the same as GIT but updated to work better with Android) I became more confused. I never found an article or tutorial which explained step-by-step the processes in which I am about to explain, which is why I decided to take the time to compose this tutorial.
Finally, through many hours of research and frustration, I came up with the answers I was so diligently seeking. Here are my findings:
The following Tutorial is for an INITIAL COMMIT of your source to GITHUB. Once you accomplish sending the initial data over, sending only changes thereafter, is very similar, but doesn't require as many steps.
Prerequisites:
(1) Create an account on GITHUB.com
(2) Download the Android Source into a working directory (in my case "android").
(3) Generate your Private SSH Keys for GITHUB (this will allow you to push files without logging in every time) You will find easy to understand directions HERE
For this example I will be working with the following variables:
My default Android directory: ~/android
For this tutorial I will editing the Setting.apk source code in order to add "XYZ" functionality
The source code for the Settings.apk is located in ~/android/packages/apps/Settings
So lets BEGIN!
First Step: You want to go into the directory where you are editing the source.
Code:
cd ~/android/packages/apps/Settings
Second Step: Initialize the Settings source folder and create a git repository
(which will track all changes)
Code:
git init
Third Step: Now you want to log-in to GITHUB and create a repository for your updated Settings source to go. In my case I created a folder on GUTHUB called android_packages_apps_Settings
Forth Step: After you have created your repository on GITHUB, from your Settings source folder, you need to tell git where to push the changes you have made. When you do the initial push, it is actually going to push all of the files in the Settings source folder including the changes you have made. Do this by typing the following command:
Code:
git remote add github [email protected]:yourusername/android_packages_apps_Settings.git
Obviously, you are going to change "yourusername" to whatever username you created on GITHUB.
Fifth Step: Add the entire Settings directory to git so that it starts tracking your additions, deletions, changes, etc for the entire directory.
Code:
git add -A
Sixth Step: Commit the changes that you made to the files in order to push to GITHUB. Now for this example, I want to commit changes to ALL files in the Settings folder.
Code:
git commit -a
If I wanted to just commit changes to one specific file, I would use "git commit whateverfile.java". After you commit, a text editor is going to pop-up. This is where you add the description for the change(s) you have made. If you have detailed change-log of each file you changed, you will not want to use the "git -a" command because the description you enter there is going to be the description for all of the files you edited.
Seventh Step: Now you want to change to the branch you plan on using to push your content. In my case its "jellybean".
Code:
git branch jellybean
Eighth Step: Finally you will now push your initial Settings commit to github. In order to do this, type:
Code:
git push github jellybean
This is going to push github ("github" is the name you gave the REMOTE when you executed the "git remote add" above) to a branch on GITHUB.com called "jellybean". You can name the branch whatever you like, but obviously naming it to the current Android release name is the easiest to remember for you and others.
You should now see that your computer sent files to GUTHUB.com and if you check online, you should see that your changes have been implemented and copied for the world to access.
I hope this helps people out with Android based git commands. I wish I found somthing like this months ago and maybe I would have a few extra hairs on my head. Let me know if you have any additional questions or would like me to add to this tutorial in any fashion. I will be doing a video shortly which I will post to this thread when complete.
Saved for Questions and Answers . . .
Create repository on github called packages_apps_Settings
Clone it
Code:
git clone https://github.com/lithid/packages_apps_Settings.git
cd packages_apps_Settings
Find the aosp settings and pull that repo so all proper history is still entact. Then merge it.
Code:
git pull https://android.googlesource.com/platform/packages/apps/Settings refs/tags/android-4.1.1_r6
Save it
Now add it all and push to your local repo.
Code:
git push
Hello, how do you create a device tree because I want to build from source but my phone does not yet have one. Thanks
itzdarockz said:
Hello, how do you create a device tree because I want to build from source but my phone does not yet have one. Thanks
Click to expand...
Click to collapse
When you say "a device tree" are you referring to the propriety device drivers and such for a particular device?
MyComputerDoctor said:
When you say "a device tree" are you referring to the propriety device drivers and such for a particular device?
Click to expand...
Click to collapse
I mean to build from source and when picking your lunch such as crespo and crespo 4G i want to add my phone into that. Is that necessary to build from source though?
itzdarockz said:
I mean to build from source and when picking your lunch such as crespo and crespo 4G i want to add my phone into that. Is that necessary to build from source though?
Click to expand...
Click to collapse
Let me know if this helps: http://www.netmite.com/android/mydr...build_new_device.html#androidBuildNewFileTree
Thanks for this tut! I've been wanting to push out sources to my github for a while...but couldn't really find a good tut/didn't have the time to do all the research...this seems like it should get me going with my github and I will definatly be using this tut soon
Sent from my SGH-I997 using Tapatalk 2
question, Let's say I want to merge a commit from CyanogenMod's GitHub ..... I use AOKP's Source, is there a command using git that I can use to facilitate this ??
johnhany97 said:
question, Let's say I want to merge a commit from CyanogenMod's GitHub ..... I use AOKP's Source, is there a command using git that I can use to facilitate this ??
Click to expand...
Click to collapse
Use git cherry-pick but first you need to add the repo
So for example you want a commit from settings first you add CM's settings as a repo with git remote add <name> <url> ....Name can be anything
So it will be $ git add remote cm https://github.com/CyanogenMod/android_packages_apps_Settings
then you can either git fetch cm which will sync all the branches out you can just sync a single branch $ git fetch cm cm-10.1
Now you can use git cherry-pick to cherry-pick the commit from CM settings
$ git cherry-pick <sha1>
e.g
$ git cherry-pick 64c377
Now you will probably need to resolve some conflicts which is hard to explain how to resolve as it varies between has been added where cherry-picked.
can some one ell me how i merge the halo from PA ?
thanks
MyComputerDoctor said:
Working with GIT and GITHUB
for Android Source
I want to start by saying that I am no EXPERT on GIT, but I believe the best way to learn is through trial and error. Through my trials and errors, this is what I have found that works when working with Android Source Code (AOSP).
I started my Android Development basically porting and hacking Android Operating Systems for the HTC Thunderbolt. In my opinion I learned the basics plus some, and was able to create stable builds, which most users found enjoyable to operate. In my quest to further improve my Android development skills, I moved on the next step in Android Operating System development, build a custom AOSP ROM from source. I soon started browsing other developers GITHUB repositories and tried my best to figure out what was going on behind the scenes, in order to share my code with others and visa versa. This lead me to setting up a development platform, downloading the latest (at the time ICS) source and then compiling everything, to obtain, a fresh updated ROM. Obviously, the next step was editing the code to my liking and then trying to figure out how to update my code (push) to Github for version tracking and also hosting purposes. I shopped around on the net for GIT tutorials, and for the life of me, I could not figure out how to make things work the way they should. After doing research on the REPO command (which I came to find was basically the same as GIT but updated to work better with Android) I became more confused. I never found an article or tutorial which explained step-by-step the processes in which I am about to explain, which is why I decided to take the time to compose this tutorial.
Finally, through many hours of research and frustration, I came up with the answers I was so diligently seeking. Here are my findings:
The following Tutorial is for an INITIAL COMMIT of your source to GITHUB. Once you accomplish sending the initial data over, sending only changes thereafter, is very similar, but doesn't require as many steps.
Prerequisites:
(1) Create an account on GITHUB.com
(2) Download the Android Source into a working directory (in my case "android").
(3) Generate your Private SSH Keys for GITHUB (this will allow you to push files without logging in every time) You will find easy to understand directions HERE
For this example I will be working with the following variables:
My default Android directory: ~/android
For this tutorial I will editing the Setting.apk source code in order to add "XYZ" functionality
The source code for the Settings.apk is located in ~/android/packages/apps/Settings
So lets BEGIN!
First Step: You want to go into the directory where you are editing the source.
Code:
cd ~/android/packages/apps/Settings
Second Step: Initialize the Settings source folder and create a git repository
(which will track all changes)
Code:
git init
Third Step: Now you want to log-in to GITHUB and create a repository for your updated Settings source to go. In my case I created a folder on GUTHUB called android_packages_apps_Settings
Forth Step: After you have created your repository on GITHUB, from your Settings source folder, you need to tell git where to push the changes you have made. When you do the initial push, it is actually going to push all of the files in the Settings source folder including the changes you have made. Do this by typing the following command:
Code:
git remote add github [email protected]:yourusername/android_packages_apps_Settings.git
Obviously, you are going to change "yourusername" to whatever username you created on GITHUB.
Fifth Step: Add the entire Settings directory to git so that it starts tracking your additions, deletions, changes, etc for the entire directory.
Code:
git add -A
Sixth Step: Commit the changes that you made to the files in order to push to GITHUB. Now for this example, I want to commit changes to ALL files in the Settings folder.
Code:
git commit -a
If I wanted to just commit changes to one specific file, I would use "git commit whateverfile.java". After you commit, a text editor is going to pop-up. This is where you add the description for the change(s) you have made. If you have detailed change-log of each file you changed, you will not want to use the "git -a" command because the description you enter there is going to be the description for all of the files you edited.
Seventh Step: Now you want to change to the branch you plan on using to push your content. In my case its "jellybean".
Code:
git branch jellybean
Eighth Step: Finally you will now push your initial Settings commit to github. In order to do this, type:
Code:
git push github jellybean
This is going to push github ("github" is the name you gave the REMOTE when you executed the "git remote add" above) to a branch on GITHUB.com called "jellybean". You can name the branch whatever you like, but obviously naming it to the current Android release name is the easiest to remember for you and others.
You should now see that your computer sent files to GUTHUB.com and if you check online, you should see that your changes have been implemented and copied for the world to access.
I hope this helps people out with Android based git commands. I wish I found somthing like this months ago and maybe I would have a few extra hairs on my head. Let me know if you have any additional questions or would like me to add to this tutorial in any fashion. I will be doing a video shortly which I will post to this thread when complete.
Click to expand...
Click to collapse
Did you finish the video tutorial?
Sent from my LG-LS970 using Tapatalk 4 Beta
sooo?
Does anyone have further information on how you would sync back to a master? That is, if I sync from AOSP today, make my own changes, and then a few weeks from now I want to resync to an updated AOSP, how do I do this?

Create specific device tree for AOSP

I followed official Google`s tutorial to build my own AOSP and succeeded in all steps: I have "Pure AOSP version" running on nexus emulator.
The story is I have some rare device came with some Android version full of pre-installed app's obviously I don't want... So I want to port Pure AOSP to my device - Simple as that, without any improvements or new features (So for example I don`t want to know how to build CM git repo).
Is it working just add to my local above master branch correct files into /device/vendor/model and then under cwd of master branch execute $ . build/envsetup.sh ?
If so, what are the files and their content I need to put under /device/vendor/model ? I found a lot of guides how to pull already existing tree of CM or something else, and looking on some git repo's of several devices, I tried to figure out the minimum complete set of files & their content but I didn't find correlation. I think there must be the minimum complete set and there is programming reason for the existence of each file. And what I saw in existed git repo`s was this set + custom extras each developer added by his own reasons.
Aftermath How do I determine the Build name & Buildtype to exucte $ lunch <Build name>-<Buildtype > ?
How to integrate $ make otapackage in order to build the familiar one zip file to load via recovery like CWM?
Thanks,

Looking to create your own custom kernel? Start here!

INTRODUCTION
I create this guide in the hope to jump start development on our lovely Exynos devices.
I expect that before you start, you have a Linux installation in either a virtual machine or on a physical PC.
Debian Jessie, Kali Linux, Mint, or Ubuntu are excellent choices and what I'm familiar with, so if you get stuck it'll be easier for me to help you if you use these.
PREREQUISITES
WARNING: Custom kernels on the Note 7, S7, and S7 edge currently require encryption to be disabled in order to boot. They also have to disable some secure MobiCore firmware. You will have to format your entire data partition when going from stock kernel to a custom kernel! Once you're on a custom kernel with non-encrypted data, you shouldn't have to wipe it going to another custom kernel.
Be careful not to disable developer options or OEM unlock, otherwise all your data will be destroyed! Back up your data partition whenever you flash stock. (for upgrades, etc.)
First off, you'll want to download some tools necessary for building and downloading kernel sources:
git-core - you'll want git for downloading and maintaining your sources
build-essential - native gcc & tools for building (needed for build commands)
libncurses5-dev - needed to build menuconfig
diff - used to compare config changes
colordiff - used by diff to provide colorful human readable diff output
Code:
apt-get install git-core build-essential libncurses5-dev diff colordiff
PREPARING YOUR ENVIRONMENT
Once you've got that out of the way, you should create an organized environment for working. I like to use ~/build.
Code:
mkdir -p ~/build/toolchain ~/build/kernel
DOWNLOADING & INSTALLING A TOOLCHAIN
You'll want to download a toolchain for kernel building. I recommend using Linaro's optimized ARM toolchains.
The Exynos 8890 benefits from the Cortex-A53 code compiling optimizations.
GCC 4.9: https://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64-linux-gnu/
GCC 5.X: https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/
The actual file that you want ends in -x86_64_aarch64-linux-gnu.tar.xz (assuming you have a 64-bit Linux install, seriously, 32-bit needs to go! )
We'll use the GCC 5.3.1 2016.5 toolchain in this example.
Let's download and extract it now:
Code:
cd ~/build/toolchain
wget "https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz"
tar xf ./*linux-gnu.tar.xz
rm ./*linux-gnu.tar.xz
That's it for installing the toolchain, easy right?
DOWNLOADING THE KERNEL
Rather than download your kernel sources directly from Samsung full of wacky issues when you change a single configuration option, you can grab it from my GitHub!
Using this method, you have an already working stock kernel prepared to be modified and built at your leisure.
You're also able to grab updates and fixes from me should you want them. I'll be committing new kernel source updates from Samsung to the opensource branch.
The stock-6.0 branch will be rebased on top of opensource when that happens, then stock-6.0.y (stock, with Linux updates) will be rebased on top of that.
Cool concept, right?
First, you'll want to create a GitHub account if you don't have one already.
This will allow you to upload your changes and share your kernel with other interested users and developers.
Once you've got your account, and you're logged in, browse to:
https://github.com/jcadduono/android_kernel_samsung_universal8890
You want to fork the sources to your own account, to do this simply click the [Fork | ] button near the top right of the page:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now you've got your own copy of the Note 7 / S7 / S7 edge kernel sources on your GitHub!
The next step is to use git to download it to your PC.
Replace "your_username" with your actual GitHub username. Using [email protected] you can avoid being asked for your username each time you push new changes.
Code:
cd ~/build/kernel
git clone https://[email protected]/your_username/android_kernel_samsung_universal8890 samsung_universal8890
cd samsung_universal8890
The default branch is stock-6.0. This is what most users will want. If you wish to start on a kernel that is updated to the latest Linux minor version, then simply:
Code:
git checkout stock-6.0.y
There's a twrp-6.0 branch that's used for building the kernel inside the official TWRP for Note 7 / S7 / S7 edge.
There's also a nethunter-6.0 branch used to build the kernel used by Kali NetHunter on those devices.
You can use git log <branch> to view commits, and git cherry-pick <commit id> to copy commits from those branches into yours if you like.
CONFIGURING GIT
Before you start working on your kernel, you will need to set up your git profile.
The user values show up in commit messages to tell people who authored them.
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global push.default simple
YOUR FIRST COMMIT
We'll want to check out a new branch, and give it your own cool name. I suggest adding a -6.0 suffix to it because you'll probably want to start a new branch when Android 7.0 comes out.
We're going to use "coolname" as our example, so be sure to replace that with what you really want it to be called in the next steps.
Code:
git checkout -B coolname-6.0
Next we'll need to modify the build scripts to fit our setup.
Open build.sh, menuconfig.sh, and dtbgen.sh.
You'll want to set the TOOLCHAIN= path in all 3 scripts. If you're following this guide, then it's already correct!
In menuconfig.sh and build.sh, you'll want to set your default target config name.
See the line:
Code:
[ "$TARGET" ] || TARGET=samsung
You'll want it to look like this:
Code:
[ "$TARGET" ] || TARGET=coolname
Now you want to copy the default samsung kernel configuration so you have your own to work with:
Code:
cp arch/arm64/configs/samsung_defconfig arch/arm64/configs/coolname_defconfig
Now you'll have prepared your kernel source for starting work on your own custom kernel!
Let's turn that into a commit, but first look at the changes you've made using:
Code:
git diff
Does that look good? If not, fix what's broken before proceeding.
Next you'll want to add files that will be part of your commit.
For simplicity's sake, let's just add all of the changed files into the commit.
Code:
git add .
Now to make your commit:
Code:
git commit -m "My first commit, setting up my coolname kernel!"
You've done it!
CONFIGURING YOUR KERNEL
We'll use the menuconfig.sh script to launch the kernel menuconfig.
Code:
./menuconfig.sh
Change whatever options you're interested in, but don't change a lot all at once, otherwise when or if you run into issues, you won't know which option caused it.
Once you're done playing in the menuconfig, exit and save.
You'll be shown a colorful difference between your old configuration and your new one.
It will ask you if you want to save it, and you just have to type "y" and press enter for it to be saved.
At this point it's a good idea to make another commit to save your configuration changes.
If you need to edit the commit, you can easily use git commit --amend to fix it up.
BUILDING YOUR NEW KERNEL
Let's take your new config for a test drive.
To build your kernel, simply run:
Code:
./build.sh gracelte xx
gracelte = Note 7
herolte = S7
hero2lte = S7 edge
xx = International N930F & N930FD
kor = Korean N930K, N930L, & N930S
Yes, you can compile your kernel to all 3 of those devices using just your single config!
The power of device specific config additions.
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
build/modules/*.ko (if modules are enabled)
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
A TWRP flashable zip and sha1sum is created!
At this point, you will need to use the [Format Data] button in TWRP if your device is encrypted! There is no known way around this.
This will wipe all data from your phone, including your internal storage, essentially making it like new.
Transfer it to TWRP and flash away, you've just lost your custom kernel development virginity.
Go have a few beers to celebrate, or to drown your sorrows in the case of a boot loop.
You should consider taking a look at the patch.d scripts sometime so you know what it's actually doing.
PROBLEMS?
Post a reply here and I'll try to find a solution and add it to this post.
RESOURCES
Need a text editor for coding? I use gedit. It's pretty, light, and you can get some decent plugins for it.
It's a minimal editor, so don't expect anything really fancy. Configure it and enable plugins before you decide to trash it.
Code:
apt-get install gedit gedit-plugins
Here's an awesome git starter guide: http://rogerdudler.github.io/git-guide/
THANKS
If not for @Tkkg1994 finding out what changes are needed to get custom kernels up and running, we wouldn't have this lovely guide here!
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Ather said:
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Click to expand...
Click to collapse
Sorry, I forgot to add to the guide that custom kernels don't support encryption. You should flash your stock kernel & supersu, install something like titanium backup, and back up all your things to an external SDcard.
I've added a warning in the thread and included it in the instructions now.
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Ather said:
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Click to expand...
Click to collapse
Are you still encrypted?
Maybe it's just one of the secure mobicore firmware that were removed that your lock screen depended on. You might be able to set up the lock screen again now, and this time it won't require that specific piece of firmware.
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
Oh, I'm not sure why that happened then. There shouldn't have been anything extra removed on top of what HydraKernel removes.
My device is working with both Iris and Fingerprint unlock right now.
Can you post the output of:
Code:
ls /system/app/mcRegistry
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Ather said:
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Click to expand...
Click to collapse
try backing up your system/data to !!external sdcard!! in twrp, saving your internal storage to pc, then formatting data.
restore your stock kernel and system before flashing your custom kernel.
then see if it works from scratch.
if it's all fine, try restoring your data backup.
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Tkkg1994 said:
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Click to expand...
Click to collapse
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
jcadduono said:
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
Click to expand...
Click to collapse
Hello @jcadduono,
I am one of your "orphan" users of Idlekernel. It is the very best kernel for the Note 3.
Would you produce a blind update of it, please, please.
I would be more than happy to test it before you upload to general public.
Sorry guys for the OT.
Need help for finalisation kernel
Hello and thank you OP for the tutorial, I have done everything and no worries except when I want to flash the kernel does not boot, then I would like to know how to get a boot.img with the dtb.img files and the image create after Compilation, if someone can help I will be grateful
Thank you
Help on Kernel modules and patches
{MY QUESTIONS ARE ABOUT BOLD ITEMS BELOW}
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
[B]build/modules/*.ko (if modules are enabled)[/B]
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
Got a few question for anyone that is familiar with the exynos8890-gracelte BUILD. This in regards to files output after compilation of kernel code; specifically with editing patches and providing module support.
Where are the *.ko files located if default output is used(using your ./build.sh gracelte xx)? By the way...Your tutorial is awesome, first and foremost...but I want to be sure that I am pulling the files from the correct location (being a newbie at this android kernel building stuff). I found my modules under "~/build/kernel/samsung_universal8890/build/lib/modules/3.18.14-dee-gracelte-xx-0.1" which is the parent folder to other folders/files that seem to be of interest. After digging deeper there are even folders within the previously mentioned (named) one that have items of question as to whether they are needed in my "flasher" module folder. Such as pictured https://drive.google.com/open?id=0B-3GHX6_T7lYRkRUUVVORE1OM1k
I just want to have a functioning kernel with module support/modules in there proper place. Another item is patches. Would it be possible to just change "070-kernel-settings" patch to "io_scheduler=noop" if I changed default setting to such? If so, what other, if any, items in this file would need editing? Where else can I find patch files located on the web or is this something home-brewed? Thanks for all your hard work.
I also assume that by changing to the proper package manager commands, this procedure will work for pretty much most Linux distros.
Windows 10 Support Number

Categories

Resources