[KERNEL][SINGLE/DUAL BOOT][JB/KK][STOCK/CM]blackhawk's NEXT kernel 2.4

Search This thread

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
NEXT 2.1.8 placeholder: http://xdaforums.com/showpost.php?p=51678768&postcount=2513

STOP! This kernel supports ONLY Samsung Jelly Bean 4.1.x, 4.2.2, CM 10.1.x, 10.2, and 11.0. It won't work on ICS, CM 9, CM 10.

FOR NOW I FORBID ANYONE ELSE REUSE THIS STILL IN DEVELOPMENT DUAL BOOT PROJECT FOR HIS/HER OWN GALAXY TAB 2 PROJECT!

STOP PRESS:
NEXT 2.x separated in two package: the kernel part as blackhawk-next-kernel-2.x-p31xx.zip and the proprietary binaries part as proprietary-vendor-samsung.zip for JB >= 4.2 and proprietary-vendor-samsung-4.1.x.zip for JB 4.1.x .

Flash the kernel part first and then directly the proprietary binaries part! Flash the appropriate proprietary part on both 1st and 2nd ROM!

Sources:
Kernel sources at http://github.com/kumajaya/android_kernel_samsung_espresso10/tree/cm-10.2-update

Features:
  • Samsung stock 4.1.x, 4.2.2 (since 1.8), CM 10.1.x and CM 10.2 (since 1.7) support with a single kernel image
  • For stock ROM: external SD card - internal media swapper script included
  • Samsung proprietary exFAT modules are loaded. CM 10.1 exFAT support files attached at post #2
  • For CM/CM based ROM: auto rotate screen default orientation depend on ro.sf.hwrotation value, camera orientation fix included
  • Dual-booting. You can have Samsung JB and CM 10.1 ROMs on a single device at the same time.
  • Nice looking AROMA based boot menu
  • Using CyanogenMod kernel source, updated to p3110 source for newer WLAN (Youtube HD bugfix on stock ROM), modem, sensors driver, and etc for both P31xx and P51xx target
  • CPU clock: 300MHz, 600MHz, 800MHz, 1.008GHz, 1.2GHz, 1.35GHz, 1.42GHz, 1.48GHz, and 1.52GHz, locked @ 1.008GHz on boot
  • GPU clock: 153.6MHz, 307.2MHz, 384MHz, and 512MHz, 307.2MHz as the default maximum clock
  • CPU voltage control. You can use Android Tuner/System Tuner/Trickster MOD to set CPU voltage
  • The ramdisk base on JB 4.1.2 (stock ROM) and JB 4.2.2 (CM 10.1)
  • Using newer PowerVR SGX 540 kernel modules and binaries blob
  • row, bfq, sio, and vr scheduler support
  • Governor bug fix. Replace Samsung's interactive governor with default OMAP4 3.0.31 interactive governor from omapzoom.org, plus pegasusq and lulzactive
  • NFS and CIFS/samba (not loaded by default) filesystem support
  • LZMA compressed initrd, to keep boot image smaller than 8MB
  • swap support. zram and cleancache with a working zcache driver, enabled by default
  • kernel config, insmod configs.ko and then you can access /proc/config.gz
  • external modem support, for PPP Widget (not loaded by default, P31xx need powered USB hub for external modem)
  • Some tweaks from gokhanmoral's siyahkernel for S3, passive entropy tweak applied
  • Remove a lot of debug message from touchscreen driver, display, mmc, modem, etc
  • linaro arm-linux-gnueabihf- cross compiler, compiler optimization applied
  • SuperSU v1.41 for stock ROM
  • Self compiled BusyBox v1.22.0-git in /sbin, config file based on CM's BusyBox bbconfig output. fstrim applet patch applied, android_reboot applet added (a quick but clean port from Android toolbox), swapon applet with priority option. For stock ROM: this version of Busybox will overwrite busybox binary in /system/bin or /system/xbin and save it as busybox.backup
  • Early boot scripts support (/system/etc/init.d, /data/local/userinit.sh, and /data/local/userinit.d)
  • Post boot script support (/system/etc/init.post_boot.sh)
  • For stock ROM: custom boot animation support (/data/local/bootanimation.zip or /system/media/bootanimation.zip if exists, Samsung boot animation as a fallback). If a bootanimation.zip found, the boot sound will be turned off as well as the shutdown animation.
  • Modified mount options
  • adb insecure, adb mode in charge state also insecure
  • Advanced TCP congestion support, westwood as the default congestion
  • No /system/etc/hosts patch, you can install AdAway from F-Droid

Known Problems:

Thanks To:
  • gokhanmoral, amarullz, Phil3759, Chainfire, cmenard, codeworkx, imoseyon, coolbho3k, Faux123, AuxLV, CodyF86, poppolo2001
  • This part will be expanded. Most of the patches I applied are coded by someone else. Please remind me if I forget to give credits to anybody...

Downloads:

Todo:
  • More features in NEXT tool

Special Thanks:

Downloads Record:
  • blackhawk-next-kernel-1.0-p31xx.zip: 316
  • blackhawk-next-kernel-1.1-p31xx.zip: 87
  • blackhawk-next-kernel-1.1-addon-nooc-p31xx.zip: 41
  • blackhawk-next-kernel-1.2-p31xx.zip: 503
  • blackhawk-next-kernel-1.2-addon-nooc-p31xx.zip: 160
  • blackhawk-next-kernel-1.3-p31xx.zip: 240
  • blackhawk-next-kernel-1.3-addon-nooc-p31xx.zip: 112
  • blackhawk-next-kernel-1.4-p31xx.zip: 583
  • blackhawk-next-kernel-1.4-nooc-p31xx.zip: 294
  • blackhawk-next-kernel-1.6-p31xx.zip: 380
  • blackhawk-next-kernel-1.6-nooc-p31xx.zip: 227
  • blackhawk-next-kernel-1.6.1-p31xx.zip: 180
  • blackhawk-next-kernel-1.6.1-nooc-p31xx.zip: 90
  • blackhawk-next-kernel-1.6.2-p31xx.zip: 151
  • blackhawk-next-kernel-1.6.2-nooc-p31xx.zip: 81
  • blackhawk-next-kernel-1.5-p31xx.zip: 600
  • blackhawk-next-kernel-1.5-nooc-p31xx.zip: 304
  • blackhawk-next-kernel-1.8.1-p31xx.zip: 222
  • blackhawk-next-kernel-1.8.1-nooc-p31xx.zip: 99
  • blackhawk-next-kernel-1.8.2-p31xx.zip: 577
  • blackhawk-next-kernel-1.8.2-nooc-p31xx.zip 321

XDA:DevDB Information
[KERNEL][SINGLE/DUAL][JB/KK][STOCK/CM]blackhawk's NEXT kernel, Kernel for the Samsung Galaxy Tab 2

Contributors
ketut.kumajaya, Android-Andi
Kernel Special Features: Dual boot stock and AOSP based ROM

Version Information
Status: Stable
Current Stable Version: 2.3

Created 2014-09-21
Last Updated 2014-10-11
 

Attachments

  • blackhawk-next-tool-0.1.zip
    691 KB · Views: 7,725
  • blackhawk-next-kernel-1.4.1-p31xx.zip
    8.4 MB · Views: 4,044
  • blackhawk-next-kernel-1.4.1-nooc-p31xx.zip
    8.4 MB · Views: 1,447
  • blackhawk-next-kernel-1.6.3-p31xx.zip
    8.6 MB · Views: 1,034
  • blackhawk-next-kernel-1.6.3-nooc-p31xx.zip
    8.6 MB · Views: 552
  • blackhawk-next-kernel-1.7-p31xx.zip
    8.7 MB · Views: 978
  • blackhawk-next-kernel-1.7-nooc-p31xx.zip
    8.7 MB · Views: 479
  • blackhawk-next-kernel-1.8.3-p31xx.zip
    8.5 MB · Views: 2,628
  • blackhawk-next-kernel-1.8.3-nooc-p31xx.zip
    8.5 MB · Views: 1,320
  • blackhawk-next-kernel-2.0-p31xx.zip
    7.1 MB · Views: 1,615
  • blackhawk-next-kernel-2.1-p31xx.zip
    6.6 MB · Views: 788
  • blackhawk-next-kernel-2.1.1-p31xx.zip
    7.9 MB · Views: 752
  • blackhawk-next-kernel-2.1.2-p31xx.zip
    7.9 MB · Views: 1,934
  • blackhawk-next-kernel-2.1.3-p31xx.zip
    7.9 MB · Views: 958
  • blackhawk-next-kernel-2.1.4-p31xx.zip
    7.9 MB · Views: 611
  • blackhawk-next-kernel-2.1.5-p31xx.zip
    6.7 MB · Views: 3,629
  • blackhawk-next-kernel-2.1.6-p31xx.zip
    7 MB · Views: 4,118
  • blackhawk-next-kernel-2.2-p31xx.zip
    7.5 MB · Views: 14,982
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
NEXT 2.x separated in two package: the kernel part as blackhawk-next-kernel-2.x-p31xx.zip and the proprietary binaries part as proprietary-vendor-samsung.zip for JB >= 4.2 and proprietary-vendor-samsung-4.1.x.zip for JB 4.1.x .

Changelog:
21/04/2014 2.2:

02/01/2014 2.1.5 -> 2.1.6:
  • CM 11.0 support

28/10/2013 2.1.4 -> 2.1.5:

27/10/2013 2.1.3 -> 2.1.4:
  • Ramdisk updated to sync with latest CM 10.2

20/10/2013 2.1.2 -> 2.1.3:
  • Update init script for PAC
  • Disable almost all kernel debugging support except KALLSYMS. Kernel failed to boot with CONFIG_KALLSYMS disabled

28/09/2013 2.1.1 -> 2.1.2:
  • Turn all CPUs online when governor gets changed, hotplug bug workaround
  • SIO and VR I/O scheduler
  • Initial STweaks support, big thanks @gokhanmoral. Download STweaks app from Play store to access almost all NEXT related settings (CPU governor, frequency, and voltages; GPU governor and frequency limit; surfaceflinger rotation; I/O scheduler; logger; CIFS, Xbox controller, and USB modem support; and dual boot related settings).

22/09/2013 2.1 -> 2.1.1:

18/09/2013 2.0 -> 2.1:

02/09/2013 1.8.3 -> 2.0:

13/08/2013 1.8.2 -> 1.8.3:
  • Samsung 4.2.2: The first attemp to reduce battery draining issue, zram service disabled! You can enable zram (not as a service) by issuing "setprop persist.service.zram 25" over Terminal Emulator or "adb shell". Reboot is required.
  • CM 10.2: Bluetooth tethering fix from upstream CM 10.2

07/08/2013 1.8.1 -> 1.8.2:
  • The third attemp to support Samsung 4.2.2 for all device configuration
  • Vendor blobs in separate flashable zip updated, please re-download it!

06/08/2013 1.8 -> 1.8.1:
  • The second attemp to support Samsung 4.2.2 for all device configuration
  • Vendor blobs in separate flashable zip. For all ROMs, on both 1st and 2nd ROM: Flash vendor-blobs-new-ducati-blackhawk.zip directry after flashing NEXT kernel!
  • Single channel sound output bug fix

05/08/2013 1.7 -> 1.8:

01/08/2013 1.6.3 -> 1.7:
  • Initial CM 10.2 support. Do not flash blackhawk-next-cm-exfat-vold.zip! CM 10.2 already has an open source/reverse engineered exFAT filesystem support
  • zram switched to zsmalloc, zram optimized for Android disabled
  • XBox 360 USB controller with BigX LED support enabled (by @iks8 request). Modules not loaded by default, edit /system/etc/init.d/02modules to activate it.

23/07/2013 1.6.2 -> 1.6.3:
  • Add android_reboot applet to NEXT's busybox (a quick port from Android toolbox) to fix AROMA boot menu fail to boot into recovery/bootloader as reported by @kinung
  • I hate bug!

22/07/2013 1.6.1 -> 1.6.2:
  • Hotplug CPU governor working properly with cleancache enabled, zcache memory corruption problem fixed!

21/07/2013 1.6 -> 1.6.1:
  • Hotplug CPU governor kernel panic bug fix. This governor not working properly with cleancache enabled, cleancache disabled for now
  • Static linked busybox compiled from source, fstrim patch applied. Busybox config based on CM's busybox bbconfig output. Total 46 more than previous busybox applet, add priority option to swapon applet
  • zRAM swap per CPU core, same priority value. CM's /system/bin/compcache script updated to handle 2 zRAM devices. Reference: http://wiki.gentoo.org/wiki/Zram
  • Stock ROM persist.customboot.zram property changed to persist.service.zram, follow CM's standard
  • Stock ROM default zRAM size changed to 26% RAM size
  • Swappiness value changed to 90

18/07/2013 1.5 -> 1.6:

11/07/2013 1.4.1 -> 1.5:
  • Decrease CPU voltage for frequencies below 1.2GHz, increase CPU voltage for frequencies above 1.2GHz
  • Re-enable MMC_CAP_ERASE for I/O speed improvement, run "fstrim -v /data" and "fstrim -v /cache" manually to TRIM your filesystem or run LagFix (fstrim GUI, download it from Play)
  • Remove my old hack in cpufreq driver
  • Newer PowerVR SGX540 3D kernel module and vendor binaries, in sync to CM-10.1. For dual boot user, you must update both 1st and 2nd ROM to renew both ROM vendor binaries!
  • Change screen_off_max_freq from 1.008GHz to 800MHz, small changes in init scripts
  • SuperSU v1.41

16/06/2013 1.4 -> 1.4.1:
  • I/O speed improvement, 1.3 and 1.4 bugfix
  • SuperSU v1.34 - thanks Chainfire
  • nooc: Smartreflex class 3 re-enabled, voltage control disabled
  • small update to disable swap support by default for my "stock based ROM" included

04/06/2013 1.3 -> 1.4:
  • Selected kernel modules, scripts, and binaries integrated in boot.img, single flash for 1st and 2nd ROM
  • Kernel compression back to gzip, boot.img compression switched to lzma for better compression (I need more space)
  • Auto root (for stock)
  • Auto busybox (for stock)
  • Auto rotate (for both stock and CM) depend on ro.sf.hwrotation value, camera orientation fix included
  • External sdcard and internal media swapper script integrated in boot.img (for stock as 1st ROM)
  • Override init.d CPU governor setting on boot completed (technical reason/by design). Please use an app "on boot" or /etc/init.post_boot.sh to set CPU governor
  • init script reworked (again), simplified
  • Standalone nooc version, no longer as an addon for standard NEXT
  • Untested CRT off animation support

01/06/2013 1.2 -> 1.3:
  • Updated compiler to the latest linaro gcc 4.7
  • Better data integrity on both 1st and 2nd ROM
  • Ramdisk init scripts reworked, inline with the latest Samsung (Taiwan BRI 04/2013) and CM (29/05/2013 nightly)
  • Inline with P51xx port
  • Updated exFAT modules (don't know it's better or worse, it's closed source)
  • Default CPU clock still 1.008GHz, default GPU clock 307.2MHz

1.1 -> 1.2:
  • Potential bug in sdcard swapper script fixed. Yes, for stock ROM as 1st ROM this kernel still has a script to swap external sdcard - internal media.
  • SuperSU updated to the latest version (stock ROM).

1.0 -> 1.1:
  • exFAT filesystem support, stock ROM only for now. I will share separate flashable zip for CM 10.1, when it's ready (broken USB storage support). Please note Dual Boot FAQs #24!
  • CGROUPS, SLUB, and TRACING support back enabled for exFAT compatibility, Android logger disabled by default to compesated it. You can enable logger by editing /system/etc/init.d/02modules .
  • No boot menu in single ROM environment.
  • Change stock ROM init.d script starting point. Earlier than before, same as CM 10.1 now.
  • Non overclock addon for anyone who is experiencing overheats when using standard NEXT kernel.
  • Source change: https://github.com/kumajaya/android_kernel_samsung_espresso10/commits/cm-10.1-blackhawk, May 24-26, 2013. A lot of undocumented change in ramdisk side.

exFAT support in CM 10.1
  • Download and flash blackhawk-next-cm-exfat-vold.zip over recovery
  • fsck.exfat, mkfs.exfat, vold binaries and all needed libraries taken from Samsung JB 4.2.2 included
  • USB storage support is broken, you need USB OTG Helper from http://xdaforums.com/showthread.php?t=1588940 as 3rd party USB storage mounter
  • exfat binaries for exfat support in USB OTG Helper included. So, all USB OTG Helper features (FAT, Ext2/3/4, full NTFS, and exFAT support) enabled
  • To avoid Dual Boot FAQs #24 issue, flash blackhawk-next-cm-exfat-vold.zip and NEXT kernel of course directly after CM update. For CM 10.1 only!

Download Record:
  • proprietary-vendor-samsung.zip: 4481
  • proprietary-vendor-samsung-4.1.x.zip: 1478
 

Attachments

  • blackhawk-next-cm-exfat-vold.zip
    2.1 MB · Views: 1,959
  • vendor-blobs-new-ducati-blackhawk.zip
    4.3 MB · Views: 6,192
  • proprietary-vendor-samsung.zip
    6.5 MB · Views: 11,260
  • proprietary-vendor-samsung-4.1.x.zip
    6.4 MB · Views: 5,593
  • proprietary-vendor-samsung-update.zip
    6.5 MB · Views: 9,053
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Dual Boot FAQs

Dual Boot FAQs

Adapted from droidphile's "Dual Boot FAQs" with permission.

1. "Why would I wanna dual-boot?"
A.
You don't have to.
Suppose you're more of an aosp rom fan. But misses the HDMI out, bluetooth hands-free and love sammy camera more. Do a minimal installation of sammy rom and boot into it when in need of these features and use aosp rom otherwise.
Or you are a sammy rom fan but love the responsiveness and pure android feel of aosp roms.
And while you can dual boot two sammy or two aosp roms, it doesn't make any sense.

2. "What if I don't need dual booting?"
A.
No issues. Kernel won't force to setup 2 roms. You can single boot as before.

3. "Will dual booting change my bootloader or do any dangerous stuff like setting my phone on fire?"
A.
NO. Changes are at kernel and ramfs level only. Some space in your internal sd card is used, and also the unused hidden partition mmcblk0p11 is used to store cache of second rom. Dual booting doesn't repartition the filesystem or perform anything scary.

4. "I want to setup dual booting."
A.
There are four situations:-
1) Sammy rom now. Want to use aosp as secondary.
2) Sammy rom now. Want to use aosp as primary.
3) Aosp rom now. Want to use sammy as secondary.
4) Aosp rom now. Want to use sammy as primary.

Prerequisites for any setup is
a) Flash latest blackhawk's NEXT kernel
b) Flash new ducati vendor blobs (since 1.8.x)
c) Flash latest PhilZ Touch - blackhawk repack version - recovery
d) Atleast 90% battery left.
e) 2 GB free on internal SD.
f) Some spare time

1) Present sammy, setup aosp as secondary:-
i) Reboot into recovery
ii) Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
iii) Reboot into secondary recovery
iv) Flash aosp ROM as 2nd ROM
v) Flash blackhawk's NEXT kernel again
vi) Flash new ducati vendor blobs again (since 1.8.x)

2) Present sammy, setup aosp as primary:-
i) Reboot into recovery
ii) Nandroid backup your current sammy ROM
iii) Flash blackhawk's NEXT tool, create system.img for Samsung stock/stock based ROM and then close it
iv) Reboot into secondary recovery
v) Nandroid restore your sammy ROM as 2nd ROM
vi) Flash blackhawk's NEXT kernel again
vii) Flash new ducati vendor blobs again (since 1.8.x)
viii) Reboot into primary recovery
ix) Flash aosp ROM as 1st ROM
x) Flash blackhawk's NEXT kernel again
xi) Flash new ducati vendor blobs again (since 1.8.x)

3) Present aosp, setup sammy as secondary:-
Same as (1), instead of flashing aosp to second, flash sammy to second.

4) Present aosp, setup sammy as primary:-
Same as (2), instead of flashing aosp to first ROM, flash sammy.

NOTE:
-To dual boot Two Aosp or Two Sammy roms, just follow (1) or (2) (depending on which one of them you want as primary/secondary), just flash Sammy instead of aosp or aosp instead of sammy.

5. "What things should I be taking care off while dealing with dual booting?"
A.
- Make sure where you are: in primary or secondary recovery.

6. "How to boot into primary rom?"
A.
AROMA based boot menu will help you on every boot.

7. "How to boot into secondary rom?"
A.
AROMA based boot menu will help you on every boot.

8. "Is kernel partition shared?"
A.
Yes. Same kernel boots both roms.

9. "If I flash another kernel (that doesn't support db) do I lose dual booting?"
A.
Yes

10. "I lost dualbooting after flashing another kernel. I didn't do anything to second rom files in sdcard/.secondrom. How can I get db back?"
A.
Just flash the latest blackhawk's NEXT kernel, flash new ducati vendor blobs again (since 1.8.x)

11. "Will there be any performance degradation on the rom used as secondary compared to primary?"
A.
NO

12. "Will my phone run slow overall because of db?"
A.
NO

13. "How to flash a newer version of 1st rom?"
A.
As usual, just flash it from primary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

14. "How to flash newer version of 2nd rom?"
A.
Just flash it from secondary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

15. "Would upgrading 1st or second rom cause other rom to fail on boot?"
A.
No. Partitions of other rom are not touched during upgrading.

16. "I miss the recovery I used before, so much.."
A.
PhilZ Touch not bad at all.

17. "User apps of 1st rom are automatically available for second rom?"
A.
NO. However, if you had backed them up using Titanium Backup or similar apps, just restore apps while on second rom.

18. "I wanna keep separate backup for apps in both the Roms, since I use one Rom for say entertainment and other productivity."
A.
Setup different backup directory in Titanium Backup in 1st and 2nd rom.

19. "I don't see STweaks app in second rom."
A.
This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

20. "Do I need to anything special before flashing a newer blackhawk's NEXT kernel?"
A.
NO. Just flash kernel in primary and secondary recovery. Yes, on both 1st and 2nd ROM. Just flash kernel in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition (since 1.4 version). Flash new ducati vendor blobs (since 1.8.x) on both ROM may be required to ensure vendor blobs match to the kernel

21. "How can I run same STweaks settings of 1st Rom in 2nd Rom?"
A.
This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

22. "How do I remove everything related to DB and run single boot again?"
A.
In primary recovery, flash blackhawk's NEXT tool and delete 2nd ROM system image. OR delete .secondrom directory in /data/media while on 1st Rom.

23. "If secondrom files are kept in /data/media, will wiping data in recovery erase second rom files?"
A.
NO. /data/media is skipped in CWM recovery.

24. "I was using ExFat card on sammy rom without any issues. I have setup dual boot with aosp and now after booting into CM it says microSD card is corrupted."
A.
Aosp roms doesn't support ExFat out of the box. The data was corrupted by aosp vold. Even if you boot back to Sammy rom, it still would be corrupted. To recover data, manually mount the card in recovery, copy contents to internal SD and reformat card to a Fat32.
Also try
chkdsk X: /f (where X is the drive letter of microsd), you may be able to copy data.

25. "I read somewhere that both rom data partition use the same space. Doesn't that mean my apps are shared across roms?"
A.
NO. It just means they uses same partition. They're still different directories.
1st rom data = /data
2nd rom data = /data/media/.secondrom/data

26. "Will hitting "Boot into Secondary Recovery" in recovery boot menu change my recovery?"
A.
NO. It just runs (not flash) an alternate recovery so that you can configure dualboot settings.

27. "How do I backup 1st Rom and 2nd Rom?"
A.
To backup 1st Rom, do what you did to backup rom while you were single booting a while ago.
To backup 2nd Rom, use the secondary recovery.

28. "Is there an easier way for dual-boot?"
A.
Yes, send your device to me.

29. "DB architecture?"
A.
Like you know, every rom has a /data, /system, /cache partition and a kernel to boot.
For primary rom, it's
mmcblk0p10 = /data
mmcblk0p9 = /system
mmcblk0p7 = /cache
And these won't change whether you're single booting or dual booting.

For secondary rom, data and system is stored in internal sd, cache in hidden partition. Note that internal sd in our device is mounted to /data/media.
We have data as a directory, System as an image in data/media/.secondrom. Cache in mmcblk0p11 which is hidden partition and not used otherwise.

- When second rom is booting, second rom data is bind mounted to mmcblk0p10 as /data/
- data/media/.secondrom/system.img partition is mounted as /system.
- mmcblk0p11 is mounted as /cache.

More FAQs will be added and the list will be updated as DB is improved.
 
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Dual Boot Exercises

Exercise I

An example current facts:
  1. ROM: Samsung stock JB 4.1.2
  2. Kernel: blackhawk single kernel
  3. Recovery: PhilZ Touch prior version

Prerequisites step:
  1. Update your kernel to blackhawk's NEXT kernel
  2. Update your recovery to the latest PhilZ Touch - blackhawk repack version - recovery
  3. Download CM latest nightly + GApps zip
  4. ~2GB free on internal storage

Dual boot step:
  1. Reboot into recovery
  2. Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
  3. Reboot into secondary recovery, make sure you choose "Secondary Recovery"! Make sure you really choose "Secondary Recovery"!!
  4. Flash CM
  5. Flash GApps zip
  6. Reflash blackhawk's NEXT kernel
  7. Reboot into secondary ROM - CyanogenMod!

It's always better if you make a backup before performing all above steps. Do it at your own risk!

Exercise II

An example current facts:
  1. ROM: CM 10.1 latest nightly
  2. Kernel: blackhawk single kernel
  3. Recovery: PhilZ Touch prior version
  4. Have Samsung stock 4.1.2 nandroid backup

Prerequisites step:
  1. Update your kernel to blackhawk's NEXT kernel
  2. Update your recovery to the latest PhilZ Touch - blackhawk repack version - recovery
  3. Nandroid backup your current CM 10.1 ROM
  4. ~2GB free on internal storage. I am not sure, depend on your backup data size

CM 10.1 as 2nd ROM:
  1. Reboot into recovery
  2. Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
  3. Reboot into secondary recovery, make sure you choose "Secondary Recovery"! Make sure you really choose "Secondary Recovery"!!
  4. Restore CM 10.1 nandroid backup
  5. Format /cache, clean dalvik-cache
  6. Reflash blackhawk's NEXT kernel
  7. Reboot into secondary ROM - CyanogenMod!

Samsung 4.1.2 as 1st ROM:
  1. Reboot into primary recovery, make sure you choose "Primary Recovery"! Make sure you really choose "Primary Recovery"!!
  2. Restore Samsung stock 4.1.2 nandroid backup
  3. Format /cache, clean dalvik-cache
  4. Reflash blackhawk's NEXT kernel
  5. Reboot into primary ROM - Samsung!

Do all above steps at your own risk!
 
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Just opened a new thread for my masterpiece work on Galaxy Tab 2. Enjoy it and don't forget to press my Thanks button :D

PhilZ Touch attached in post #1 has a "red" on screen navigation bar in secondary recovery to distinguish between primary and secondary :laugh:

08/08/2013: Kernel for stock 4.2.2 Developtment Secret
If you want to build your own kernel for stock 4.2.2, this is the development secrets how to fix CPU frequency jumping to maximum available frequency, how to fix slow graphics issue, how utilize the new ducati firmware and increase the RAM space, how to fix hardware accelerated media problem and how to fix WiFi tethering issue.

Kernel source: http://github.com/kumajaya/android_kernel_samsung_espresso10/tree/cm-10.1-blackhawk
Samsung kernel update: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=p3110
Samsung exFAT source: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=exfat

  1. How to fix CPU frequency jump to maximum available frequency (1.52GHz, overclock version) on boot
    Rename /system/lib/hw/power.default.so to /system/lib/hw/power.default.so.bak, copy power.piranha.so from NEXT kernel 1.8.2 package to /system/lib/hw
  2. How to fix slow graphics issue
    This solution authored by @codeworkx 8 moths ago but disabled by default: https://github.com/kumajaya/android...mmit/0c6d1a53f1a51b588786b168a48e2566f8a49065 Enabling both FB_OMAP2_VSYNC_SEND_UEVENTS and FB_OMAP2_VSYNC_SYSFS solve this problem
  3. How utilize the new ducati firmware and increase the RAM space
  4. How to fix hardware accelerated media problem
  5. How to fix WiFi tethering issue
If you use above information, proper credit must be given including a clear text about this solution.


21/09/2013: OMAP PowerVR 3D GPU Control
There some interface inside /sys/devices/platform/omap/pvrsrvkm.0/sgxfreq:
  1. frequency interface to access the current GPU frequency (153600000/307200000/384000000)
  2. frequency_list interface to access supported GPU frequencies (153600000 307200000 384000000)
  3. frequency_limit interface to access the GPU maximum frequency limit (default: 307200000). Writeable mean this code inside the pvrsrvkm kernel module, the GPU maximum frequency controllable
  4. governor interface to access the current GPU governor (userspace/on3demand/activeidle/onoff)
  5. governor_list interface to access supported GPU governor (userspace on3demand activeidle onoff)

The upcoming version of Android Tuner (0.10.2) support OMAP GPU controls.

21/09/2013: NEXT 2.0.1
As I mentioned before, I still continued cm-10.2 branch kernel development. This branch is the source code of NEXT 2.0, I've added overclock support but limited at 1.2GHz CPU and 384MHz GPU. OMAP GPU controls support applied as gpu_oc interface replacement. Kernel attached here as blackhawk-next-kernel-2.0.1-p31xx.zip .

Changelog:
  1. Rewriting overclock code: https://github.com/kumajaya/android...mmit/35e0c0455cb7ae4beb50375c5873b328a76a1087
  2. Add sysfs interface to store GPU frequency limit: https://github.com/kumajaya/android...mmit/738061b30d2278d3b51b341bc2597dad300f4e47
  3. Limit GPU frequency to default on boot: https://github.com/kumajaya/android...mmit/8a6933cf6565b5587db6a2a5ce7b1207807ab701
  4. Xpad force feedback support disabled

WARNING: This kernel only for device that can handle 1.2GHz CPU and 384MHz GPU frequency.
 

Attachments

  • blackhawk-next-kernel-2.0.1-p31xx.zip
    6.6 MB · Views: 661
Last edited:

dimfil

Senior Member
Jul 1, 2012
172
60
Athens
Now Im very confuse. Which one to use? Im on CM10.1 4.2.2 Lastet update.. GT P3110..which kernel should I install? what is the different between KK and Philz Touch?

There is no confusion at all...
Every file you need is in the first post: kernel, tool and Philz. Don't use anything else.
Read the examples. All information is in there...

I don't know about the differences between KK and Philz, but I don't care though... Philz is just great!

Many, many respects to ketut...
Big thanks for your efforts...

Sent from my GT-P3110 using xda app-developers app
 
  • Like
Reactions: ketut.kumajaya

Vishesh

Senior Member
Nov 26, 2012
664
367
New delhi
Ketut @ awesome work with awesome guide.. U explained each n every step clearly for freshers.. N BTW do I need to update Blackhawk next kernel to 1.0..if yes, wiping cache n delvk is necessary before flashing? I am asking u cos I Dnt want to be in mess anymore.. I am happily enjoy dual boot environment.. Thanks again for all the effort..

Sent from my GT-P3100 using xda premium
 
  • Like
Reactions: ketut.kumajaya

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Ketut @ awesome work with awesome guide.. U explained each n every step clearly for freshers.. N BTW do I need to update Blackhawk next kernel to 1.0..if yes, wiping cache n delvk is necessary before flashing? I am asking u cos I Dnt want to be in mess anymore.. I am happily enjoy dual boot environment.. Thanks again for all the effort..

Sent from my GT-P3100 using xda premium
Yes. Fixed the problem when installed CM 10.1 directly as 2nd ROM. No wipe needed.
 

dimfil

Senior Member
Jul 1, 2012
172
60
Athens
Please let me ask a question here.
I have already asked in Philz's thread but no answer till now.

Can Philz restore backups made within cwm?
I already have some backups from cwm times and if Philz could restore them that would save me a lot of time. Of course I could just try and see, but that information would be usefull to have before starting in advance.

Please, ketut, any information on that?

Sent from my GT-P3110 using xda app-developers app
 

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Please let me ask a question here.
I have already asked in Philz's thread but no answer till now.

Can Philz restore backups made within cwm?
I already have some backups from cwm times and if Philz could restore them that would save me a lot of time. Of course I could just try and see, but that information would be usefull to have before starting in advance.

Please, ketut, any information on that?

Sent from my GT-P3110 using xda app-developers app
Compatible: http://xdaforums.com/showthread.php?t=2201860
 

distan7

Senior Member
Mar 12, 2011
365
146
Jakarta-Indonesia
selamat.gif


Ketut, congrats on your new achievement !

Just one quick question : Can you post all the features (other than dual-boot ability) of this blackhawk-next-kernel on first post ? Or the features are still the same with this :

This is [BOOT IMAGE][GT-P31XX] KK-Boot - Custom boot image for stock 4.1.1/4.1.2 ROM and [KERNEL][GT-P31XX][JB][4.2.2]CyanogenMod 10.1 unofficial kernel 3.0.31 combination, plus cm-10.1-blackhawk commit on github:
  • Remove Samsung debugging code in ext4 filesystem, inline with omapzoom
  • Initializing Android USB depending on the rom type, big thanks to gokhanmoral. This is the key of single kernel. Multiboot support not so far, you can reuse my kernel for multiboot (if you can)
  • Compiler optimizations
  • Kernel without CGROUPS support
  • Using SLQB memory allocator
  • Decrease MPU, IVA, and GPU voltage
  • Adapt and fix codeworkx's sysfs for controlling pivot mode. This is the key of landscape kernel
  • Stop the spam from audio driver
  • An exprimental config, remove a lot of debugging config from kernel: 775MB RAM

Stock JB 4.1.1/4.1.2 ROM: Using a slim version of busybox (from gokhanmoral's ramfs for siyahkernel-sgs3), bash and nano binary, sysrw and sysro script removed. GPU clock @ 384MHz + 2D GPU rendering, stock ROM really need an overclocked GPU.

CM/CM based ROM: As usual, change ro.sf.hwrotation value from 270 to 0 in /system/build.prop will transform your device to landscape mode, a workaround fix for boot animation graphic glitch. GPU clock @ 307MHz + 2D GPU rendering + 16bit transparency + disabled dithering + purging assets allowed

/system/etc/init.post_boot.sh is yours kernel tuning template. But remember, do not force your system too much until you are sure that your device is able to handle it.

Flash this using the latest CWM, CWM Touch, Philz Touch, or TWRP at your own risk!

Thank you
toastcendol.gif
 
  • Like
Reactions: ketut.kumajaya

Andrev01

Senior Member
Nov 1, 2012
845
59
Gliwice
Couple questions to ketut ;) Please try to answer me - noobie :D

1) I can flash this for single rom, yes? It should be better than previous version?
2) I can still turn Tab on, press volume down button to boot into CWM?
3) How to turn off the boot menu? (I think I don't need it)
 

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,138
Bekasi
Couple questions to ketut ;) Please try to answer me - noobie :D

1) I can flash this for single rom, yes? It should be better than previous version?
2) I can still turn Tab on, press volume down button to boot into CWM?
3) How to turn off the boot menu? (I think I don't need it)
1. Yes as covered by Dual Boot FAQs. No.
2. Yes.
3. Can not be, maybe the next version. Reboot to recovery and bootloader may be removed for security reasons.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 224
    NEXT 2.1.8 placeholder: http://xdaforums.com/showpost.php?p=51678768&postcount=2513

    STOP! This kernel supports ONLY Samsung Jelly Bean 4.1.x, 4.2.2, CM 10.1.x, 10.2, and 11.0. It won't work on ICS, CM 9, CM 10.

    FOR NOW I FORBID ANYONE ELSE REUSE THIS STILL IN DEVELOPMENT DUAL BOOT PROJECT FOR HIS/HER OWN GALAXY TAB 2 PROJECT!

    STOP PRESS:
    NEXT 2.x separated in two package: the kernel part as blackhawk-next-kernel-2.x-p31xx.zip and the proprietary binaries part as proprietary-vendor-samsung.zip for JB >= 4.2 and proprietary-vendor-samsung-4.1.x.zip for JB 4.1.x .

    Flash the kernel part first and then directly the proprietary binaries part! Flash the appropriate proprietary part on both 1st and 2nd ROM!

    Sources:
    Kernel sources at http://github.com/kumajaya/android_kernel_samsung_espresso10/tree/cm-10.2-update

    Features:
    • Samsung stock 4.1.x, 4.2.2 (since 1.8), CM 10.1.x and CM 10.2 (since 1.7) support with a single kernel image
    • For stock ROM: external SD card - internal media swapper script included
    • Samsung proprietary exFAT modules are loaded. CM 10.1 exFAT support files attached at post #2
    • For CM/CM based ROM: auto rotate screen default orientation depend on ro.sf.hwrotation value, camera orientation fix included
    • Dual-booting. You can have Samsung JB and CM 10.1 ROMs on a single device at the same time.
    • Nice looking AROMA based boot menu
    • Using CyanogenMod kernel source, updated to p3110 source for newer WLAN (Youtube HD bugfix on stock ROM), modem, sensors driver, and etc for both P31xx and P51xx target
    • CPU clock: 300MHz, 600MHz, 800MHz, 1.008GHz, 1.2GHz, 1.35GHz, 1.42GHz, 1.48GHz, and 1.52GHz, locked @ 1.008GHz on boot
    • GPU clock: 153.6MHz, 307.2MHz, 384MHz, and 512MHz, 307.2MHz as the default maximum clock
    • CPU voltage control. You can use Android Tuner/System Tuner/Trickster MOD to set CPU voltage
    • The ramdisk base on JB 4.1.2 (stock ROM) and JB 4.2.2 (CM 10.1)
    • Using newer PowerVR SGX 540 kernel modules and binaries blob
    • row, bfq, sio, and vr scheduler support
    • Governor bug fix. Replace Samsung's interactive governor with default OMAP4 3.0.31 interactive governor from omapzoom.org, plus pegasusq and lulzactive
    • NFS and CIFS/samba (not loaded by default) filesystem support
    • LZMA compressed initrd, to keep boot image smaller than 8MB
    • swap support. zram and cleancache with a working zcache driver, enabled by default
    • kernel config, insmod configs.ko and then you can access /proc/config.gz
    • external modem support, for PPP Widget (not loaded by default, P31xx need powered USB hub for external modem)
    • Some tweaks from gokhanmoral's siyahkernel for S3, passive entropy tweak applied
    • Remove a lot of debug message from touchscreen driver, display, mmc, modem, etc
    • linaro arm-linux-gnueabihf- cross compiler, compiler optimization applied
    • SuperSU v1.41 for stock ROM
    • Self compiled BusyBox v1.22.0-git in /sbin, config file based on CM's BusyBox bbconfig output. fstrim applet patch applied, android_reboot applet added (a quick but clean port from Android toolbox), swapon applet with priority option. For stock ROM: this version of Busybox will overwrite busybox binary in /system/bin or /system/xbin and save it as busybox.backup
    • Early boot scripts support (/system/etc/init.d, /data/local/userinit.sh, and /data/local/userinit.d)
    • Post boot script support (/system/etc/init.post_boot.sh)
    • For stock ROM: custom boot animation support (/data/local/bootanimation.zip or /system/media/bootanimation.zip if exists, Samsung boot animation as a fallback). If a bootanimation.zip found, the boot sound will be turned off as well as the shutdown animation.
    • Modified mount options
    • adb insecure, adb mode in charge state also insecure
    • Advanced TCP congestion support, westwood as the default congestion
    • No /system/etc/hosts patch, you can install AdAway from F-Droid

    Known Problems:

    Thanks To:
    • gokhanmoral, amarullz, Phil3759, Chainfire, cmenard, codeworkx, imoseyon, coolbho3k, Faux123, AuxLV, CodyF86, poppolo2001
    • This part will be expanded. Most of the patches I applied are coded by someone else. Please remind me if I forget to give credits to anybody...

    Downloads:

    Todo:
    • More features in NEXT tool

    Special Thanks:

    Downloads Record:
    • blackhawk-next-kernel-1.0-p31xx.zip: 316
    • blackhawk-next-kernel-1.1-p31xx.zip: 87
    • blackhawk-next-kernel-1.1-addon-nooc-p31xx.zip: 41
    • blackhawk-next-kernel-1.2-p31xx.zip: 503
    • blackhawk-next-kernel-1.2-addon-nooc-p31xx.zip: 160
    • blackhawk-next-kernel-1.3-p31xx.zip: 240
    • blackhawk-next-kernel-1.3-addon-nooc-p31xx.zip: 112
    • blackhawk-next-kernel-1.4-p31xx.zip: 583
    • blackhawk-next-kernel-1.4-nooc-p31xx.zip: 294
    • blackhawk-next-kernel-1.6-p31xx.zip: 380
    • blackhawk-next-kernel-1.6-nooc-p31xx.zip: 227
    • blackhawk-next-kernel-1.6.1-p31xx.zip: 180
    • blackhawk-next-kernel-1.6.1-nooc-p31xx.zip: 90
    • blackhawk-next-kernel-1.6.2-p31xx.zip: 151
    • blackhawk-next-kernel-1.6.2-nooc-p31xx.zip: 81
    • blackhawk-next-kernel-1.5-p31xx.zip: 600
    • blackhawk-next-kernel-1.5-nooc-p31xx.zip: 304
    • blackhawk-next-kernel-1.8.1-p31xx.zip: 222
    • blackhawk-next-kernel-1.8.1-nooc-p31xx.zip: 99
    • blackhawk-next-kernel-1.8.2-p31xx.zip: 577
    • blackhawk-next-kernel-1.8.2-nooc-p31xx.zip 321

    XDA:DevDB Information
    [KERNEL][SINGLE/DUAL][JB/KK][STOCK/CM]blackhawk's NEXT kernel, Kernel for the Samsung Galaxy Tab 2

    Contributors
    ketut.kumajaya, Android-Andi
    Kernel Special Features: Dual boot stock and AOSP based ROM

    Version Information
    Status: Stable
    Current Stable Version: 2.3

    Created 2014-09-21
    Last Updated 2014-10-11
    95
    NEXT 2.x separated in two package: the kernel part as blackhawk-next-kernel-2.x-p31xx.zip and the proprietary binaries part as proprietary-vendor-samsung.zip for JB >= 4.2 and proprietary-vendor-samsung-4.1.x.zip for JB 4.1.x .

    Changelog:
    21/04/2014 2.2:

    02/01/2014 2.1.5 -> 2.1.6:
    • CM 11.0 support

    28/10/2013 2.1.4 -> 2.1.5:

    27/10/2013 2.1.3 -> 2.1.4:
    • Ramdisk updated to sync with latest CM 10.2

    20/10/2013 2.1.2 -> 2.1.3:
    • Update init script for PAC
    • Disable almost all kernel debugging support except KALLSYMS. Kernel failed to boot with CONFIG_KALLSYMS disabled

    28/09/2013 2.1.1 -> 2.1.2:
    • Turn all CPUs online when governor gets changed, hotplug bug workaround
    • SIO and VR I/O scheduler
    • Initial STweaks support, big thanks @gokhanmoral. Download STweaks app from Play store to access almost all NEXT related settings (CPU governor, frequency, and voltages; GPU governor and frequency limit; surfaceflinger rotation; I/O scheduler; logger; CIFS, Xbox controller, and USB modem support; and dual boot related settings).

    22/09/2013 2.1 -> 2.1.1:

    18/09/2013 2.0 -> 2.1:

    02/09/2013 1.8.3 -> 2.0:

    13/08/2013 1.8.2 -> 1.8.3:
    • Samsung 4.2.2: The first attemp to reduce battery draining issue, zram service disabled! You can enable zram (not as a service) by issuing "setprop persist.service.zram 25" over Terminal Emulator or "adb shell". Reboot is required.
    • CM 10.2: Bluetooth tethering fix from upstream CM 10.2

    07/08/2013 1.8.1 -> 1.8.2:
    • The third attemp to support Samsung 4.2.2 for all device configuration
    • Vendor blobs in separate flashable zip updated, please re-download it!

    06/08/2013 1.8 -> 1.8.1:
    • The second attemp to support Samsung 4.2.2 for all device configuration
    • Vendor blobs in separate flashable zip. For all ROMs, on both 1st and 2nd ROM: Flash vendor-blobs-new-ducati-blackhawk.zip directry after flashing NEXT kernel!
    • Single channel sound output bug fix

    05/08/2013 1.7 -> 1.8:

    01/08/2013 1.6.3 -> 1.7:
    • Initial CM 10.2 support. Do not flash blackhawk-next-cm-exfat-vold.zip! CM 10.2 already has an open source/reverse engineered exFAT filesystem support
    • zram switched to zsmalloc, zram optimized for Android disabled
    • XBox 360 USB controller with BigX LED support enabled (by @iks8 request). Modules not loaded by default, edit /system/etc/init.d/02modules to activate it.

    23/07/2013 1.6.2 -> 1.6.3:
    • Add android_reboot applet to NEXT's busybox (a quick port from Android toolbox) to fix AROMA boot menu fail to boot into recovery/bootloader as reported by @kinung
    • I hate bug!

    22/07/2013 1.6.1 -> 1.6.2:
    • Hotplug CPU governor working properly with cleancache enabled, zcache memory corruption problem fixed!

    21/07/2013 1.6 -> 1.6.1:
    • Hotplug CPU governor kernel panic bug fix. This governor not working properly with cleancache enabled, cleancache disabled for now
    • Static linked busybox compiled from source, fstrim patch applied. Busybox config based on CM's busybox bbconfig output. Total 46 more than previous busybox applet, add priority option to swapon applet
    • zRAM swap per CPU core, same priority value. CM's /system/bin/compcache script updated to handle 2 zRAM devices. Reference: http://wiki.gentoo.org/wiki/Zram
    • Stock ROM persist.customboot.zram property changed to persist.service.zram, follow CM's standard
    • Stock ROM default zRAM size changed to 26% RAM size
    • Swappiness value changed to 90

    18/07/2013 1.5 -> 1.6:

    11/07/2013 1.4.1 -> 1.5:
    • Decrease CPU voltage for frequencies below 1.2GHz, increase CPU voltage for frequencies above 1.2GHz
    • Re-enable MMC_CAP_ERASE for I/O speed improvement, run "fstrim -v /data" and "fstrim -v /cache" manually to TRIM your filesystem or run LagFix (fstrim GUI, download it from Play)
    • Remove my old hack in cpufreq driver
    • Newer PowerVR SGX540 3D kernel module and vendor binaries, in sync to CM-10.1. For dual boot user, you must update both 1st and 2nd ROM to renew both ROM vendor binaries!
    • Change screen_off_max_freq from 1.008GHz to 800MHz, small changes in init scripts
    • SuperSU v1.41

    16/06/2013 1.4 -> 1.4.1:
    • I/O speed improvement, 1.3 and 1.4 bugfix
    • SuperSU v1.34 - thanks Chainfire
    • nooc: Smartreflex class 3 re-enabled, voltage control disabled
    • small update to disable swap support by default for my "stock based ROM" included

    04/06/2013 1.3 -> 1.4:
    • Selected kernel modules, scripts, and binaries integrated in boot.img, single flash for 1st and 2nd ROM
    • Kernel compression back to gzip, boot.img compression switched to lzma for better compression (I need more space)
    • Auto root (for stock)
    • Auto busybox (for stock)
    • Auto rotate (for both stock and CM) depend on ro.sf.hwrotation value, camera orientation fix included
    • External sdcard and internal media swapper script integrated in boot.img (for stock as 1st ROM)
    • Override init.d CPU governor setting on boot completed (technical reason/by design). Please use an app "on boot" or /etc/init.post_boot.sh to set CPU governor
    • init script reworked (again), simplified
    • Standalone nooc version, no longer as an addon for standard NEXT
    • Untested CRT off animation support

    01/06/2013 1.2 -> 1.3:
    • Updated compiler to the latest linaro gcc 4.7
    • Better data integrity on both 1st and 2nd ROM
    • Ramdisk init scripts reworked, inline with the latest Samsung (Taiwan BRI 04/2013) and CM (29/05/2013 nightly)
    • Inline with P51xx port
    • Updated exFAT modules (don't know it's better or worse, it's closed source)
    • Default CPU clock still 1.008GHz, default GPU clock 307.2MHz

    1.1 -> 1.2:
    • Potential bug in sdcard swapper script fixed. Yes, for stock ROM as 1st ROM this kernel still has a script to swap external sdcard - internal media.
    • SuperSU updated to the latest version (stock ROM).

    1.0 -> 1.1:
    • exFAT filesystem support, stock ROM only for now. I will share separate flashable zip for CM 10.1, when it's ready (broken USB storage support). Please note Dual Boot FAQs #24!
    • CGROUPS, SLUB, and TRACING support back enabled for exFAT compatibility, Android logger disabled by default to compesated it. You can enable logger by editing /system/etc/init.d/02modules .
    • No boot menu in single ROM environment.
    • Change stock ROM init.d script starting point. Earlier than before, same as CM 10.1 now.
    • Non overclock addon for anyone who is experiencing overheats when using standard NEXT kernel.
    • Source change: https://github.com/kumajaya/android_kernel_samsung_espresso10/commits/cm-10.1-blackhawk, May 24-26, 2013. A lot of undocumented change in ramdisk side.

    exFAT support in CM 10.1
    • Download and flash blackhawk-next-cm-exfat-vold.zip over recovery
    • fsck.exfat, mkfs.exfat, vold binaries and all needed libraries taken from Samsung JB 4.2.2 included
    • USB storage support is broken, you need USB OTG Helper from http://xdaforums.com/showthread.php?t=1588940 as 3rd party USB storage mounter
    • exfat binaries for exfat support in USB OTG Helper included. So, all USB OTG Helper features (FAT, Ext2/3/4, full NTFS, and exFAT support) enabled
    • To avoid Dual Boot FAQs #24 issue, flash blackhawk-next-cm-exfat-vold.zip and NEXT kernel of course directly after CM update. For CM 10.1 only!

    Download Record:
    • proprietary-vendor-samsung.zip: 4481
    • proprietary-vendor-samsung-4.1.x.zip: 1478
    58
    Dual Boot FAQs

    Dual Boot FAQs

    Adapted from droidphile's "Dual Boot FAQs" with permission.

    1. "Why would I wanna dual-boot?"
    A.
    You don't have to.
    Suppose you're more of an aosp rom fan. But misses the HDMI out, bluetooth hands-free and love sammy camera more. Do a minimal installation of sammy rom and boot into it when in need of these features and use aosp rom otherwise.
    Or you are a sammy rom fan but love the responsiveness and pure android feel of aosp roms.
    And while you can dual boot two sammy or two aosp roms, it doesn't make any sense.

    2. "What if I don't need dual booting?"
    A.
    No issues. Kernel won't force to setup 2 roms. You can single boot as before.

    3. "Will dual booting change my bootloader or do any dangerous stuff like setting my phone on fire?"
    A.
    NO. Changes are at kernel and ramfs level only. Some space in your internal sd card is used, and also the unused hidden partition mmcblk0p11 is used to store cache of second rom. Dual booting doesn't repartition the filesystem or perform anything scary.

    4. "I want to setup dual booting."
    A.
    There are four situations:-
    1) Sammy rom now. Want to use aosp as secondary.
    2) Sammy rom now. Want to use aosp as primary.
    3) Aosp rom now. Want to use sammy as secondary.
    4) Aosp rom now. Want to use sammy as primary.

    Prerequisites for any setup is
    a) Flash latest blackhawk's NEXT kernel
    b) Flash new ducati vendor blobs (since 1.8.x)
    c) Flash latest PhilZ Touch - blackhawk repack version - recovery
    d) Atleast 90% battery left.
    e) 2 GB free on internal SD.
    f) Some spare time

    1) Present sammy, setup aosp as secondary:-
    i) Reboot into recovery
    ii) Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
    iii) Reboot into secondary recovery
    iv) Flash aosp ROM as 2nd ROM
    v) Flash blackhawk's NEXT kernel again
    vi) Flash new ducati vendor blobs again (since 1.8.x)

    2) Present sammy, setup aosp as primary:-
    i) Reboot into recovery
    ii) Nandroid backup your current sammy ROM
    iii) Flash blackhawk's NEXT tool, create system.img for Samsung stock/stock based ROM and then close it
    iv) Reboot into secondary recovery
    v) Nandroid restore your sammy ROM as 2nd ROM
    vi) Flash blackhawk's NEXT kernel again
    vii) Flash new ducati vendor blobs again (since 1.8.x)
    viii) Reboot into primary recovery
    ix) Flash aosp ROM as 1st ROM
    x) Flash blackhawk's NEXT kernel again
    xi) Flash new ducati vendor blobs again (since 1.8.x)

    3) Present aosp, setup sammy as secondary:-
    Same as (1), instead of flashing aosp to second, flash sammy to second.

    4) Present aosp, setup sammy as primary:-
    Same as (2), instead of flashing aosp to first ROM, flash sammy.

    NOTE:
    -To dual boot Two Aosp or Two Sammy roms, just follow (1) or (2) (depending on which one of them you want as primary/secondary), just flash Sammy instead of aosp or aosp instead of sammy.

    5. "What things should I be taking care off while dealing with dual booting?"
    A.
    - Make sure where you are: in primary or secondary recovery.

    6. "How to boot into primary rom?"
    A.
    AROMA based boot menu will help you on every boot.

    7. "How to boot into secondary rom?"
    A.
    AROMA based boot menu will help you on every boot.

    8. "Is kernel partition shared?"
    A.
    Yes. Same kernel boots both roms.

    9. "If I flash another kernel (that doesn't support db) do I lose dual booting?"
    A.
    Yes

    10. "I lost dualbooting after flashing another kernel. I didn't do anything to second rom files in sdcard/.secondrom. How can I get db back?"
    A.
    Just flash the latest blackhawk's NEXT kernel, flash new ducati vendor blobs again (since 1.8.x)

    11. "Will there be any performance degradation on the rom used as secondary compared to primary?"
    A.
    NO

    12. "Will my phone run slow overall because of db?"
    A.
    NO

    13. "How to flash a newer version of 1st rom?"
    A.
    As usual, just flash it from primary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

    14. "How to flash newer version of 2nd rom?"
    A.
    Just flash it from secondary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

    15. "Would upgrading 1st or second rom cause other rom to fail on boot?"
    A.
    No. Partitions of other rom are not touched during upgrading.

    16. "I miss the recovery I used before, so much.."
    A.
    PhilZ Touch not bad at all.

    17. "User apps of 1st rom are automatically available for second rom?"
    A.
    NO. However, if you had backed them up using Titanium Backup or similar apps, just restore apps while on second rom.

    18. "I wanna keep separate backup for apps in both the Roms, since I use one Rom for say entertainment and other productivity."
    A.
    Setup different backup directory in Titanium Backup in 1st and 2nd rom.

    19. "I don't see STweaks app in second rom."
    A.
    This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

    20. "Do I need to anything special before flashing a newer blackhawk's NEXT kernel?"
    A.
    NO. Just flash kernel in primary and secondary recovery. Yes, on both 1st and 2nd ROM. Just flash kernel in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition (since 1.4 version). Flash new ducati vendor blobs (since 1.8.x) on both ROM may be required to ensure vendor blobs match to the kernel

    21. "How can I run same STweaks settings of 1st Rom in 2nd Rom?"
    A.
    This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

    22. "How do I remove everything related to DB and run single boot again?"
    A.
    In primary recovery, flash blackhawk's NEXT tool and delete 2nd ROM system image. OR delete .secondrom directory in /data/media while on 1st Rom.

    23. "If secondrom files are kept in /data/media, will wiping data in recovery erase second rom files?"
    A.
    NO. /data/media is skipped in CWM recovery.

    24. "I was using ExFat card on sammy rom without any issues. I have setup dual boot with aosp and now after booting into CM it says microSD card is corrupted."
    A.
    Aosp roms doesn't support ExFat out of the box. The data was corrupted by aosp vold. Even if you boot back to Sammy rom, it still would be corrupted. To recover data, manually mount the card in recovery, copy contents to internal SD and reformat card to a Fat32.
    Also try
    chkdsk X: /f (where X is the drive letter of microsd), you may be able to copy data.

    25. "I read somewhere that both rom data partition use the same space. Doesn't that mean my apps are shared across roms?"
    A.
    NO. It just means they uses same partition. They're still different directories.
    1st rom data = /data
    2nd rom data = /data/media/.secondrom/data

    26. "Will hitting "Boot into Secondary Recovery" in recovery boot menu change my recovery?"
    A.
    NO. It just runs (not flash) an alternate recovery so that you can configure dualboot settings.

    27. "How do I backup 1st Rom and 2nd Rom?"
    A.
    To backup 1st Rom, do what you did to backup rom while you were single booting a while ago.
    To backup 2nd Rom, use the secondary recovery.

    28. "Is there an easier way for dual-boot?"
    A.
    Yes, send your device to me.

    29. "DB architecture?"
    A.
    Like you know, every rom has a /data, /system, /cache partition and a kernel to boot.
    For primary rom, it's
    mmcblk0p10 = /data
    mmcblk0p9 = /system
    mmcblk0p7 = /cache
    And these won't change whether you're single booting or dual booting.

    For secondary rom, data and system is stored in internal sd, cache in hidden partition. Note that internal sd in our device is mounted to /data/media.
    We have data as a directory, System as an image in data/media/.secondrom. Cache in mmcblk0p11 which is hidden partition and not used otherwise.

    - When second rom is booting, second rom data is bind mounted to mmcblk0p10 as /data/
    - data/media/.secondrom/system.img partition is mounted as /system.
    - mmcblk0p11 is mounted as /cache.

    More FAQs will be added and the list will be updated as DB is improved.
    56
    Just opened a new thread for my masterpiece work on Galaxy Tab 2. Enjoy it and don't forget to press my Thanks button :D

    PhilZ Touch attached in post #1 has a "red" on screen navigation bar in secondary recovery to distinguish between primary and secondary :laugh:

    08/08/2013: Kernel for stock 4.2.2 Developtment Secret
    If you want to build your own kernel for stock 4.2.2, this is the development secrets how to fix CPU frequency jumping to maximum available frequency, how to fix slow graphics issue, how utilize the new ducati firmware and increase the RAM space, how to fix hardware accelerated media problem and how to fix WiFi tethering issue.

    Kernel source: http://github.com/kumajaya/android_kernel_samsung_espresso10/tree/cm-10.1-blackhawk
    Samsung kernel update: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=p3110
    Samsung exFAT source: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=exfat

    1. How to fix CPU frequency jump to maximum available frequency (1.52GHz, overclock version) on boot
      Rename /system/lib/hw/power.default.so to /system/lib/hw/power.default.so.bak, copy power.piranha.so from NEXT kernel 1.8.2 package to /system/lib/hw
    2. How to fix slow graphics issue
      This solution authored by @codeworkx 8 moths ago but disabled by default: https://github.com/kumajaya/android...mmit/0c6d1a53f1a51b588786b168a48e2566f8a49065 Enabling both FB_OMAP2_VSYNC_SEND_UEVENTS and FB_OMAP2_VSYNC_SYSFS solve this problem
    3. How utilize the new ducati firmware and increase the RAM space
    4. How to fix hardware accelerated media problem
    5. How to fix WiFi tethering issue
    If you use above information, proper credit must be given including a clear text about this solution.


    21/09/2013: OMAP PowerVR 3D GPU Control
    There some interface inside /sys/devices/platform/omap/pvrsrvkm.0/sgxfreq:
    1. frequency interface to access the current GPU frequency (153600000/307200000/384000000)
    2. frequency_list interface to access supported GPU frequencies (153600000 307200000 384000000)
    3. frequency_limit interface to access the GPU maximum frequency limit (default: 307200000). Writeable mean this code inside the pvrsrvkm kernel module, the GPU maximum frequency controllable
    4. governor interface to access the current GPU governor (userspace/on3demand/activeidle/onoff)
    5. governor_list interface to access supported GPU governor (userspace on3demand activeidle onoff)

    The upcoming version of Android Tuner (0.10.2) support OMAP GPU controls.

    21/09/2013: NEXT 2.0.1
    As I mentioned before, I still continued cm-10.2 branch kernel development. This branch is the source code of NEXT 2.0, I've added overclock support but limited at 1.2GHz CPU and 384MHz GPU. OMAP GPU controls support applied as gpu_oc interface replacement. Kernel attached here as blackhawk-next-kernel-2.0.1-p31xx.zip .

    Changelog:
    1. Rewriting overclock code: https://github.com/kumajaya/android...mmit/35e0c0455cb7ae4beb50375c5873b328a76a1087
    2. Add sysfs interface to store GPU frequency limit: https://github.com/kumajaya/android...mmit/738061b30d2278d3b51b341bc2597dad300f4e47
    3. Limit GPU frequency to default on boot: https://github.com/kumajaya/android...mmit/8a6933cf6565b5587db6a2a5ce7b1207807ab701
    4. Xpad force feedback support disabled

    WARNING: This kernel only for device that can handle 1.2GHz CPU and 384MHz GPU frequency.
    53
    Dual Boot Exercises

    Exercise I

    An example current facts:
    1. ROM: Samsung stock JB 4.1.2
    2. Kernel: blackhawk single kernel
    3. Recovery: PhilZ Touch prior version

    Prerequisites step:
    1. Update your kernel to blackhawk's NEXT kernel
    2. Update your recovery to the latest PhilZ Touch - blackhawk repack version - recovery
    3. Download CM latest nightly + GApps zip
    4. ~2GB free on internal storage

    Dual boot step:
    1. Reboot into recovery
    2. Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
    3. Reboot into secondary recovery, make sure you choose "Secondary Recovery"! Make sure you really choose "Secondary Recovery"!!
    4. Flash CM
    5. Flash GApps zip
    6. Reflash blackhawk's NEXT kernel
    7. Reboot into secondary ROM - CyanogenMod!

    It's always better if you make a backup before performing all above steps. Do it at your own risk!

    Exercise II

    An example current facts:
    1. ROM: CM 10.1 latest nightly
    2. Kernel: blackhawk single kernel
    3. Recovery: PhilZ Touch prior version
    4. Have Samsung stock 4.1.2 nandroid backup

    Prerequisites step:
    1. Update your kernel to blackhawk's NEXT kernel
    2. Update your recovery to the latest PhilZ Touch - blackhawk repack version - recovery
    3. Nandroid backup your current CM 10.1 ROM
    4. ~2GB free on internal storage. I am not sure, depend on your backup data size

    CM 10.1 as 2nd ROM:
    1. Reboot into recovery
    2. Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it
    3. Reboot into secondary recovery, make sure you choose "Secondary Recovery"! Make sure you really choose "Secondary Recovery"!!
    4. Restore CM 10.1 nandroid backup
    5. Format /cache, clean dalvik-cache
    6. Reflash blackhawk's NEXT kernel
    7. Reboot into secondary ROM - CyanogenMod!

    Samsung 4.1.2 as 1st ROM:
    1. Reboot into primary recovery, make sure you choose "Primary Recovery"! Make sure you really choose "Primary Recovery"!!
    2. Restore Samsung stock 4.1.2 nandroid backup
    3. Format /cache, clean dalvik-cache
    4. Reflash blackhawk's NEXT kernel
    5. Reboot into primary ROM - Samsung!

    Do all above steps at your own risk!