[Q] Android Source building questions - Android Q&A, Help & Troubleshooting

Hey all
Recently, I have done some source builds but still have some question. Let me list them below:
How to change build number? - for example when I build AOKP it always says in build.prop that the build is: aokp_unofficial_*date*_etc. I would like to set it to for example maxrom_daily_*date*
Same with ROM zips names - I want them to generate automatically with every build
How to add packages to ROM? - for example I'd like to add CM Calc to my build (https://github.com/CyanogenMod/android_packages_apps_Calculator). How to do it? It won't be cherry-pick, so... Git clone command?
How to set ROM to build in custom DPI - I'd like every build to have my custom DPI in build.prop
Thanks for help in advance

Related

[DEVS][MOD] Adding SMS Tasks to native MMS.apk

hello fellow XDA-Developers alike, i have been neglecting the development of my app SMS Tasks, found in this thread:
http://forum.xda-developers.com/showthread.php?t=2354884
and i have not made a build for it in september so i decided to make it open-sourced for all to use in the native MMS.apk (CM 11.0/Android 4.4)
I POSTED IN ROM DEVELOPMENTS AS ITS FOR A ROMS NATIVE MMS.apk FROM ROM SOURCE i dont want any to think "wrong section" ok
i have made an easy commit to my friends rom Dirty Unicorns gerrit, and is free to use for cherry-picking to your native MMS.apk or as rom developers know it as android_packages_apps_MMS it works exactly the same as my app in the thread stated above, only a few un-needed features were removed, and a few things added/changed:
the changes were:
-made it all in one menu;
-checkbox to enable is in settings of MMS/Messaging
-a few String wording Changes
additions are:
- a how-to-use menu that syncs with everyones apps (DO NOT REMOVE/CHANGE PLEASE AS ITS NEEDED FOROTHERS TO KNOW HOW TO USE) its the only thing i dont want changed or removed, other then that feel free to change things but the SMS Tasks app/activity name
- few fixes for 4.4.* support (like data toggle being incompatible to all 4.4.* due to exploit being blocked)
- Few command changes/fixes
removals are:
-some commands
-ads menu;
-extra menu codes (obviously)
-unworking code+relaced with fresher working code
**NOTE**
this has only been tested on Dirty Unicorns 4.4.2 Rom, and is implemented/merged so it all works fine with it, but some changes might need to be made to work with earlier android versions
**/NOTE**
heres the gerrit listing, feel free to cherry-pick as i got permission earlier from @Mazda to use this gerrit post from Dirty Unicorns, even if i was the one to contribute it ( Joshua Kittle ) lol
http://gerrit.dirtyunicorns.com/#/c/2110/
Have fun, and stay dirty my friends =)

Help! Trying to port for Lg P710

Hello!
I am trying to port some Custom ROM to my Lg P710 (Lg L7 II). Since the bootloader got unlocked and now i have CWM i decided to start to port a custom rom. I read some tutorials and i understood the basics but how can i get the stock rom from Lg. I downloaded the Kdz file and tried to build from source but i am stuck here. I don't know what i shall do. When i build from source i get a really small output like e 30 MB output. Can someone help me clarify this please?
Lg Instructions for building android and kernel:
1. Android build
- Download original android source code ( Jelly Bean 4.1 ) from http://source.android.com
- Unzip opensource packages of P710(Optimus L7 II)_Android_JB_P710V10h_EUR.zip into downloaded android source directory
- And, merge the source into the android source code(Jelly Bean)
- Run following scripts to build android
a) source build/envsetup.sh
b) choosecombo
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
( add prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin to PATH )
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Unzip using following command at the android folder
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
- cd kernel
- export ARCH=arm
- export TARGET_PRODUCT=vee7e_open_eu
- export CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
- make vee7-rev_10_defconfig
- make zImage
3. After Build, You Can find the build image at arch/arm/boot.
christi9503 said:
Hello!
I am trying to port some Custom ROM to my Lg P710 (Lg L7 II). Since the bootloader got unlocked and now i have CWM i decided to start to port a custom rom. I read some tutorials and i understood the basics but how can i get the stock rom from Lg. I downloaded the Kdz file and tried to build from source but i am stuck here. I don't know what i shall do. When i build from source i get a really small output like e 30 MB output. Can someone help me clarify this please?
Lg Instructions for building android and kernel:
1. Android build
- Download original android source code ( Jelly Bean 4.1 ) from http://source.android.com
- Unzip opensource packages of P710(Optimus L7 II)_Android_JB_P710V10h_EUR.zip into downloaded android source directory
- And, merge the source into the android source code(Jelly Bean)
- Run following scripts to build android
a) source build/envsetup.sh
b) choosecombo
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
( add prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin to PATH )
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Unzip using following command at the android folder
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
- cd kernel
- export ARCH=arm
- export TARGET_PRODUCT=vee7e_open_eu
- export CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
- make vee7-rev_10_defconfig
- make zImage
3. After Build, You Can find the build image at arch/arm/boot.
Click to expand...
Click to collapse
Please help!
christi9503 said:
Hello!
I am trying to port some Custom ROM to my Lg P710 (Lg L7 II). Since the bootloader got unlocked and now i have CWM i decided to start to port a custom rom. I read some tutorials and i understood the basics but how can i get the stock rom from Lg. I downloaded the Kdz file and tried to build from source but i am stuck here. I don't know what i shall do. When i build from source i get a really small output like e 30 MB output. Can someone help me clarify this please?
Lg Instructions for building android and kernel:
1. Android build
- Download original android source code ( Jelly Bean 4.1 ) from http://source.android.com
- Unzip opensource packages of P710(Optimus L7 II)_Android_JB_P710V10h_EUR.zip into downloaded android source directory
- And, merge the source into the android source code(Jelly Bean)
- Run following scripts to build android
a) source build/envsetup.sh
b) choosecombo
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
( add prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin to PATH )
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Unzip using following command at the android folder
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
- cd kernel
- export ARCH=arm
- export TARGET_PRODUCT=vee7e_open_eu
- export CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
- make vee7-rev_10_defconfig
- make zImage
3. After Build, You Can find the build image at arch/arm/boot.
Click to expand...
Click to collapse
One question. You have the bootloader unlock? you as unlock the bootloader? Sorry for my bad English and greetings from Mexico.
Enviado desde mi LG-P714 mediante Tapatalk
neutrondev said:
Hello!
I am trying to port some Custom ROM to my Lg P710 (Lg L7 II). Since the bootloader got unlocked and now i have CWM i decided to start to port a custom rom. I read some tutorials and i understood the basics but how can i get the stock rom from Lg. I downloaded the Kdz file and tried to build from source but i am stuck here. I don't know what i shall do. When i build from source i get a really small output like e 30 MB output. Can someone help me clarify this please?
Lg Instructions for building android and kernel:
1. Android build
- Download original android source code ( Jelly Bean 4.1 ) from http://source.android.com
- Unzip opensource packages of P710(Optimus L7 II)_Android_JB_P710V10h_EUR.zip into downloaded android source directory
- And, merge the source into the android source code(Jelly Bean)
- Run following scripts to build android
a) source build/envsetup.sh
b) choosecombo
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
( add prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin to PATH )
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Unzip using following command at the android folder
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
- cd kernel
- export ARCH=arm
- export TARGET_PRODUCT=vee7e_open_eu
- export CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
- make vee7-rev_10_defconfig
- make zImage
3. After Build, You Can find the build image at arch/arm/boot.
Click to expand...
Click to collapse
Which Rom are u BUILDING?
All guides are here -> http://forum.xda-developers.com/showthread.php?t=2073370

[WIP] AOSP 7.1.1 (Nougat)

What's up guys, even though this Nexus 4 is 4 years old, (pun not intended XD) it's still holding up strong and in time for some Nougat treatment. [emoji14]
Note: Most of the components are working and I believe that it is enough for daily tasks. However, YOU see whether it fits your needs or not.
Working:
- Audio
- Wi-Fi
- Bluetooth
- RIL
- H/W Acceleration
- USB
- GPS
- NFC
- Sensors
Semi-Working:
- Camera (Video recording stutters sometimes with some apps)
Not Working:
How to Flash:
1. Download Zip
2. Flash zip
3. Flash GApps
4. Wipe Data (If coming from anything other than 7.0)
4. Flash SuperSU (Optionnal, Uses systemless as a root method)
5. Profit
Note: You will see Fc's all along the setup, just skip them if shown. Also if Google Play Services is crashing, grant it the location permission in the settings.
Download:
AOSP 7.0 download folder
Mirror
Quanta:
Quanta V19 Test
GApps:
OpenGApps
Banks GApps
SuperSU: SuperSU Stable
Sources:
Device Tree
Kernel Source
Changelog, other stuff
Code:
V10 (18/12/16):
- Updated to Android 7.1.1
- Patched kernel with the latest security fixes.
V9: (14/10/16)
- Video recording on Camera2 partially fixed (Video shakes sometimes)
- Fixed stack trace for native processes
- Updated to October's Security patches
- Misc fixes
V8: (18/09/16)
- Kernel patched accordingly to September security fixes (Patches all Quadrooter exploits up to now)
- Fixed Torch
V7: (11/09/16)
- Updated to September security fixes (For real this time)
- Enabled H/W encoding for video recording
- Re-enabled navigation bar tweaks and night mode in SystemUI
- Fixed Google Play Services FC's using OpenGApps (For real also)
- Add possibility to change WebView provider
V6: (09/09/16)
- Updated to September security patches
- Fixed freezing while watching YouTube
- Attempt to enable LTE
- Hidden misc battery drain as it causes some misinterpretations
V5: (05/09/16)
- Enabled Doze for real this time
- Reverted a change that may have broke Camera
V4: (02/09/16)
- Fixed H/W video decoding for the most part
- Kernel: SDCard FS enabled
- Attempt to fix permissions for GApps
- Enabled Navigation Bar tweaks and Night mode in SystemUI Tuner.
V3: (30/08/16)
- Fixed Sensors
- Semi-Fixed camera
- Fixed MPDecision
- Enabled Doze
- Used Flo's developper preview N GPU drivers
V2: (28/08/16)
- Fixed audio
- Fixed GPS
- Fixed data connectivity
- Disabled the power toggle widget which caused Settings to crash on every boot
V1 (26/08/16):
- Initial release
Here's a video showing how to install the ROM. (Thanks @Swapnil Soni)
Here's another one with a little overview of it. (Thanks @DaKoin)
Build instructions:
Since some of you guys asked me how to build from scratch, I will give a walkthrough of what I mostly did.
Note that this is in no way a walkthrough in how to compile (there are several guides for that on XDA) but more a guide
on how I did my setup so you can replicate the AOSP builds on your device.
Here's what I did:
1. Download the latest AOSP revision for android-7.1 which is r6 at the time of this writing (replace with whatever required branch necessary)
Code:
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-7.1.1_r6
repo sync
2. Download the kernel source used for the build:
Code:
git clone https://github.com/zaclimon/android_kernel_google_msm -b mako_nougat
3. Once both sources has been downloaded, compile the kernel. Note that AOSP do have a kernel toolchain that you can use to compile
Code:
export CROSS_COMPILE "/path/to/aosp/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-"
make mako_defconfig
make -j$(grep -c processor /proc/cpuinfo)
4. Copy the arch/arm/boot/zImage file to the Android source into device/lge/mako-kernel
Note: You must create the said directories if they don't exist. You also must rename the file to kernel after copy.
5. Go back to the AOSP source, and download/update/replace the following repositories for each component (relative path):
Code:
device/lge:
git clone https://github.com/zaclimon/android_device_lge_mako mako
hardware/qcom:
git clone https://github.com/zaclimon/android_hardware_qcom_audio audio
git clone https://github.com/zaclimon/android_hardware_qcom_display display
git clone https://github.com/zaclimon/android_hardware_qcom_gps gps
git clone https://github.com/zaclimon/android_hardware_qcom_media media
vendor:
git clone https://github.com/zaclimon/android_vendor_lge lge
6. Apply the following patches to each of their respective repositories:
Code:
bionic:
https://github.com/LineageOS/android_bionic/commit/81af26a3a033723fb34ddf280e33a9d4a6ce82c4.patch
frameworks/base:
https://gist.github.com/zaclimon/bb39d7f5059b63e3add3b5cad15e87db
https://android-review.googlesource.com/#/c/147266/
system/sepolicy:
https://github.com/LineageOS/android_system_sepolicy/commit/10dd0402ab62aa1a6416d7ea549a6a3eea1c6ae4.patch
7. Increase RAM usage for Jack (Only if you have 6/8GB of RAM in your system)
Code:
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
8. Once all the patches have been applied, we can now proceed to compile the system.
Code:
. build/envsetup.sh && lunch aosp_mako-userdebug
make -j$(grep -c processor /proc/cpuinfo) otapackage
9. The build should be in out/target/product/mako
10. Flash and enjoy!!
You're the king, buddy! ?
P.
[sntfrmnxs⁴]
first
oops, second
Thanks @zaclimon and BTW wiping data is needed?
Nitin
nitin.chobhe said:
first
Nitin
Click to expand...
Click to collapse
Ha ha ! Almost.
Sent from my Nexus 4 using Tapatalk
You're great!!
nitin.chobhe said:
first
oops, second
Thanks @zaclimon and BTW wiping data is needed?
Nitin
Click to expand...
Click to collapse
It's not necessary per se because it should boot fine. That said, as always, it's recommended to wipe so random issues are less prone to happen.
Merci infiniement !!!
Just downloaded, and works, I think we need to changes the permission so that google play service not crashing
Its people like you who make this world a better place, thank you very much!
zaclimon said:
It's not necessary per se because it should boot fine. That said, as always, it's recommended to wipe so random issues are less prone to happen.
Click to expand...
Click to collapse
Thanks man! One last question - I need N gapps for this, right?
Open gapps should be fine?
@cqloveqc what gapps did you use? And what permissions need to be modified?
Nitin
funthomasz said:
Its people like you who make this world a better place, thank you very much!
Click to expand...
Click to collapse
nitin.chobhe said:
Thanks man! One last question - I need N gapps for this, right?
Open gapps should be fine?
@cqloveqc what gapps did you use? And what permissions need to be modified?
Nitin
Click to expand...
Click to collapse
Please everybody read the note (I should make it bold so people can see it)
"Note:You will see Fc's all along the setup, just skip them if shown. Also if Google Play Services is crashing, grant it the location permission in the settings. I'm also surprised to say that even with your data not wiped, it's working."
I am coming from the fake Nexus Rom aka I do not have a custom bootloader yet. What bootloader is the best to go with?
Could someone write me a quick instruction how to get started with my situation. I bet there are a lot coming from fake nexus.
Thanks for the great work!!
wow! cool zaclimon, so quanta is now N compatible i guess? haha, gj, if i'll find any kind of fix for something, i'll pull request, and thanks alot!
aabuk said:
wow! cool zaclimon, so quanta is now N compatible i guess? haha, gj, if i'll find any kind of fix for something, i'll pull request, and thanks alot!
Click to expand...
Click to collapse
I compiled a stock kernel as I wanted to start off a fresh base if ever others wanted to use a custom kernel. (Including myself with Quanta) It is patched with Google's latest updates.
I could compile a build of Quanta and incorporate the patches required to boot Nougat but it wouldn't be fair lool.
zaclimon said:
Please everybody read the note (I should make it bold so people can see it)
"Note:You will see Fc's all along the setup, just skip them if shown. Also if Google Play Services is crashing, grant it the location permission in the settings. I'm also surprised to say that even with your data not wiped, it's working."
Click to expand...
Click to collapse
I'm using the open gapps 7.0 arm version, and after change the app permission, all is good so far
And another sergestion, can we change the original LCD density to 240 instead of the default 320 ?
This change make the desktop more attractive.
zaclimon said:
I compiled a stock kernel as I wanted to start off a fresh base if ever others wanted to use a custom kernel. (Including myself with Quanta) It is patched with Google's latest updates.
I could compile a build of Quanta and incorporate the patches required to boot Nougat but it wouldn't be fair lool.
Click to expand...
Click to collapse
hahaha, okie, atleast i got some space to look at dem kernelzz, thanks for echo
cqloveqc said:
I'm using the open gapps 7.0 arm version, and after change the app permission, all is good so far
And another sergestion, can we change the original LCD density to 240 instead of the default 320 ?
This change make the desktop more attractive.
Click to expand...
Click to collapse
This has been allowed always from build.prop, did you try that?
P.
[sntfrmnxs⁴]
Gu$houn* said:
This has been allowed always from build.prop, did you try that?
P.
[sntfrmnxs⁴]
Click to expand...
Click to collapse
Yes, I've tried that by using a es file manager, but if we can make the 240 default, we don't need to make change anymore
Damn I'm late to the party, downloading now !
And thanks a ton @zaclimon for keeping mako alive, you're the man !
@zaclimon nice work.. keep it clean please

[REFERENCE] [3.10.105] Stock kernel with upstream Linux patches - May 9th

Introduction
Hello all, I am bringing you this thread as a jumping off point to compiling kernels and working with upstream Linux. I will include a guide, some links, and some terms that will help you get started with modifying kernel source. This is also a good reference point for existing developers as I have consolidated all upstream patches into one repo. Let's get down into it!
What in the world is upstream Linux?
When an OEM sets up a device, they will pick a stable longterm branch from the Linux kernel to base their modifications around (drivers and such). In the case of Shamu, they picked 3.10.40. Currently, the Linux kernel's 3.10 is updated to 3.10.105, as you can see on kernel.org. This means that Google is "missing" versions 3.10.41 to 3.10.105. Now, why does this matter? Well, the way that the Linux kernel runs its stable branches, the only things that get merged into there are bug fixes and security updates. That's it, there are no wonky features or unstable patches. The only way you get a patch into a stable branch is by having it be in the mainline branch first. Some developers have an aversion to adding upstream because they claim it is excessive and not necessary and they are partially right since not all the patches that come in are relevant to our architecture (arm). However, upstream Linux is not unstable and by adding each version one at a time, you can verify this. Being up to date is good since you keep yourself protected from bugs and security issues that crop up. Google has been better about doing this lately with their monthly security updates but it never hurts to take matters into your own hands.
I suggest watching one of these talks given by Greg Kroah-Hartman, it is really interesting to see how the process goes:
https://www.youtube.com/watch?v=SPY0LyTU53w | https://www.youtube.com/watch?v=L2SED6sewRw
What did you do?
All I did was fetch the latest kernel.org patches from here and cherry pick them on top of the latest kernel source from Google.
I merge these patches by cherry-picking each version individually (3.10.40 to 3.10.41, 3.10.41 to 3.10.42, etc), that way I can verify that the kernel compiles fine and that there are no merge conflicts. Google will sometimes pick certain commits from upstream that are of a higher importance than others which can result in conflicts if you try to pick it again. Additionally, upstream might fix a bug one way and Google has done it another (which is not really good, Google should be pushing their fixes back to upstream so everything stays in sync).
What do I do with this?
I have created two repos below: one with the latest N security update branch with the latest upstream patches picked up on top of it (the shamu-upstream branch) and another one with a plain AnyKernel source for you to modify (shamu-stock is the most basic, shamu-decrypt contains an fstab file that will disable both forced encryption and dm-verity). You are free to fork these or base other branches on them, that's the whole point of this post. I have verified that all the patches contain no major detectable issues. I would like some credit if you do use it but it's not required since the kernel is licensed under GPL Another reason I offer this is I have seen a lot of developers picking in upstream in patch sets, so you get one single commit for an upstream version. This is detrimental as you start to add your own patches as you cannot fully tell what was modified and for what reason without the individual commits. It might look cleaner but you don't get full history which hurts you in the long run.
Links
Kernel source: https://github.com/nathanchance/shamu/tree/upstream-7.1.1
AnyKernel source: https://github.com/nathanchance/AnyKernel2/tree/shamu-stock-decrypt
Toolchain source: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/
How to compile
This will be a quick, step by step guide on how to compile this kernel from source. By using this process, you can start to make modifications to the kernel source and make a flashable zip.
Clone the kernel source, the AnyKernel source, and toolchain source
Code:
cd ~
mkdir Kernel && cd Kernel
git clone https://github.com/nathanchance/shamu.git source
git clone https://github.com/nathanchance/AnyKernel2.git anykernel
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 AOSP-4.8
Explanation:
First command: make sure you are in your home directory (or whatever directory you want to hold the kernel folder we are about to make.
Second command: make a Kernel folder and move into it
Third command: clone the kernel source from my repo into a folder named source
Fourth command: clone the AnyKernel source from my repo into a folder named anykernel
Fifth command: clone the Google 4.8 toolchain into a folder named AOSP-4.8
AnyKernel is the name of the zip we are going to make which allows the kernel to be flashed over any ROM.
A toolchain is a set of compiler tools that allow us to compile the kernel on any computer architecture.
Make sure you are on the correct branches
Code:
cd source && git checkout upstream-7.1.1
cd ../anykernel && git checkout shamu-stock-decrypt
Explanation:
First command: move into the source directory and checkout the branch "upstream-7.1.1", which is the necessary branch for this device.
Second command: move into the AnyKernel directory and checkout the branch "shamu-decrypt". If you don't want to disable forced encryption, use the "shamu-stock" branch.
Tell the compiler what you are are compiling
Code:
export CROSS_COMPILE=${HOME}/Kernel/AOSP-4.8/bin/arm-eabi-
export ARCH=arm && export SUBARCH=arm
make clean && make mrproper
make shamu_defconfig
Explanation:
First command: point the compiler to the location of your toolchain. If you have done anything different with the folder locations, you will need to modify the "${HOME}/Kernel/AOSP-4.8" part.
Second command: tell the compiler which architecture we are compiling for. In this case, our device is an arm device.
Third command: clean out any compiled files and remove our previous defconfig.
Fourth command: tell the compiler which options we want in the kernel using the shamu_defconfig.
A defconfig is a file that will tell the compiler which features we want in the kernel. No computer ever uses all of the options in the kernel since there are different drivers for various devices.
Make the kernel!
Code:
make -j$(nproc --all)
Explanation:
make tells the compiler to make the kernel (duh) and the -j$(nproc --all) tells the compiler to use the maximum number of cores your computer has available
Make the AnyKernel zip
Code:
cp -v arch/arm/boot/zImage-dtb ../anykernel
cd ../anykernel
zip -r9 stock-upstream.zip * -x README stock-upstream.zip
Explanation:
First command: copies the completed kernel (zImage-dtb) into the AnyKernel folder
Second command: moves us into the AnyKernel folder
Third command: makes the zip file (named stock-upstream.zip) in the AnyKernel folder.
If you ever want to do this again, run these commands and go straight to step 3:
Code:
cd source && git clean -fxd && git pull
cd anykernel && git clean -fxd && git pull
NOTE: This thread is aimed to be a breeding ground for kernel development, a place to jump off if you will. I am happy to answer how to questions about building kernels or flashing the one I have provided but this is not supposed to be a general Q&A thread. Please use another thread or create your own in Q&A if you need assistance.
Nice write up.
One suggestion though. Instead of using the current version as the branch name, you may want to just name them for the device, like "Shamu-Upstream" then tag the versions once you've gotten to the version commit. This will prevent you from having to update the thread for this command anytime that you pull in more upstream changes. It also makes it alot cleaner/easier if someone for whatever reason wanted to checkout a specific patch version as they could just checkout the tag rather than resetting back to the commit.
For lack of a better explanation, tags are sort of like sub-branches within a branch.
Very new to kernel building and AOSP in general. Followed the guide but I'm getting stuck when make mrproper is ran. Build stops and i get the error : unknown target 'mrproper' then the build fails. Any help?
The Flash said:
Another reason I offer this is I have seen a lot of developers picking in upstream in patch sets, so you get one single commit for an upstream version. This is detrimental as you start to add your own patches as you cannot fully tell what was modified and for what reason without the individual commits. It might look cleaner but you don't get full history which hurts you in the long run.
Click to expand...
Click to collapse
That's true. Some devs are lazy to commit each patch and bring up from 3.10.40 to 3.10.103 which comprises nearly 3000 patches.
neobuddy89 said:
That's true. Some devs are lazy to commit each patch and bring up from 3.10.40 to 3.10.103 which comprises nearly 3000 patches.
Click to expand...
Click to collapse
Exactly lol. It's also annoying for people looking at your source because if you had to fix anything, it is going to be lumped in with that enormous patch.
Root Wizard said:
Very new to kernel building and AOSP in general. Followed the guide but I'm getting stuck when make mrproper is ran. Build stops and i get the error : unknown target 'mrproper' then the build fails. Any help?
Click to expand...
Click to collapse
can I see a full terminal window/log showing you entering all the commands?
The Flash said:
can I see a full terminal window/log showing you entering all the commands?
Click to expand...
Click to collapse
Just logged off for the night. Will give a full report back tomorrow with pictures. Basically all the commands go good up to 'make mrproper' . 'make clean' runs fine but the 'make mrproper' goes through incuding all the aosp files for build, then ninja enters build directory, then the error 'unknown target 'mrproper' ' comes up, and the build fails.
Root Wizard said:
Just logged off for the night. Will give a full report back tomorrow with pictures. Basically all the commands go good up to 'make mrproper' . 'make clean' runs fine but the 'make mrproper' goes through incuding all the aosp files for build, then ninja enters build directory, then the error 'unknown target 'mrproper' ' comes up, and the build fails.
Click to expand...
Click to collapse
Oh you're building this into a ROM? Alright, that might make things different but yeah show me pictures tomorrow and I'll try to get you up and running.
The Flash said:
Oh you're building this into a ROM? Alright, that might make things different but yeah show me pictures tomorrow and I'll try to get you up and running.
Click to expand...
Click to collapse
Ah I guess I should have metioned that I was building an aosp rom. Thanks for your quick assistance. Will get back tomorrow.
If you're building into a rom, you just need to change the existing kernel source to this one in the xml for this device.
Yoinx said:
If you're building into a rom, you just need to change the existing kernel source to this one in the xml for this device.
Click to expand...
Click to collapse
Can you explain how to do this? First time building with aosp, not very familiar which xml file or what to change to apply the upstream patch.
Root Wizard said:
Can you explain how to do this? First time building with aosp, not very familiar which xml file or what to change to apply the upstream patch.
Click to expand...
Click to collapse
For shamu in aosp, the kernel is pulled with the main aosp source by that manifest. https://github.com/android/platform_manifest/blob/master/default.xml#L65
You world need to substitute this repo with the new one, and delete your existing kernel source. Then next time you sync the repo tool will pull it down.
On other roms it gets pulled in during the breakfast/brunch process. I can't remember exactly where that comes from, but I think that is in the vendor directory for the device, maybe.
How to modify rom manifests and such though is a little outside of this thread's topic. If you need more info I'd recommend opening a thread in the Q&A forum unless this is something that The flash wants to cover in this thread.
There are a few other caveats with doing it in the rom as well. The defconfig name would need to match what the rom build expects and you would need to go in and checkout the correct branch.
Yoinx said:
For shamu in aosp, the kernel is pulled with the main aosp source by that manifest. https://github.com/android/platform_manifest/blob/master/default.xml#L65
You world need to substitute this repo with the new one, and delete your existing kernel source. Then next time you sync the repo tool will pull it down.
On other roms it gets pulled in during the breakfast/brunch process. I can't remember exactly where that comes from, but I think that is in the vendor directory for the device, maybe.
How to modify rom manifests and such though is a little outside of this thread's topic. If you need more info I'd recommend opening a thread in the Q&A forum unless this is something that The flash wants to cover in this thread.
There are a few other caveats with doing it in the rom as well. The defconfig name would need to match what the rom build expects and you would need to go in and checkout the correct branch.
Click to expand...
Click to collapse
Ok, thanks for your help.
For those of you who have forked my kernel, you will need to revert this patch: https://github.com/nathanchance/and...mmit/0b17006c16bba286ecc9d7bacd75a3902a26835e
It causes issues with Wi-Fi and Chrome.
The Flash said:
For those of you who have forked my kernel, you will need to revert this patch: https://github.com/nathanchance/and...mmit/0b17006c16bba286ecc9d7bacd75a3902a26835e
It causes issues with Wi-Fi and Chrome.
Click to expand...
Click to collapse
It does? I have been using Chrome Beta (on wifi) since last night fine with that patch. Maybe its just a matter of time before things start failing. Thanks anyway, will keep a heads up.
Root Wizard said:
It does? I have been using Chrome Beta (on wifi) since last night fine with that patch. Maybe its just a matter of time before things start failing. Thanks anyway, will keep a heads up.
Click to expand...
Click to collapse
If you toggle Wi-Fi, start flipping through pages in Chrome, and toggle Wi-Fi again, it will reboot. Oddest issue I have ever dealt with.
Sent from my Nexus 6P using XDA Labs
The Flash said:
If you toggle Wi-Fi, start flipping through pages in Chrome, and toggle Wi-Fi again, it will reboot. Oddest issue I have ever dealt with.
Click to expand...
Click to collapse
Interesting, will look into this. I also have been getting reboots from searching forums in xda labs app. Logcat says a ton of "PowerHAL_touch_boost failed to send: Connection refused" before reboots. Is this what is happening to you?
Root Wizard said:
Interesting, will look into this. I also have been getting reboots from searching forums in xda labs app. Logcat says a ton of "PowerHAL_touch_boost failed to send: Connection refused" before reboots. Is this what is happening to you?
Click to expand...
Click to collapse
No I haven't had that happen but that error shouldn't cause reboots.
The Flash said:
No I haven't had that happen but that error shouldn't cause reboots.
Click to expand...
Click to collapse
Huh, odd
Github and the kernel in the OP are updated to 3.10.104.

Build apk request

Interested in the Android-VTS app, to test security of roms. I have an apk, but it's not up-to-date. Sources have been updated here - https://securityonline.info/android-vts-android-vulnerability-test-suite/ - but I'm not too familiar with building from source, and not set up for it atm. Anybody willing to do a build? Thanks

Categories

Resources