Showing posts with label kernel. Show all posts
Showing posts with label kernel. Show all posts

Wednesday, 21 December 2016

Elephone P9000 Kernel is OUT

Elephone P9000 Kernel is OUT


Enjoy! :laugh:

http://ift.tt/2a5aZ5b


from xda-developers http://ift.tt/2ahLwZo
via IFTTT

Available link for download

Read more »

Wednesday, 23 November 2016

Mavericks Lapic Kernel

Mavericks Lapic Kernel


Got a hold of the latest Mavericks 10.9 DP1 kernel yesterday to see if it could be patched with the same search and replace procedure that my Lapic Kernel Patcher applies. Turns out that Apple changed some things with this new OS which resulted in the offsets my program searches for to be off by one. Easy fix thats already been applied to my program. Also updated its release to version 0.5.

Heres where the lapic kernel panic occurs in the 10.9 kernel, and heres how my program patches it.


And heres the new byte sequences and their corresponding offsets. All numbers are hex values:
 Offset i: 65 8B 04 25 14 00 00 00 
Offset i + 1F: Call to kernel panic (5 bytes)
Offset i + 24: 65 8B 04 25 14 00 00 00
Hope this helps those experiencing a lapic kernel panic on Mavericks.

I already contacted gsly about these changes, so hell probably update the lapic kernel auto-patches in Clover soon.

Available link for download

Read more »

Sunday, 25 September 2016

Lapic Kernel Patcher

Lapic Kernel Patcher


A couple months ago I created a program that can patch Macs kernels to prevent the lapic kernel panic from occuring on hackintoshs. Heres the story of how I developed this patch.
 Local APIC Error, ESR: 64 " @/source/xnu/xnu_1504.15.2/osfmk/1386/lapic.c:704 
This is caused by HPs APIC table not being initialize the same way that occurs in Macs. A temporary solution to this is to boot with the cpus = 1 kernel flag. This limits your processor to only using part of its full potential though. A better way of fixing this issue, discovered by yehla2amer in 2010, was to recompile Apples kernel after adding this lapic write command to the part where the kernel initializes it:
 /* NMI: ummasked, off course */ 
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);
However, this fix is only possible after Apple release the source code to its kernels. Which usually takes 2 - 3 months after the update is available. If your curious, Apple releases its kernels source code here. In addition, kernels that are recompile lose the capabilities to sign in to FaceTime, iCloud, and other Apple software. Back in March, when Apples 10.8.3 update was released, I attempted to find a better solution that could be applied without this delay and that wouldnt have any negative side affects.

I started off by updating my hackintosh to 10.8.3. I noticed the immediate kernel panic the occurred was similar to the ones in all previous kernels. As a side note, my laptop also has Windows 8 installed with latest MacDrive software. MacDrive allows you to read/write to HFS/HFS+ partitions uses Windows native file explorer. So I booted up my computer into Windows and opened 10.8.3s kernel with IDA Pro. The disassembler will automatically recognize that this file is in a Mach-O format, so youll be asked which architecture of the kernel to disassemble. Since Apple dropped 32bit support in Mountain Lion, my only option is the 64bit part.


I searched through the strings until I found the one relating to the kernel panic. It ended up being at offset 0xFFFFFF0006A556A.

 
So I checked were it was being referenced from. It was only used in one place, which was the _lapic_interrupt subroutine. As you can see, it calls the kernel panic after loading the strings address into rdi. This CPU register is almost always used as the destination in stream operations.


 In order to prevent this kernel panic from happening, there are a few different things we can do. We can alter all the conditional jumps that lead to 0xFFFFFF800020BD814 so that they never jump there, or we can prevent the subroutine from calling the kernel panic by removing the call. I choose to the second option. So lets look at the hex view of this function to see what well actually be changing. The call to the kernel panic is done with this byte sequence E8 3C FD F5 FF, so lets replace all the bytes with the hex value for no operation, 90. The resulting process looks like this:


So now 0xFFFFFF800020BD814 looks like this:


After appling these changes with a hex editor to 10.8.3s mach_kernel file, I was now able to boot into Mountain Lion without any kernel panics. Since this modified the original kernel, I could still use FaceTime and iCloud without any problems. After posting my modified kernel online, a osx86.net user named sherlocks contacted me about applying this patch to the 10.7.5 kernel. This same fix, applied to both the 32bit and 64bit part of that kernel, resulted in the same success.

After that, we both decided to start working on a user-friendly way so that anyone could easily apply this patch. We also wanted it to be able to patch all previous and future kernels released by Apple. To accomplish this, I examined how the 10.8.3, 10.7.5, and a few other kernels called the lapic kernel panic in order to find a similarity between them. The byte pattern I found for the 64bit part was this. All numbers are hex values:
 If offset i: 65 8B 04 25 14 00 00 00 
And if offset i + 23: 65 8B 04 25 14 00 00 00
Then offset i + 1E: Call to kernel panic (5 bytes)
And the byte pattern for the 32bit part was:
 If offset i: 65 A1 0C 00 00 00 
And if offset i + 1E: 65 A1 0C 00 00 00
Then offset i + 19: Call to kernel panic (5 bytes)
So all we have to do is replace the 5 bytes at offset i + 1E for 64bit and i + 19 for 32bit with nops. This same pattern exists in all kernels released since at least 10.6.0. Ive never looked at any earlier than that. We assume it will stay the same for all future kernels. So we created a simple command line argument program that could apply this patch, but sherlocks recommended that we add a GUI to it. About a week later we released version 0.4 to the public. We named our program Lapic Kernel Patcher, and its available to download here.

?
About two weeks ago, another osx86.net user named gsly contacted me about adding my patch to Clovers kernel patcher feature. I thought that was a great idea, so I sent him what I had discovered. He was done a few days later, and revision 1731 of Clover has implemented his addition. Clover keeps their latest releases hosted here. To use it, simply add these lines to your config.plist:
 <key>KernelAndKextPatches</key> 
<dict>
<key>KernelLapic</key>
<true/>
...
</dict>
Im currently using Chameleon as my bootloader, so I havent been able to test it. Unfortunately Chameleon doesnt have as simple of a kernel patcher feature like Clover, so it would be difficult to implement it there.

Yesterday I was searching online to see if someone has tested my patches on Apples newest 10.8.4 kernel. I ran across an article on Yuan Lukitos blog where he has confirmed that my program successfully patches that kernel.

Wow, that was a long blog post. Hope you enjoyed it and learned something in the process.

Available link for download

Read more »

Wednesday, 14 September 2016

KERNEL CAF MIUI Blaze Kernel 1

KERNEL CAF MIUI Blaze Kernel 1




Code:

#include
/*
 * I am not responsible for bricked devices, dead SD cards, thermonuclear
 * war, or the current economic crisis caused by you following these
 * directions. YOU are choosing to make these modifications, and
 * if you point your finger at me for messing up your device, I will
 * laugh at you.
 */

Users mostly want download link so made a simple thread

What controls you get with this kernel ?
  • Impulse , lionfish CPU governor added
  • BFQ , FIOPS , SIO i/o schedulers implemented
  • Full Control over Thermal parameters
  • Adreno Idler
  • KCAL Control
  • Vibration Control
  • CPU Boost Toggle
  • Software CRC Control
  • Gentle Fair Sleepers
  • KSM Enabled
  • Frandom -Fast Kernel Number Generator driver
  • Toggle for ARCH power savings
  • Many more in future ;)

Instructions
  • Download the file
  • Put into your SD CARD
  • Flash in recovery

DOWNLOAD
http://ift.tt/2a3eCxI

(Do not mirror the links if its broken report here)

Quote:

F.A.Q. - Read this before complaining!
1. This kernel works on Y or X rom?
A: Confirmed working on MIUI 7 and 8 , not tested on other ROMs as of now , test and report
2. OMG Battery Sucks...!
A: As you can imagine I dont build kernels to decrease battery life. All the battery life problems come from your apps, either Facebook, or Maps, or some Location Service being enabled etc etc. Check your damn wakelocks and fix them, the kernel is not responsible for them.
3. How do I flash this?
A: Reading the OP, theres a reason why I added instructions on it.
4. Which App is the best for Controlling the Kernel?
A: Kernel Auditor MOD
5. Getting Random reboots..! Any Help
A: I dont answer to problems without a log. The log file is in /proc/last_kmsg. Paste it on pastie.org and link it on your post. Logcats are useless for Kernel purposes, dont bother posting them.
6. OP is arrogant, Im gonna call the Internet Police?
A: Deal with it.
7. Which Settings are best for XYZ ROM and XYZ thing..!
A: The Default settings of the Kernel are the best and Balanced one but you can ask other users on the thread or can discuss which settings are the best..!
8. XYZ Feature doent work in this Kernel on XYZ ROM..! You suckass, fix it..!
A: I dont know who you are. I dont know what you want. If you are looking for a fix, I can tell you I dont have the solution. If you leave now, thatll be the end of it. I will not look for you, I will not pursue you. But if you dont, I will look for you, I will find you, and I ignore you.
Note:
Feel free to post anything even if it is slight OT i love to see Geek Talks , Benchmarks , discussion going over my thread but this doesnt mean you can post anything unrelated to the kernel or device. Moderators are free to take any actions if they feel necessary.
Lets make a better community here on this thread
Cheers..!

XDA:DevDB Information
Blaze Kernel for BIG.little devices, Kernel for the Xiaomi Redmi Note 3

Contributors
GuneetAtwal, thomas1991_12
Testers @GoodStream
Source Code: http://ift.tt/2a3ePAX

Kernel Special Features: Sound Control , Vibration Control , KCAL Control

Version Information
Status: Testing

Created 2016-07-24
Last Updated 2016-07-24


from xda-developers http://ift.tt/2aiiMOZ
via IFTTT

Available link for download

Read more »