Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[KERNEL][SINGLE/DUAL BOOT][KK]CM / CM Based / Stock 4.1

OP Android-Andi

12th August 2014, 11:21 AM   |  #1  
OP Recognized Contributor
Thanks Meter: 13,639
 
5,945 posts
Join Date:Joined: Mar 2013
More
NEXT Kernel 1.0.0:

STOP! This kernel supports Custom KitKat Roms (e.g. OmniROM, SlimKat, CM 11.0), Custom JB 4.3.x Roms (e.g. CM 10.2) and Stock / Stockbased Roms!

It won't work on any AOSP Android 4.1.x or 4.2.x Custom Roms for now!


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

Sources:
https://github.com/andi34/android_kernel_samsung_golden

  • Dual-Boot Solution by @ketut.kumajaya, well known from Samsung Galaxy Tab 2 and Samsung Galaxy Tab 3 8.0
  • I/O Scheduler : noop | deadline | cfq | sio | sioplus | row | zen
  • Governor : Abyssplug | Ondemand | Interactive | Powersave | Performance | SmartassV2 | Sakuractive
  • based on latest Samsung OSRC for Samsung Golden (JB_Update2)
  • Linux kernel 3.0.101 version
  • Compiled with GCC 4.7
  • Open source Samsung exFAT included (v. 1.2.7)
  • Static BusyBox v1.21.1 in /sbin, android_reboot applet added (a quick but clean port from Android toolbox), swapon applet with priority option. Thanks to @ketut.kumajaya
  • "magic busybox" for Stock (based) 4.1 Roms: Ramdisk Busybox will overwrite busybox binary in
    /system/bin or /system/xbin and save it as busybox.backup
  • Auto root on Stock (based) 4.1, but please download SuperSU from Google Play to update
  • Early boot scripts support
    (/system/etc/init.d, /data/local/userinit.sh, and /data/local/userinit.d)
  • symlink /system/etc/wifi/bcmdhd_sta.bin_b2 to /system/etc/wifi/bcmdhd_sta.bin
    to fix broken Wifi on Stock(based) Roms
  • SElinux Support

Known Problems:

Bootmenu
- Reboot into Recovery from main Bootmenu does not work
- Reboot into Bootloader from main Bootmenu only reboots normal

StockRom
- USB connection not working, charging works
- Wifi-Tethering not working on Stock / Stockbased Rom

Known fully working Roms
SlimKat by Android-Andi
OmniROM by golden-guy
VanirAOSP by Unjustified Dev
enox Stockbased Rom
Stock Light
Virginity v14
Selfcompiled CM 10.2.1 (based on CM 10.2.1 Stable Source)
Novafusion CM 11 & PAC (ext4 formatted!)
Novafusion CM 10.2 & PAC

Thanks To:
  • ketut.kumajaya - without you this would never be possible <3
  • gokhanmoral, Chainfire
  • @LuuchoRocha
  • @cocafe
  • OliverG96
  • DerTeufel1980
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...


I am still learning each day, i learnd most stuff from our great Developer Ketut P. Kumajaya
- i think HE deserves a Beer instead donating to me ATM. If you like you can spend Ketut a beer using PayPal



Screenshots
NEXT Dual-Boot Tool




XDA:DevDB Information
[golden] NEXT kernel, Kernel for the Samsung Galaxy S III Mini

Contributors
Android-Andi, ketut.kumajaya
Kernel Special Features:

Version Information
Status: Beta

Created 2014-08-12
Last Updated 2014-10-11
Last edited by Android-Andi; 25th August 2014 at 04:07 PM.
The Following 28 Users Say Thank You to Android-Andi For This Useful Post: [ View ]
12th August 2014, 11:21 AM   |  #2  
OP Recognized Contributor
Thanks Meter: 13,639
 
5,945 posts
Join Date:Joined: Mar 2013
More
Downloads
All files attached
- NEXT Tool 0.2 to create a 2nd System Partition (system.img) - also included inside PhilZ Touch Blackhawk Recovery
- PhilZ Touch Blackhawk Recovery for Dual-Boot-Support
- NEXT Kernel


Since NEXT Kernel 1.5.4: download latest NEXT Kernel here

Older files for history still here attached!



Changelog
Code:
11.10.2014
1.5.6 -> 1.6.0
- Utilized blkid further
- Autogenerated fstab adapted from NEXT Kernel for Samsung Galaxy Tab 3
- Initial F2FS Support (experimental)

19.09.2014
Update dual boot tool 0.3
- Create 1.5 GB dynamic growth sparse image
- Ext4 formatting fix
- Free space calculation fix

1.5.5 -> 1.5.6
- fixes a warning in dmesg (sysfs: cannot create duplicate filename '/devices/virtual/switch/usb_audio')

17.09.2014
1.5.4 -> 1.5.5
- get rid of DVFS limit without breaking Stock 4.1 or Android 4.3 / Android 4.4
  thanks @LuuchoRocha and @cocafe 

16.09.2014
1.5.3 -> 1.5.4
- Android 4.3: added PAC Support
- Nintendo Wii Remote support (experimental, untested)
- cpufreq: turn all CPUs online when governor gets changed

04.09.2014
1.5.1 -> 1.5.3
- "magic busybox" for Stock (based) 4.1 Roms: Ramdisk Busybox will overwrite busybox binary in
  /system/bin or /system/xbin and save it as busybox.backup
- Auto root on Stock (based) 4.1, but please download SuperSU from Google Play to update
- Early boot scripts support
  (/system/etc/init.d, /data/local/userinit.sh, and /data/local/userinit.d)
- symlink /system/etc/wifi/bcmdhd_sta.bin_b2 to /system/etc/wifi/bcmdhd_sta.bin
  to fix broken Wifi on Stock(based) Roms

01.09.2014
1.5.0 -> 1.5.1
fix broken Dual-Boot (because missing "tmp" folder inside ramdisk? also some file permissions fixed inside ramdisk)

1.4.0 -> 1.5.0
Upstream Kernel Changes to 3.0.101 - thanks a lot to @Fred6681 for fixing some know Problems after Upstream!
Build Xpad module (not tested if it is working)
Enabled DVFS Limit to make the Kernel boot on Stock and AOSP Roms
New Charger-Animation - thanks a lot to @daywalk3r666

25.08.2014
1.3.1 -> 1.4.0
Initial CM 10.2 support

22.08.2014
1.3.0 -> 1.3.1
Fix 800mhz bug, thanks to  @Fred6681

1.2.0 -> 1.3.0
Updated Android 4.4 ramdisk: this will fix broken Wifi on Novafusion Roms / Roms based on Novafusion source
Build exFat as module

20.08.2014
1.1.0 -> 1.2.0
Added Stock / Stock based 4.1 Support
More i/o scheduler: Added sioplus | row | zen
Compiled using GCC 4.7 again for better compatibility
Update LZO compression
arm/vfp: Makefile optimization
and some more....

1.0.5 -> 1.1.0
Fixed bootmenu flickering / blackscreen :) now the bootmenu is 100% visible
(Reboot-Recovery option from bootmenu not working, ends in kernel-panic,
reboot bootloader not working, it will normal reboot)
partially restore initial cm11 ramdisk
cleanup cm11 ramdisk

19.08.2014
1.0.4 -> 1.0.5
Update permissions inside init.samsunggolden.rc,
set SELinux to permissive for now,
lzma compressed ramdisk

1.0.3 -> 1.0.4 
Use Linaro 4.8 Toolchain

18.08.2014
1.0.2 -> 1.0.3
Use Linaro 4.7-2013-04 Toolchain

12.08.2014
1.0.1 -> 1.0.2
- fix an Superuser issue, added back init.superuser.rc

1.0.0 -> 1.0.1:
- fix "com.android.phone" crashed on Vanir Rom

1.0.0:
- initial release
How-To
  1. Flash PhilZ Touch Blackhawk Recovery
  2. Reboot into PhilZ Touch Blackhawk
  3. Flash NEXT Kernel
  4. Advanced Functions -> Run Aroma Dual Boot Tool
  5. Create a 2nd System.img (choose 1 GB)
  6. Reboot your recovery
  7. Choose the 2nd Bootoption (it is flickering, black screen, just press the volume down key one time and press the power button).
  8. Now the navigation buttons inside PhilZ Touch are RED
  9. Flash a 2nd Rom (i tested my own SlimKat and @golden-guys OmniROM because they don't use F2FS)
  10. Flash NEXT Kernel again
  11. Reboot
  12. Now you will see a Bootmenu (flicckering & blackscreen), you will see it short if you press the volume key,
    first option = boot 1st Rom, second option = boot 2nd Rom

USE ON YOUR OWN RISK! MAKE A BACKUP BEFORE TRYING!
Attached Files
File Type: zip nexttool-0.2-golden.zip - [Click for QR Code] (665.9 KB, 283 views)
File Type: zip GT-I8190_PhilZ-Touch-Recovery_6.57.2-blackhawk.zip - [Click for QR Code] (7.12 MB, 268 views)
File Type: zip blackhawk-next-kernel-1.0-golden.zip - [Click for QR Code] (7.85 MB, 88 views)
File Type: zip blackhawk-next-kernel-1.0.1-golden.zip - [Click for QR Code] (7.85 MB, 11 views)
File Type: zip blackhawk-next-kernel-1.0.2-golden.zip - [Click for QR Code] (7.85 MB, 132 views)
File Type: zip blackhawk-next-kernel-1.0.3-golden.zip - [Click for QR Code] (7.85 MB, 22 views)
File Type: zip blackhawk-next-kernel-1.0.4-golden.zip - [Click for QR Code] (8.53 MB, 20 views)
File Type: zip blackhawk-next-kernel-1.0.5-golden.zip - [Click for QR Code] (7.32 MB, 31 views)
File Type: zip GT-I8190_PhilZ-Touch-Recovery_6.57.2-2-blackhawk.zip - [Click for QR Code] (7.60 MB, 97 views)
File Type: zip blackhawk-next-kernel-1.1.0-golden.zip - [Click for QR Code] (7.36 MB, 26 views)
File Type: zip blackhawk-next-kernel-1.2.0-golden.zip - [Click for QR Code] (6.62 MB, 35 views)
File Type: zip blackhawk-next-kernel-1.3.0-golden.zip - [Click for QR Code] (6.61 MB, 31 views)
File Type: zip blackhawk-next-kernel-1.3.1-golden.zip - [Click for QR Code] (6.61 MB, 65 views)
File Type: zip blackhawk-next-kernel-1.4.0-golden.zip - [Click for QR Code] (6.99 MB, 107 views)
File Type: zip blackhawk-next-kernel-1.5.0-golden.zip - [Click for QR Code] (6.32 MB, 35 views)
File Type: zip blackhawk-next-kernel-1.5.1-golden.zip - [Click for QR Code] (6.32 MB, 54 views)
File Type: zip blackhawk-next-kernel-1.5.2-golden.zip - [Click for QR Code] (6.38 MB, 123 views)
File Type: zip GT-I8190_PhilZ-Touch-Recovery_6.57.5-blackhawk-f2fs.zip - [Click for QR Code] (7.19 MB, 142 views)
File Type: zip blackhawk-next-kernel-1.5.3-golden-signed.zip - [Click for QR Code] (6.38 MB, 426 views)
File Type: zip GT-I8190_PhilZ-Touch-Recovery_6.57.8-blackhawk-f2fs.zip - [Click for QR Code] (7.15 MB, 198 views)
Last edited by Android-Andi; 11th October 2014 at 11:27 PM.
The Following 20 Users Say Thank You to Android-Andi For This Useful Post: [ View ]
12th August 2014, 11:21 AM   |  #3  
OP Recognized Contributor
Thanks Meter: 13,639
 
5,945 posts
Join Date:Joined: Mar 2013
More
Reserved
Dual Boot FAQs
Adapted from @ketut.kumajaya s Dual-Boot FAQ,
original adapted from droidphile's "Dual Boot FAQs".

1. "Why would I wanna dual-boot?"
A.
You don't have to.
You need one testing system and don't want to break your daylie Rom.
You can not decide between different Roms - use both :)

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 mmcblk0p24 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:-

Prerequisites for any setup is
a) Flash latest blackhawk's NEXT kernel.
b) Flash latest Extended PhilZ Touch recovery: http://forum.xda-developers.com/show...18&postcount=2
c) Atleast 90% battery left.
d) 3 GB free on internal SD.
e) Some spare time

1) Present AOSP, setup AOSP as secondary:-
i) Reboot into recovery
ii) Select "Run Aroma Dual Boot Tool" in Advaced Menu, create system.img for CM/CM based ROM and then close it
iii) Reboot into secondary recovery (red on screen navigation buttons)
iv) Flash AOSP ROM as 2nd ROM
v) Flash blackhawk's NEXT kernel again

2) Present AOSP, setup aosp as primary:-
i) Reboot into recovery
ii) Nandroid backup your current sammy ROM
iii) Select "Run Aroma Dual Boot Tool" in Advaced Menu, create a 2nd system.img and then close it
iv) Reboot into secondary recovery (red on screen navigation buttons)
v) Nandroid restore your AOSP ROM as 2nd ROM
vi) Flash blackhawk's NEXT kernel again
vii) Reboot into primary recovery
viii) Flash AOSP ROM as 1st ROM
ix) Flash blackhawk's NEXT kernel again

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

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

14. "How to flash newer version of 2nd rom?"
A.
Just flash it from secondary recovery. Flash blackhawk's NEXT kernel again

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. "Do I need to anything special before flashing a newer blackhawk's NEXT kernel?"
A.
NO. Just flash kernel in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition

20. "How do I remove everything related to DB and run single boot again?"
A.
In primary recovery, flash blackhawk's NEXT tool or "Run Aroma Dual Boot Tool" in Advaced Menu from PhilZ Touch Blackhawk and delete 2nd ROM system image. OR delete .secondrom directory in /data/media while on 1st Rom.

21. "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.

22. "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

23. "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.

24. "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.

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

26. "DB architecture?"
A.
Like you know, every rom has a /data, /system, /cache partition and a kernel to boot.
For primary rom, it's
mmcblk0p25 = /data
mmcblk0p22 = /system
mmcblk0p23 = /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 mmcblk0p24 which is hidden partition and not used otherwise.

- When second rom is booting, second rom data is bind mounted to mmcblk0p25 as /data/
- data/media/.secondrom/system.img partition is mounted as /system.
- dev/block/mmcblk0p24 is mounted as /cache.



How to get important Logs
Quote:
Originally Posted by tonyp

The three most important log types are:

  • logcat: the logoutput of the Android system
  • radio logcat: the log outpur ot your System / BB / RIL communication
  • kernel log (kmsg / dmesg): the kernel messages
    Additionally there's the last_kmsg which is a dump of the kernel log until the last shutdown.

Normal Logcat:
Code:
adb logcat -v time -d > logcat.log
Radio Logcat:
Code:
adb logcat -b radio -v time -d > logcat_radio.log
Note: Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb:
Settings - Developer Options - Root access - choose: "Apps and ADB"


Kernel Log:
Code:
adb shell su -c dmesg > dmesg.log
Last_kmsg:
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.log


More FAQs will be added and the list will be updated as DB is improved.
Last edited by Android-Andi; 19th August 2014 at 03:14 PM.
The Following 11 Users Say Thank You to Android-Andi For This Useful Post: [ View ]
12th August 2014, 01:02 PM   |  #4  
samnettt's Avatar
Senior Member
Flag Kerala
Thanks Meter: 41
 
209 posts
Join Date:Joined: Oct 2012
More
Wow!
another milestone in the S3 Mini history!
Keep it up bro
The Following 3 Users Say Thank You to samnettt For This Useful Post: [ View ]
12th August 2014, 01:03 PM   |  #5  
meduza2's Avatar
Senior Member
Thanks Meter: 416
 
1,293 posts
Join Date:Joined: May 2012
Incredible!!
This will bring my two favorite ROMs on one device!! Unbelievable Till now, I thought it is possible only with linux lubuntu and ROM, like on my tab...
Thank you!
m.
The Following 2 Users Say Thank You to meduza2 For This Useful Post: [ View ]
12th August 2014, 02:04 PM   |  #6  
Senior Member
Flag Izmir
Thanks Meter: 53
 
256 posts
Join Date:Joined: Nov 2013
More
This is amazing! Can we use roms like debloated stock with your roms?

Sent from my GT-I8190/Novafusion CM11
12th August 2014, 02:07 PM   |  #7  
meduza2's Avatar
Senior Member
Thanks Meter: 416
 
1,293 posts
Join Date:Joined: May 2012
Don't you read the OP?!? Not for stock ROMs! And 4.4.x only!
m.
The Following User Says Thank You to meduza2 For This Useful Post: [ View ]
12th August 2014, 02:38 PM   |  #8  
Senior Member
Flag Izmir
Thanks Meter: 53
 
256 posts
Join Date:Joined: Nov 2013
More
Quote:
Originally Posted by meduza2

Don't you read the OP?!? Not for stock ROMs! And 4.4.x only!
m.

Ah missed that part! Thanks for pointing out.

Sent from my GT-I8190/Novafusion CM11
12th August 2014, 02:50 PM   |  #9  
meduza2's Avatar
Senior Member
Thanks Meter: 416
 
1,293 posts
Join Date:Joined: May 2012
No worries
m.
12th August 2014, 02:54 PM   |  #10  
OP Recognized Contributor
Thanks Meter: 13,639
 
5,945 posts
Join Date:Joined: Mar 2013
More
Quote:
Originally Posted by heithered

This is amazing! Can we use roms like debloated stock with your roms?

Sent from my GT-I8190/Novafusion CM11

Will try to add Stock 4.1.2 support sometimes later.

Send from OnePlus One using Tapatalk

The Following 8 Users Say Thank You to Android-Andi For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes