5,596,784 Members 48,240 Now Online
XDA Developers Android and Mobile Development Forum

[APP/KERNEL] Dual Boot Ancora

Tip us?
 
educk
Old
(Last edited by educk; 5th October 2013 at 07:27 AM.)
#1  
educk's Avatar
Recognized Developer - OP
Thanks Meter 6251
Posts: 1,107
Join Date: Oct 2012

 
DONATE TO ME
Default [APP/KERNEL] Dual Boot Ancora



Hello everyone!

Together with @h0rn3t we bring you Dual Boot Support for the Samsung Galaxy Wonder (Ancora)

Let's get started

Requirements:
Root
Busybox
CM or other AOSP like ROM based on 4.0+
Minimum ~350MB internal storage free space
External SD (min 4GB, the higher class, the better)


Description:

The process is fairly simple. The application will format your external-sd (we recommend to back up your personal data), then create 3 partitions as follows:
  • /dev/block/mmcblk1p1 -> storage (formatted VFAT)
  • /dev/block/mmcblk1p2 -> /system (formatted EXT4)
  • /dev/block/mmcblk1p3 -> /data (formatted EXT4)

After that you'll be given the possibility to flash a secondary ROM on your EXT-SD (currently only 4.1.2+ ROM's are supported as secondary and 4.0+ as primary).
At last, you'll be able to switch between ROM's within the app.



Process:

WARNING: Partitioning and flashing operations could take up to 5 minutes to complete, please be patient !
  1. Download the app and kernel pack from the Downloads section
  2. If you want the app to be automatically installed on the secondary ROM, push the app to /system/app and give proper permissions (rw-r-r or 644). Otherwise, just install it normally.
  3. Backup your personal data from the external sd card.
  4. Run the app and partition your external-sd.
  5. In app, choose flashing then choose your preferred secondary ROM from your internal SD card (must be 4.1.2 or higher).
  6. Your phone will reboot into recovery and automatically flash the secondary ROM. (in CWM, if you get "Signature Verification Failed", continue flashing, it is normal)
  7. After the flashing process is done, you'll be redirected to your primary ROM.
  8. On your internal SD-Card, you'll have a folder called DualBootSplus, open it up.
  9. Copy the kernels from the kernels pack into their appropriate subfolder. (eg CM-10 kernel (boot2.img) goes into 4.1.2 subfolder -> you'll have to create the subfolder if it doesn't exit)
  10. Now you can switch between ROM's or flash secondary gapps within the app.

Additional details:
  • You must put only 1 boot2.img in each DualBootSplus subfolders.
  • The kernel will determinate which ROM will be booted. So, if you have a primary and secondary ROM, you can quickly switch between them within the app (make sure you have the kernels in the SD-Card subfolders), or manually by flashing the correspondent kernel.
  • The boot2.img can be flashed separately in ADB.

Special thanks goes to @arsradu for his kernels and @Madridii for testing.

XDA:DevDB Information
[GT-I8150] Dual Boot [ANCORA], a Tool/Utility for the Samsung Galaxy W I8150

Contributors
educk, h0rn3t

Version Information
Status: Stable
Current Stable Version: 1.5.1
Stable Release Date: 2013-10-27

Created 2013-10-04
Last Updated 2013-10-26


Google Nexus 5 | Paranoid Android (AOSPA) | Phenom Kernel (experimental)
@ 422 - 2265 MHz; Interactive + Deadline


SAMSUNG GALAXY S PLUS | Paranoid Android 4+ (AOSPA) | K^Kernel | Performance Control | TWRP 2.6.3.0 by ADC Team
@ 245 - 1401 MHz; Ondemand + BFQ


Phenom Kernel [3.4.x]
Official Liquid Smooth Ariesve
Official Liquid Smooth Ancora
[Guide] Build your own kernel for Galaxy W



GitHub


The Following 45 Users Say Thank You to educk For This Useful Post: [ Click to Expand ]
 
educk
Old
(Last edited by educk; 5th October 2013 at 07:42 PM.)
#2  
educk's Avatar
Recognized Developer - OP
Thanks Meter 6251
Posts: 1,107
Join Date: Oct 2012

 
DONATE TO ME
Default For Kernel Developers

For Kernel Developers

How to make a kernel suitable for dual-booting (mounting ext-sd partition)

We know that a kernel (for Galaxy W, S Plus and many others) has 2 major components. The RAMDISK and the zImage.
The RAMDISK is responsible for mounting and other init processes so to successfully boot up a secondary ROM (from the external SD-Card) we need a kernel with a modified RAMDISK, so that it recognizes these external partitions.

As stated in the OP, the app partitions the ext-sd like this:
  • /dev/block/mmcblk1p1 -> storage (formatted VFAT)
  • /dev/block/mmcblk1p2 -> /system (formatted EXT4)
  • /dev/block/mmcblk1p3 -> /data (formatted EXT4)

So these are the exact instructions we should pass to the fstab. (this particular file from the RAMDISK is responsible for disk mounting).

I pasted here a modified fstab.qcom which should explain pretty much everything I did to make a proper dual boot kernel:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#<src>                    <mnt_point>  <type>   <mnt_flags and options>                            <fs_mgr_flags>
/dev/block/mmcblk1p2      /system      ext4     ro,barrier=1                                       wait
/dev/block/mmcblk0p16     /cache       ext4     nosuid,nodev,barrier=0                             wait,check
/dev/block/mmcblk1p3     /data        ext4     noatime,nosuid,nodev,noauto_da_alloc,barrier=1     wait,check,encryptable=footer
Please note that fstabs might vary with Android version.
Currently, only 3.0 kernels are able to mount ext-sd partitions, the 3.4 one has some bugs/differences in the emmc driver which were not fixed/adapted until now.

For decompiling the boot image there are several tools out there. My personal favorite is bootimgtools, there are several toolkits which use this little binary like dsixda's Android Kitchen.

Good luck!
The Following User Says Thank You to educk For This Useful Post: [ Click to Expand ]
 
hadidjapri
Old
(Last edited by hadidjapri; 4th October 2013 at 06:22 PM.)
#3  
hadidjapri's Avatar
Senior Member
Thanks Meter 1029
Posts: 793
Join Date: Sep 2012
Location: Depok

 
DONATE TO ME
Quote:
Originally Posted by educk View Post


Hello everyone!

Together with @h0rn3t we bring you Dual Boot Support for the Samsung Galaxy Wonder (Ancora)

Let's get started

Requirements:
Root
Busybox
CM or other AOSP like ROM based on 4.0+
Minimum ~350MB internal storage free space
External SD (min 4GB, the higher class, the better)
awesome job:thumbup:

Sent from my GT-I8150
The Following 2 Users Say Thank You to hadidjapri For This Useful Post: [ Click to Expand ]
 
fsl7th
Old
#4  
fsl7th's Avatar
Member
Thanks Meter 6
Posts: 37
Join Date: Feb 2013
Location: surabaya
finally, thanks mr educk

---------- Post added at 12:33 AM ---------- Previous post was at 12:24 AM ----------

hi mr educk, it's that ok if i swap the mmc to sd when dual boot ? sorry bad english
 
vpart_aeip
Old
#5  
vpart_aeip's Avatar
Senior Member
Thanks Meter 152
Posts: 122
Join Date: Jan 2013
Location: Salatiga City
Good job mate... thanks :thumbup:
The Following User Says Thank You to vpart_aeip For This Useful Post: [ Click to Expand ]
 
K_TECH
Old
#6  
K_TECH's Avatar
Senior Member
Thanks Meter 310
Posts: 323
Join Date: Feb 2013
Awesome
Thanks sir educk:thumbup::thumbup:
The Following User Says Thank You to K_TECH For This Useful Post: [ Click to Expand ]
 
tycoo
Old
#7  
Senior Member
Thanks Meter 77
Posts: 160
Join Date: Sep 2013
Location: FHain
I have to think about it because i already formatted and configured my ext-sd to be used as app swap with link2sd.

Thanks a lot nevertheless!
*Samsung Galaxy Wonder / LCD Rev.3* *i8150XXLMI*
*DarkCM Beta3 by Madridii & davidteri91 - KK 4.4.2* *arco Kernel v3.4.85 by arsradu* *CWM 6.0.4.5*
My must-have root mods & apps:
Xposed Framework / Performance Control / ViPER4Android FX - XHiFi
AdAway / MyPhoneExplorer / Link2SD / FolderMount / Helium / UsageTimelines Free

.. Cyanogenmod 11 + AriesVE-DevConnection-Team - 'Masters of ION'
 
fsl7th
Old
#8  
fsl7th's Avatar
Member
Thanks Meter 6
Posts: 37
Join Date: Feb 2013
Location: surabaya
Quote:
Originally Posted by tycoo View Post
I have to think about it because i already formatted and configured my ext-sd to be used as app swap with link2sd.

Thanks a lot nevertheless!
haha sure, i'm just test it, my second rom is swap mmc to sd and i forgot to change it, it's run very laggy on second rom
 
sir mordred
Old
#9  
Senior Member
Thanks Meter 81
Posts: 237
Join Date: Sep 2013
Default GOOD!!

thank you very much educk .

now we are able to use stock rom and cm together on the one phone

you are awesome man thanx again
 
fsl7th
Old
#10  
fsl7th's Avatar
Member
Thanks Meter 6
Posts: 37
Join Date: Feb 2013
Location: surabaya
Quote:
Originally Posted by sir mordred View Post
thank you very much educk .

now we are able to use stock rom and cm together on the one phone

you are awesome man thanx again
i think no, the primary rom is 4.0.+ and secondary is 4.1.2+

The Following User Says Thank You to fsl7th For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes