[KERNEL] Nexus 9 5.0.1 Stock Kernel with 2Amp Charging - Nexus 9 Android Development

Disclaimer: Im not responsible for any damage done to your device if you flash this kernel.
Nexus 9 5.0.1 Stock Kernel with 2Amp charging modification
http://www38.zippyshare.com/v/52487126/file.html
compiled from source. edited the current limits based on FIK kernel. thanks to USBHost.
https://github.com/USBhost/FIK/commit/62aa76b7e1c6e68abdcc723e7a2aabfd398cf9e4
I'm still trying to figure out how to change the kernel version name. But this is a working kernel. I'm using it on my device. The highest charging current i have achieved is 1.9amps and charges my N9 from 5% to 100% in 3.5 hours using an Apple Charger.
Feedback is appreciated.

heres a screenshot of 3c toolbox battery status

Will this be good for LTE model or just wifi

I'm not sure if the kernel for lte is the same. I only have the non lte nexus9

Seems to work just fine on my LTE version. Verified the data connection still comes up and works for me.

jonahmt21 said:
I'm still trying to figure out how to change the kernel version name.
Click to expand...
Click to collapse
You will need to edit your defconfig for that
make "your defconfig"
make menuconfig
select the first option
select the second option :: if I remember correctly
Then type what you want
Then exit and save

Can you make this as flashasble zip please

How flash this kernel? On fastboot or can use flashify?

I used flashify and it worked great. No need for a flashable zip.

fastboot install using the nexus root toolkit.

I should of known... If you removed encryption, install this kernel, your device will encrypt itself... Dag nab it..

USBhost said:
You will need to edit your defconfig for that
make "your defconfig"
make menuconfig
select the first option
select the second option :: if I remember correctly
Then type what you want
Then exit and save
Click to expand...
Click to collapse
Actually, isn't that easier to just open the Makefile at the kernel dir? "kernel/htc/flounder/Makefile"
Code:
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 40
EXTRAVERSION = [COLOR=Green][I]ENTER HERE FREE SPACE[/I][/COLOR]
NAME = [COLOR=DarkRed]TOSSUG Baby Fish [COLOR=Green]<--Or just change the given name here[/COLOR][/COLOR]
The first blank space option prob better.
I know I am a million years late here but I don't know how many old old threads I've had to read to get stuff. So good deal. I'm still trying to get the Camera working on DirtyUnicorns on flounder. haha
I think I must have a problem with my setup cuz I am getting weird compile errors when I try to build the kernel, inline or not....Like the stupid -mlittle_endian crap. MAN! gcc or PATH issues? hmm

wantowan2 said:
Actually, isn't that easier to just open the Makefile at the kernel dir? "kernel/htc/flounder/Makefile"
Code:
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 40
EXTRAVERSION = [COLOR=Green][I]ENTER HERE FREE SPACE[/I][/COLOR]
NAME = [COLOR=DarkRed]TOSSUG Baby Fish [COLOR=Green]<--Or just change the given name here[/COLOR][/COLOR]
The first blank space option prob better.
I know I am a million years late here but I don't know how many old old threads I've had to read to get stuff. So good deal. I'm still trying to get the Camera working on DirtyUnicorns on flounder. haha
I think I must have a problem with my setup cuz I am getting weird compile errors when I try to build the kernel, inline or not....Like the stupid -mlittle_endian crap. MAN! gcc or PATH issues? hmm
Click to expand...
Click to collapse
True you can use EXTRAVERSION one
but the other one NAME it wont show in the kernel version

Could someone compile a version of this kernel with encryption disabled?

siraltus said:
Could someone compile a version of this kernel with encryption disabled?
Click to expand...
Click to collapse
You just need to edit the ramdisk
No need to recompile

All links are dead
Sent from my SM-N920C using XDA-Developers mobile app

Related

[KERNEL] [GPL] [4.4] FuguMod kernel for nexus 5 (secure)

FuguMod is a secure, open, reliable and no nonsense kernel
This is probably the only custom kernel for the Nexus 5 which adds security instead of removing it.
Current features are:
- compiled with linaro gcc4.7.4
- various small fixes
You can download the kernels at:
http://fugumod.org/nexus5
Source and changelog can be found here:
https://github.com/renaudallard/nexus5_kernel
IRC channel:
irc.freenode.net #fugumod
Flashing
Kernel zips are intended to be flashed with CWM ot TWRP, if you want to flash using fastboot, you need to unpack the zip and flash the boot.img which is inside
Versions
Kernels are based on the below version scheme
kernel_FuguMod_20131104_r1-4.4.img
20131104 is the date it has been packaged
r1 is the release number
4.4 is the ROM it is compatible with
Stable vs Testing
There are sometimes kernels in testing folder. These may be very stable or may not boot at all. Be sure to have an USB cable and fastboot under the hand if you try one of these. That said, in general, if they stay into testing folder for more than 15 min, they should at least boot and work more or less. I tend to remove non booting kernels from testing folder in less than 10 min (depending a little bit on the speed testers take them), and so if you see them one hour later, you should assume they are safe enough to flash.
So, in general Stable is the safest bet, but Testing may be the best. I, myself, generally run testing one.
Deprecated folder
In general, unless you really know what you are doing, you should avoid flashing those, they are mainly there for historical reasons.
Check for vulnerabilities
http://www.xray.io
Compatibility with hackish style apps
All apps which require direct memory write, access to symbols or memory offsets or modules will NOT work. And, no, don't ask they won't be supported in the future. Example: Arararagi's light is only provided as a module and will not be supported unless he produces a patch.
Security
If you want good security when your phone is stolen, in addition to encryption, don't forget to turn debugging off. Also, use enpasschanger to change your encryption password, any short PIN encryption can be cracked in a few minutes easily (for example, using my script at http://pastebin.com/Mdu06RZN)
Redistribution
As per GPL, you are authorized to redistribute this kernel with any of your custom ROMs provided you give out the source code like I do. You can link to my github in your distribution site.
However, if you modify the kernel yourself, whatever the modification is (compiling it yourself with a different compiler is a modification), you are not authorized to name it FuguMod, although you can credit me and tell the base comes from FuguMod but you cannot call the kernel itself FuguMod.
XDA:DevDB Information
FuguMod, a Kernel for the Google Nexus 5
Contributors
renaud, http://forum.xda-developers.com/member.php?u=2859799
Kernel Special Features: Open, stable, reliable and secure
Version Information
Status: Testing
Created 2013-11-04
Last Updated 2014-01-29
Glad to see you here renaud. I loved your Galaxy Nexus kernels.
First test version is now available
If anyone can confirm it was flashed correctly and boots, that would be great.
I'll test it right after the postman makes me happy
Haeretik said:
I'll test it right after the postman makes me happy
Click to expand...
Click to collapse
Just got a confirmation that mine will come tomorrow
flashed kernel_FuguMod_20131104_r1-4.4.zip and it reboots to bootloader.
Hello @renaud.
It's really nice to find a lot of people coming from Galaxy Nexus to the Nexus 5. As the Galaxy Nexus is an oldie (yes, two years), there are less and less threads supported. I hope, you will still support the Galaxy Nexus - but also the Nexus 5, of course. Good to have you in here! :laugh:
proxuser said:
flashed kernel_FuguMod_20131104_r1-4.4.zip and it reboots to bootloader.
Click to expand...
Click to collapse
When flashing or when booting?
renaud said:
When flashing or when booting?
Click to expand...
Click to collapse
after booting, i flashed it via bootloader.
proxuser said:
after booting, i flashed it via bootloader.
Click to expand...
Click to collapse
I suppose you meant you flashed with fastboot.
Whatever, till how far does it go?
I am wondering, did you unpack the zip and flashed boot.img through fastboot, or did you flash the whole zip through fastboot??
I'm glad you got the new nexus because I've been waiting for your kernels for awhile now.
Sent from my Nexus 4 using Tapatalk
tried out your kernel, alot of nice features but stock seemed to run faster. cant wait to see what the community has to offer over the next couple of months. pushing the phone to its limits / extending battery life.
dandwhelan said:
tried out your kernel, alot of nice features but stock seemed to run faster. cant wait to see what the community has to offer over the next couple of months. pushing the phone to its limits / extending battery life.
Click to expand...
Click to collapse
Thank you for confirming that it boots. Currently it has no features except being smaller than the stock one. I was waiting for the boot confirmation before developing.
Nice to see you again Renaud. Glad to be owning a device you're deving on again.
I have now received my N5. Real stuff will begin.
OK, thanks for some reporting as booting, but in fact it does not because my img doesn't support dtb yet.
Glad you got the phone and now hopefully fugukernel updater will work for this phone.
Sent from my Nexus 5 using Tapatalk
unforgivenmercy said:
Glad you got the phone and now hopefully fugukernel updater will work for this phone.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I was not doing it myself, but I guess I can ask for the code to not have to rewrite everything by myself
r3 is out.
It boots and is compiled with linaro GCC 4.8
Further optimizations are on the road.
Whats with colour calibration?
Sent from my Nexus 5 using xda app-developers app

[EXPLOIT][HOW-TO] BypassLKM: bypass module signature verification on TW 4.3

I got this idea after reading about CVE-2013-6282 and seeing the source for it.
As we all know, anyone with MF3+ bootloaders on ATT/VZW cannot load custom kernels/recoveries. Hashcode saved the day with Safestrap, which allowed users to run custom ROMs using stock, signed boot.imgs (initramfs/kernel). Unfortunately booting a custom kernel is still not possible due to BL restrictions.
With this latest root exploit, it is possible to overwrite kernel memory and thus remove some of the restrictions of the stock kernel. Most important is the ability to insert kernel modules not signed by Samsung, specifically kexec. This module can allow one to load any custom kernel regardless of BL restrictions. Before you ask, I have never compiled nor worked with kexec!
I'm going to go over the process just for completeness, you can skip this section if you want. It's mostly for devs:
With 4.3, when you insert one of the included modules (ie, /system/lib/modules), you will see the following in dmesg:
Code:
<4>[ 2003.009063] TIMA: lkmauth--launch the tzapp to check kernel module; module len is 3224
<4>[ 2003.009124] TIMA: lkmauth -- hdr before kreq is : e3003000
<4>[ 2003.009155] TIMA: lkmauth--send cmd (tima_lkm) cmdlen(304:320), rsplen(264:320) id 0x00050000, req (0xE511C000), rsp(0xE511C140), module_start_addr(0xE3003000) module_len 3224
<4>[ 2003.012237] TIMA: lkmauth--verification succeeded.
Though I'm not intimately familiar with the workings of lkmauth, it's obvious it's querying the trustzone (TZ) to verify the module. If we now change one insignificant byte in the module, you get:
Code:
<4>[ 2301.298980] TIMA: lkmauth--launch the tzapp to check kernel module; module len is 3224
<4>[ 2301.299011] TIMA: lkmauth -- hdr before kreq is : e300c000
<4>[ 2301.299041] TIMA: lkmauth--send cmd (tima_lkm) cmdlen(304:320), rsplen(264:320) id 0x00050000, req (0xE511C000), rsp(0xE511C140), module_start_addr(0xE300C000) module_len 3224
<3>[ 2301.301391] TIMA: lkmauth--verification failed -1
<4>[ 2301.301544] TIMA: MSG=lkm_modified; result (TIMA_RESULT=MSG=lkm_modified;)
We can use these messages to narrow down the code in the kernel. I'm using ATT MK2 as the example here:
kernel/module.c
Code:
/* parse result */
if (krsp->ret == 0) {
pr_warn("TIMA: lkmauth--[B]verification succeeded[/B].\n");
ret = 0; /* ret should already be 0 before the assignment. */
} else {
pr_err("TIMA: lkmauth--[B]verification failed[/B] %d\n", krsp->ret);
ret = -1;
....
If we unpack boot.img, then decompress the zImage, we can find this code in the binary. Fire up IDA and set the base address to 0xC0008000. You should be able to resolve the above string reference to:
Code:
ROM:C00B9C20 44 11 98 E5 LDR R1, [R8,#0x144]
ROM:C00B9C24 00 00 51 E3 CMP R1, #0
[B][COLOR="Red"]ROM:C00B9C28 02 00 00 1A BNE loc_C00B9C38[/COLOR][/B]
ROM:C00B9C2C 54 01 9F E5 LDR R0, =a4TimaLkmauthVe ; "<4>TIMA: lkmauth--verification succeede"...
ROM:C00B9C30 CA 57 1D EB BL sub_C080FB60
ROM:C00B9C34 3C 00 00 EA B loc_C00B9D2C
That BNE is the target for our patch. So bypasslkm will basically overwrite that test with a NOP instruction thus forcing the authentication to succeed.
I tested inserting a modified stock module and one I compiled. Btw, if you wanna use the modules from the kernel source tree, be sure to add
-fno-pic to CFLAGS_MODULE in the Makefile.
-------------------------------------------------------------------------------------------------------------
Usage:
bypasslkm is run alone, and patches the kernel in memory. It does NOT make any changes to the filesystem, and a reboot will require re-executing the patch. Please note the patch will remain in memory until you run 'bypasslkm -r' OR reboot. THIS CAN LEAVE YOUR OS IN A VULNERABLE STATE TO MALWARE. Ideally, you would run the patch, insert your module, then run the patch with -r.
Typical usage:
adb push bypasslkm /data/local/tmp
cd /data/local/tmp
chmod 755 bypasslkm
./bypasslkm
insmod <modulename.ko>
./bypasslkm -r
Supported stock kernels: ATT MK2, VZW MK2, VZW MJ7
CREDITS
fi01 - awesome source for the CVE!
CUBE - getroot source!
djrbliss - thanks for the makefile =P
DOWNLOAD:
Get the latest from my git: https://github.com/jeboo/bypasslkm
Reserved!
Very nice work. Wish I had a MF3 device so I could try it.
Thank you @jeboo. I'll see what I can do with this
Sent from my XT926 using Tapatalk
Nice job man!
Sent from my SM-N900V using Tapatalk
Hashcode said:
Thank you @jeboo. I'll see what I can do with this
Sent from my XT926 using Tapatalk
Click to expand...
Click to collapse
it will help to crack the bootloader note 3?
This also works on the I545 with MI1 kernel...
This is directed at @Hashcode and @jeboo:
Guys, I just tried this on my I545 running the MI1 kernel, and it works. I am running Hyperdrive RLS 10.2 with the ATT compatibility pack (using AT&T service) -- but as you know, I am still stuck on the stock Verizon MI1 kernel. You should know that I flashed Hyperdrive over the stock ROM -- that's the only way (at the time) I could get it onto AT&T service here in the US.
My immediate question is how will this allow me to completely replace the stock kernel with something like the Infamous 4.6 OC kernel? I am just getting into this phase of development, so I am not as up on this as you guys are. I know every time I flash the Infamous kernel, the flash in SS seems to work -- but the phone always reboots to the stock 3.0.4 verizon kernel.
Of course, I had another thought, too -- I wonder if it is possible to use this to allow us to insert a module that does something similar to the Motorola Trust Zone unlock? Just another item for your consideration...
Here is a screen capture of me running bypasslkm:
=============================================
130|[email protected]:/data/local/tmp # ./bypasslkm
BypassLKM patch by Jeboo
usage: -r will restore kernel to original
Big thanks to fi01 & CUBE for their awesome CVE-2013-6282 exploit source!
ro.build.product=jflteatt
ro.build.displayid=JDQ39.I545VRUAME7
Patching kernel @ 0xC00B9C28: unsigned modules can now be inserted.
Done.
[email protected]:/data/local/tmp # ./bypasslkm -r
BypassLKM patch by Jeboo
usage: -r will restore kernel to original
Big thanks to fi01 & CUBE for their awesome CVE-2013-6282 exploit source!
ro.build.product=jflteatt
ro.build.displayid=JDQ39.I545VRUAME7
Patching kernel @ 0xC00B9C28: restoring original value.
Done.
[email protected]:/data/local/tmp #
I have an AMDL S4 so I'm already running AOSP ROM's, so I've never really paid attention to the problems which the newer S4's face.
Does the OP have a patch that allows the newer S4's to run AOSP now also?
Sorry if it's a stupid question.
Not quite yet...
CZ Eddie said:
I have an AMDL S4 so I'm already running AOSP ROM's, so I've never really paid attention to the problems which the newer S4's face.
Does the OP have a patch that allows the newer S4's to run AOSP now also?
Sorry if it's a stupid question.
Click to expand...
Click to collapse
Not quite yet -- but this is looking extremely promising!!
CZ Eddie said:
I have an AMDL S4 so I'm already running AOSP ROM's, so I've never really paid attention to the problems which the newer S4's face.
Does the OP have a patch that allows the newer S4's to run AOSP now also?
Sorry if it's a stupid question.
Click to expand...
Click to collapse
OP has an exploit that lets us load unsigned kernel modules. This means we can try to load up a kexec module, which would then load in a kernel over the stock one. So possibly, if it can be implemented.
budding_developer said:
This is directed at @Hashcode and @jeboo:
Guys, I just tried this on my I545 running the MI1 kernel, and it works. I am running Hyperdrive RLS 10.2 with the ATT compatibility pack (using AT&T service) -- but as you know, I am still stuck on the stock Verizon MI1 kernel. You should know that I flashed Hyperdrive over the stock ROM -- that's the only way (at the time) I could get it onto AT&T service here in the US.
My immediate question is how will this allow me to completely replace the stock kernel with something like the Infamous 4.6 OC kernel? I am just getting into this phase of development, so I am not as up on this as you guys are. I know every time I flash the Infamous kernel, the flash in SS seems to work -- but the phone always reboots to the stock 3.0.4 verizon kernel.
Of course, I had another thought, too -- I wonder if it is possible to use this to allow us to insert a module that does something similar to the Motorola Trust Zone unlock? Just another item for your consideration...
Click to expand...
Click to collapse
SS does not actually flash kernels, which is why it reboots to stock. The way this will allow you to run a different kernel is by loading in an unsigned kexec module and loading the new kernel over the stock one using that module. As for the Trust Zone unlock, someone with more real dev knowledge than me will have to look into that.
budding_developer said:
This is directed at @Hashcode and @jeboo:
Guys, I just tried this on my I545 running the MI1 kernel, and it works. I am running Hyperdrive RLS 10.2 with the ATT compatibility pack (using AT&T service) -- but as you know, I am still stuck on the stock Verizon MI1 kernel. You should know that I flashed Hyperdrive over the stock ROM -- that's the only way (at the time) I could get it onto AT&T service here in the US.
My immediate question is how will this allow me to completely replace the stock kernel with something like the Infamous 4.6 OC kernel? I am just getting into this phase of development, so I am not as up on this as you guys are. I know every time I flash the Infamous kernel, the flash in SS seems to work -- but the phone always reboots to the stock 3.0.4 verizon kernel.
Of course, I had another thought, too -- I wonder if it is possible to use this to allow us to insert a module that does something similar to the Motorola Trust Zone unlock? Just another item for your consideration...
Click to expand...
Click to collapse
Careful running this on unsupported kernels..I didn't add any sanity checking.
jeboo said:
Careful running this on unsupported kernels..I didn't add any sanity checking.
Click to expand...
Click to collapse
Didn't figure you did at this early stage... I am well equipped with everything I need to restore (short of JTAG, of course)... thanks for the warning, though!
I know it's early but are there any Modules handy for testing
SAFESTRAPPED ATT MK2 I337 S4
jball said:
I know it's early but are there any Modules handy for testing
SAFESTRAPPED ATT MK2 I337 S4
Click to expand...
Click to collapse
Too early, give it a week or so.. it's a long process being that no one is doing it full time...
Then again it's Christmas time, so maybe a few weeks..
tommydrum said:
Too early, give it a week or so.. it's a long process being that no one is doing it full time...
Then again it's Christmas time, so maybe a few weeks..
Click to expand...
Click to collapse
I've done some reading on it and trust me I do know it's not an easy thing for you and me.i don't put in development hours as I'm not a developer.i just want to Contribute anything I can even if it's just my phone.if you asked my wife I live and breath XDA .Thank you all for the Hard work your doing an awesome job
SAFESTRAPPED ATT MK2 I337 S4
jball said:
I've done some reading on it and trust me I do know it's not an easy thing for you and me.i don't put in development hours as I'm not a developer.i just want to Contribute anything I can even if it's just my phone.if you asked my wife I live and breath XDA .Thank you all for the Hard work your doing an awesome job
SAFESTRAPPED ATT MK2 I337 S4
Click to expand...
Click to collapse
I'd be willing to contribute my phone too .. even more since there's work around to odin bricked phone back on mk2
tommydrum said:
I'd be willing to contribute my phone too .. even more since there's work around to odin bricked phone back on mk2
Click to expand...
Click to collapse
What work around are you refering too? I thought there was no way to odin to MK2.
Sent from my GT-I9505 using XDA Premium 4 mobile app
cerobles1 said:
What work around are you refering too? I thought there was no way to odin to MK2.
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Let's not clutter this thread.Look it up please
i don't mean to be a noob but will this work on mf3?
Ask in another thread please..and we don't know, but there's a good chance yes..
Again..please only developers post on this thread!! Keep it clean!!

We need one real update...

Hallo i watch all this roms... They are all 4.2.2. In the sort time adroid L its out... And i have the big question when we have one real update ??? I have this phone 9 months until now i live in eu
gkm8123 said:
Hallo i watch all this roms... They are all 4.2.2. In the sort time adroid L its out... And i have the big question when we have one real update ??? I have this phone 9 months until now i live in eu
Click to expand...
Click to collapse
100% agree but unfortunately duo to mate 2 is out they have no plan to update mate1 to 4.3 or 4.4:crying:
i really think ham is good phablet and deserve better support from manufacturer.
mazi_v said:
100% agree but unfortunately duo to mate 2 is out they have no plan to update mate1 to 4.3 or 4.4:crying:
i really think ham is good phablet and deserve better support from manufacturer.
Click to expand...
Click to collapse
This kind of support let me turn away from Huawei. A pitty. But i want decent support. A phone schould get 2 year regular updates. Thats wat a customer deserves
Well you'll have to dive deeply into it to do the job of building a custom Android ROM. I just downloaded the kernel sources from the official JB (4.1) release, but I'm not sure how far I can get with that. Some experienced devs here posted that they would need Huawei's sources for KitKat to build a KitKat ROM, but I also have an Ascend P1 and I'm running a custom KitKat CyanogenMod build from the forums here although Huawei only released ICS (4.0) Kernel sources. I will have a try with a custom cross compiling toolchain of mine that I use for my Radxa Rock, but it's quite generic. I'll let you know how far I could get if at all.
Cheers!
The kernel build was successful, but I've simply used Google's latest toolchain (arm-linux-androideabi-4.6-android-4.4.4_r1). I'm now syncing the most recent Android repo, that will take some time. I will try to set everything up to start compiling tomorrow morning or something...
Just in case you want to build the kernel yourself as well: There is an indentation issue in one of Huawei's Makefiles for the touchscreen, you'll see an error message about it if you run the first make according to the README_kernel.txt. You can just add tabs and your file should look like this:
[drivers/huawei/device/touchscreen_Mate/Makefile]
Code:
[COLOR="DarkOrange"]#
# Makefile for the touchscreen drivers.
#
# Each configuration option enables a list of files.
obj-y += synaptics_i2c_rmi.o
obj-y += rmi_dev_6.o
obj-y += rmi_f54_6.o
obj-y += rmi_fw_update_6.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean[/COLOR]
CyReVolt said:
The kernel build was successful, but I've simply used Google's latest toolchain (arm-linux-androideabi-4.6-android-4.4.4_r1). I'm now syncing the most recent Android repo, that will take some time. I will try to set everything up to start compiling tomorrow morning or something...
Just in case you want to build the kernel yourself as well: There is an indentation issue in one of Huawei's Makefiles for the touchscreen, you'll see an error message about it if you run the first make according to the README_kernel.txt. You can just add tabs and your file should look like this:
[drivers/huawei/device/touchscreen_Mate/Makefile]
Code:
[COLOR="DarkOrange"]#
# Makefile for the touchscreen drivers.
#
# Each configuration option enables a list of files.
obj-y += synaptics_i2c_rmi.o
obj-y += rmi_dev_6.o
obj-y += rmi_f54_6.o
obj-y += rmi_fw_update_6.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean[/COLOR]
Click to expand...
Click to collapse
A kitkat kernel that would make you in my opinion almost immortal for Mate users
henk_j said:
A kitkat kernel that would make you in my opinion almost immortal for Mate users
Click to expand...
Click to collapse
We'll see, I'm still learning about the stuff, but the chances look quite fair. I've set up the rest of the environment and the build is running now. But I guess it will take some more hours. I usually need about 3.5 hours to build chrome, firefox or libreoffice. AOSP should be similar. I'll see how far it got today evening/night. But for now it looks good, I'm running with -j4 as recommended. ^^
CyReVolt said:
We'll see, I'm still learning about the stuff, but the chances look quite fair. I've set up the rest of the environment and the build is running now. But I guess it will take some more hours. I usually need about 3.5 hours to build chrome, firefox or libreoffice. AOSP should be similar. I'll see how far it got today evening/night. But for now it looks good, I'm running with -j4 as recommended. ^^
Click to expand...
Click to collapse
if you have more cores processor why dont increase the thread value so that build process will complete more quickly
svvv said:
if you have more cores processor why dont increase the thread value so that build process will complete more quickly
Click to expand...
Click to collapse
I have 2 cores, so 4 is quite fine. The next option would have been 16.
Take your time! we need more developers
Any news ?
Really appreciate the works here.
so many had forgotten Mate 1 and P6 since 2 & 7 came out...
For me the first editions are always the best although the the 2nd might have little differences or improvements (but always have flaws or bugs more than the 1st editions)..
so very much grateful and thanks for devs that spent their time looking at mate 1 and p6...
Will donate if theres any need for it..count on me for that..
[email protected]
gkm8123 said:
Any news ?
Click to expand...
Click to collapse
Come on, I'm writing every couple of hours...
Well, the news is: v8 failed in some point. I've just resynced the AOSP repo to start over. ^^ I'll let you know how it went today evening. I also have a job, you know.
CyReVolt said:
Come on, I'm writing every couple of hours...
Well, the news is: v8 failed in some point. I've just resynced the AOSP repo to start over. ^^ I'll let you know how it went today evening. I also have a job, you know.
Click to expand...
Click to collapse
Ok no problem, thank so much for your help
Well, the newer patches didn't resolve the issue so I decided to try the normal user build (I tried a full debug build first). For now it looks very promising. I'm not sure if I can figure out how to to fix the issue I had, so if this one fails at the same point (although as far as I understood it was one of the debug parts so it shouldn't), it might get a little harder. We'll see ^^
thank you mate.. i mean CyReVolt.
i hope ur doing ok with ur job also,, and really hope u give us a good news..
cumanisengdoang said:
thank you mate.. i mean CyReVolt.
i hope ur doing ok with ur job also,, and really hope u give us a good news..
Click to expand...
Click to collapse
Sure, np... actually, it failed again due to the same problem, and I quickly figured out the cause (I already had suspected that): I'm on a strongly hardened Linux system, and the
Code:
mksnapshot
tool was killed due to NX protection (see http://wiki.gentoo.org/wiki/Hardened/PaX_Quickstart#Understanding_PaX). So if you're running a PaX protected kernel or similar you might run into the same issue. Duh... -.-
It's up and running again, so let's wait for a result!
While waiting you can try the Android kernel I have attached. Don't ask me how to do that. I have no clue. This is just for fun. And for you!
Considering work: It was actually quite funny today because I had to work on a Mac and OSX feels just horrible to me. My boss asked me to take a glance at Xcode and especially the new beta and Swift. I'm so glad to be back at my Linux machine now.
CyReVolt said:
Well you'll have to dive deeply into it to do the job of building a custom Android ROM. I just downloaded the kernel sources from the official JB (4.1) release, but I'm not sure how far I can get with that. Some experienced devs here posted that they would need Huawei's sources for KitKat to build a KitKat ROM, but I also have an Ascend P1 and I'm running a custom KitKat CyanogenMod build from the forums here although Huawei only released ICS (4.0) Kernel sources. I will have a try with a custom cross compiling toolchain of mine that I use for my Radxa Rock, but it's quite generic. I'll let you know how far I could get if at all.
Cheers!
Click to expand...
Click to collapse
The main problem is not the kernel. We can build a kitkat rom with the 3.0.8 kernel , but we have no source for display part , audio part. We have to use the prebuilt hwcomposer , grallloc etc. . These prebuilt libs are compatible only with the android version of the stock rom they are coming from and with the kernel they are patched for.
With sources of display driver we can patch the kernel and the driver to work on KK . Like I did JB on ZTE V11,V71,V55 tablet with 2.6.35 kernel , but that device was QC based device with available display driver sources. (http://forum.xda-developers.com/showthread.php?t=1629630)
I have compiled a 4.3 rom for mate , but I am stuck at display. There are changed routines in framework which are not working with 4.2's display drivers . One solution can be to get these sources , or to change the framework to work with the 4.2' display driver.
The Mate is my first non QC chipset based device , but also the last too. This is my fourth device from Huawei and until now I was satisfied , they simply do not care Mate customers. The release of the KK for Mate is just a few hours job , but they wont do it.
joe.stone said:
The main problem is not the kernel. We can build a kitkat rom with the 3.0.8 kernel , but we have no source for display part , audio part. We have to use the prebuilt hwcomposer , grallloc etc. . These prebuilt libs are compatible only with the android version of the stock rom they are coming from and with the kernel they are patched for.
With sources of display driver we can patch the kernel and the driver to work on KK . Like I did JB on ZTE V11,V71,V55 tablet with 2.6.35 kernel , but that device was QC based device with available display driver sources. (http://forum.xda-developers.com/showthread.php?t=1629630)
I have compiled a 4.3 rom for mate , but I am stuck at display. There are changed routines in framework which are not working with 4.2's display drivers . One solution can be to get these sources , or to change the framework to work with the 4.2' display driver.
The Mate is my first non QC chipset based device , but also the last too. This is my fourth device from Huawei and until now I was satisfied , they simply do not care Mate customers. The release of the KK for Mate is just a few hours job , but they wont do it.
Click to expand...
Click to collapse
Thats why we have to get some sense into their heads thats trough they're Wallet. The only way tot make them do this strangely by hurting them where it counts.
Alright, I'm getting the point now... so I did some research.
The GPU is a Vivante GC4000, so might this help https://github.com/laanwj/etna_viv ?
I wouldn't mind the sound at first. I would love to work on this somehow.
Can you point out which files I should look at? I know a bit about the ARM/Thumb ISA, so I'd try to reverse engineer a little to either adjust the pre-built drivers or the framework using them. =) I don't give up very quickly, you know! Finally, I'd just contact Huawei and talk straight to them. Thanks in advance for all your efforts.
Cheers
CyReVolt

[DEV] AOSP-Based ROM Development Thread

Since joshuabg posted his build of AICP, countless other people decided they would continue his mission of bringing AOSP-based custom roms to this wonderful device
however in doing this people started stealing the AICP thread to talk about compile problems(i know im the biggest offender) so im fixing that.
Post all ROM development talk below so we can attempt to help each other and get the rom problems out of the way and finally get development for this amazing, game-changing, sexy slice android off the ground
Hey guys, if anyone is looking for how to build a rom for the nexus 9(and theyre forced to use a prebuilt kernel) i wrote up a tutorial on how to do that at the top of page 5:
http://forum.xda-developers.com/nex...evelopment-thread-t2995510/page5#post58089268
Based on my convo with Josh, he indicated that disabling SELinux in the prebuilt kernel (with help from USBHost) would assist in allowing the build to boot. However, I honestly do not want to disable SELinux AT ALL. I will find a way to make this work without disabling SELinux.
The issues I had with getting the AICP to boot without a Setup Wizard has stopped loop was 100% to blame on SELinux. ROM was disabled kernel was enforcing, and they didn't want to play nicely together. As soon as I used a kernel with SELinux disabled, it booted right up no problems. Should someone maybe ask flar2 with a mention in here to get his two cents?
SwoRNLeaDejZ said:
The issues I had with getting the AICP to boot without a Setup Wizard has stopped loop was 100% to blame on SELinux. ROM was disabled kernel was enforcing, and they didn't want to play nicely together. As soon as I used a kernel with SELinux disabled, it booted right up no problems. Should someone maybe ask flar2 with a mention in here to get his two cents?
Click to expand...
Click to collapse
i dont think thats right...i could be doing something wrong, but im fairly certain that when i compiled by build i set both the ROM and Kernel to SElinux disabled(or at least enforcing) and the kernel wouldnt even try to boot...
however, i do have to say that im not 100% certain how to disable SElinux in the ROM so i did what i thought would work, so maybe thats why mine doesnt boot...once i figure out compiling this kernel and either praise you or stand by my point
also i havent heard anything of flar2 since november 24th so idk what happened there
zawata said:
i dont think thats right...i could be doing something wrong, but im fairly certain that when i compiled by build i set both the ROM and Kernel to SElinux disabled(or at least enforcing) and the kernel wouldnt even try to boot...
however, i do have to say that im not 100% certain how to disable SElinux in the ROM so i did what i thought would work, so maybe thats why mine doesnt boot...once i figure out compiling this kernel and either praise you or stand by my point
also i havent heard anything of flar2 since november 24th so idk what happened there
Click to expand...
Click to collapse
You could very well be right. All I was speaking from was my experience of every kernel I tried using that didn't have SELinux disabled, the build wouldn't boot.
SwoRNLeaDejZ said:
You could very well be right. All I was speaking from was my experience of every kernel I tried using that didn't have SELinux disabled, the build wouldn't boot.
Click to expand...
Click to collapse
what do you mean by not boot? like exacty? because for me, a kernel not booting means stuck at the google splash screen
The ROM does not control selinux
Only the kernel controls it
Well guys, i finally got CM to build without breaking a few days ago but the kernel didnt work so i did a bunch of testing a research and i think ive concluded that theres something wrong with the build process that breaks the kernels, once i figure out what, we'll have the reliable build system that doesnt rely on prebuilt kernels
on a side note i figured out how to build AOSP with prebuilt kernels
SO we finally have a CM build that can stand on its own and run well(shockingly well, i havent found any problems) and it doesnt rely on USBhost's feature-rich kernel or his prebuilt one that no-one really understands...lol no offense intended usbhost, FIK is pretty damn good
@SwoRNLeaDejZ : selinux is currently disabled so im going to see what happens when i renable it @USBhost : is SElinux disabled the same thing as permisive? im guessing no and which one would be the best to set for a custom rom. im guessing permissive?
zawata said:
Well guys, i finally got CM to build without breaking a few days ago but the kernel didnt work so i did a bunch of testing a research and i think ive concluded that theres something wrong with the build process that breaks the kernels, once i figure out what, we'll have the reliable build system that doesnt rely on prebuilt kernels
on a side note i figured out how to build AOSP with prebuilt kernels
SO we finally have a CM build that can stand on its own and run well(shockingly well, i havent found any problems) and it doesnt rely on USBhost's feature-rich kernel or his prebuilt one that no-one really understands...lol no offense intended usbhost, FIK is pretty damn good
@SwoRNLeaDejZ : selinux is currently disabled so im going to see what happens when i renable it @USBhost : is SElinux disabled the same thing as permisive? im guessing no and which one would be the best to set for a custom rom. im guessing permissive?
Click to expand...
Click to collapse
I built a stock kernel that's so awesome that no one can comprehend or understand it
Haha aren't I awesome lol
About selinux if its disabled
It means it was not compiled with the kernel
so you can't simply enable it
I would recommend permissive on the kernel command line
So it would be easier to debug what is preventing stock kernel from not booting
Because you can see what would have selinux prevented from running
on /proc/kmsg or /dev/kmsg
USBhost said:
I built a stock kernel that's so awesome that no one can comprehend or understand it
Haha aren't I awesome lol
About selinux if its disabled
It means it was not compiled with the kernel
so you can't simply enable it
I would recommend permissive on the kernel command line
So it would be easier to debug what is preventing stock kernel from not booting
Because you can see what would have selinux prevented from running
on /proc/kmsg or /dev/kmsg
Click to expand...
Click to collapse
haha well no one could figure out how to use it(but i did I FIGURED YOU OUT!! YOUR A PHONY!!) jokes aside though
so setting permissive in the boardconfig.mk? :
BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive
then make menuconfig and re-enable the options you told me to disable in tha PM(i dont fee like typing them out lol)
zawata said:
haha well no one could figure out how to use it(but i did I FIGURED YOU OUT!! YOUR A PHONY!!) jokes aside though
so setting permissive in the boardconfig.mk? :
BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive
then make menuconfig and re-enable the options you told me to disable in tha PM(i dont fee like typing them out lol)
Click to expand...
Click to collapse
Yep that should do it
If not tell me
USBhost said:
Yep that should do it
If not tell me
Click to expand...
Click to collapse
currently building the boot image(btw im using your flashable zip as a base thanks )
will report back
EDIT: hmm nope it didnt seem to work, i think it might have been my fault ill tryt it again
USBhost said:
Yep that should do it
If not tell me
Click to expand...
Click to collapse
im not sure if its me being stupid or something else but i cant reenable SElinux
im thinking its because i dont know if im specifying the right config file...im not 100%
maybe you could just give me a kernel binary with selinux reenabled but not tonight, i should really get to sleep lol
zawata said:
im not sure if its me being stupid or something else but i cant reenable SElinux
im thinking its because i dont know if im specifying the right config file...im not 100%
maybe you could just give me a kernel binary with selinux reenabled but not tonight, i should really get to sleep lol
Click to expand...
Click to collapse
Lol will do
CM compiles fine for me with prebuilt kernel and a few minor source changes. I have a zip from 1/6/15 if anybody will like to test (I really don't feel like wiping right now lol)
Sent from my SCH-I545 using Tapatalk
joshuabg said:
CM compiles fine for me with prebuilt kernel and a few minor source changes. I have a zip from 1/6/15 if anybody will like to test (I really don't feel like wiping right now lol)
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
yeah what im trying to do now is get it to compile now straight from source(figure out why it wont) and also prepare the kernel for build teams to want to take it
i actually have CM(built on the 5th) and my kernel(no changes but selinux disabled(working on it)) running on my tablet right now and im shocked by how smooth it is! its amazing!
zawata said:
yeah what im trying to do now is get it to compile now straight from source(figure out why it wont) and also prepare the kernel for build teams to want to take it
i actually have CM(built on the 5th) and my kernel(no changes but selinux disabled(working on it)) running on my tablet right now and im shocked by how smooth it is! its amazing!
Click to expand...
Click to collapse
CM android_build currently does not support arm64 kernels
Sent from my SCH-I545 using Tapatalk
Just throwing this out there, but if anyone comes up with any type of test builds, or test kernels, that they need someone to flash and try out, let me know. Always more than willing to give some experimental builds a test drive.
joshuabg said:
CM android_build currently does not support arm64 kernels
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
Yeah I know, which is why I'm going to *hackily implement it*(until Steve finishes his implementation) or cherry pick his attempt and see if I can get it too work
I just got off work(I hate training!!!) And I'll see what I can do about it
I will not deny that anything the CM team will cook up, will be miles better than what I can make but I'm just trying to make it build for a single device, not all of the devices it a super efficient manner
Actually I think I might start some unnoficial nightlies for CM if people want, once I finish my build script then I shouldnt have very much difficulty making it each night
SwoRNLeaDejZ said:
Just throwing this out there, but if anyone comes up with any type of test builds, or test kernels, that they need someone to flash and try out, let me know. Always more than willing to give some experimental builds a test drive.
Click to expand...
Click to collapse
lol bold offer, you're so brave, unlucky for you though, this is a nexus device so if know it boots then we pretty much know everything works so the beta testing isnt as necessary as say on a samsung/htc/lg device,
however, ill see if i can find something i need testing
EDIT: device is now selinux status: permissive(apparently i still dont know how to build kernels...lol but i figured it out)
zawata said:
Yeah I know, which is why I'm going to *hackily implement it*(until Steve finishes his implementation) or cherry pick his attempt and see if I can get it too work
I just got off work(I hate training!!!) And I'll see what I can do about it
I will not deny that anything the CM team will cook up, will be miles better than what I can make but I'm just trying to make it build for a single device, not all of the devices it a super efficient manner
Actually I think I might start some unnoficial nightlies for CM if people want, once I finish my build script then I shouldnt have very much difficulty making it each night
lol bold offer, you're so brave, unlucky for you though, this is a nexus device so if know it boots then we pretty much know everything works so the beta testing isnt as necessary as say on a samsung/htc/lg device,
however, ill see if i can find something i need testing
EDIT: device is now selinux status: permissive(apparently i still dont know how to build kernels...lol but i figured it out)
Click to expand...
Click to collapse
Love the unofficial nightlies idea

Need help compiling sedikernel (or any kernel)

Hello,
In order to debug the bluetooth problem, I'm trying to compile a kernel for the Captivate Glide. I can't get it to boot properly.
@steadfasterX 's SediROM is the highest-version ROM I know of on which bluetooth works so I've got it installed (version 2.1.2) on the phone.
The steps I've taken so far:
1. I have sedikernel from https://github.com/steadfasterX/kernel_samsung_i927 at commit 088aa4109ad144c583f32da5ffba7bac200f0575
2. I copied /proc/config.gz from a running phone, which contains CONFIG_LOCALVERSION="-sediKERNEL-v1.0", ungzipped it and saved it as .config . Haven't changed anything in it yet.
3. I ran `make CROSS_COMPILE=arm-linux-gnueabihf- zImage` (also tried arm-none-eabi- (both from Debian Jessie) as well as ~/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- from the NDK)
4. I also made a TWRP backup of the boot partition, and used split_bootimg.pl from William Enck to split it into a kernel and initrd
5. I then ran mkbootimg with the initrd extracted in step 4 and the kernel obtained in step 3 in arch/arm/boot/zImage
6. Finally I flashed this new boot.img onto the phone with odin (Heimdall, specifically)
I see the white "SAMSUNG" logo (which is normal when booting) with a yellow-triangle with an exclamation mark in it. No further boot stage happens (no bootanim from sediROM). If I re-pack the original kernel with bootimg and flash that via odin, then after the next boot the yellow triangle changes into a blue one and sediROM boots correctly.
I'm a bit stuck at the moment, not sure what's going wrong there. Probably the kernel panics for some reason. Is there a way to read the kernel boot messages before android starts? Any help would be greatly appreciated.
Thanks!
Successful!
Thanks to a lot of help from @steadfasterX on IRC I finally managed to compile a working kernel
Here's a list of steps I had to follow in addition to https://github.com/steadfasterX/android_device_samsung_i927/blob/sediROM_CM-ICS/README.md :
1. as discussed on IRC, `repo sync` was not finding a branch. Needed to add
Code:
revision="refs/heads/ics-release"
in .repo/manifests/default.xml in the line with
Code:
CyanogenMod/android_vendor_qcom_opensource_v8
2. I removed the spurious comma in device/samsung/i927/cm.dependencies
3. In device/samsung/i927/, I changed vendorsetup.sh to point to vendorsetup.sh.nopatching rather than .patching (none of the patches could be applied)
4. lunch target was therefore the one with -eng, not -userdebug
5. I installed java 6 manually (didn't have sudo)
6. I installed schedtool
7. I adjusted the path to Java and my toolchain in build_sediROM.sh (taken from https://github.com/steadfasterX/android_buildtools )
8. I downgraded GNU make from 4.0 to 3.81
9. I installed linux-headers and created a symlink from /usr/include/asm-generic to /usr/include/asm
10. I changed the toolchain prefixes in device/samsung/i927/BoardConfig.mk to have 4.4.3 rather than 4.7
11. I built with
Code:
BUILDID=samsung/i927 LOKIFY=0 ../android_buildtools/build_sediROM.sh bootimage
12. I used the original ramdisk I had extracted from sediROM's boot image, rather than the one that was built (we discussed this on IRC too)
This got me a working kernel, yay
uukgoblin said:
Thanks to a lot of help from @steadfasterX on IRC I finally managed to compile a working kernel
Here's a list of steps I had to follow in addition to https://github.com/steadfasterX/android_device_samsung_i927/blob/sediROM_CM-ICS/README.md :
1. as discussed on IRC, `repo sync` was not finding a branch. Needed to add
Code:
revision="refs/heads/ics-release"
in .repo/manifests/default.xml in the line with
Code:
CyanogenMod/android_vendor_qcom_opensource_v8
2. I removed the spurious comma in device/samsung/i927/cm.dependencies
3. In device/samsung/i927/, I changed vendorsetup.sh to point to vendorsetup.sh.nopatching rather than .patching (none of the patches could be applied)
4. lunch target was therefore the one with -eng, not -userdebug
5. I installed java 6 manually (didn't have sudo)
6. I installed schedtool
7. I adjusted the path to Java and my toolchain in build_sediROM.sh (taken from https://github.com/steadfasterX/android_buildtools )
8. I downgraded GNU make from 4.0 to 3.81
9. I installed linux-headers and created a symlink from /usr/include/asm-generic to /usr/include/asm
10. I changed the toolchain prefixes in device/samsung/i927/BoardConfig.mk to have 4.4.3 rather than 4.7
11. I built with
Code:
BUILDID=samsung/i927 LOKIFY=0 ../android_buildtools/build_sediROM.sh bootimage
12. I used the original ramdisk I had extracted from sediROM's boot image, rather than the one that was built (we discussed this on IRC too)
This got me a working kernel, yay
Click to expand...
Click to collapse
its really long guide. You have to replace kernel modules, wifi wouldnt work without modules.
Imho best is compile kernel, modules, replace zImage + modules in this
file and flash from recovery. You dont need to compile whole android just the kernel, you dont need java and other special things, this method is much more faster.
bubor said:
its really long guide. You have to replace kernel modules, wifi wouldnt work without modules.
Imho best is compile kernel, modules, replace zImage + modules in this
file and flash from recovery. You dont need to compile whole android just the kernel, you dont need java and other special things, this method is much more faster.
Click to expand...
Click to collapse
You are right for the kernel but we discussed on IRC to build ram disk too then you need all that stuff but most important he wants to build CM too.
However I'm always a fan of making it right so building a ram disk is the correct way of creating a bootimage. But to start its ok replacing kernel and modules first.
.
Sent from my LG-H815 using XDA Labs
steadfasterX said:
Sent from my LG-H815 using XDA Labs
Click to expand...
Click to collapse
correct way is rebuild whole android, and reflash everything, wipe data/cache
You dont want to make new ramdisk without replace system. System and ramdisk bound together.
I hope you find something, and fix bluetooth or voip audio.
good luck
bubor said:
correct way is rebuild whole android, and reflash everything, wipe data/cache
You dont want to make new ramdisk without replace system. System and ramdisk bound together.
I hope you find something, and fix bluetooth or voip audio.
good luck
Click to expand...
Click to collapse
Well no and yes. I build kernels including ram disk without building system. This is not necessary as long both are compatible.
But you are right that booting fails when system and ram disk are not compatible so the correct way depends
However @uukgoblin I hope you get the fix you want :fingers-crossed:
Sent from my LG-H815 using XDA Labs
steadfasterX said:
Well no and yes. I build kernels including ram disk without building system. This is not necessary as long both are compatible.
But you are right that booting fails when system and ram disk are not compatible so the correct way depends
However @uukgoblin I hope you get the fix you want :fingers-crossed:
Sent from my LG-H815 using XDA Labs
Click to expand...
Click to collapse
would you tell me an example when kernel doesnt compatible with ramdisk but kernel does compatible with system?
bubor said:
would you tell me an example when kernel doesnt compatible with ramdisk but kernel does compatible with system?
Click to expand...
Click to collapse
No no my friend that's not what I said. :cyclops:
I meant if you have CM 9 as system you can build a boot image which includes kernel and a CM9 based ram disk without building cm9 system again. :laugh:
.
Sent from my LG-H815 using XDA Labs

Categories

Resources