• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory
Search This thread

7alvi

Senior Member
Jan 14, 2012
842
1,302
25
Kanpur, Delhi
I found that your updater-script was fine.. the problem must be with the kernel.. here's my kernel : http://d-h.st/q91

Download it just take out the boot.img(its named "boot3.img" --rename it to1)boot.img use in rom 2) cm.img (put it in sd-card)
Now, also take the modules part.. then i think it should work fine.. if problem still persistes.. i'll also attach the updater-script !!

And guys the kernel i have uploaded will work for all android 4.2.2 roms .. just use the modules and boot.img

*wifi may not work

and the kernel source is same as mine pandora kernel's

Uh there is some confusion. I just noticed in non-edited updater-script that this line
Code:
mount("yaffs2", "MTD", "system", "/system");
appears two times. Once we replace it with what you have given in first post. What do we do with other one?

UPDATE: I just tried with your boot.img and modules. Results are same. Flashes and finishes too early and stuck on HTC logo. I still think its updater-script problem. the rom isn't getting flashed. I request you to take a closer look at updater-script. It might be different from 4.1.
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Might be the recovery then... :p
After flashing the ROM, try adb shelling, and mount the sd-partition which contains system files (using busybox), and check if all files are extracted properly. if yes, problem lies elsewhere. if no, problem lies with recovery and/or updater script.
 

7alvi

Senior Member
Jan 14, 2012
842
1,302
25
Kanpur, Delhi
Might be the recovery then... :p
After flashing the ROM, try adb shelling, and mount the sd-partition which contains system files (using busybox), and check if all files are extracted properly. if yes, problem lies elsewhere. if no, problem lies with recovery and/or updater script.

After flashing i checked the partitions using mini tool and all partition free and used space is unchanged.. So the rom hasn't flashed.. Im sure of it.. Ill try with yannous recovery..!
 

<JohnCarter>

Senior Member
Jun 1, 2012
761
1,770
Ranchi
After flashing i checked the partitions using mini tool and all partition free and used space is unchanged.. So the rom hasn't flashed.. Im sure of it.. Ill try with yannous recovery..!

i use philz recovery !! and fisrt time system gets mounted for some busybox tools and then gets unmounted.. the part which you have edited was fine.. maybe you can also check the recoverylog
 

<JohnCarter>

Senior Member
Jun 1, 2012
761
1,770
Ranchi

7alvi

Senior Member
Jan 14, 2012
842
1,302
25
Kanpur, Delhi
Ok now it looks like it was never the problem of updater-script...I tried your updater-script...I even tried your modified cm10..All gives same result..Flashing finishes too early...I've partitioned correctly also..I dont have any clue now..Im going to try with different recovery!
 

Attachments

  • untitled.JPG
    untitled.JPG
    27.8 KB · Views: 104

<JohnCarter>

Senior Member
Jun 1, 2012
761
1,770
Ranchi
Ok now it looks like it was never the problem of updater-script...I tried your updater-script...I even tried your modified cm10..All gives same result..Flashing finishes too early...I've partitioned correctly also..I dont have any clue now..Im going to try with different recovery!

Yes.. i too had same problems with TWRP ... maybe philz recovery or yannaou's can help you .. i have only tested pll2 OC and dual booting in these recoveries..
 

7alvi

Senior Member
Jan 14, 2012
842
1,302
25
Kanpur, Delhi
Yes.. i too had same problems with TWRP ... maybe philz recovery or yannaou's can help you .. i have only tested pll2 OC and dual booting in these recoveries..

I was also using Philz...I switched to yaanou's and all worked fine..finally I'm able to dual boot...app works great..dual booting thinkingBridge and miui 4.1..TB with Pll2 oc also..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    #THIS GUIDE IS ONLY FOR ADVANCED USERS, WHO KNOW HOW TO COMPILE AND MAKE MODIFICATIONS TO KERNEL AND MODIFYING VARIOUS PARAMETERS IN RAMDISK IN THE RAMDISK LEVEL #


    Hey guys this guide will tell you how to add support for Dual bootinga as primary ROM.

    YOU MUST USE ATLEAST CLASS 6 OR ABOVE SDCARD WITH MINIMUM 8GB CAPACITY

    First you need 3 EXT4 partitions on SD-card, using minitool partition wizard
    1) around 400 MB - SD-SYSTEM (ext4)
    2) around 1 GB (or can be less) - SD-DATA(ext4 format),
    3)around 75MB (can be less) SD-CACHE(ext4 format) (refer to the screenshot):

    dual_zps2a02cd36.jpg


    This is very important : You should remove any memory increasing script that you were using. Because /data partition is now on SDcard, using memory increasing script will cause conflict and makes ROM unbootable.

    Now making kernel level Changes :

    Step 1- open the defconfig of your kernel source and make this change in it
    Enable LBDAF (for multiple partitions to work)
    Code:
    [COLOR="Navy"]CONFIG_LBDAF=y[/COLOR]
    Now compile the kernel.
    Step 2- Ramdisk level changes:
    All modifications are performed on init.rc file.
    Step 1- Search for this line :
    Code:
    mount yaffs2 [email protected] /system
    mount yaffs2 [email protected] /system ro remount

    Replace it with this :
    Code:
    [COLOR="Navy"]# Mount SD-SYSTEM
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
    mount ext4 /dev/block/mmcblk0p2 /system
    mount ext4 /dev/block/mmcblk0p2 /system ro remount[/COLOR]
    Step 2 - find this line :
    Code:
    mount yaffs2 [email protected] /data nosuid nodev

    Now replace it with :
    Code:
    [COLOR="navy"]# Mount SD-DATA
        wait /dev/block/mmcblk0p3
        wait /dev/block/mmcblk0p3
        wait /dev/block/mmcblk0p3
        wait /dev/block/mmcblk0p3
        mount ext4 /dev/block/mmcblk0p3 /data nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue[/COLOR]

    Step 3- Find this line :
    Code:
    mount yaffs2 [email protected] /cache nosuid nodev
    Replace it with :
    Code:
    [COLOR="navy"]# Mount SD-CACHE
        wait /dev/block/mmcblk0p4
        wait /dev/block/mmcblk0p4
        wait /dev/block/mmcblk0p4
        wait /dev/block/mmcblk0p4
        mount ext4 /dev/block/mmcblk0p4 /cache nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue[/COLOR]
    That's it now pack the ramdisk with the kernel you made earlier
    All of this is much similar like pll2 Oc by cute_prince.

    Now the Updater-script changes

    This was the real pain in finding out, It took me nearly a month to figure out how to extract system on the partition, and learn the mount function.. If you are using it PLEASE give me some credits ;)

    Step 1- one the updater-script of the ROM find these lines :
    Code:
    format("yaffs2", "MTD", "system", "0", "/system");
    mount("yaffs2", "MTD", "system", "/system");
    package_extract_dir("system", "/system");

    Replace them with these:
    Code:
    [COLOR="navy"]run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/system");
    run_program("/sbin/busybox", "rm", "-rf", "/system/*");
    package_extract_dir("system", "/system");[/COLOR]

    That's it you've Successfully added support for the rom as primary ROM !! :D

    Head Over here : http://forum.xda-developers.com/showthread.php?t=2409236
    for flashing instructions ,dual boot app by galaxy freak and switching mechanisms

    IF YOU WANT TO PLL2 OC BOTH PRIMARY AND SECONDARY ROMs GO TO THE GUIDE BY @Arslankirmani HERE : http://forum.xda-developers.com/showpost.php?p=45063954&postcount=84

    Now if you are using it for adding support for ROM , please PM either me,adityalahiri13 or galaxyfreak the download link so that we can add on the dual boot thread.. IF you are a ROM developer ,i kindly request you to let us also keep the download link for the primary enable ROM.
    6
    The Yin-Yang Way!

    Procedure

    You MUST know how to unpack/repack kernels, and their ramdisks.

    If you unpack your kernel, you would find the folder named sbin where you'd unpacked the ramdisk. Place these two files busybox.7z and bootsdcard.txt in the folder. Rename them to "busybox" and "bootsdcard.sh" respectively.
    Additionally, you will need to create a folder named "tmp" where you've unpacked the ramdisk.

    Now, open up init.rc and find the lines:

    Code:
    on fs
    # mount mtd partitions
        # Mount /system rw first to give the filesystem a chance to save a checkpoint
        mount yaffs2 [email protected] /system
        mount yaffs2 [email protected] /system ro remount
        mount yaffs2 [email protected] /data nosuid nodev
        mount yaffs2 [email protected] /cache nosuid nodev

    After these lines, you are most likely to find these lines (or similar lines):

    Code:
    # once everything is setup, no need to modify /
        mount rootfs rootfs / ro remount

    Add the following lines to the above:
    Code:
        chmod 0777 /sbin/busybox
        chmod 0777 /sbin/bootsdcard.sh
        exec /sbin/busybox sh /sbin/bootsdcard.sh

    En total, it should look like this:

    on fs
    # mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a checkpoint
    mount yaffs2 [email protected] /system
    mount yaffs2 [email protected] /system ro remount
    mount yaffs2 [email protected] /data nosuid nodev
    mount yaffs2 [email protected] /cache nosuid nodev

    on post-fs
    chmod 0777 /sbin/busybox
    chmod 0777 /sbin/bootsdcard.sh
    exec /sbin/busybox sh /sbin/bootsdcard.sh
    # once everything is setup, no need to modify /
    mount rootfs rootfs / ro remount

    Now, you can repack the ramdisk, and repack the kernel. In most cases, you should be able to flash the kernel with the busybox included. If you are not able to flash the repacked boot.img, please post the boot.img along with thread from which obtained/sources.

    P.S. For the curious, this is what bootsdcard.sh looks like:

    Code:
    #!/sbin/busybox sh
    
    MOUNT="/sbin/busybox mount"
    UMOUNT="/sbin/busybox umount"
    MKDIR="/sbin/busybox mkdir"
    RMDIR="/sbin/busybox rmdir"
    TOUCH="/sbin/busybox touch"
    
    $MKDIR /tmp/sdcard
    $CHMOD 0770 /dev/block/mmcblk0p1
    $MOUNT /dev/block/mmcblk0p1 /tmp/sdcard
    if [ -f /tmp/sdcard/.bootsdcard ]; 
    	then
    		$TOUCH /tmp/.bootsdcard
    	fi
    $UMOUNT /tmp/sdcard
    $RMDIR /tmp/sdcard
    
    if [ -f /tmp/.bootsdcard ]; 
    	then
    		$UMOUNT /data;
    		$CHMOD 0770 /dev/block/mmcblk0p2
    		$MOUNT -t ext3 -o nosuid,nodev /dev/block/mmcblk0p2 /data
    		$UMOUNT /system
    		$CHMOD 0770 /dev/block/mmcblk0p3
    		$MOUNT -t ext3 /dev/block/mmcblk0p3 /system
    		$MOUNT -t ext3 -o remount,ro /dev/block/mmcblk0p3 /system
    		$UMOUNT /cache
    		$CHMOD 0770 /dev/block/mmcblk0p4
    		$MOUNT -t ext3 /dev/block/mmcblk0p4 /cache
    fi

    Now, to switch to the other ROM, please create a file named ".bootsdcard", and to switch to primary ROM, delete the ".bootsdcard" from your sdcard.

    I know this post looks wierd, and outta place. the busybox.7z and bootsdcard.sh file can be obtained from here: http://forum.xda-developers.com/showthread.php?t=2413642
    until I edit this post...

    P.s. @omerjerk made an app for this purpose... he'd release it shortly.
    2
    Yes.. i too had same problems with TWRP ... maybe philz recovery or yannaou's can help you .. i have only tested pll2 OC and dual booting in these recoveries..

    I was also using Philz...I switched to yaanou's and all worked fine..finally I'm able to dual boot...app works great..dual booting thinkingBridge and miui 4.1..TB with Pll2 oc also..
    1
    What if?

    @ayushrox
    U said on facebook that the sd-data is only for primary rom and the data for the secondary rom is on the NAND Partition ....
    So , can't we make changes in the boot.img of Secondary Rom so that it uses the SD-DATA Partition for its data ......?
    So our apps can be used in both the roms......
    1
    ayushrox atleast can you make CM10.1 as primary rom for who dont know how to compile , etc... and please make primary rom support Pll2 OC.

    good work!!!!!