[Galaxy S 4 i9500 Android Development] maxfu:
The first time I made AdaMax was for the Chinese Galaxy S4 Duos GT-I9502. I ported Adam kernel and added more tweaks from other kernels like Persus, halaszk (5420). After several releases, I decidec to spread this kernel to more models. So I built the v8 for both Chinese and international GT-I9500. This thread it for hosting it.

This week, i successed compiling for the s4 with 5410 cpu. As we know GT-I9500, GT-I9502 and SCH-I959. They share almost same compiling configure and their own ramdisk. So I compile them together with almost same features.

At last, I have to make following declarations, AGAIN:

Take your own risk and responsibility on flashing this kernel. I am not responsibale for any loss of your hardware, software, data or warranty.

Read this OP from start to finish before flashing the packages or asking any questions. There is a Q&A section. Any questions already answered will be ignored by me and may be insulted by other members. So save your your keyboard, your time and your data traffic.

No ETAs.

Don't ask me to make this kernel for a specific rom. There are basically only two kinds of roms, AOSP and TouchWiz. So I compile for these two kinds with differnet SDK levels. If it dose not work on some rom, don't blame me and ask me to adapt the rom for it.

If you found a new version, but its download link is not directly showed in this OP, that means it is a version I don't think good enough to be a release. So take your own risk to use it. I will remember your feedback, try to make changes, but not respond with posts.

Thanks to a lot of people, I will add their names here... [MENTION=3562083]wanam[/MENTION], halaszk@github, [MENTION=912474]Dees_Troy[/MENTION] and Team Win, [MENTION=4167023]AndreiLux[/MENTION]

As my habit, I always put the download link first:

v15: https://github.com/maxfu/android_kernel_samsung_exynos5410/releases/tag/v15-9500

File name instruction:

touchwiz: for most used international GT-I9500 with exynos5410 cpu.

aosp: for AOSP KitKat 4.4 roms like CM, ramdisk comes from CM 11

kk442: kernel for KitKat 4.4.2

jb43: kernel for Jelly Bean 4.3

jb442: kernel for Jelly Bean 4.2.2

lite: live version is built with stock zImage and maxfour initrd. It has limited maxfour features. And sometimes selinux f**ks up the STweaks.

boot: system kernel package

recovery: recovery kernel package

kernel: system + recovery combined kernel package

*.tar/*.tar.md5: Odin package

*.zip: CWM/TWRP recovery package

example.1: boot-i9500-aosp kk442-v10f1tc.zip means a system kernel image CWM/TWRP flashable package for international I9500 with TouchWiz KitKat 4.4.2 roms.

example.2: kernel-i9500-aosp-kk442-v10f1tc.tar.md5 means a system recovery combined odin package for international I9500 with AOSP roms like CM.

Old versions:

v14: https://sourceforge.net/projects/maxfuacm/files/Kernel/MaxFour/v14/GT-I9500/

v13: https://sourceforge.net/projects/maxfuacm/files/Kernel/MaxFour/v13/GT-I9500/

v12: https://sourceforge.net/projects/maxfuacm/files/Kernel/MaxFour/v12/GT-I9500/

v11: https://sourceforge.net/projects/maxfuacm/files/Kernel/MaxFour/v11/GT-I9500/

v10f1: https://sourceforge.net/projects/maxfuacm/files/Kernel/MaxFour/v10f1/GT-I9500/

You can always go to the following addresses to see whether there is a new version:

https://github.com/maxfu/android_kernel_samsung_exynos5410/wiki

https://github.com/maxfu/android_kernel_samsung_exynos5410/releases

I open the issue section for the source code, you can report problems here. Please provide at least version aosp/touchwiz jb/kk.

https://github.com/maxfu/android_kernel_samsung_exynos5410/issues/new

The source code:

You can

git clone https://github.com/maxfu/android_kernel_samsung_exynos5410.git

git clone https://github.com/maxfu/initramfs_samsung_galaxy_s4.git

git clone https://github.com/maxfu/toolchains.git

use the build.sh for exynos in toolchains/script ro build the kernel.

you need to su before build the kernel cause the ramdisk belongs to root.

Since this is a side product of my kernel for GT-I9502 which is the phone I am currently using. I don't actually test this build for GT-I9500, so I really need feedback. And please backup your rom before using this.

Features:

Built with OSRC KK 4.4 source and ramdisk, now it should work on many 4.4 roms.

Contains most features from Adam kernel including Wolfson Audio Control. For I9502 which uses yamaha sound chip, Wolfson Audio Control will be hidden automatically since it does not work.

From v10, the kernel is renamed to MaxFour due to wamam's request.

Kernel + Recovery release at one time, recovery based on TWRP with EFS_GSM (for Chinese Duos devices) support.

Compiled with GCC 4.8 toolchain from Google NDK r9c.

Packed in LZMA format to make smaller images.

Native exfat support based on OSRC exfat source code.

UCI script for STweaks and may be others.

Unlocked some hidden CPU frequency: 2.0GHz, 1.9GHz, 1.8GHz, 1.7GHz, 800MHz, 700MHz for big cores; 1.3GHz, 1.2GHz, 400MHz,

300MHz, 200MHz for little cores. Frequencies over stock like 1.7GHz for big cores and 1.3G for little cores are implemented in tc*/overclock version.

Added more STweaks settings which are not included in Adam kernel, including CPU power management, Tools with reboot options, GPU settings, CPU governor.

Android logger is compiled as standanlone module, so user can disable it completely to save power.

Tc/overclock version contains Persus dvfs for GPU with 700MHz overclock, thanks to AndreaLux.

Built-in Seeder entropy generator to provide lag reduction although it is not significant as it was on Gingerbread.

Built-in busybox with auto-installation.

Optimize on ram.

Added several I/O Schedulers including ZEN and ROW.

Built-in dynamic eMMC read ahead

Built-in Asynchronous Fsync

Compiled with compile flag for Cortex-A15 and NEON

Disable KNOX and SELinux when booting, selinux will be set to permissive with the boot command line.

init.d support.

A lot of changes and fixes.

Disabled a lot of rarely used devices support.

PS:

*1. TC means turbocharged, so it is overclock

Change Log:

v15:

Rebuild with GT-I9502 CHN KK Opensource from OSRC.

Upgrade KSM (Kernel Samepage Merging) to uksm (Ultra KSM) which has Super quiet CPU usage, Ultra scan speed and High CPU efficiency.

Support init.d.

Lower CPU frequencies presented in previous versions, voltage options coming soon.

GPU tweak presented in previous versions.

STweaks cueerntly unsupported, coming soon.

mDNIe and Sound Control coming soon.

AOSP support coming soon.

v14:

Upgrade kernel to 3.4.10

Implement AES-ARM and SHA1-ARM crypto algorithm

Rollback selinux related script to v11

v13:

Rebuilt source tree from HNC6 source.

Most features kept

INT, MIF, MEMIO settings removed, these should not be touched

Should be much better than v12

Fixed video bug for AOSP, I think it is fixed

Upgraded AOSP initramfs, may fix the modem/signal problem

Set ro.secure and ro.adb.secure to 0

Camera lag? Less.

Upgraded busybox

v12:

I don't want to talk about it, this version is totally a rubbish

v11:

STweaks: Added Chinese UI, works on Chinese system, when the language is set to other ones, English UI will show. An templete is provided for more translations.

STweaks: Added boost mode in the Misc tab. The boost mode is found when the news of Samsung cheating on benchmark softwares came out. When a benchmark software is detacted running, the boost mode will be on to allow higher temprature and faster CPU scaling. Simply turn on this mode will not provide any visable change, it should be used with CPU, GPU, INT, MIF clock operations.

STweaks: Added control for Internal, Memory Interface and Memory I/O.

STweaks: Added a button to switch the USB mode to Mass Storage Mode, which is classical mode before GingerBread got out dated.

STweaks: Added a CPU wake lock switch.

STweaks: Added instructiuon of Sound Control being not available on models other than I9500.

STweaks: Added instruction of GPU voltage control being not available on non-tc versions.

Kernel: Added a odin mode. Now we can reboot to download mode with "adb reboot odin". The original commands still work.

v10f1:

initial build for XDA users.

Q&A:

I did not reserve a post for this section, so I will put the Q&A here in the OP.

Q: Which package should I use? A: boot is what you need. recovery is just a side product.

Q: Which version I should use? A: Please the "File name instruction" section in the OP, you will find the answer.

Q: Do I need to wipe the data after I flash? A: Well I don't think you need, but due to some report, wiping data can solve certain problems after flashing this kernel. So whatever you like, please backup data before you flash or wipe.

Q: Which rom does this kernel support? A: I can't tell, please refer to the File name instruction section, if you rom is not mentioned there, it is not supported?

Q: Does this support MIUI? A: Official MIUI is based on touchwiz 4.2.2. So please refer to Q2,3,4.

Q: There is no OC in tc version. A: In the init.rc there is a script limiting the CPU frequency to 1.6GHz, so you should use STweaks to unlock it. Please open /sys/devices/system/cpu/cpu0/cpufreq/UV_uV_table, if there is 2000 1900 1800 and 1700, then there is OC, just unlock it.

Q: Some app FC? A: Usually FCs are not due to the kernel, check the rom first, and settings etc, the kernel should be the last reason, cause it just provide the bridge between the system hal and hardware. Report the fc, I will take a look, but I can not say I can fix it.

Q: Battery life? A: It is due to your habit, just like driving a car, a Toyota Prius can use 10L gas if driven by somebody like Michael Schumacher. As my test, due to my habit with non tc version, it is better than stock.

Q: Do I need STweaks to run the kernel? A: The kernel can run without it, but with it you can have more options.

Q: STweaks shows "unextected error"? A: This situation usually happens at the first time STweaks starts, it is OK. Just go on using STweaks.

Q: STweaks FCs. A: Well this sometimes is due to the kernel, sometimes. Here is something you can do: Wipe the STweaks' data, remove /data/.maxfour and /data/.adamax, check the superuser software and give STweaks root access. And yes you need root access. At last, use normal version.

Q: Auto root? A: Use the CWM zip package. And I would take it out soon. Sometimes it breaks root.

Q: Not actually auto-root with v13? A: Yes, v13 will put a wizard like app which will lead you download SuperSU, only when your rom is not rooted.

Q: Conservative governor stock at certain frequency? A: Don't use it, only ondemand governor is optimized for 5410 with big.little cores.

Q: Can you add something? You must do something? Please do something? A: I take advice, but not demand. The reason is simple: I make this kernel due to my interests, not purchase orders. I am not funded for doing this. If the advice is good, I'd take it. If it is just a personal preference, I have to consider it.

Q: Got very low volume of sound? A: Use stweaks, I9500 has wolfson sound control.

Q: Video color is not correct, got blur faces. A: v13 should have this issue fixed.

Q: No internal storage access permission. A: I will make a workaroung later. For now, remount it with rw option through adb.

Q: Random reboot. A: Well, it exists, I admit. I don't know why. I will look for the reason.

Q: After flashing, the phone won't boot. A: Well, I can't guarantee that this kernel works everywhere. And please check if you are using the correct version.

Q: When is your next release? A: I don't know either.

Q: I flashed, it doesn't work. A: Well, it does not work. I don't know why cause it just don't work. I only answer information-rich questions. Questions like this is only a waster of your keyboard, your time and your data traffic. Please at least tell me which version and what rom you are using.

Q: Anything asked above. A: I will keep silence. Other people may insult for this.

Q: Why don't you answer/respond our questions? A: I am a employee, husband, father and son of someone other than XDA and you.