yashsingh1/xdaforums huggingface dataset:
[Asus Transformer TF700] JoinTheRealms:
Do you think it would be difficult to dualboot android roms using kexecboot? specifically containing a rom inside a image and kexec boot like we do with linux images? it could be an interesting possibility..
[Asus Transformer TF700] _that:
Try it :), I think it should be possible.

You might want to have a look at this: https://github.com/tux-mind/tf201-dev

I personally don't really see the point in kexec as long as it is possible to run everything you want to boot with the same zImage.
[Asus Transformer TF700] JoinTheRealms:
Im pretty sure it will work, just didnt know if android relied on anything outside of its partition. I will definatly give it a try though!

I know what you mean, have one zImage and multiple initrd's for the systems you want to boot, kexecboot needs a zImage and initrd per device it wants to boot.

Btw have you had a look into multirom? it does mostly what you've done here i believe, but slightly more user/ noobie friendly :) i did attempt to port it over, but got stuck at building the modified TWRP... , but everything is compatible with our device.
[Asus Transformer TF700] kali113:
you can just press download zip button on github and compile the cpp file in the zip. in Linux:

sudo apt-get update

sudo apt-get install make

sudo apt-get install g++

and in the folder where the cpp an makefile are run the command:

make

it will compile it for you and you get a runnable binary. (if running it normally doesnt work, run with ./)

---------- Post added at 09:45 PM ---------- Previous post was at 09:40 PM ----------

I`ve tried with pa 3.99 r2, on the sd card but I`m getting a bootloop. Any suggestions what could be the problem? I have been very careful to prepare everything, and Im out of ideeas.

the pa boot animation just hangs if I start with micro-sd inserted.
[Asus Transformer TF700] _that:
Can you get a logcat and dmesg?
[Asus Transformer TF700] vnphatbuddha:
I'm currently running cromi-x latest and also trying to do pa-3.99rc2 for sdcard but I'm kinda stuck at the extracting ramdisk part. Terminal on tablet says "sh: cpio: not found" "gzip: failed fwrite". Don't know what could be wrong when I followed exactly what the instruction said to input
[Asus Transformer TF700] _that:
Looks like you are missing Busybox. [MENTION=518363]sbdags[/MENTION]: Isn't this included automatically in CROMI-X?
[Asus Transformer TF700] vnphatbuddha:
I do have busybox installed. Do u think its bc I installed it eventhough cromi already has it included?

---------- Post added at 12:42 PM ---------- Previous post was at 12:39 PM ----------

Also how would I proceed in preparing the preinit script n last couple of files that needs to be edited if sbdags has already has it done? Is there something different I need to do besides extracting my ramdisk that was taken from paranoid?
[Asus Transformer TF700] sbdags:
Yes busybox is and has always been installed.

I'm not sure paranoid android is compatible - _that only tested CM so far. I have only tested CROMi-X and miniCROMi-X both as normal and with ROM2SD.
[Asus Transformer TF700] _that:
I found a way to install an *unmodified* ROM to the microSD card. Note: This is not tested very well, use at your own risk and make backups (I didn't, of course :)).

Instructions:

* Prepare microSD card with 3 partitions as described in post #1

* Flash rom2sd-data2sd-intmedia-shell-that1. This adds files into /system/boot, so you need to re-flash this if you re-flash your internal ROM.

* Flash rom2sd1.zip - this will change the device nodes to the external card. All following actions in TWRP will affect the external partitions until you reboot or re-execute rom2sd1.zip.

* Flash your "external" ROM, e.g. CyanogenMod, and do NOT reboot

* Flash rom2sd2.zip - this will extract the ramdisk from the new ROM's kernel in the staging partition to (external) /system/boot/ramdisk and then overwrite the header so that it is not flashed by the bootloader. It will also patch the ramdisk files for Data2SD and add the required wifi kernel modules for the -that6 kernel to /system/lib/modules.

View attachment rom2sd1.zip

View attachment rom2sd2.zip

View attachment rom2sd-data2sd-intmedia-shell-that1.zip

An important difference to the original solution is that the ramdisk files are now on the sdcard and not on the internal storage, so that true multiboot with multiple cards is possible and there are no dependencies between internal /system and external /system.

The new preinit script will detect:

* Card with 3 partitions -> ROM2SD

* Card with 2 partitions -> Data2SD (with internal /sdcard)

* otherwise boot internal ROM as usual

If the tablet is docked when booting, a Linux shell will be started before booting Android so you can inspect potential issues, run fsck, etc. Press Ctrl+D to continue. If this feature annoys you, simply delete /system/boot/preshell or the call inside preinit.
[Asus Transformer TF700] kali113:
Will try and report back, when i get home from work.
[Asus Transformer TF700] sbdags:
This is great.
[Asus Transformer TF700] LetMeKnow:
You are the genius. This new script will work more reliable on rom2sd..:good:
[Asus Transformer TF700] kali113:
Can anyone confirm _that`s last method with the 2 zips?

For me, it just boots the original rom, maybe I`m doing something wrong.

It would be the best if it were to work.
[Asus Transformer TF700] _that:
I can confirm that it really doesn't work. :o

Looks like I uploaded the old, incorrect version of the preinit script - the mknod line must end in "51" instead of "50".
[Asus Transformer TF700] sbdags:
Ah OK :) I was just about to test it out. I'll let you fix them up - didn't have chance to download them yet.
[Asus Transformer TF700] _that:
Uploaded fixed versions. I've now tested the rom2sd zips and they work with CM 10.2.
[Asus Transformer TF700] kbboykin:
Does this mean I can try this without all the instructions at the top of the thread. I want to try this, but didn't want to have to go through so much. I went out and bought a 32 GB UHS microSD card for $30 bucks this weekend, but don't want to fry it trying this out. I am running CROMi-X 5.1.2 without issues, but really like CM 10.2 also and this would fit the picture for me, if I can do this without screwing up. Should I nandroid the 5.1.2 ROM before I try this? just to be safe? Thanks in advance. (I have never done anything other than flashing custom ROMs).
[Asus Transformer TF700] _that:
Yes, it's now easier to install the second ROM, you can now skip almost all the manual steps in post #1. Making a backup before is always a good idea - dual-booting is still an advanced topic and requires some care.

Note that so far I only tested if the second ROM boots correctly - there will be issues that only appear when you actually try to use the device. :)
[Asus Transformer TF700] kbboykin:
Thanks. I will probably get up enough confidence to try this tonight or sometime this week. Thanks for the zip files and directions.
[Asus Transformer TF700] _that:
I see you already have some experience with dual boot, so you should have no major problems. :D
[Asus Transformer TF700] ariesting:
I followed the instruction to install CM 10.2 to a MicroSD card. The installation went smoothly but the new rom ran into a boot loop. It just reboots after the upgrade process. What did I do wrong?
[Asus Transformer TF700] _that:
You didn't post a logcat.
[Asus Transformer TF700] _that:
Something new...

Unfortunately, that's already about all that works for now. Even the launcher crashes at startup... but it's much better than yesterday (black screen) or 2 hours before (hanging at "starting apps"). :)
[Asus Transformer TF700] sbdags:
Would be great if it works! :D

BTW I got Android 4.1.1 working on thatv6 as ROM2SD but had lots of graphic anomalies - translucent windows etc. But it worked without crashing.
[Asus Transformer TF700] JoinTheRealms:
Nice work _that! ive had omni's sources and a tf700 device tree sitting for a while but couldn't get it to build due to missing dock framework in their source.
[Asus Transformer TF700] _that:
I simply commented out everything that didn't work. :)

But then I still had to find out why there was no picture (turned out to be a missing method in libui) and why mediaserver crashed (I simply renamed audio_policy.tegra.so for now). Binary blobs are hard to debug and practically impossible to change - wish we had more open source drivers.
[Asus Transformer TF700] JoinTheRealms:
[MENTION=4878287]_that[/MENTION] Am i right in thinking that the only thing i need to change in the ramdisk to mount android from a different location other than mmcblk0p1 is in cardhu.fstab?

For example im attempting to get an android multiboot working with kexecboot, ive extracted cyanogenmod to /android1 on mmcblk0p8 and modified the fstab.cardhu to this

/dev/block/mmcblk0p2	/cache	ext4	noatime,noauto_da_alloc,nosuid,nodev,nomblk_io_submit,errors=panic	wait
/dev/block/mmcblk0p8	/data	ext4	noatime,noauto_da_alloc,nosuid,nodev,nomblk_io_submit,errors=panic	wait,encryptable=footer
/data/android1	/system	ext4	bind,noatime,noauto_da_alloc,ro	wait

unsurprisingly this didnt work and hung at splash screen, but in essence im trying to replace mmcblk0p1 with mmcblk0p8/android1/ just wondered if you had a better idea of how i might accomplish this, im currently writing a lenthy script that automtically finds linux directory and images and *hopefully* android directories and images and compiles them into the boot.cfg required by kexecboot. My goal is allowing a multiboot of as many android roms and as many linux distros and a user desires. Making full use of kexecboot.

Cheers
[Asus Transformer TF700] _that:
Right.

Anything interesting in logcat?
[Asus Transformer TF700] dilfred:
How long does gparted take to do the scan initially. Minegets stuck at dev/somethingc drive.

Left for 30mins and still not moved on.

It is a 2tb drive would that make differenc4?
[Asus Transformer TF700] _that:
Maybe 5 to 10 seconds, depending on the number of disks you have. If it takes longer than a minute, there's something wrong.

I don't know dev/somethingc, so I can't help you with that.
[Asus Transformer TF700] dilfred:
/dev/sdc. Could not remember how it was written:)

I'll try a fresh cd from fresh iso download. May try different pc to run it on too for good measure.
[Asus Transformer TF700] JoinTheRealms:
Well i mistakenly used the zImage from _thatv6 instead of bryce09's but im assuming the kernel itself doesnt have anything cyanogenmod specific.

heres the panic in the kmsg:

VFS: Cannot open root device "(null)" or unknown-block(0,255)
[ 4.356043] Please append a correct "root=" boot option; here are the available partitions:
[ 4.356127] b300 62087168 mmcblk0 driver: mmcblk
[ 4.356329] b301 786432 mmcblk0p1 eadc9873-0202-c225-54d0-17b26eb39b35
[ 4.356471] b302 438272 mmcblk0p2 45582ec7-8255-748e-23ca-19dd532f9ed7
[ 4.356672] b303 2048 mmcblk0p3 ad45ba59-1311-387d-5358-ccc5ace52f24
[ 4.356900] b304 835584 mmcblk0p4 3ee35265-ac6b-1d10-abf2-3532a9a197de
[ 4.357049] b305 5120 mmcblk0p5 8e3ad95a-8f49-fb6d-e623-c42397d83375
[ 4.357248] b306 512 mmcblk0p6 159257f7-1200-8dd0-cf5d-0f59dc3eff25
[ 4.357447] b307 5120 mmcblk0p7 be4acdac-3bf7-d4bd-93df-905e648d9046
[ 4.357588] b308 59976192 mmcblk0p8 afa95cdf-c21c-f9b2-8e66-fa75e6b1093e
[ 4.357788] b320 4096 mmcblk0boot1 (driver?)
[ 4.357928] b310 4096 mmcblk0boot0 (driver?)
[ 4.358127] b330 30702592 mmcblk1 driver: mmcblk
[ 4.358268] b331 5102592 mmcblk1p1 00000000-0000-0000-0000-000000000000
[ 4.358467] b332 25598976 mmcblk1p2 00000000-0000-0000-0000-000000000000
[ 4.358664] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[Asus Transformer TF700] _that:
I know the CM kernel remaps a few dock function keys which my kernel doesn't to stay compatible with the stock ROM, but other than that I know my kernel works with CM. :)

This kernel panic cannot be related to the fstab because the root device should be the ramdisk - this looks more like incorrect usage of kexecboot - check the kernel command line in the kmsg.
[Asus Transformer TF700] JoinTheRealms:
Hmm thats what i worried of :( This is from the same kmsg

I believe the last two are appended by kexecboot, i know moreD_cn's Linux initrd uses these parameteres to know what linux rootfs to boot from, the strange thing is Android is working fine from mmcblk0p1.

I had the above panic when i was attempting to port ubuntu-touch to my phone, which also stopped me in my tracks :)
[Asus Transformer TF700] llcoolveer:
I have 2 questions...1.) Your kernel 10.6.1.14.10-that6-oc » OC, UV, CIFS, ROW, fsync, pre-init wich you made for the TF700, if want to run it on my TF300...do i have to unpack, put a 300.blob instead of the 700.blob,and repack it again...? Is it as simple as THAT...:cowboy:

And question 2.) I just prepared a CM11 TF300T build from the source of the CM11 for the TF700,and because i have a damn fine version of the last Cromi-X 5.2a and i would like to run it as second rom( i know that your kernel doesn't have support for it now),is it possible on the Transformers to build a dualboot kernel like the Siyah Kernel 1.9.1 on the Samsung S3,which is maintained now by Googy ? The reason i ask you this is that its pretty annoying to make backups,wipe's and reinstalls over and over again.On my S3 however it is so easy on that dualboot kernel and its done in a sec.,and both roms are running on the same ext4 partition....

http://www.youtube.com/watch?feature=player_detailpage&v=_YcDfSAT4iI

Thanks for the good work,and i'm glad that you guys maintain the terrific support on the Asus Pad's...the main reason i started the CM11 build was to get it also on the TF300,because not every mod or rom is prepared for both devices...despite of some differences,they are the same....it was my first build,but its up and running and thats a good thing...i know time is a precious thing putting everything together,i hope i can pay my tribute in the future to the Transformers

Sincerely,llcoolveer
[Asus Transformer TF700] _that:
I don't understand the question, there is no 700.blob, and the ROM2SD zips don't contain any kernels. Lots of users are running the unmodified that6 kernel on their TF300s.

Something like that was my original motivation to do this dual-boot thing. :) Who says my kernel doesn't support it? For the TF300 you just need a different WiFi module - bcmdhd_29.ko instead of bcmdhd.ko.

I now just do this for testing a new build:

- push ROM to external microSD card

- reboot to recovery

- flash rom2sd1.zip, the new ROM, then rom2sd2.zip, reboot

And whenever I need a tablet that just works: Reboot, pull the card while in the bootloader, wait for boot animation, reinsert card, start using the internal ROM and data as usual.

Looking forward to your contributions! :)
[Asus Transformer TF700] dilfred:
Sorted it. I tried all same things on different pc but happened to have another sd card loaded. It worked fine. I then loaded original sd card and again the freeze.

I reformatted the sd card and it all worked perfectly :)
[Asus Transformer TF700] vnphatbuddha:
hey _that, just got my microsd n gparted it with 3 partitions like instructed. How do I go about in pushing zips on the first partition fat32 without messing the other 2 up?
[Asus Transformer TF700] _that:
If you use your card as usual, only the first partition is used.
[Asus Transformer TF700] ariesting:
After I install rom2sd1.zip, I get "error opening '/data/media' and "error: No such file or directory" when TWRP updating partition details. I ignore the errors and install CM rom to MicroSD card and then install rom2sd2.zip. CM starts in a boot loop. I did partition the MircroSD card by gpart.
[Asus Transformer TF700] berndblb:
I had exactly the same experience. On the first flash the error of no /data/media, then CM bootloops at bootanimation.

I reformatted the card, flashed rom2sd-data2sd-intmedia, flashed rom2sd1, then CM, this time I did not get the "no /data/media", error, did not flash the gapps package this time, then rom2sd2. CM get's to "1 app updating" then reboots.

I flashed the gapps package, it again bootloops at "starting apps"
[Asus Transformer TF700] lucius.zen:
Works like a charm. This mod is boss. Aside from the dual booting capabilities ive noticed performance is very nice, better than D2SD. Ive always wanted to be able to have actual seperate partitions on the extsd for /data and /system but that is way out of my league technically at this point. Thanks for this mod and explaining it as thoroughly as you have, even if someone doesnt want to use this mod reading this guide is very valuable.
[Asus Transformer TF700] berndblb:
If i may ask: Which CM version did you flash?
[Asus Transformer TF700] lucius.zen:
Hey I apologize for the late reply I have not been very active for the past 6 months. I am not using CM to be honest, I don't have any interest in using different ROMS, I have CROMI-X installed on both internal and external storage. I do a lot of tweaking/modding so its nice to have a seperate install to fck around with. If you want i could let you know the exact steps I went through to set up my tablet.
[Asus Transformer TF700] berndblb:
Thanks, but CROMI-X as well as miniC work fine as ROM2SD for me. It's CM on a card I was interested to scew around with...:)

But I couldn't get it to boot....
[Asus Transformer TF700] hdcine:
Works like a charm with Official Cyanogenmod 10.2.

- Flash rom2sd-data2sd-intmedia-shell-that1.

- Flash rom2sd1.zip.

- Flash ROM - Add More Zips - Gapps, and do NOT reboot

- Flash rom2sd2.zip

- Reboot, the first boot can take five minutes.

I see an error message at startup, with or without card μSD, but it works.

Next test, try with kitkat.

Edit : Works also with KitKat and recovery CWM

Now to see if everything is working properly...
[Asus Transformer TF700] ariadnejro:
Is the rom in the MicroSD able to "see" the internal data/media? I'm planning to use only CM in the MicroSD to benefit from faster I/O and not being able to access my internal storage would be a waste of space.
[Asus Transformer TF700] berndblb:
Yes, the internal storage will show up as "sdcardi" in your file browser
[Asus Transformer TF700] graphdarnell:
I tried to install CROMi X on an external sd card following your instructions to no avail. If I choose ROM2SD option during the installation, flashing rom2sd2 will fail. If I don't, it would complete all the steps "successfully," except that upon reboot, it would hang at the preinit - "permission denied" - without going any further. What am I missing?
[Asus Transformer TF700] sbdags:
CROMi-X has it all built in you don't need to use this method.

Flash CROMi-X normal and then reflash as CROMi-X rom2sd.
[Asus Transformer TF700] dpeti:
Preinit won't start

Hi there!

Please help me!

For first, I tried CROMi rom2sd aroma installation, no success.

Then I tried to use the automated method. I have the latest CM10.2 flashed in the internal drive. I have a Sandisk ultra 16gb UHS1 card formatted to the required 3 partitions.

I flashed everything in order as stated in the post:

rom2sd-data2sd-intmedia-shell-that1.zip

rom2sd1.zip

CM10.2 to the sdcard, (when connected to PC, Ubuntu confirms, it has been flashed on the partitions)

rom2sd2.zip

Then I reboot, but it looks like the preinint script is not running. From the bootloader I immediately get to the bootscreen, no trace of the running script.

I have checked in ES file and I have all the three mmcblck1-3 partitions.

Recovery says no error, than cannot mount /data/media.

Please help me! What do I do wrong?:crying:
[Asus Transformer TF700] sbdags:
It doesn't work that way around. The stock based rom (i.e., CROMi-X) needs to be on internal. CM10.2 can only go on external using that's method above.
[Asus Transformer TF700] _that:
Why wouldn't it work? I can only say I've never tested it with CM on internal storage, but in theory you just have to use my or Hundsbuah's kernel and install the required kernel modules to internal /system/lib/modules to make it work.
[Asus Transformer TF700] sbdags:
In theory I suppose you could install your kernel, modules and do it that way. It never occurred to me to try it that way either.
[Asus Transformer TF700] dpeti:
I tried that way as well. Lately I have tried to flash CM10.2 on the sd. Files are succesfully installed. Still cannot start the system from SD. I guess somehow the preinit script does not start. As I see from the code, that it should print on the screen something like "mmcblk1p3 detected, setting up for ROM2SD".

But I can See nothing. With the pad docked, there should be a linux shell, which can be stepped over with ctrl+d. But No shell with the dock...

Any suggestion?
[Asus Transformer TF700] sbdags:
Do this:

1. Flash CROMi-X 5.2.2 normal (no rom2sd setup)

2. Reboot make sure it is working then grab the files from post #31 and put onto ext sdcard

3. Flash rom2sd-data2sd-intmedia-shell-that1.zip

4. Flash rom2sd1.zip

5. Flash CM10.2 but do not reboot

6. Flash rom2sd2.zip

7. Reboot

You will now have CM10,2 working from the card.
[Asus Transformer TF700] berndblb:
There's something I don't get about the ROM2SD setup :confused:

Here's what I did on my last flashing merry-go-around:

Clean installed 5.2.1a with _thatv6 with the last option in the installer selected (install with rom2sd capability)

Got it all set up the way I like it - naturally about an hour later you release 5.2.2 :D

So I thought I just flash 5.2.2 as rom2sd and enjoy both of them!

Reformatted the card to have it clean, flashed 5.2.2 as rom2sd with _thatv7

Went through setup fine, a few minutes later while in the Play Store, the tablet just froze. Didn't crash, just froze totally, no touch response whatsoever.

Force rebooted it and it hung on the 5.2.2 boot animation. Tried a couple of times, but it kept hanging at the animation, so I took the card out and booted to internal.

That boot never got past _that's preinit script, the penguins.

So I figure it's a problem of flashing _thatv7 to external with v6 installed to internal (?????????)

Flashed 5.2.2 with _thatv7 and the last option in the installer (rom2sd capability) to internal.

Did basic setup of the internal ROM and booted again with the microSD inserted, expecting it to boot to the ROM on SD. No dice - boots straight back to internal.

Now I know, I can just reflash 5.2.2. as rom2sd, but I feel I am flashing about in the dark here, and I would like to understand what I'm doing - the basics at least..... ;)

My questions:

1) What does the "install with rom2sd capability" in Aroma do? Is it the same as installing "normally" and then using _that's three rom2sd scripts for the rom2sd installation?

2) I understand both external and internal are running off the same kernel, but as _that mentioned earlier ^^^, some modules get installed to the specific rom???

I thought flashing v7 with the external installation would also change it on internal, but something seems to be off...

3) So if you wanted to change just the kernel, you have to flash it to both installations in the same TWRP session???? (Using _that's scripts to change TWRP's "orientation", so to speak???)

If someone could enlighten me - I would be eternally grateful :D
[Asus Transformer TF700] sbdags:
Right here we go! :D

1. Flashing with ROM2SD compatibility flashed the rom to internal but also adds the preinit rom2sd script and files to internal. Should you have CROMi-X or MiniC on your external it would find them and use them for the next boot. All modules are flashed to internal.

2. Flashing just the kernel will always load the modules into /system/lib/modules. If you have flashed rom2sd1 first that would be on external. If you haven't or you flashed rom2sd1 twice that would be internal.

3. If you want to change the kernel on internal flash as normal. If you want to change it on external, flash rom2sd1 first.

if you are using a non stock rom on external then flash the rom2sd2 after the reboot put the correct modules onto external from the kernel.