Jump to content

[MOD] [SCRIPT] Multiboot via loop file [19/12]


Guest Snap.IT

Recommended Posts

Guest Snap.IT

Hang on, i'll make a loop rom for CM10-KonstaKANG and test it on there to see what's wrong.

Right now i'm running it on CM9-KonstaKANG and it runs like a charm.

Link to comment
Share on other sites

Guest Snap.IT

Try

sh makelooprom-android

You'll run into errors within the script itself it ./ doesn't work, like ./split-bootimg.pl.

I was wrong above, that runs on the perl interpreter and not the shell.

Apparently i was right, i just tried this on PA ICS and it doesn't work at all.

There has to be something wrong here because on CM9-KonstaKANG it works perfectly but on pa-blade-1.6a it doesn't.

I was under the impression that the SU was bad but it might have something to do with the shell.

If you run which $SHELL, what does it say?

Edited by Snap.IT
Link to comment
Share on other sites

Guest Snap.IT

@snap.it It's /system/bin/sh.

Well that is correct.

I honestly don't know why some ROMs refuse to run this correctly right now, but it has to have something to do with the SU, just to check i'll replace the SU on PA with the version from CM9-KonstaKANG.

Link to comment
Share on other sites

Guest Snap.IT

Yes it's because of the different versions of busybox compiled in different ROMs.

?

It's not because of the busybox i included, it won't run the perl script either or anything called from the script that isn't in path.

However, it works fine on CM9-KonstaKANG and the busybox i put in there isn't from that ROM, it's a complete version of the standard busybox, it should run on every rom including CM7 and CM10.

Link to comment
Share on other sites

Guest Snap.IT

Well just a note. Fat32 doesn't have a permissions system.

That's what i thought too but changing permissions worked for android@sam as he reported above.

As su you should have full permissions on all files on fat32.

Link to comment
Share on other sites

Guest gunapriyan

Boss, "To be able to reboot back to NAND (the ROM on your phones internal storage) you need to copy the boot.img of your current ROM into the multiboot directory." ....Where can i find my current ROM boot.img?

Link to comment
Share on other sites

Guest Snap.IT

Boss, "To be able to reboot back to NAND (the ROM on your phones internal storage) you need to copy the boot.img of your current ROM into the multiboot directory." ....Where can i find my current ROM boot.img?

Easiest way is to open the zip you used to flash your current nand rom, the boot.img is in the root directory of the zip and you can just extract it from there directly into your multiboot directory.

Note, you should make a backup before installing any new rom, that way you can go to backup and restore -> advanced restore -> boot to restore your nand boot image.

Remember that if you run a backup when you are running a loop rom it will backup the boot image of the loop rom and the data, system and sd-ext of your nand rom. :S

I'll be fixing the issue with having to copy your boot.img from the zip file after i get a hold of what's causing the permissions problems, in the next version of this script i'll pull the boot img from MTD instead.

Edited by Snap.IT
Link to comment
Share on other sites

Guest android@sam

Boss, "To be able to reboot back to NAND (the ROM on your phones internal storage) you need to copy the boot.img of your current ROM into the multiboot directory." ....Where can i find my current ROM boot.img?

Or if you just lost your ROM update.zip,then go into the terminal type su and then following command

dump_image boot /sdcard/makelooprom-android/multiboot/boot.img

Edited by android@sam
Link to comment
Share on other sites

Guest gunapriyan

Using "sh makelooprom-anroid" fix permission problem.....

Steps i did...

1. Do you want to make an image file to hold the system for this ROM? Yes

2. What do you want to call your system image? Y

3. Wat size ? 500 MB

...

...

...

Writing Superblocks..............

...

...

...

Do you want to make an image file to hold the data for this ROM? Yes

...

...

What do you want to call your data image? Yes

...

...

...

What size do you want your data image to be ? 200 MB

...

...

...

Writing superblocks....

...

...

...

Type the name of the ROM....

Type the name of data image...

...........................

Gapps...

.....

Select Gapps....

.....

Permission Error....

...

...

Name of ROM ()

Name of data ()

....

....

Finally....2 folders are created....But nothing in it.....

...

In loop-roms folder...() is there ....but empty....some "y" is created in root with 200 MB....

....

....

What can i do?

Is there any wrong i am doing?

Please help me....(I am using CM10-Konsta...)

Regards,

Guna

Edited by gunapriyan
Link to comment
Share on other sites

Guest gunapriyan

used new tar version...

If you need, i can eloborate my process....

If i wrong means, correct me...

I had tried to use "CM9-Burstlam" ROM.....I am using CM10-Konsta ROM.....is there any problem on that?

Edited by gunapriyan
Link to comment
Share on other sites

Guest Snap.IT

There is something wrong with the shell on some ROMs, if you can't start the script using ./makelooprom-android it won't work.

I've tried to use exec instead but the end result is the same, no permissions to execute.

I wonder what would happen if i made an ext2 loopfile, mounted it and ran the whole shebang within the loopfile. I'll check it out.

Link to comment
Share on other sites

Guest Snap.IT

Heh, making an ext2 loop rom for running the script worked just fine, but i'm going to have to rewrite most of the script to make it work properly.

Link to comment
Share on other sites

Guest Snap.IT

Once you've done all that I'm going to try and put it into one simple to use app.

That would be awesome.

The script should be self running now with all the directory changes included so that it can be called from wherever you are, well at least as long as the /sdcard symlink exists which it does seem to be in all roms i've tested.

Link to comment
Share on other sites

Guest Snap.IT

used new tar version...

If you need, i can eloborate my process....

If i wrong means, correct me...

I had tried to use "CM9-Burstlam" ROM.....I am using CM10-Konsta ROM.....is there any problem on that?

Here's an example of my latest install using the new version, the only difference is that you now type sh makelooprom-startup for the rom and sh makeloopgapps-startup for the gapps and other packages as you can see in my example below.

# cd sdcard/MakeLoopROM

/sdcard/MakeloopROM # sh makelooprom-startup

20000+0 records in

20000+0 records out

20480000 bytes transferred in 3.340 secs (6131736 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

5016 inodes, 20000 blocks

1000 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=20709376

3 block groups

8192 blocks per group, 8192 fragments per group

1672 inodes per group

Superblock backups stored on blocks:

8193

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

Do you want to make an image file to hold the system for this ROM? (not neccessary if it's an upgrade from a previous ROM) Y for yes any other key for no.

y

What do you want to call your system image?

cm-10-konstat-system

What size do you want your system image to be (in MB's)?

180

184320+0 records in

184320+0 records out

188743680 bytes transferred in 49.203 secs (3836019 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

46184 inodes, 184320 blocks

9216 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67371008

23 block groups

8192 blocks per group, 8192 fragments per group

2008 inodes per group

Superblock backups stored on blocks:

8193, 24577, 40961, 57345, 73729

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

Do you want to make an image file to hold the data for this ROM? (not neccessary if it's an upgrade from a previous ROM or you want to share a data image with another ROM) Y for yes any other key for no.

y

What do you want to call your data image?

cm-10-konstat-data

What size do you want your data image to be (in MB's)?

500

512000+0 records in

512000+0 records out

524288000 bytes transferred in 154.700 secs (3389062 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

128016 inodes, 512000 blocks

25600 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67633152

Type the name of the ROM you copied to this directory without the file ending. For example if your ROM file name is cm-7.2.0-blade.zip you type cm-7.2.0-blade

cm-10-20120829-KonstaKANG-blade

unzipping your ROM

Saving base and cmdline of boot.img from current ROM (cm-10-20120829-KonstaKANG-blade) for future use

Extracting the boot.img of current ROM (cm-10-20120829-KonstaKANG-blade)

Page size: 2048 (0x00000800)

Kernel size: 3511076 (0x00359324)

Ramdisk size: 173245 (0x0002a4bd)

Second size: 0 (0x00000000)

Board name:

Command line: androidboot.hardware=blade console=null

Writing boot.img-kernel ... complete.

Writing boot.img-ramdisk.gz ... complete.

30000+0 records in

30000+0 records out

30720000 bytes transferred in 12.645 secs (2429418 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

7520 inodes, 30000 blocks

1500 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=30932992

4 block groups

8192 blocks per group, 8192 fragments per group

1880 inodes per group

Superblock backups stored on blocks:

8193, 24577

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

30000+0 records in

30000+0 records out

30720000 bytes transferred in 6.912 secs (4444444 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

7520 inodes, 30000 blocks

1500 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=30932992

4 block groups

8192 blocks per group, 8192 fragments per group

1880 inodes per group

Superblock backups stored on blocks:

8193, 24577

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

30000+0 records in

30000+0 records out

30720000 bytes transferred in 5.119 secs (6001172 bytes/sec)

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

7520 inodes, 30000 blocks

1500 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=30932992

4 block groups

8192 blocks per group, 8192 fragments per group

1880 inodes per group

Superblock backups stored on blocks:

8193, 24577

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

570 blocks

What is the name of the system image you'll be using for this ROM? If you made a system image before for this ROM then use that name ()

cm-10-konstat-system

What is the name of the data image you'll be using for this ROM? If you made a data image before for this ROM then use that name ()

cm-10-konstat-data

If this is a Jelly Bean (CM10) ROM type y for yes, if it's not, type n for no.

y

Creating ramdisk cpio archive ...

Find compiled boot.img inside output folder as cm-10-20120829-KonstaKANG-bladeboot.img

Now fixing your updater-script so you can install this ROM into your loop image

format("yaffs2", "MTD", "system", "0", "/system");

Do you want this installation to format the data image used with this ROM?

Answer Y for yes if it's a new installation and N for no if you are upgrading

and want to keep the data on the data image. (Say yes if you would run wipe

data/factory reset in recovery if this was a normal install)

y

The data image used with this ROM will be formatted during installation

All done, time to pack your ROM up again, it will be called cm-10-20120829-KonstaKANG-blade-loopinstall.zip and will be in multiboot/cm-10-konstat-system/loop-roms

Moving all files to your /sdcard/multiboot directory

Everything worked, cm-10-20120829-KonstaKANG-blade is ready for loop installation.

Happy multibooting :)

Snap.IT aka Jinxxed

/sdcard/MakeLoopROM # sh makeloopgapps-startup

Type the name of the package you copied to this directory without the file ending. For example if your ROM file name is gapps-jb.zip you type gapps-jb

CM9-KonstaKANG-GEN3

unzipping your package

What is the name of the system image you'll be using for this ROM? If you made a system image before for this ROM then use that name ()

cm-10-konstat-system

What is the name of the data image you'll be using for this ROM? If you made a data image before for this ROM then use that name ()

cm-10-konstat-data

Now fixing your updater-script so you can install this ROM into your loop image

run_program("/sbin/busybox", "mount", "/system");

All done, time to pack your package up again, it will be called CM9-KonstaKANG-GEN3-loopinstall.zip and will be in multiboot/loop-roms/cm-10-konstat-system

Moving all files to your /sdcard/multiboot directory

Everything worked, CM9-KonstaKANG-GEN3 is ready for loop installation.

/sdcard/MakeLoopROM # sh makeloopgapps-startup

Type the name of the package you copied to this directory without the file ending. For example if your ROM file name is gapps-jb.zip you type gapps-jb

gapps-jb-20120815-KonstaKANG

unzipping your package

What is the name of the system image you'll be using for this ROM? If you made a system image before for this ROM then use that name ()

cm-10-konstat-system

What is the name of the data image you'll be using for this ROM? If you made a data image before for this ROM then use that name ()

cm-10-konstat-data

Now fixing your updater-script so you can install this ROM into your loop image

run_program("/sbin/busybox", "mount", "/system");

All done, time to pack your package up again, it will be called gapps-jb-20120815-KonstaKANG-loopinstall.zip and will be in multiboot/loop-roms/cm-10-konstat-system

Moving all files to your /sdcard/multiboot directory

Everything worked, gapps-jb-20120815-KonstaKANG is ready for loop installation.

Edited by Snap.IT
Link to comment
Share on other sites

Guest android@sam

android terminal emu says no such file or directory after typing sh makelooprom-startup

any idea why is this happening to me?

You should first mount the makelooprom directory first ro proceed.Type the following commands in term:

su

cd /sdcard/MakeLoopRom

sh makelooprom-startup

Edited by android@sam
Link to comment
Share on other sites

Both of those roms work perfectly when i'm converting them, there is something else that is wrong here, i don't know what but it would help if i knew what ROM you're running the script on.

The fact that you get "permission denied" when trying to run ./makelooprom-android tells me that there is something wrong with your permissions, you need to be su.

For some reason there is a problem with PA roms (i get the exact same response you do when running it on PA roms), it works fine on KonstaKANG though, the problem persists after upgrading SU so i don't know what is going on.

I tried it on both cyanscape rom and then on Burstlam's CM9. Both time i got the same problem.

So i used "sh ./makelooprom-android", then it works fine. But at the end it shows" You have an unusual updater script".

I used CM7.2 and cyanscape rom for convertion.

I hope this helps.

Will use tar file and report back.

Edited by n1729
Link to comment
Share on other sites

Good work I'm using Linux to create the multi boot rom but when I flash in Cwm it I get stuck in the green Man and I'm forced to restore my nand backup, is there something that I'm doing wrong?

Link to comment
Share on other sites

Guest raizor6th

that is exactly what i did before i get the error and i tried it many times following the steps at the OP. The error occured after typing sh makelooprom-startup

im using cm10 konstaKANG latest build.

"no such file or directory"

any idea?

Edited by raizor6th
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.