• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

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

395 posts in this topic

Posted

Oh..sorry i missed that one.By the way nice solution.

Thanks, all in all the script creates four different loop files and mounts them, runs the script and then unmounts and removes all the loop files. (i could solve that by running it in one big loop file but that would take up several GB if you have larger data partitions).

The end result is a clean directory waiting for a new install and all the files moved to your /sdcard/multiboot directory. :)

0

Share this post


Link to post
Share on other sites

Posted (edited)

It works for me on CM-10-KonstaKANG from 29/8, i'm running the loop script it to upgrade to 01/09 version right now.

My exact procedure:

1. Downloaded the MakeLoopROM-Android-V4.tar from the link in my OP to the root of the sdcard (/sdcard)

2. start terminal session

3. su

4. cd /sdcard

5. tar -xvf MakeloopROM-Android-V4.tar

6. cd MakeLoopROM

7. sh makelooprom-startup

It runs and completes, all files are in /sdcard/multiboot as they are supposed to, i'll install them in a bit to make sure that works too.

One question, did you change your SU on your rom (if you installed the wraithdu su per the V6-start me up script that may be the problem)

I had followed as per your direction. But still i am facing same permission error.....

Edited by gunapriyan
0

Share this post


Link to post
Share on other sites

Posted

I had followed as per your direction. But still i am facing same permission error.....

This is strange since i can run it just fine on CM-10-KonstaKANG (tested on both 27/8 and 1/9), CM-9-KonstaKANG, PA-1.6a, SSRLS7 and cm-7.2.0-blade (stable).

I'll ask you the same thing i asked De@n, have you fiddled with your su, like installing the v6-start me up package?

There must be something that's different because the above procedure works like a charm every single time on every single ROM i try it on.

There is absolutely NO reason why you shouldn't be able to exec a file with 0777 permission on an ext2 partition as superuser, none what so ever.

Try this for me:

1. open up a terminal session

2. su

3. whoami

4. which $SHELL

5. losetup -f

What is the response after whoami, which $SHELL and losetup -f?

0

Share this post


Link to post
Share on other sites

Posted

Err... I thought that the sdcard is mounted with noexec for security reasons isn't it? It may cause problems just like that... What about extracting to /tmp or /data/local/<subdir>?

0

Share this post


Link to post
Share on other sites

Posted (edited)

This is strange since i can run it just fine on CM-10-KonstaKANG (tested on both 27/8 and 1/9), CM-9-KonstaKANG, PA-1.6a, SSRLS7 and cm-7.2.0-blade (stable).

I'll ask you the same thing i asked De@n, have you fiddled with your su, like installing the v6-start me up package?

There must be something that's different because the above procedure works like a charm every single time on every single ROM i try it on.

There is absolutely NO reason why you shouldn't be able to exec a file with 0777 permission on an ext2 partition as superuser, none what so ever.

Try this for me:

1. open up a terminal session

2. su

3. whoami

4. which $SHELL

5. losetup -f

What is the response after whoami, which $SHELL and losetup -f?

Whoami = root

Which $SHELL = /system/bin/sh

losetup = /dev/block/loop0

Edited by De@n
0

Share this post


Link to post
Share on other sites

Posted

Err... I thought that the sdcard is mounted with noexec for security reasons isn't it? It may cause problems just like that... What about extracting to /tmp or /data/local/<subdir>?

Yeah but it shouldn't matter since i'm using an ext2 loop file to run it from.

It will take a total of 140MB +size of unpacked ROM + size of data and system images created, of course it can be reconfigured to run elsewhere but you still need at least 50MB free from wherever you're running it.

0

Share this post


Link to post
Share on other sites

Posted

Whoami = root

Which $SHELL = /system/bin/sh

losetup = /dev/block/loop0

Yeah, that's all correct.

I'm going to try something else, can you test this new version i'm attatching to this post, just unzip it and copy it to your MakeLoopROM folder on your sdcard and see if this one works better.

makelooprom-startup.zip

0

Share this post


Link to post
Share on other sites

Posted

Yeah, that's all correct.

I'm going to try something else, can you test this new version i'm attatching to this post, just unzip it and copy it to your MakeLoopROM folder on your sdcard and see if this one works better.

Downloading now :D

0

Share this post


Link to post
Share on other sites

Posted

Yeah, that's all correct.

I'm going to try something else, can you test this new version i'm attatching to this post, just unzip it and copy it to your MakeLoopROM folder on your sdcard and see if this one works better.

Downloading now :D

No change :(

0

Share this post


Link to post
Share on other sites

Posted

Another update on the app.

So I've been coding all afternoon and it's at a point where all the data is collated and it's at the final screen where all the functions are performed.

1

Share this post


Link to post
Share on other sites

Posted (edited)

No change :(

This is really weird...

#!/system/bin/sh


cd /sdcard


scriptloop=$(losetup -f)


dd if=/dev/zero of=scriptloop bs=1024 count=20000


losetup $scriptloop scriptloop


mke2fs -t ext2 $scriptloop


mkdir -p runscript


mount -t ext2 -w -o exec $scriptloop runscript


cp -f -r MakeLoopROM/edit-kernel runscript

cp -f MakeLoopROM/zip runscript

cp -f MakeLoopROM/perl runscript

cp -f MakeLoopROM/busybox runscript

cp -f MakeLoopROM/makelooprom-android runscript

chmod 0777 runscript

cd runscript


./makelooprom-android

Why doesn't that work on CM-10-KonstaKANG?

I realized that me testing it on the loop install of CM-10-KonstaKANG was useless since the loop install mounts the sdcard with exec permissions.

However, PA-1.6a, which i'm running on the NAND mounts the sdcard with the noexec option and the above script still works just fine on it.

Edited by Snap.IT
0

Share this post


Link to post
Share on other sites

Posted (edited)

No change :(

Are you getting any other errors before the permission denied? There should be the printout from mke2fs (mke2fs 1.41.12 (17-May-2010) and so on) but are you getting any errors after that and before the permission denied error?

Could you or someone else test the one i'm attatching to this post, same procedure as before, just unpack and copy to your MakeLoopROM folder.

makelooprom-startup-test2.zip

Edited by Snap.IT
0

Share this post


Link to post
Share on other sites

Posted

Another update on the app.

So I've been coding all afternoon and it's at a point where all the data is collated and it's at the final screen where all the functions are performed.

'tis a lot of work but once done it should be easy to add to it. :)

Next step i'm thinking of is to run the updater-script directly after installation and install the ROM into the loop files so you don't have to go through recovery to do that, after reboot you're in your new loop room directly. :)

0

Share this post


Link to post
Share on other sites

Posted

Installing CM-10-KonstaKANG-20120901-blade to my nand right now, i'll test it and come up with a solution. :)

1

Share this post


Link to post
Share on other sites

Posted

I just tried it by curiosity, and for me it fails when it tries to create the system loop file.

'let: arith: invalid syntax: "size=190*1024"'

Obviously 190 is the size for the new /system.

0

Share this post


Link to post
Share on other sites

Posted

Are you getting any other errors before the permission denied? There should be the printout from mke2fs (mke2fs 1.41.12 (17-May-2010) and so on) but are you getting any errors after that and before the permission denied error?

Could you or someone else test the one i'm attatching to this post, same procedure as before, just unpack and copy to your MakeLoopROM folder.

You've cracked it! :P

0

Share this post


Link to post
Share on other sites

Posted

You've cracked it! :P

Sometimes... i'm awesome. :D

Nah, seriously, i forgot an -R on the chmod, i'll upload a new version in a few minutes. :D

Now i'll just restore the PA i had running before i decided i had to test it for myself, didn't actually have to do that if i had just been a bit more patient but it's great to hear that it works now. :)

1

Share this post


Link to post
Share on other sites

Posted

You've cracked it! :P

Heads up on one thing though, you're going to need the new version to make makeloopgapps-startup work or you'll run into the same problem. ;)

0

Share this post


Link to post
Share on other sites

Posted

I just tried it by curiosity, and for me it fails when it tries to create the system loop file.

'let: arith: invalid syntax: "size=190*1024"'

Obviously 190 is the size for the new /system.

That's a new one, never seen that before. :S

That would be in this section:


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

echo " "

echo " "


read SYSTEM_IMG_SIZE


let size=$SYSTEM_IMG_SIZE*1024

What ROM are you running it on?

0

Share this post


Link to post
Share on other sites

Posted (edited)

That's a new one, never seen that before. :S

That would be in this section:


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

echo " "

echo " "


read SYSTEM_IMG_SIZE


let size=$SYSTEM_IMG_SIZE*1024

What ROM are you running it on?

I'm running a (fairly old) cm7 kang at the moment. I'm now trying with hardcoded values... Still in progress. I also found that piece of code, but I just don't see why it fails, because setting 'somevar=4' and executing 'anothervar=$somevar*2' manually from bash works. :o

Okay, now it ran fine, although in the end it weren't able to umount the loop file and it also weren't able to remove runscript, but the zip is there, and the loops files aren't where they supposed to be. I think I can get it working with some hackin' around.

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Posted

I'm running a (fairly old) cm7 kang at the moment. I'm now trying with hardcoded values... Still in progress. I also found that piece of code, but I just don't see why it fails, because setting 'somevar=4' and executing 'anothervar=$somevar*2' manually from bash works. :o

Okay, now it ran fine, although in the end it weren't able to umount the loop file and it also weren't able to remove runscript, but the zip is there, and the loops files aren't where they supposed to be. I think I can get it working with some hackin' around.

Yeah, that is weird indeed, it worked for me on cm-7.2.0-blade (stable).

About the unmount and removal of runscript, are you running the latest version? (v5) I added two sleep commands to it to give it some time to unmount and remove the loop.

0

Share this post


Link to post
Share on other sites

Posted (edited)

No, I was running v4, but I fixed up the remaining things myself, and got konstakang cm10 running from loop. The loading times became MUCH longer, but I think it's probably because I tried it with a Class 4. Otherwise, it's fine. Actually it's still faster than I thought it could be with this card :)

As for the let issue... I still have no idea, but it can be easily worked around with any calculator app.

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Posted (edited)

No, I was running v4, but I fixed up the remaining things myself, and got konstakang cm10 running from loop. The loading times became MUCH longer, but I think it's probably because I tried it with a Class 4. Otherwise, it's fine. Actually it's still faster than I thought it could be with this card :)

As for the let issue... I still have no idea, but it can be easily worked around with any calculator app.

I'm actually running on a class 4 sandisk 16GB sdcard and after the initial loading and the building of the dalvik-cache that takes place for all new apps it's surprisingly fast on my phone. Since i'm using S2E on my nand it is actually faster to run the loop roms after the first reboot after installing all my need to have apps.

One thing you'll notice though is that you can't unmount your sdcard to activate usb storage, i suggest using qtadb for file transfers since it works well enough.

About the let issue, if i could find out why it's not working i can probably fix it but i need to know what version of what rom you're running.

Edited by Snap.IT
0

Share this post


Link to post
Share on other sites

Posted (edited)

Thank you for the tip, although I just tried by curiosity, I wouldn't like to run the OS from loop on a general basis. I'm running a kang based on CM7.2-RC3 (Yes, RC3 :)) by asm19.

It's from June 7.

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Posted

Snap, Is it work with CM-10-Konsta 1/9?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.