[DEV]Dualboot 2013-05-12 - concept for all 2nd-boot roms and new CM10.1 SDCARD rom - Defy Android Development

After a lot of testing it is time to present "new" way to use dualboot on defy.
How it works.
Stock and custom roms can support different ways to boot a rom. 2nd-init, 2nd-boot and stock.
For dualboot we need 2nd-boot. First we use 2nd-boot to run TWRP recovery from quarx. With TWRP we can mount sdcard as /system.
With a "modded" update script we can install system files to a sdcard partition.
For this you will need 3 primary partitions on your sdcard. First partition fat32, secound partition min. 512 Mb ext3 and 3rd partition min 512 max 2048 Mb. (You can use MiniTool Paritition wizard Home edition http://www.partitionwizard.com/ to create this partitions)
You need to change the /meta-inf/com/google/android/updater-scipt:
NAND
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
ext3 partition, it is the 2nd partition
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p2", "/system");
To install the modded zip you have to run the TWRP.
After TWRP boots you can install the "modded" rom zip.
Now we need to install files to boot sdcard rom from your NAND bootmenu.
For this we have to edit the ramdisk from /system/bootmenu/2nd-boot/ramdisk and create a update.zip that install new files to NAND /system.
You have to edit all /system and /data mount points. They have to match with sdcard.
On NAND /system use /dev/block/mmcblk1p21 and /data /dev/block/mmcblk1p25
For SDCARD /system use /dev/block/mmcblk0p2 and /data /dev/block/mmcblk0p3
I use Cygwin (http://www.cygwin.com/) and boottools to edit ramdisk. (sorry can`t remember where i download it)
Now you can boot your rom from sdcard. It is like 2nd-boot.
ROM DEVS can use Aroma Installer to support nand and sdcard install with one zip.
For CM10.1 i edited all files and you can try it.
Check my skydrive folder. /Mobile Phone/CM10.1-2nd-system-for-MS2Ginger
How to install CM10.1 SDCARD if you are running MS2Ginger 5.0
1. install TWRP View attachment 2nd-system-TWRP-NAND.zip
2. set default boot (bootmenu) to 2nd-system
3. reboot --> TWRP should boot now
4. install cm-10.1-20130511-NIGHTLY-mb526-sdcard-gapps.zip
5. reboot to bootmenu and run custom recovery
6. install 2nd-system-boot-cm10.1-2013-05-11.zip
7. reboot and cm10.1 should boot now.
To switch between NAND and SDCARD boot change only default boot in bootmenu.

What sd card are you running this second rom from? class 4 or class 10?

Minimum class 4.

second 10.1 rom from system on sd card running fun!

done it all over again

reserved

reserved

Any idea how we have to change ramdisk to boot a traditional linux distro from sdcard that works with boot folder instead of the android bootmenu folder?
Just changing hbooot config file to the appropriate kernel and init files?

extracting the ramdisks works fine..., putting them back together seems to go wrong
what command do you use to get them fine again?

use packrmadisk

walter79 said:
use packrmadisk
Click to expand...
Click to collapse
Hi Walter, could this work in milestone 2 too?
Enviado desde mi XT925 usando Tapatalk 2

Can I have cm7.2 along with cm10 with this method?

Related

how to enable apps to sd in cm7

PRE-INSATLLED :
Backup files on your SD (recommended)
Make sure that you have a 2nd partition on your SD card. If none, partition using CWM or any other method
Format 2nd partition to EXT3/4 using CWM or any other method
Make sure that 2nd partition is mounted at boot. You can check this by typing the command below -
Code:
mount | grep sd-ext
you will get something like this :
Code:
/dev/block/mmcblk0p2 on /sd-ext type ext3 (rw,noatime,nodiratime,barrier=1,nodel
alloc,data=ordered)
How to install:
Download Darktremor Apps2SD 2.7.5.3 Beta 04 and save it on your SD ==> http://api.viglink.com/api/click?for...a04-signed.zip
Reboot in recovery
Backup
Mount system and data partitions (Main Menu > mounts and storage)
Install file in Step 1 (Main Menu > install zip from sd > choose zip from sdcard)
Reboot. Done!
NOTE: After the phones boots, it will reboot again. This is normal because a2sd will automatically move apps to the 2nd partition of your SD
CREDITS : PARASMI
Thanks this worked perfectly
just one thing, your link didn't work for me for some reason http://forum.xda-developers.com/showthread.php?t=715116 I also installed A2SD GUI successfully and that's working as well

[HOW TO] linux native in sbk2 devices, purelinux and pseudo-dualboot methods

This is a guide for installing and running natively any linux distribution on tf101 devices with sbk2 bootloader, but with some tweeks it would work also in tfp devices.
What is needed? you will need a rooted device with cwm recovery installed microsd for purelinux and a good microsd is recommended for one of the pseudo-dualboot options.
This guide is also prepared to execute all the commands in a computer running linux and with adb prepared to work, but you can also do it in windows, just google a bit for abootimg, blobpack and adb.
The binarys provided are precompiled for x86 system.
I am going to use as example ubuntu but you can install any linux distibution making some tweaks that i am not going to explain in this thread because i already opened another one explaining this.
DISCLAIMER: This is as safe as flashing custom roms (even a little bit less) you will always have a risk to brick your devices, I have a sbk1 device and in all my tests i haven't brick my device but i have the option of use nvflash so use it at your own risk
There are two basic options, running purelinux and pseudo-dualboot, and this last one has different variants.
Purelinux
YES: you will have the option to go to stock with cwm recovery
This will install ubuntu in the internal ssd in the data partition wich in tf101 is /dev/block/mmcblk0p7
With this method you will lose all the data in your android rom so make backups if necesary.
First of all we have to prepare the boot.img with the kernel and initrd, for that we will need abootimg, and a kernel already compiled, you either can compile your own kernel following lilsteive's, wiki instructions or use the one in OLIFE script. The initrd needed it's a bit diferent from OLIFE's one so i will attach the files needed at the end of this post.
We have kernel image: 2636-zImage
We have initd: initrd.img
and we need a boot.cfg file with this inside:
Code:
bootsize = 0x800000
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name =
cmdline = [email protected] [email protected] vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 [email protected] root=/dev/mmcblk0p7 ro quiet splash
Now we can build boot.img with abootimg with this command.
Code:
./abootimg-i686 --create boot.img -f boot.cfg -k 2636-zImage -r initrd.img
Now we have created boot.img wich is ready to blobpack. It's VERY important to blobpack it to LNX partition to not overwrite cwm recovery.
Code:
./blobpack kernelblob LNX boot.img
Now we have kernelblob file and ubuntu.img. This is al we need to flash our device, but we can use a zip file suitable for cwm to flash the kernelblob. I will explain later in the pseudo-dualboot options.
So now we place those files in a microsdcard and we reboot into cwm.
Once in there we have to get a shell trough adb
In some version of cwm you cannot see microsd but you see the sdcard, in that case you will have to manually mount the microsd.
I don't remember right now if in cwm shell you are already root or not, but if not just su to gain permissions.
Now this is the most risky part we have to dd the kernel blob to the correct partition, in this case is /dev/block/mmcblk0p4. As i said before we can flash the kernel blob also through a zip file.
assuming we are in the folder where both files are:
Code:
dd if=kernelblob of=/dev/block/mmcblk0p4
and now we flash ubuntu.img over data partition, but we have to be sure is unmounted, depending wich version of cwm recovery you may need to do it manually
the command mount will show you if is mounted or not and if it is, umount it
Code:
umount /dev/block/mmcblkop7
and then dd
Code:
dd if=ubuntu.img of=/dev/block/mmcblk0p7
This will take some time, so be patient.
And that's it, just reboot and go through oem instalation procedure and you have it.
To go back to android you will only need to boot into cwm wipe everything to avoid problems reboot again into cwm and flash any rom wanted.
With the last cwm version i had some trouble accesing to sdcard or microsd so i needed to delete a symbolik link (/sdcard was a symbolik link to /media/data and i don't know why) and create /sdcard folder, mount /dev/block/mmcblk0p7 over sdcard create a microsd folder and mount microsd manually over that folder.
Pseudo-dualboot
We have two options here, we can install over a microsdcard or put the image file in the internal sdcard.
If you have a good 10 class microsd for me that's the best option if not, it will be much slower than the other option.
Pseudo-dualboot over microsd
The process here is almost the same than in pure linux, the diference is only that in the boot.cfg file rootfs parameter will be diferent partition:
Code:
bootsize = 0x800000
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name =
cmdline = [email protected] [email protected] vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 [email protected] root=/dev/mmcblk1p1 ro quiet splash
instead of /dev/mmcblk0p7 (wich is data partition of the internal sdcard) it will be /dev/mmcblk1p1 wich is the microsdcard)
and instead of dd-ing ubuntu.img over internal sdcard we will dd to the microsd, we can do this also in cwm recovery or in a computer with sdcard reader.
As i think it's less risky to dd things in your computer instead in cwm and you will need an ubuntu.zip and android.zip to change your operating system flashing the kernel trough cwm i've attached Ubuntu.zip to do that. It's already prepared for microsd instalation.
If you compile the latest kernel (wich have some patches like the sound working) or you want to use it to purelinux instalation just do all the abootimg and blobpack proces and open ubuntu.zip and delete kernelblob and add your own one.
You will also need an android.zip file with the android kernel you prefer to choose again android system to boot.
I think it is aslo posible to do this with a pendrive is you have a dock, but i haven't tested it and i don't know if the kernel reads the usb devices soon enough to mount rootfs.
If you want to try, just boot linux, see wich device in /dev/ is asigned to the usb and place the correct device in root=/dev/XXXX in the boot.cfg
Pseudo-dualboot with loopmounted image placed in the internalsd
Just place ubuntu.img in the internal sdcard and flash ubuntu-mountloop.zip to boot into ubuntu and flash android.zip to boot into android.
There still are a couple of fixes to do, but i have no time right now and i am not using this configuration because i have sbk1 device so i won't be able to test and develop this but i will be glad to answer the questions i am able to.
I've also added the latest kernel and modules compiled from git but i haven't test them.
abootimg, blobpack and blobunpack files:
http://dl.dropbox.com/u/60048492/transformer/blobutils-abootimg.zip
ubuntu asus kernel (the OLIFE one, the git kernel has some fixes as sound enabling), initrd and boot.cfg
http://dl.dropbox.com/u/60048492/transformer/kernel-initrd-boot.cfg.zip
Unbutu-sdcard.zip (with kernelblob prepared for microsd installation)
http://dl.dropbox.com/u/60048492/transformer/Ubuntu-sdcard.zip
Android.zip (with revolver 3.1 default kernel)
http://dl.dropbox.com/u/60048492/transformer/Android.zip
Ubuntu-mountloop.zip for pseudo-dual boot with ubuntu.img placed in the internal sdcard
http://dl.dropbox.com/u/60048492/transformer/Ubuntu-mountloop.zip
Latest git kernel and modules precompiled
http://dl.dropbox.com/u/60048492/transformer/kernel-and-modules-from-git.zip
Thanks to rdnetto, Jhinta and of course lilstevie
Awesome! Waiting for the dualboot
How To - Step by step​
A few notes:
pseudo-dualboot over external microsd >> deletes all data on your external microsd card, but doesn't delete files on internal storage
pseudo-dualboot with loopmounted image placed in the internal storage >> doesn't delete files on internel storage (internal microsd)
how to resize img file (this you don't do in Ubuntu in TF):
Code:
dd if=/dev/zero bs=1G count=1 >> ubuntu.img
e2fsck -f ubuntu.img
resize2fs ubuntu.img
bs=1G >> how much large, new size is 3GB
mount data from Android in Ubuntu:
Code:
mkdir ~/Android/; mount /dev/block/mmcblk0p7 ~/Android/
after you find data in your home directory in folder Android
I recommend use the last CWM > http://forum.xda-developers.com/showthread.php?t=1213723 you need option flash package from internal storage
For work all components follow here: http://forum.xda-developers.com/showpost.php?p=25549030&postcount=1973 and http://forum.xda-developers.com/showpost.php?p=26149064&postcount=2048
You don't must nothing compile only apply change!
Dualboot with loopmounted image placed in the internal storage (I recommend, it is faster and smoother than sdcard version)
1. download http://lilstevie.geek.nz/ports/ubuntu.img.gz and extract ubuntu.img from .gz package to internal storage on /sdcard/
(second mirror > http://www.ulozto.net/xyFaPBA/ubuntu-img-gz)
2. download http://www.mediafire.com/?7f5fpatmgmg01ha and place to internal storage on /sdcard/
3. download from http://www.mediafire.com/?labcx60jowrdx one package for back to Android(by the ROM you use) and place to internal storage on /sdcard/ *
4. reboot into CWM recovery and flash the package Ubuntu.zip from 2. point
5. reboot and you booting to Ubuntu
6. you must add to /lib/modules/ this > http://www.2shared.com/file/843Sq6-J/3110tar.html
Code:
mkdir 3.1.10; tar -xzf 3.1.10.tar.gz -C 3.1.10; sudo cp -r 3.1.10 /lib/modules/
7. reboot and enjoy
When you want back to Android so reboot into recovery and flash your package from 3. point.
Dualboot over external mirco sd:
- your microsd card must have capacity more than 2GB (4GB is optimal)
1. download http://lilstevie.geek.nz/ports/ubuntu.img.gz and extract ubuntu.img from .gz package to internal storage on /sdcard/
2. open terminal emulator or run adb shell from your PC and enter the command:
Code:
dd if=/sdcard/ubuntu.img of=/dev/block/mmcblk1p1
(mmcblk1p1 is external microsd card)
- wait a few minutes
- after succesful finished you can delete ubuntu.img
- you don't see files in microsd card, but this is normal
3. download http://dl.dropbox.com/u/60048492/transformer/Ubuntu-sdcard.zip and place to internal storage on /sdcard/
4. download from http://www.mediafire.com/?labcx60jowrdx one package for back to Android(by the ROM you use) and place to internal storage on /sdcard/ *
5. reboot into CWM recovery and flash the package Ubuntu-sdcard.zip from 3. point
6. reboot and you booting to Ubuntu
7. you must add to /lib/modules/ this > http://www.2shared.com/file/843Sq6-J/3110tar.html
Code:
mkdir 3.1.10; tar -xzf 3.1.10.tar.gz -C 3.1.10; sudo cp -r 3.1.10 /lib/modules/
8. reboot and enjoy
When you want back to Android so reboot into recovery and flash your package from 4. point.
* when you can't find the package for your ROM or latest version so extract blob file from your ROM package .zip, rename to kernelblob and replace in Android-xxx.zip package
Original post:
Very thanks!
A few questions:
it deletes all data in my TF
ubuntu.img is from http://forum.xda-developers.com/showpost.php?p=16101612&postcount=3 (RootFS)
./abootimg-i686 --create boot.img -f boot.cfg -k 2636-zImage -r initrd-2.6.36.img << here should be initrd.img
jozka.1 said:
Very thanks!
A few questions:
ubuntu.img is from http://forum.xda-developers.com/showpost.php?p=16101612&postcount=3 (RootFS)
./abootimg-i686 --create boot.img -f boot.cfg -k 2636-zImage -r initrd-2.6.36.img << here should be initrd.img
Click to expand...
Click to collapse
Thanks, already corrected, and yes, that's an option, but the last version of ubuntu.img i think it's 2.0 GB and that one is 535MB or something like that, for all my tests i've used the 2GB one i think is inside OLIFE prime. But you can also build your own one with another distro. The question is wich type of instalation are you going to use, because in the native (internal or external) the image will be automatically resizes to fit the partition in the first boot so it doesn't matter, but in the loopmount one will keep the same size. So either of them would be a bad option.
I will explain this later and wich options we have to increase the space.
EDIT:
http://forum.xda-developers.com/showthread.php?t=1476835
i have to rewrite that to correct grammar but it will help you understanding a couple of things
And I can't this process without microsdcard (I can't have the ubuntu.img in internal memory), because dd if=ubuntu.img of=/dev/block/mmcblk0p7 deletes all files on /data/media. Is it right?
jozka.1 said:
And I can't this process without microsdcard (I can't have the ubuntu.img in internal memory), because dd if=ubuntu.img of=/dev/block/mmcblk0p7 deletes all files on /data/media. Is it right?
Click to expand...
Click to collapse
Yes, installing in the internal sdcard will erase all your data, and with the microsd even if you have a good one it will be a bit laggy sometimes.
The loopmount option it's another option, but i haven't try it yet and i will not write a guide for that until i do it, but basically is the same, we put the img file in the internal sd we modify the boot.cfg to mountloop and we'll need to tweak up the initrd to mount over loop device the image.
I don't know if that precompiled kernel support that, i think it does, but i am not sure if it's necesary recompile it.
In the other way, we would also need to resize the image to have a system with more than 2gb and that also would require editing the fstab.
I think i remember from time ago working with qemu there was two types of images qcow and raw. One of them had a good feature, you could create a 10gb image but it only weigth the space ocupied inside the image and not the all 10gb, but i don't know if we could use that feature in the mountloop option.
Do we have to compile again kernel with a new modules? Or how to mounts virtual disk?
jozka.1 said:
Do we have to compile again kernel with a new modules? Or how to mounts virtual disk?
Click to expand...
Click to collapse
I don't know yet, i don't think so but i have not compile the kernel myshelf. I have to take a look to init file in the initrd and figure where to put mount comands for the rootfs, i can't give you more information right now because i've never done that before, but here is "again" how the process i think it would be:
in boot.cfg root=/dev/loop0
and inside the initrd there is a file call init where whe have to mount /dev/mmcblk0p7 over somewhere, for example /media/data and then loopmount with losetup /media/data/ubuntu.img
That's what i think, but i am not sure
Just a point which is still not really clear for me, following those instructions, it will erase EVERYTHING on my ssd ? Or it's just a wipe like when we flash a new rom ?
outpox said:
Just a point which is still not really clear for me, following those instructions, it will erase EVERYTHING on my ssd ? Or it's just a wipe like when we flash a new rom ?
Click to expand...
Click to collapse
This process (the first one, purelinux option) will erase /data partition not the entire sdcard
it doesn't either erase android system wich is another partition. So (and this is a guess, when i test it i didn't have just a kernel blob to flash so i flashed the entire revolver rom) if you reboot into cwm recovery wipe data and install android.zip (wich i'll upload a bit later) . you would be able to boot into android like if it was a clean instalation.
So, yes, is like a full wipe. But only in the first option, the other two options don't touch your data.
But all this is yet to be confirmed, i am quite new in android systems i ony have experience in linux systems. I am pretty sure it is like a say but i would not bet my life on it
shaola said:
This process (the first one, purelinux option) will erase /data partition not the entire sdcard
it doesn't either erase android system wich is another partition. So (and this is a guess, when i test it i didn't have just a kernel blob to flash so i flashed the entire revolver rom) if you reboot into cwm recovery wipe data and install android.zip (wich i'll upload a bit later) . you would be able to boot into android like if it was a clean instalation.
So, yes, is like a full wipe. But only in the first option, the other two options don't touch your data.
But all this is yet to be confirmed, i am quite new in android systems i ony have experience in linux systems. I am pretty sure it is like a say but i would not bet my life on it
Click to expand...
Click to collapse
Okey that's nice
When I come home I will make a back up and I will try it !
I'll let you know if I experience any issues
I have the problem.
When I make dd if=ubuntu.img of=/dev/block/mmcblk0p7 so I get IO problem and now when I choose in CWM install zip from sdcard, so I get E: can't mount sdcard
E: mount: mounting /dev/block/mmcblk0p7 on /sdcard/ failed: Invalid argument
E2: solved, I made small .img file (2MB) and dd if=smal.img of=/dev/block/mmcblk0p7
E3: no, data is mount successful, but the size is small, any ideas how to resize back to default ?
I don't understand what exactly are you saying, anyway, the partition will not by resized in anyway, not when you dd not ever, is the filesystem what is resized. So wipe data trough cwm
Code:
/sdcard # cat /proc/partitions
major minor #blocks name
179 0 30203904 mmcblk0
179 1 524288 mmcblk0p1
179 2 542208 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 542208 mmcblk0p4
179 5 5120 mmcblk0p5
179 6 512 mmcblk0p6
179 7 28563968 mmcblk0p7
179 8 1931264 mmcblk1
179 9 1930240 mmcblk1p1
but:
Code:
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 369644 32 369612 0% /dev
/dev/block/mmcblk0p2 533664 9072 524592 2% /cache
/dev/block/mmcblk0p7 39663 4587 33028 12% /data
I made dd if=smal.img of=/dev/block/mmcblk0p7, because it doesn't mount, but smail.img is 40MB.
Wipe data doesn't help to me.
ups, your data partition was mounted, it has to be unmounted before dd, that's the problem. Sorry i forget to put that in the guide. i will correct it now
just umount /data and try to dd again the ubuntu.img
Corrected. Sorry, i assumed that everyone should now that a partition has to be unmounted before attemp to dd. My fault
jozka.1 said:
[
I made dd if=smal.img of=/dev/block/mmcblk0p7, because it doesn't mount, but smail.img is 40MB.
Wipe data doesn't help to me.
Click to expand...
Click to collapse
It is mounted as you see in df command
No, I made mount.
jozka.1 said:
No, I made mount.
Click to expand...
Click to collapse
I am a bit lost, so
Did you check the md5sum of ubuntu.img before attemping this?
are you using a microsd card?
after wipe data did you reboot into cwm again?
wich version of cwm do you have?
I'm sorry, my fail.
I used dd with my smal image(40MB) for repair mount /data, then /data was so small. I used dd with ubuntu.img, kernelblob > reboot and all is it right.
I have one more question. When I want return to android, so I make factory reset (wipe data, cache) and flash a ROM ?
jozka.1 said:
I'm sorry, my fail.
I used dd with my smal image(40MB) for repair mount /data, then /data was so small. I used dd with ubuntu.img, kernelblob > reboot and all is it right.
Click to expand...
Click to collapse
So, you finally have running ubuntu natively with sbk2 device?

[HowTo] Dual Boot allwinner a10 Multiple Roms

Hey guys its me dragonhustler with an awesome tutorial.
In this tutorial i will guide you on how to dual boot your allwinner a10 device with multiple roms. AS i am writting this am currently dual booting stock ics rom with christian troy's aokp rom . Anyways lets start.
Please know this i just figured out this method but one thing that will not work is dual booting cm10 with aokp. I tried that but touch wont work with cm10 but aokp is working perfectly. Another thing is that i dual booted from a usb not an sd card but am pretty sure it will work.
First Step [Partitioning Your Sd card or USB]
NOTE: Please know that i done this on a usb flash drive but am so sure it will work on an sd card.
First you need a spare usb flash drive or spare sdcard that you will use. I recommend they should be more than 4gb but i done mine on a 4gb usb flash drive so its stable.
On your pc download minitool partition manager from here ------> http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html
After that install everything correctly and then at the end click finish and launch minitool
When its loaded take your spare sdcard or usb flash drive and plug it in the pc
It will then be loaded into minitool
Right click on the usb or sdcard and choose delete. Yes delete thats why i said spare
After its deleted Right click on the unnalocated space and choose create
Now create 3 partitions EXT4 Partitions
system around 400 or 500 mb, data around 1500 mb and finnaly cache around 700 mb
After thats done all of them should be primary not logical.
Now thats done click apply and wait for the process to finish
When the process is done take the usb or sdcard and mount it on your allwinner a10 and go to the app store and download a programm partition table.
When its downloaded open it up and it will then tell you the partition names on the sdcard
Now you have to look carefully at the sizes so you dont get confused which one is which
I could tell mine because system was 510 mb, cache 540 mb and data was 1400 mb
it wont show the names but you will just know by the sizes
It will probably just show names like sda1 sda2 sda3
so just figure out which one is which and memorise or write them somewhere.
Building a Rom for Multi-boot [Boot.img]
You dont really have to build a rom from source all you have to do is customise it so that it boots from the sdcard you partitioned or the usb flash drive
Ok first take any custom rom you want to dual boot say this one -----> http://forum.xda-developers.com/showthread.php?t=1821398
Now when its downloaded find any boot.img unpacking tools
Now you unpack the boot.img and then find the file init.sun4ei.rc [i think] the open it up with notepad++
After that find these lines:
Code:
mount ext4 /dev/block/nandd /system wait ro
mount ext4 /dev/block/nandxx /data wait noatime nosuid nodev
mount ext4 /dev/block/nandx /cache wait noatime nosuid nodev
Something like that and and it will tell you which one belongs to which as you can see
Now what you do is just replace those nandXX with the names you memorised earliear which. Then place the name for the system partition in the system partition like mine.
Code:
mount ext4 /dev/block/sd1 /system wait ro
mount ext4 /dev/block/sda3 /data wait noatime nosuid nodev
mount ext4 /dev/block/sda2 /cache wait noatime nosuid nodev
sda1, sda2 and sda3 are my codes for the partitions use yours not mine
When thats done just repack the boot.img and save it somewhere for later.
The rom [updater-script]
Now you have delt with the boot.img lets deal with the updater script of your rom
use any unzipping program and unzip meta inf folder in the rom you want to dual boot
Now open up the folder and then with notepad++ open updater script
Now all you have to do is edit where the mount partitions and format partitions for system are
If there are any other partitions like for bootloader just leave them
Now thats done
The rom [compatibility.zip]
open up compatibilty.zip and also extract the meta inf folder and do the same where it mounts for system. Just change the name at the end not all files like dev/block/XX
When thats done just replace the updater scripts of all files with your modded ones
Now thats done take your rom plug in your usb or sdcard boot into cwm and flash rom and after that you will boot into you new rom
For gapps just do the same in the updater script.
Credits Macadamia Daze
reserved
And when i turn on my phone it will say to chooce a rom to boot? (eg cm10 or stock, custom rom or stock etc)
Sent from my Xperia Tipo using xda app-developers app
No if you know how to make a kernel i can help to put that option
Sent from my Xoom using xda premium

[Troubleshoot]Sense Rom Stuck At Boot Animation.

Please help me...I flashed the FlyROM V4 correctly but its stuck at boot animation...when i go to mount sd-ext..its shows "Error mounting sd-ext"..is that the problem? If it is..how to solve it?
Make Sure You Made A Sd-Ext Partition Correct, To Check Whether You Made A Partition Correct Or Not, Just Mount Sd-Ext In Recovery, If It Mounts Without Any Error Then Just Go Ahead, But If It Shows An Error, It Means You Didn't Make A Partition Correct. So Now What You Need To Do Is:
1. Don't Partion Your SD Card By Using Recovery.
2. Partition It Via "Minitool Partition Wizard" Manually.
3. Create A Ext 4 Partition As Primary.
4. Now, Install Yannou's Recovery (The One Which You Install While Rooting)
5. Finally, Mount Sd-Ext And Flash Any Sense 4 Rom..
Note: Don't Use CWM Recovery, It Never Mount Sd-Ext At Any Cost.. Use Yannou's Recovery Or Philz Touch Recovery Instead..
Sent from my HTC Explorer using xda premium
thanks for replying here..i got the problem solved by just
1. removing old partitions
2. changing to philz recovery
3. making a new partition using philz and then flashing..
But now am unable to install any kind of memory script to increase internal memory..even after installing successfully .. the memory isnt increasing..what's wrong?
First open ur rom zip, navigate to system/etc/init.d and remove that 78mv2ext file and replace it with ur desired script and then reflash rom..
But do this at your own risk, if u get into a bootloop just reflash the rom with 78mv2ext script again..
Note: in sense roms, internal memory will always be 150 mb, but when you install apps its internal memory will not decrease as it decreases usually because of that Sd-Ext Partition you created..
Sent from my HTC Explorer using xda premium
lol i didnt know internal memory is always 150mb..but it doesnt decreases..if its true..then there's no problem.

MM internal memory solution

Hi guys,
I'll share some scripts (flashable) that I've made to help with xperia l internal memory shortage.
1. First one is the link2sd-enabler.zip: http://www24.zippyshare.com/v/UduJGjqJ/file.html.
For this to work you'll need a second partition on the external sdcard formated as ext4. So first partition is the vfat one, the second primary partition on the external sd card is the ext4 one. Currently I have a 8Gb ext4 second partition.
Installation procedure: prepare your external sdcard, flash the zip, install link2sd application.
2. Second is the 01link2sdmm: http://www86.zippyshare.com/v/9DSgorlH/file.html.
The link2sd application does not automatically link the oat directory of the application. This directory contains the compiled application in the form of an odex file. For big apps this file is pretty big. So this script will automatically link this directory to the sdcard second partition for the applications that are linked to the sdcard. This works in conjunction with the link2sd-enabler.zip script.
Installation procedure: put this script in the /etc/init.d directory with the proper permissions. This way it will run at boot. If you want to run this directly after you link an app you'll need to use automagic and make a rule to run this script after you exit the link2sd application.
Observations: This script is not needed if you switch the internal partitions because you'll have enough space to keep the odex file internally. It's your choice.
3. Third script is the mm-partition-swapper.zip: http://www10.zippyshare.com/v/eyRO7gLw/file.html.
This one will switch your sdcard and userdata partition on your current mm rom. This was tested on rr573 that I have installed, but it should work in other mm roms as well.
Installation procedure: Make sure you have enough space on the external sd card so the script will be able to save your current data partition files. Save the files that you need from your internal partition to your external sd card. Make a backup of your current rom from twrp in case something wrong happens. Format from TWRP the internal sd card as ext4. Flash the zip. If everything works ok then you'll have a rom with the internal partitions swapped and you'll have 4Gb of user data available (minus your space for the already installed apps).
!!!!!!!!!!!!!!!!!!Very important!!!!!!!!!!!!!!!!!!
Don't try formatting the internal sdcard as ext4 with twrp version 3.0.2! It seems that his twrp version does not support this. I'm using twrp 2.8.7.0 by Barbarosa.
Observations: Twrp does not support backing up/restoring internal sd. If you swap partitions you'll have to backup your ext4 internal sd manually from within twrp connected through adb (with a simple tar command)
4. I think 256 ZRAM for the rr573 rom is too big so this zip will change this to 128MB:
mm-128Mb-zram.zip:http://www103.zippyshare.com/v/XjVAnXEl/file.html.
Please make a backup before flashing the swap zip and report if this worked for you.
Hope this helps,
Thanks.
cojocar.andrei said:
Hi guys,
1. First one is the link2sd-enabler.zip:
For this to work you'll need a second partition on the external sdcard formated as ext4. So first partition is the vfat one, the second primary partition on the external sd card is the ext4 one. Currently I have a 8Gb ext4 second partition.
Installation procedure: prepare your external sdcard, flash the zip, install link2sd application.
Click to expand...
Click to collapse
I've been struggeling for quite some time to get the link2sd app working since I flashed MM.
I've done a clean install, flashed the zip, installed link2sd, but I still get a 'mount script error, Cannot create script, mount: no such file or directory.' Anyone got an idea what I do wrong?
thx!
mikelektro said:
I've been struggeling for quite some time to get the link2sd app working since I flashed MM.
I've done a clean install, flashed the zip, installed link2sd, but I still get a 'mount script error, Cannot create script, mount: no such file or directory.' Anyone got an idea what I do wrong?
thx!
Click to expand...
Click to collapse
Check if you have in the /etc/init.d directory the 00link2sd script. For this script to work you need a rom with a working init.d (otherwise this won't work obviously...). If you have the script there, then check if you see a directory /data/sdext2 (if this directory is missing, but you have the 00link2sd script in the /etc/init.d directory, then this means you don't have init.d support in the rom). If you partition your sdcard correctly then the second ext4 partition of you sdcard should me mounted in the /data/sdext2 directory ... All these you need to check before installing the link2sd app...
Awesome! Thank you. I'll try this
cojocar.andrei said:
Check if you have in the /etc/init.d directory the 00link2sd script. For this script to work you need a rom with a working init.d (otherwise this won't work obviously...). If you have the script there, then check if you see a directory /data/sdext2 (if this directory is missing, but you have the 00link2sd script in the /etc/init.d directory, then this means you don't have init.d support in the rom). If you partition your sdcard correctly then the second ext4 partition of you sdcard should me mounted in the /data/sdext2 directory ... All these you need to check before installing the link2sd app...
Click to expand...
Click to collapse
I have the init.d folder, but it seems the sdext2 folder was only created after I installed the link2sd app.
I tried doing it all over again, but it still doesnt work, same messages...
mikelektro said:
I have the init.d folder, but it seems the sdext2 folder was only created after I installed the link2sd app.
I tried doing it all over again, but it still doesnt work, same messages...
Click to expand...
Click to collapse
Then your rom doesn't have init.d support. You need a kernel/rom (more precisely a ramdisk) with init.d support to use this ... The rr573 supports init.d ... Try it with this one ...
cojocar.andrei said:
Then your rom doesn't have init.d support. You need a kernel/rom (more precisely a ramdisk) with init.d support to use this ... The rr573 supports init.d ... Try it with this one ...
Click to expand...
Click to collapse
Thx! Which do you recommend? I've tried several in the last two or three months. Now I'm running AOSP-OMS.
I ran slim, RR and CM 13 beta before without any problems, just the storage issue.
mikelektro said:
Thx! Which do you recommend? I've tried several in the last two or three months. Now I'm running AOSP-OMS.
I ran slim, RR and CM 13 beta before without any problems, just the storage issue.
Click to expand...
Click to collapse
I've just told you. RR573. For a completely working camera on this one just replace a camera library... Search the rr thread...
Sent from the center of the galaxy
3. Third script is the mm-partition-swapper.zip: http://www10.zippyshare.com/v/eyRO7gLw/file.html.
This one will switch your sdcard and userdata partition on your current mm rom. This was tested on rr573 that I have installed, but it should work in other mm roms as well.
Installation procedure: Make sure you have enough space on the external sd card so the script will be able to save your current data partition files. Save the files that you need from your internal partition to your external sd card. Make a backup of your current rom from twrp in case something wrong happens. Format from TWRP the internal sd card as ext4. Flash the zip. If everything works ok then you'll have a rom with the internal partitions swapped and you'll have 4Gb of user data available (minus your space for the already installed apps).
Click to expand...
Click to collapse
I use rom AOSP OMS . file zip working?
Brick and problem other ?
Thx you building script .
Thx advanced
I am on stryflex MM ROM and TWRP 3.0.2.
I formatted internal storage as ext4, then flashed mm-partition-swapper.zip.
Says that there is no ext4fs partition and I tried reboot recovery and my phone is dead now, can't turn it on...
I don't blame you, I blame myself for trying. But please help. Flashtool doesn't recognize flash mode.
Don't use this method. Not safe.
Option58 said:
I am on stryflex MM ROM and TWRP 3.0.2.
I formatted internal storage as ext4, then flashed mm-partition-swapper.zip.
Says that there is no ext4fs partition and I tried reboot recovery and my phone is dead now, can't turn it on...
I don't blame you, I blame myself for trying. But please help. Flashtool doesn't recognize flash mode.
Don't use this method. Not safe.
Click to expand...
Click to collapse
Sorry to hear this. If the script gave you this error then the script did nothing to your phone. It just aborted the procedure because it did not find the sdcard formated as ext4. It must be the twrp version. I'm using twrp 2.8.7.0 by barbarosa. I think twrp 3.0.2 does not support formatting the internal sdcard as ext4. Most pobably the twrp version 3.0.2 formated something else as ext4 or whatever instead of internal sd... I did not know this. Sorry again...
Try to search the brick threads. If you still have a blue light when in flashmode I think you still have a chance to resurect it...
Sent from the center of the galaxy
I've modified the post to warn people of this twrp version. So, people, use only twrp 2.8.x.x to format the internal sdcard. I'm using 2.8.7.0 twrp version by Barbarosa. I don't know if other twrp versions support ext4 on internal sdcard.
Sent from the center of the galaxy
Thanks for the solutions. So now if I only need to swap internal sd and /data, i just need to flash 3rd script? I'm quite confusing about partitioning and memory stuffs
newguyknowsnothing said:
Thanks for the solutions. So now if I only need to swap internal sd and /data, i just need to flash 3rd script? I'm quite confusing about partitioning and memory stuffs
Click to expand...
Click to collapse
You have to have twrp 2.8.7.0, then format internal sdcard as ext4 (wipe settings) and then flash the zip...
Sent from the center of the galaxy
Yes, formatting internalSD as ext4 is tricky. My recovery was broken. Probably formatted something else. It wasn't your script.
However I have no volume up button on my phone (fell out) - no fastboot. And just volume down button (flash mode) and a somewhat broken USB cable. Phone not recognized by flashtool at all...
cojocar.andrei said:
You have to have twrp 2.8.7.0, then format internal sdcard as ext4 (wipe settings) and then flash the zip...
Sent from the center of the galaxy
Click to expand...
Click to collapse
Ok thanks! One more question, If I somewhat want to undo this, I need to back up the current MM rom before flashing the script? Will the internal sd and /data automtically be swapped back when I restore the back up?
newguyknowsnothing said:
Ok thanks! One more question, If I somewhat want to undo this, I need to back up the current MM rom before flashing the script? Will the internal sd and /data automtically be swapped back when I restore the back up?
Click to expand...
Click to collapse
After swapping the partitions your old backups of the rom will not work anymore (or probably they would just revert the swapping. Anyway if you want to restore a backup that's been done prior to swap it's better to format back by hand the internal sdcard to vfat and data to ext4)
For backing up a rom with swapped partitions you'll have to select the sdcard instead of data partition in the backup options... I did not try it yet...
Sent from the center of the galaxy
Option58 said:
Yes, formatting internalSD as ext4 is tricky. My recovery was broken. Probably formatted something else. It wasn't your script.
However I have no volume up button on my phone (fell out) - no fastboot. And just volume down button (flash mode) and a somewhat broken USB cable. Phone not recognized by flashtool at all...
Click to expand...
Click to collapse
I don't know, sorry. You have to search the brick threads...
Sent from the center of the galaxy
I ran the the link2sd enabler script on my rr573, works like a charm now.
Thank you so much, I needed this!
Didn't swapped the storages yet.
The dream is real!
Congratulations.
Seeking a long time for a script like mm-partition-swapper.zip
Before seeing your post, I had already made the formatting of SD0 (ext4) to try to install Link2SD to work with SD0 without work.
I used the TWRP 3.0.2.
I could easy return the partition to FAT.
I intend to make a clean installation of ROM on my device to then install your mm-partition-swapper.zip script.
As both the "DATA" as SD0 are empty you still think need to format with TWRP 2.8.7?
No way to change this script without the data transfer?
Only formatting partitions and inverted mounts?
If not necessary then ok...but... please clear this my doubts.
Again without getting tired ... very thank you even for your script.

Categories

Resources