Dual-Boot: SD Card & Internal ROM by Modifying Initramfs - Galaxy Ace II General

HI there! Just wanna share about things I've done some time ago..
Background... :fingers-crossed:
I'm interested with ROM development & testing, but.. Ace 2 is my only primary phone which I really need for school things, poking friends *woah* and.. etc. Actually, I can make a CWM backup, flash the ROM and restore the backup after testing. But... seriously! It takes quite lot of time and... yeah.. since I'm testing ROM, I'll keep flashing & reflashing my phone and I get a little worried about its internal memory if I do it too often. So, I decided to make something that let me boot new ROM which I flash on the SD card & switch back to the previous ROM with just a simple reboot.. Yeay!
How it works?
I accomplished my goal by using modified initramfs which run after the kernel initialization and before any of Android system get loaded. It will mount 2nd partition of the SD card. If it find a file named enable_sdboot inside, it will decompress SD ROM's ramdisk.cpio which is stored in that partition, then boot the SD ROM. It will also delete enable_sdboot file immediately after checking, so internal ROM will get booted in next reboot.
Important notes:
SD ROM's ramdisk.cpio must contains modified fstab & some of .rc files, so it won't touch the internal ROM.
Kernel modules are placed on initramfs (/lib/modules), so it'll be easier to change ROMs or the kernel itself.
Limitations: because initramfs is compiled with the kernel, so internal & SD ROM will boot using same kernel.
Preparations
Prepare the Kernel
If you want to use stock ROM (codina) as ur internal ROM & CWM as ur recovery, you can use my precompiled kernel: codina-ace2nutzer-sdboot-stock-unsigned.zip which you can flash via CWM. If you use other internal ROM, you have to compile the kernel by yourself. If you're building Android ROMs, you can add my repo: nieltg/codina-initramfs-sdboot to your local manifest and read this guide. You can also take a look at this repo: nieltg/android_device_samsung_codina as an example.
If you build an out-of-tree kernel, you can follow these steps:
Create a folder named codinaramfs_dir in your kernel source.
Extract my initramfs intermediate: codina-sdboot-intermediates.zip to folder you've just created.
Replace boot.cpio with ur internal ROM ramdisk, so you can boot into it. You can also replace recovery.cpio with recovery system you would like to use.
Configure ur kernel & execute scripts/config --file .config --set-str CONFIG_INITRAMFS_SOURCE codinaramfs_dir/initramfs.list.
NOTE: .config is generated in output directory after configuring. If you change the output directory, you should modify the command before executing.
Compile and execute make INSTALL_MOD_PATH=codinaramfs_dir/modules modules_install to put modules in codinaramfs_dir/modules.
Modify codinaramfs_dir/initramfs.list to include all kernel modules in codinaramfs_dir/modules.
NOTE: I've specified the details in codinaramfs_dir/initramfs.list itself.
Then, recompile ur kernel.
Prepare an SD ROM & ur Device
You have to repartition ur SD card to store ur SD ROM. You also have to modify any ROM you want to install into ur SD card. ROM in SD card should not touch internal ROM. It should work independently. So, there are some modifications you must apply. There are things which you must ensure:
Any flashable zip you apply for the SD ROM extracts to SD partitions instead of internal.
Kernel is not going to be replaced after flashing any flashable zip.
SD ROM mounts appropriate SD partitions instead of internal partitions.
SD & internal ROM look for kernel modules in /lib/modules.
You can read this guide to prepare an SD ROM & ur device, to be exact, ur SD card.
----------
Well.. this is not good enough. You have to understand Linux, shell commands, compilation process, etc to apply this idea correctly. But of course if you're interested, you can help me improve this. Sorry for my English, I'm still studying. And like usual, I'm not responsible if you brick your phone, void your warranty, or any other pain or suffering you may feel as result of applying my idea. You do it all at your own risk!
Thanks to: @ace2nutzer for ur kernel, @Rox & @jereksel for the CWM I took from ur repo, @ishtiaque9 for ur support, everyone who interested with my idea & everyone..
So, anyone interested with my idea?

Seems great to run cm11 and cm12 at the same time

Very grateful idea !! :good:
Good that i've a sd 32gb Class 10 card.. so i can test finally CM12 from sdcard ... very nice job ! :good:

I'm glad to know my idea is being helpful!
@ace2nutzer woow! that's really big!
Actually, I'm using 2 Gb SD card which speed is 2x slower than the internal memory.. (tested using dd)
Quite slow.. but at least, it works.. but now i'm confused.. Is it slow because of the SD or because of my build? hahahaha

nieltg said:
I'm glad to know my idea is being helpful!
@ace2nutzer woow! that's really big!
Actually, I'm using 2 Gb SD card which speed is 2x slower than the internal memory.. (tested using dd)
Quite slow.. but at least, it works.. but now i'm confused.. Is it slow because of the SD or because of my build? hahahaha
Click to expand...
Click to collapse
Depends on class of sdcard.. Mine is class 10 = 10mb/s write speed. Read is as usual faster.. For me: 15 - 20 mb/s.
So u've probably only class 4 or 6.
The emmc in the Phone is class 10.
But of course a kernel can make it a bit faster or slower.. Depends on used config.
With my latest build + read_ahead_kb @ 512kb (writed on ramdisk on device_tunables) i've on ext. Sd card + emmc approxx. 12mb/s write speed
BTW: our Phone supports also 64gb cards.. And maybe even more...

This is a great idea ! I also need a dual boot stock / carbon (stock ROM includes eap sim and some other things I need)
What changes have to be made to use it on codinap (NFC) ?
Sent from my GT-I8160P using XDA Free mobile app

Really good idea, i think need to make an app, which can switch roms.
Maybe this sources will be usefull.

ace2nutzer said:
Depends on class of sdcard.. Mine is class 10 = 10mb/s write speed. Read is as usual faster.. For me: 15 - 20 mb/s.
So u've probably only class 4 or 6.
The emmc in the Phone is class 10.
But of course a kernel can make it a bit faster or slower.. Depends on used config.
With my latest build + read_ahead_kb @ 512kb (writed on ramdisk on device_tunables) i've on ext. Sd card + emmc approxx. 12mb/s write speed
BTW: our Phone supports also 64gb cards.. And maybe even more...
Click to expand...
Click to collapse
Hey.. I found something weird! I'm testing my storage with dd if=/dev/full of=tmp.file bs=1024576 count=10 in my cm-12 (sdboot) & I get:
7.5 Mb/s in /storage/sdcard1 (SD card)
27.55 Mb/s in mmcblk1p3 (SD card data partition)
85.47 Mb/s in mmcblk0p5 (internal data partition)
Hmm.. maybe the kernel caching mechanism that make it really fast?
Btw: I'm using ur kernel (commit d67aa9f) with audit enabled & sdboot modification
Mavireck said:
This is a great idea ! I also need a dual boot stock / carbon (stock ROM includes eap sim and some other things I need)
What changes have to be made to use it on codinap (NFC) ?
Click to expand...
Click to collapse
You should compile a kernel by yourself..
If you develop ROMs, you can include my repo in ur local manifests, modify boot.img (you can extract files from ur stock ROM) & compile to get an sdboot kernel.
If you're building out-of-tree kernel, I'm going to write a guide for it in the first post..
Kirya12347 said:
Really good idea, i think need to make an app, which can switch roms.
Maybe this sources will be usefull.
Click to expand...
Click to collapse
Hmm.. actually, I'm not really sure about that..
If you use this sdboot idea, all you have to do is write a file named enable_sdboot in 2nd partition of ur SD card to switch ROM.
For now, I'm using Terminal Emulator for that.. but it'll be nice to have a simple app which can do that in a single tap..

@nieltg
Why modified kernel not in archive. I download it without any expansion.
P.S. Sorry for bad eng.

Kirya12347 said:
@nieltg
Why modified kernel not in archive. I download it without any expansion.
P.S. Sorry for bad eng.
Click to expand...
Click to collapse
Actually, I just need to modify its initramfs, but initramfs is compiled with the kernel in codina.
So, I have to recompile the kernel to modify the initramfs.. Hmm.. what archive? Could you tell me more specific, please?

nieltg said:
Actually, I just need to modify its initramfs, but initramfs is compiled with the kernel in codina.
So, I have to recompile the kernel to modify the initramfs.. Hmm.. what archive? Could you tell me more specific, please?
Click to expand...
Click to collapse
I mean kernel isn't in flashable zip. It look , for exapmple, like init.d script, without any expansion

Kirya12347 said:
I mean kernel isn't in flashable zip. It look , for exapmple, like init.d script, without any expansion
Click to expand...
Click to collapse
Ohh I see! Actually, that is a raw kernel which you can install by dd-ing to /dev/block/mmcblk0p15..
I haven't thought about flashable zip before, since my idea isn't mature enough for me, I think.. Anyway, thank you for ur idea!

nieltg said:
Hey.. I found something weird! I'm testing my storage with dd if=/dev/full of=tmp.file bs=1024576 count=10 in my cm-12 (sdboot) & I get:
7.5 Mb/s in /storage/sdcard1 (SD card)
27.55 Mb/s in mmcblk1p3 (SD card data partition)
85.47 Mb/s in mmcblk0p5 (internal data partition)
Hmm.. maybe the kernel caching mechanism that make it really fast?
Btw: I'm using ur kernel (commit d67aa9f) with audit enabled & sdboot modification
Click to expand...
Click to collapse
This is a bit weird.. but maybe only achieved by dd ... But i mean with 12mb/s write speed when u're using the Phone .... Tested with:
https://play.google.com/store/apps/details?id=com.a1dev.sdbench&hl=en
As u can see in the Screeshots: only 7.57mb/s .. write speed even on internal SD .. .. if i remove all my kernel tweaks then it's the same ..
btw: u should update your sources from my repo .. that commit is of course great .. but actually since that commit i did some optimizations.. for more speed .. .. approx. + 400 Points on Antutu

ace2nutzer said:
This is a bit weird.. but maybe only achieved by dd ... But i mean with 12mb/s write speed when u're using the Phone .... Tested with:
https://play.google.com/store/apps/details?id=com.a1dev.sdbench&hl=en
As u can see in the Screeshots: only 7.57mb/s .. write speed even on internal SD .. .. if i remove all my kernel tweaks then it's the same ..
btw: u should update your sources from my repo .. that commit is of course great .. but actually since that commit i did some optimizations.. for more speed .. .. approx. + 400 Points on Antutu
Click to expand...
Click to collapse
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:

nieltg said:
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:
Click to expand...
Click to collapse
I hope you'll make flashable zip also

nieltg said:
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:
Click to expand...
Click to collapse
As i said, with a bad configured kernel u can reach only 7mb/s write speed even with class 10.
With read_aehead_kb 512 + good kernel u should have at least 10mb/s write speed with class 10.
personally i've 12mb/s write speed. on internal and ext-sd

Some ideas regarding the subj:
1. mount an images instead of repartition external sdcard
2. (1) can allow to use multiple ROMs.
1) it was just test, but it's quite possible. Right now I use an image file instead of /dev/block/mmcblk0p4 !
Before the all we need to create an image:
Code:
mkdir /storage/sdcard1/ROM
touch /storage/sdcard1/ROM/cache.bin
dd if=/dev/zero of=/storage/sdcard1/ROM/cache.bin bs=1024768 count=10
mke2fs -t ext4 -m 0 /storage/sdcard1/ROM/cache.bin
although, dd from original /dev/block/mmcblk0p4 is also possible.
2) secondly, init.samsungcodina.rc should be edited as follows
Code:
(init.samsungcodina.rc listing)
...
on property:sys.boot_completed=1
write /sys/class/misc/backlightnotification/enabled 0
write /sys/kernel/mm/uksm/run 1
exec /system/xbin/mknod /dev/block/loop250 b 7 250
exec /system/xbin/sleep 5
exec /system/xbin/losetup /dev/block/loop250 /storage/sdcard1/ROM/cache.bin
exec /system/xbin/mount -t ext4 /dev/block/loop250 /cache
3) line with /cache should be commented in fstab
4) now you can check it:
Code:
mount
and get output like:
...
/dev/block/loop250 /cache ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Maybe later I'll continue to work on it.

Any chance that this would be a feature in your kernel @ChronoMonochrome @ace2nutzer?
Sent from my GT-I8160 using Tapatalk

shaqman89 said:
Any chance that this would be a feature in your kernel @ChronoMonochrome @ace2nutzer?
Sent from my GT-I8160 using Tapatalk
Click to expand...
Click to collapse
Actually, repartition extsdcard is too painful for me, I simply don't have enough space on hard drive(not that it's small, but it's always nearly full ) to backup those ~30 Gb data on extsdcard :/ I can add multirom support only if I'll finish my idea, that I posted here.

Kirya12347 said:
I hope you'll make flashable zip also
Click to expand...
Click to collapse
Sure.. I'm going to create that after my final exam...
ace2nutzer said:
As i said, with a bad configured kernel u can reach only 7mb/s write speed even with class 10.
With read_aehead_kb 512 + good kernel u should have at least 10mb/s write speed with class 10.
personally i've 12mb/s write speed. on internal and ext-sd
Click to expand...
Click to collapse
Ohh.. I see.. really sorry for my misunderstanding!
Okay, the fact is I've compiled ur updated kernel source (commit: e59fb17) before my final exam.. hahaha.. n I get better read speed: ~25 Mb/s on internal & ~17 Mb/s on external.. thx!
dunno why.. I still don't get much improvement about the write speed.. because they're nearly full maybe? or because I'm testing on stock ROM.. hmm...
ChronoMonochrome said:
Some ideas regarding the subj:
1. mount an images instead of repartition external sdcard
2. (1) can allow to use multiple ROMs.
Click to expand...
Click to collapse
Thank you very much for ur brilliant idea! If I read this post before, I wouldn't just return my friend's card reader this morning to clean up partitions I've made in my SD.. hahaha
Okay.. just wanna write down my idea that popped from my mind after reading ur post..
How about place all ROMs in directories, like this:
/storage/extSdCard/ROMs
/storage/extSdCard/ROMs/slot1 contains system, data n ramdisk.cpio for ROM 1
/storage/extSdCard/ROMs/slot2 contains system, data n ramdisk.cpio for ROM 2
/storage/extSdCard/ROMs/slotN...
and create symlink to the appropriate slot directory to boot SD ROM, for example: to boot ROM 1, create symlink /storage/extSdCard/.sdboot_slot to ROMs/slot1, etc? Much better than typing this long command: cd /tmp; mkdir l; mount -t ext4 /dev/block/mmcblk1p2 l; cd l; echo > enable_sdboot; cd ..; umount l; each time when I want to boot the SD ROM..
Okay.. time to study again.. I'm going to think about this idea after my exam..

Related

[New Solution] - Faster Virtual Ram !!!!!

Hi,
I'm not a developer but I think my idea is great.
1. Using CACHE partition (50Mb) as virtual ram​
- I see that we are using swap ext partition to increase virtual ram, but access data speed of sdcard is not fast enough (for class2 or class4 sdcard),
- And I see that we have 50Mb free in cache partition which are only used when we use OTA update. But if we use a moded rom, why do we use OTA update ? access data speed of internal memory is really good, why don't we use cache partition as virtual ram ???
2. Runing faster with dalvik-cache on internal memory.​
- As you know, after install an application, we will have apk file in data/app or data/app-private and some odex file in dalvik-cache.
- If we only use app2sd with data/app and data/app-private, our application will run faster.
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
What are the partitions formatted as now?
ivanmmj said:
What are the partitions formatted as now?
Click to expand...
Click to collapse
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
The partition wouldn't have to be formatted, you can use zeroed images for swap space, I've done it in Solaris before and I'm sure some of the memory techniques for Android have implemented this before, don't quote me!
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
Is it not possible to use something like a swap file on the cache partition? I'm not familiar enough with the workings of Android, but I know that swap files are supported in Linux and I've seen it mentioned for Android, so is there any reason this wouldn't work? It would be an amazing improvement. I see you answered while I was typing this post, thanks.
I do wish people would stop putting their ideas as [new solution] and stuff and just put it forward as an [idea] or [concept] until there's a working implementation.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
Would the loop mounting be slow to create or slow for performance? I wouldn't mind a bit more boot time if it meant onboard swap, but obviously if it's a slowdown vs SD or none at all, it's probably not worth it.
How would u format a folder like that??? We could elimate the recovery and instead of useing it for 50 mb swap. Let's use it on the system folder. And then we could than drag eclair in our phones but then we would have to be stuck have just one rom. We could also ask rom devs to make us img instead of .zip roms so we could just flash the images
What about Nandroid etc?
This is a must-have.
Also I think the formation of the partition would be overwritten with every reboot..
But idk.
Won't try it out.
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
But remember guys we also have the spl as backup. We could make the nandro-backup into a .nbh file to flash but it takes a longer time to do it. We could make an app or script that does it for as. I tried to customize the init.rc, build.prop, and fstab but it changes everytime - reboot. What should I do? These files were rewriten when I rebooted. If you guys want to talk this over with me and some of my friends on gtalk, I'll create a group for us to talk more in depth. My email address is [email protected].
jroid said:
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
Click to expand...
Click to collapse
How much code do we have for recovery? I know there are modified recovery images, I have used Cyano and RA. It seems like it would be possible to create a small ramdisk or loop mount for recovery to use and recover this RAM for use by our applications. Or a mod to the init script to format that device properly for recovery when it boots and run mkswap on it when we boot to normal mode. I'm not real familiar with Android at this level, so perhaps I'm way off base here.
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
mohsinkhan47 said:
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
Click to expand...
Click to collapse
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
farmatito said:
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
Click to expand...
Click to collapse
I did that but got " broken image file ". What do I do now?
If the 50MB on the cache partition is never used, would it be possible to re-map it to /system? Probably something akin to what the "Death" SPL did.
That is what I said but then I guess you would have to reformat the phone to accept a different amount of info in this case megabytes. We would have to reformat the system folder to hold more info on it.
rgawenda said:
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
Click to expand...
Click to collapse
YAFFS2 doesn't support swapfiles.
Thats why would need a loop mounted ext-image.
Placing a swap file/partition in internal memory is risky business. Flash memory has a limited number of write cycles, and swap does many writes per second. Whereas an SD card can be replaced if worn out, internal memory cannot, so the phone becomes a brick if the flash memory is damaged by swapping.

[ROM] ownheredesireHD v1.6 base on DHD, newSense|DATA2EXT|CAMERA|SUPERFAST

I like to share my DHD ROM for Desire, it is base on DHD HK RUU.
This rom use my script DATA2EXT, it is superfast.
DownloadLink:
multiupload:ownheredesireHD_v1.6_101205.zip
Additional:
HtcLaputa(Location,Navi):http://u.115.com/file/f5dd099cc, use this resolve carpanel and repeat download map issues. mirror:http://rapidshare.com/files/435169937/HtcLaputa.apk, thanks to uridium_uk
original framework-res.apk(for battery icon):http://www.multiupload.com/VRAF74HTX7
Notice:
1.This rom will be format your 2nd partition automaticlly, so you need backup your 2nd partition first.
2.I don't like deodexed system, because it will change apk's signatur, that I can not upgrade my system app for new update. And deodexed system will take more time for first booting time:every app need dexopt.So I use stock odex system.
3.Don't setup Google account until your TitaniumBackup restore job finish.
4.Some say this ROM will destroy the SD card, I have not encountered, and if SD card is not recognized in Windows, you can use Windows Computer Management -> Disk Management, assigned a drive letter for SD 1st partition, so you can see fat32 partition
5.put bootanimation.zip and shutdown.zip on /data/local will be replace BootAnimation and RebootAnimation.
Optimization Suggestion:
1.use fast SD card, class 4 or higher.
2.format SD 1st partition(fat32) with 32K cluster.
3.use setcpu overlock to 1113Mhz
4.use static wallpaper
5.use ADW Launcher
Requirement:
1.SD card with 2nd partition, 2nd partition is not less than 512M, recommend 1G for large app space and super fast. The second partition can be in any format.
2.Bravo Stock MTD(system:250M,data:150)
Installation:
use RA or ClockworkMod recovery, or ROMManager flash ownheredeisreHD_v1.6_101205.zip.
the first boot take long time(about 5-15 mins).
Feature:
1.ownhere's data2ext, get large app installation space,special for /data/data, which leave in phone memory with a2sd/a2sd+. You can install many many app with data2ext with out memory full warning.
2.ext4 loop device in ext4 partition, speed up IO.
3.kernel base htc 2.6.32.15, add BFS,GPU+,SDFIX,UnderVolt,OverClock,LZMA, thanks to richardtrip and all kernel devs. I disabled HAVS, cause of it lead phone not stable.
4.google maps 4.7.0 ownhere MOD, base on brut17 (thanks to brut.all), internationl navi.
5.ROM base on DesireHD HK RUU 1.32.832.1
6.kernel module:cifs,nfs,utf8,nilfs2,reiserfs,tun...
7.You can replace framework-res.apk with mod version(signed by testkey), because I've resigned some core app/lib for personalize battery-icon.
Known Bug:
1.720p recording
Update Note:
v1.6
Code:
1.enable EXT4 journal, more stable after reboot or lost power.
2.remove some paid app(sorry to author)
Thanks to:
snq-
robocik
sibere
enjoy it.
ownhere said:
I like to share my DHD ROM for Desire, it is base on DHD HK RUU.
This rom use my script DATA2EXT, it is superfast.
Requirement:
1.SD card with 2nd partition, not less than 512M, strongly recommend 2G for large app space and super fast.
2.Bravo Stock MTD(system:250M,data:150)
enjoy it.
Click to expand...
Click to collapse
2nd partition, ext2, 3, or 4?
1st partition fat32?
coutts99 said:
2nd partition, ext2, 3, or 4?
1st partition fat32?
Click to expand...
Click to collapse
Yes, it's right.
coutts99 said:
2nd partition, ext2, 3, or 4?
1st partition fat32?
Click to expand...
Click to collapse
+1.
I want to know too.
based from a dhd rom, what have you added or taken from it? or is this just purely just a speed increase rom?
just curious.
but aside from that, is this simply a straight flash-able rom? (provided the card is partitioned) or are there other steps involved?
thanks.
ownhere said:
I like to share my DHD ROM for Desire, it is base on DHD HK RUU.
This rom use my script DATA2EXT, it is superfast.
Requirement:
1.SD card with 2nd partition, 2nd partition is not less than 512M, strongly recommend 2G for large app space and super fast. The second partition can be in any format.
2.Bravo Stock MTD(system:250M,data:150)
Thanks to:
snq-
robocik
enjoy it.
Click to expand...
Click to collapse
I found that there is stock and location patch file in your other post
hXXX://bbs.gfan.com/viewthread.php?tid=348528&extra=page%3D1%26amp;filter%3Dtype%26amp;typeid%3D171
Is it included in this version or we need to download it separately.
BTW, this is very good ROM. thanks!!
"The second partition can be in any format."
Pretty sure that means ext2-4.
02xda1 said:
based from a dhd rom, what have you added or taken from it? or is this just purely just a speed increase rom?
just curious.
but aside from that, is this simply a straight flash-able rom? (provided the card is partitioned) or are there other steps involved?
thanks.
Click to expand...
Click to collapse
Partition your SD card and flash the zip file.
There is no other step involved.
Just simple and easy.
Dose it work well with my kingston class 2 8G card?a light user from gfan.com
Sent from my HTC Desire using XDA App
michaelmai88 said:
Partition your SD card and flash the zip file.
There is no other step involved.
Just simple and easy.
Click to expand...
Click to collapse
thanks for clearing that up, but in regards to the other part of the question, is it a standard dhd rom or are there any extra's worth noting?
02xda1 said:
thanks for clearing that up, but in regards to the other part of the question, is it a standard dhd rom or are there any extra's worth noting?
Click to expand...
Click to collapse
standard dhd rom with totaly diffrent disk layout, very smooth, very fast
How do I create 2 partitions on my sd card
Sent from my HTC Desire using XDA App
is there JAVA in this ROM and rotation?any pictuers
ownhere said:
standard dhd rom with totaly diffrent disk layout, very smooth, very fast
Click to expand...
Click to collapse
Thank you for your effort. Could you upload to dropbox? Estimated download time on megaupload is over 8 hours.
Thanks in advance.
Im sure many were waiting for this release.
Can you confirm sd partition - swap =0, ext = 1 gb , convert ext 2 to 3 and then 3 to 4 ?
sorry for noob question
ps - i have to wait 22 hrs for the whole file to come in....
ownhere said:
standard dhd rom with totaly diffrent disk layout, very smooth, very fast
Click to expand...
Click to collapse
cifs / sdcard fix / chargemod fix / etc / what kernel ?
give us more details
02xda1 said:
thanks for clearing that up, but in regards to the other part of the question, is it a standard dhd rom or are there any extra's worth noting?
Click to expand...
Click to collapse
When you flash this ROM, you will get data2ext automatically.
It means that how big you size your 2nd partition, you get the same size internal memory. It's just the Desire user needs.
can anyone mirror this somewhere else please?
megaupload are really really slow for me at the moment, i'm getting speeds of around 5.1-5.7KB/sec
says i've got over 10 hours to go
we need more info ...
screenshots ... kernel ... apps
then we can try it ..
+1 for Mirror ... whats up with Megaupload ... it should be called Microupload ...8)

run Ubuntu from SD card ?

Hi,
I want to run Ubuntu on the TF101 but without touching the Android partition and losing anything from the current ROM installation.
Would it be possible to install Ubuntu on external SD card and run through boot with a custom bootloader ? (dual boot maybe)
I've searched for a thread for this but there are several Ubuntu threads on the development forum and most of them run Android with a different partition table on internal SD card.
Thanks.
mrmrmrmr said:
Hi,
I want to run Ubuntu on the TF101 but without touching the Android partition and losing anything from the current ROM installation.
Would it be possible to install Ubuntu on external SD card and run through boot with a custom bootloader ? (dual boot maybe)
I've searched for a thread for this but there are several Ubuntu threads on the development forum and most of them run Android with a different partition table on internal SD card.
Thanks.
Click to expand...
Click to collapse
I'm pretty sure it can't be done like that. It either replaces recovery or you do the pseudo dualboot.
Solar.Plexus said:
I'm pretty sure it can't be done like that. It either replaces recovery or you do the pseudo dualboot.
Click to expand...
Click to collapse
ok; that's acceptable. But what about installing the Linux partition on SD card instead of the internal SD ?
mrmrmrmr said:
ok; that's acceptable. But what about installing the Linux partition on SD card instead of the internal SD ?
Click to expand...
Click to collapse
I think this is what you are looking for. It's the Dualboot over external micro sd section
doing that is pretty straightforward, you just need to partition the external sd and pass the right parameter to the kernel while booting, but you still need to flash a secondary kernel ( hopefully on the SOS partition of your internal mmc ) so u will not actually get a *clean* dualboot.
It probably worths only if u wanna easily edit the rootfs content without using nvflash so much ( which u need anyway at least for the initial kernel download ).
An other advantage is that if u're planning to make lots of tests ( apt-get install *this*, autoremove *that* ... ) u will save ure internal hd a lot of read/write cicles getting some years more for ure device to live..
I did it on my B60 using OLiFE scripts, just edit the ./boot/dualboot.cfg file replacing the "root" kernel parameter with whathever partition u want ( probably blk1p1 on the simplest configuration ), format ure external ssd as u need ( you can do it right from android with a terminal emulator and fdisk/parted ), copy over ure new root partition the rootfs content of ure choise , flash the "edited" kernel with OLiFE and enjoy.

Booting from external SD [CM]

UPDATE: This can't be used with CM10 Alpha 4 (or later) as it is due to the new partitioning system.
____
I made this thing time ago and I thought to share.
What it does is to boot a stock ROM from the external SD card. It's nothing special, I simply changed few things here and there. I did it because I needed a stock ROM for a couple of minutes and this was the faster way to get it.
I'm using CM and I made this with that in mind, so, don't use while using a stock ROM. It won't mess your current setup, but it won't work.
You need to change kernel to boot the stock ROM (reboot recovery > flash zip. Simple and fast). That's because, as you probably now, kernels made for stock ROMs are not compatible with CM.
Prepare you SD card
You need first to repartition your external SD like this:
Code:
1° partition (mmcblk1p1): FAT - it will be the usual external SD
2° partition (mmcblk1p2): ext4 - /system (make it around 300MB big, 254MB will be more or less the space used)
3° partition (mmcblk1p3): ext4 - /data
I can't help you with this, I did it with adb and parted (the command is available in CWM). Look for instructions on the web, it's full of guides out there. Your external SD card is /dev/block/mmcblk1 (mmcblk0 is the internal one).
If you'll use the zip linked to flash the ROM, the two partitions (mmcblk1p2 and mmcblk1p3) will be automatically converted, unless they are already two ext4/ext3/ext2 partitions.
It shouldn't matter which kernel you are currently using and it should be safe flashing it, the only important thing is to have three partitions. If mmcblk1p2 or mmcblk1p3 are not detected, the installation will be aborted (it means that your SD card is not partitioned). Nothing else will be touched.
If you don't want to use the zip, mount mmbclk1p2 and copy the ROM there.
/dbdata will be the usual one (it's not used in CM. This will also makes Samsung apps a lot faster when using a slow SD card), same for /cache.
The flashable ROM is a stock XXLE4 + su/Superuser.apk.
How to use the additional ROM
To use the ROM on your SD, flash kernel-stock-SD.zip (see below) from recovery.
To go back to the real ROM you have to flash its kernel. Here below you can find CM10 Alpha 2 kernel, flashable from recovery. If you have doubts, reflash the entire ROM, it won't wipe your data.
I only mentioned CM10 because it's what I'm using, but this thing should work with CM9 too.
Things to know
I built the kernel using the latest Samsung sources with inbuilt ext4 support (and ext3/ext2 compatibility). Nothing else was changes, so I think there's no need to publish the sources, they are available here.
I attached the tools I use to unpack/repack boot images (they are a modified version of skin1980's tools):
Code:
./unpack.pl boot.img
./repack.sh [gz|lzma|bzip2|xz]
To see the changes I made, compare "out/android" with the stock XXLE4 ramdisk and the other two directories with CM10 boot.img ramdisk.
I changed recovery.fstab accordingly, but I can't tell you if flashing stuff from CWM while using the additional ROM will work as expected. You should read the updater-script to know it for sure.
I can only tell you that dhiru's builds will be flashed into the real /system partition and not your SD card.
Backups should work too, but I didn't try.
Of course, performances depends on your SD card. Mine is not that good I think, I took it from an old phone and I really don't know anything about it. The ROM is still usable, but apps that intensely use databases are slow (not Samsung apps, those will use /dbdata). Maybe disabling journaling will help (search for more info).
The Galaxy SL screen will last more than usual because I intentionally added a delay (3 seconds, SD cards are detected after a while) and of course because of the slower load.
Please, use this if you have some experience.
Note: dual booting two ROMs with a single kernel is possible, but only if they use the same kernel image. See this and this.
Downloads
XXLE4-CWM.zip: CWM flashable ROM
kernel-stock-SD.zip: kernel to boot the ROM from the external SD, flashable from recovery
kernel-CM10-Alpha2.zip: CM10 Alpha 2 kernel, flashable from recovery
Wow ! thats dualboot for i9003 ! sweet gud to see development back in action
Good work.
The class of an SD card can be misleading. It is only a measure of the sequential Write access and that doesn't tell the whole story. Class 10 cards are great for cameras and applications that write or read sequential data, such as saving a picture and transferring a file. They are not so good for random access which is what the Android OS does when operating. In fact the random access speed for class 10 cards is lower than class 4 or 6 cards. From what I have seen, the sweet spot for smartphones is class 6.
Awesome. Only if we could achieve dual boot without flashing kernel everytime. But anyways awesome guide. Thanks.
Reminded me of dual booting of maemo and android on my brother's n900.
Whats the benefits of dual boot? I heard about it but i dont have an idea
juztinlee said:
Whats the benefits of dual boot? I heard about it but i dont have an idea
Click to expand...
Click to collapse
Dual Booting means you can have two OS's (here firmware) on the phone at the same time. You can choose on which you want to go. This, besides being awesomely cool, is really helpful in many scenarios.
But its not exactly a dual booting. On galaxy s2 dual booting uses a single kernel but in our case.we are still using two different kernels which has to flash saperately.
Really we should create a kernel which can be used for cm9/10 & for stock GB rom. Then real fun will begin
^But this can be useful when you have to go for a long trip and want to record videos which only our stock rom is capable of doing good. Thanks to the developer.
Also, if anyone can, please tell me what is the possibility we can create a dualboot kernel like siyah kernel?
vishal24387 said:
But its not exactly a dual booting. On galaxy s2 dual booting uses a single kernel but in our case.we are still using two different kernels which has to flash saperately.
Really we should create a kernel which can be used for cm9/10 & for stock GB rom. Then real fun will begin
Click to expand...
Click to collapse
I didn't say dual boot
Creating a single kernel for ICS/JB and GB is not possible, or at least not an easy thing.
CyanogenMod is using newer graphic drivers not compatible with GB. I tried to use my CM10 kernel with GB, just to see what could happen. Well, it works, but with no hardware rendering as expected. It doesn't mean "it's laggy", it's painfully slow. And if we'll have the 3.0 kernel working, I guess this will be even more difficult.
The only option I think is kexecing an additional kernel, but kexec is hard to implement.
However I dual booted CM10 and CM9 (SD) with a single kernel (there are traces of this in my unpack/repack tools), I simply added an additional "cpio.gz" inside the boot.img. There's an additional boot reason that we never use, so we can use it to choose the corrent "cpio.gz" by parsing /proc/cmdline. The only problem is that you need to boot the ROM first and the reboot, because to get the other boot reason you have to run this:
Code:
reboot arm11_fota #or arm9_fota
(if you are using a stock ROM and try to reboot with the command above, you'll see weird stuff, but nothing should happen to your phone. I did it once.).
Maybe there's something else possible, but dual booting never interested me. As I said, I did it because I needed it.
You can do a lot of things, I even stored a ROM in a subdirectory in /data and use it from there (=> fast).
santoshsadani009 said:
^But this can be useful when you have to go for a long trip and want to record videos which only our stock rom is capable of doing good. Thanks to the developer.
Also, if anyone can, please tell me what is the possibility we can create a dualboot kernel like siyah kernel?
Click to expand...
Click to collapse
I don't know how exactly dual booting with this kernel works. I actually don't know how usually dual booting is implemented in Android.
I just looked at it. It allows you dualbooting only two ICS+ ROMs (so no GB), it automatically creates an hidden partition, automatically stores the ROM there, provides additional tools in CWM and other nice things.
I guess is something possible, but don't expect it from me. As I said, I'm not interested in dual booting and this thing requires time and knowledge.
loSconosciuto said:
I didn't say dual boot
Creating a single kernel for ICS/JB and GB is not possible, or at least not an easy thing.
CyanogenMod is using newer graphic drivers not compatible with GB. I tried to use my CM10 kernel with GB, just to see what could happen. Well, it works, but with no hardware rendering as expected. It doesn't mean "it's laggy", it's painfully slow. And if we'll have the 3.0 kernel working, I guess this will be even more difficult.
The only option I think is kexecing an additional kernel, but kexec is hard to implement.
However I dual booted CM10 and CM9 (SD) with a single kernel (there are traces of this in my unpack/repack tools), I simply added an additional "cpio.gz" inside the boot.img. There's an additional boot reason that we never use, so we can use it to choose the corrent "cpio.gz" by parsing /proc/cmdline. The only problem is that you need to boot the ROM first and the reboot, because to get the other boot reason you have to run this:
Code:
reboot arm11_fota #or arm9_fota
(if you are using a stock ROM and try to reboot with the command above, you'll see weird stuff, but nothing should happen to your phone. I did it once.).
Maybe there's something else possible, but dual booting never interested me. As I said, I did it because I needed it.
You can do a lot of things, I even stored a ROM in a subdirectory in /data and use it from there (=> fast).
I don't know how exactly dual booting with this kernel works. I actually don't know how usually dual booting is implemented in Android.
I just looked at it. It allows you dualbooting only two ICS+ ROMs (so no GB), it automatically creates an hidden partition, automatically stores the ROM there, provides additional tools in CWM and other nice things.
I guess is something possible, but don't expect it from me. As I said, I'm not interested in dual booting and this thing requires time and knowledge.
Click to expand...
Click to collapse
so that means we can dualboot cm9/10 with miui v4 . right ? since they both use the same kernel
vishal24387 said:
But its not exactly a dual booting. On galaxy s2 dual booting uses a single kernel but in our case.we are still using two different kernels which has to flash saperately.
Really we should create a kernel which can be used for cm9/10 & for stock GB rom. Then real fun will begin
Click to expand...
Click to collapse
Ya a Universal kernel will do the trick.If later then we can achieve dual boot then the people who were holding back from CM9 or CM10 can flash that for features and a stock rom for stability and camera.
shriomman said:
so that means we can dualboot cm9/10 with miui v4 . right ? since they both use the same kernel
Click to expand...
Click to collapse
As long as the kernel is the same, yes.
If you want, here you can find the unpacked boot.img I (probably) used to dual boot CM10 and CM9 (SD).
There's no zImage in there, use the one you prefer, CM10 and CM9 are using the same kernel.
EDIT:
I almost forgot. "out/ramdisk/2ndROM" is for the ROM stored in your SD card, so you have to adjust the mount points there (already done in the one linked). "out/ramdisk/android" should be the "stock" ramdisk.
recovery will work only for the primary ROM in this case, maybe with some scripting you can make it works for both the ROMs, but I won't do it (if it's something possible).
The tools I posted will automatically take care of the additional ramdisk.
Possible to fix the download links? I want to boot rom from SD card since my internal is corrupted...
nick0016 said:
Possible to fix the download links? I want to boot rom from SD card since my internal is corrupted...
Click to expand...
Click to collapse
I don't know what happened to the links, probably I deleted the files by mistake on dev-host. Sadly I no longer have them and I currently don't have the time to make them again.
Anyway, I suggest you to follow other guides in order to replace only the corrupted memory instead (we have two different memories). This one for example, but there are other guides probably.
Thanks for your answer, problem is that my "device" memory is corrupted (as in read only).
I did the SD / USB storage swap but still have the problem that I cannot run/remove/install. So I need a ROM that loads completely from the external SD card and also uses it for data/storage...
I can flash a rom/kernel without problems, but changing version makes it only worse because the data does not get erased (background/applications/settings.... stays the same everytime, even after a wipe from the recovery).
If it helps I would love to pay/donate money to you as a thanks for your help and effort because the phone itself is working fine (except the corrupted memory of course) and would like to use it again
nick0016 said:
Thanks for your answer, problem is that my "device" memory is corrupted (as in read only).
I did the SD / USB storage swap but still have the problem that I cannot run/remove/install. So I need a ROM that loads completely from the external SD card and also uses it for data/storage...
I can flash a rom/kernel without problems, but changing version makes it only worse because the data does not get erased (background/applications/settings.... stays the same everytime, even after a wipe from the recovery).
If it helps I would love to pay/donate money to you as a thanks for your help and effort because the phone itself is working fine (except the corrupted memory of course) and would like to use it again
Click to expand...
Click to collapse
The guide I linked is fine then.
It explains how to repartition your SD card and the script Dipu K attached to his post is to use the newly created partition inside your external SD for /data. It's not to swap internal and external SD.
As I said, we have two memories, /data is in one, /system, kernel and other things are in the other memory. The corrupted one must be the one which holds /data.
Try to do as explained in the guide, if the problem persists, I'll see what I can do to help.
I followed the guide and got the Device memory replaced (data partition). Problem is now it is stuck in at boot because the partition is empty.... and when I copy the files from the corrupted data partition it boots fine but get message that I must wipe my data or the system will be unstable (which is correct because I get then flooded with unexpected errors which make it unusable). But formatting data partition gives stuck @ samsung boot logo??
So I need to get the "factory" data files from somewhere... I am running stock KPE ROM with BAM kernel (for init.d support).
Is it possible to extract the data partition from the stock rom?!
nick0016 said:
I followed the guide and got the Device memory replaced (data partition). Problem is now it is stuck in at boot because the partition is empty.... and when I copy the files from the corrupted data partition it boots fine but get message that I must wipe my data or the system will be unstable (which is correct because I get then flooded with unexpected errors which make it unusable). But formatting data partition gives stuck @ samsung boot logo??
So I need to get the "factory" data files from somewhere... I am running stock KPE ROM with BAM kernel (for init.d support).
Is it possible to extract the data partition from the stock rom?!
Click to expand...
Click to collapse
The content of /data is generated, there's nothing like what you asking for.
Maybe the problem is that the script posted in the guide copies the content of the old /data partition to the new partition inside the SD card. Wiping data shouldn't work because the path to the SD card is not specified.
Try the script attached. I zipped it to be able to upload it here, but it's not flashable. Since you've been able to follow the guide I assume you know how to use adb.
Wipe the content of the data partition you created inside you SD card (/dev/block/mmcblk1p2). You could reformat it with make_ext4fs, use a computer and so on. What's important is that it's ext4 formatted.
While in recovery, run:
Code:
adb shell mount /system
adb shell mkdir -p /system/etc/init.d/
adb push [I]PATH_TO[/I]/remount_data /system/etc/init.d/
adb shell chmod 777 /system/etc/init.d/remount_data
I'm sorry, but I currently don't have much free time to help more than this. With no logs or access to the device it's really hard for me to know what's the problem.

[MOD][2016-11-01][V3.01]TURBO DATA - Get an 8GB Data-Partition ...

TURBO DATA - Get an 8GB Data-Partition!​
Use SD-EXT as new Data partition​
presented by​
~~~~~~~~ delta-roh ~~~~~~~~ ​
HIT THANKS for delta-roh (1st post) ​And, please, don't forget to Rate this Thread - thank you!​
You love your Sensation, but:
The 1 GB of the data partition limits you?
You don't like Link2SD?
You don't want to use the to SDCard feature?
You don't want to use data2sd or similar scripts?
You are afraid of broken links?
Then this is the Turbo for your HTC Sensation​
Features of TURBO DATA
Version 3.01 (release date 01st Nov 2016)
new corrected error in cpio to support 2nd level subdirectories
new Mod for Ivanich CM11 to get Data on SD-Ext, but have Dalvik internally (FAST!!!) - refer to Post 2
Version 3.00 (release date 29th Mar 2015)
new now my Delta-Roh cpio.bat is integrated
new Delta-Roh cpio without cygwin! - all tools integrated als always
new No need of Windows 8.1 administrative rights (as for cygwin)!
new Now manual changes can be done to all scripts of the ramdisk
new Very easy handling!
new This version now also supports ViperS-Roms!
new If you like, you can download only the Delta-Roh cpio package (see below)
Version 2.02 (release date 02nd Mar 2015)
new now also handles .img (boot-Image files)
new added loop for performing patterns more flexible
new added patch check - exit if no pattern was found
new added ramdisk size check
Version 1.04 (release date 21st Feb 2015)
First Version by delta-roh
new handles normal flashable zip, that include a boot.img
new works fully automatically
new support of command line call
new Drag+Drop support
new A lot of checks to make the procedure safe
new Writes a logfile parallel to the screen output
new Does not change your original zip
new the resulting zip can be flashed directly
Click to expand...
Click to collapse
Idea:
Our beloved Sensation comes only with 1 GB of available internal memory and that is too less to work, even if you don't install a lot of games. When I tried several thinks (app2sd, app2sd-ext, Link2SD etc.) I recognized, that modern SD-Cards are very fast and our Sennsation has got a very good interface to suppport high speeds. Even better, the SD-Cards of SanDisk (SanDisk Extreme Pro, SanDisk Extreme Plus and SanDisk Extreme) are even faster, than the internal memory. Therefore I got the idea, to make a seperate external SD partition (SD-Ext) to the new Data partition. It works flawlessly and fast. But how does it work? The first step of the Android startup process is to mount the boot image and to mount a ramdisk, that is part of the boot image. In this ramdisk you will find the mount table for the primary partitions - it is called fstab.pyramid. Here you will find, that the data partition is mounted to /dev/block/platform/msm_sdcc.1/by-name/userdata or to /dev/block/mmcblk0p23. The only thing to do is, to change this to /dev/block/mmcblk1p2, which is the second partition of the SD-Card.
The attached ZIP now contains a Batch file together with all necessary tools to do this job for you completely automatically. It extracts the boot.img file from your flashable zip, extracts the kernel and the ramdisk.gz, unpacks the ramdisk, patches the fstab.pyramid as described above, repacks the ramdisk, repacks the boot.img, makes a copy of the original flashable zip, exchanges the boot.img in this new zip - done! You have got a new flashable zip, that will mount the second SD-Card partition as your new data partition. I do this with an 8 GB sd-ext partition and therefore now have got a Sensation with 8 GB of available internal memory - no need to care about memory or tools like Link2SD any longer!
Click to expand...
Click to collapse
Installation:
Take these steps:
the attached zip contains the batch and all needed utilities
extract the directory tree in the zip to a location on your Windows harddisk
place your flashable zip or boot-Image in the main directory which also contains this batch
open a cmd-windows by clicking "Start here.bat"
call "MakeNewImage" with your flashable zip or boot-Image: MakeNewImage <your-rom-or-image.zip>
or
just Drag+Drop your flashable zip or boot-Image to MakeNewImage.bat
after processing you will find the new flashable zip or boot-Image in the subdir "new"
all original parts (boot.img, kernel, ramdisk(.gz)) are in the subdir "original"
all new parts (boot.img, kernel, ramdisk(.gz) and your new flashable zip) will be in the subdir "new"
if you call the batch another time (or Drag&Drop a new image to MakeNewImage.bat, the complete subdirs will be deleted before processing the new fashable zip; the batch will then create the directories again with the new parts
if you like, you can make additional changes to the fstab.pyramid or init.rc ...
Click to expand...
Click to collapse
YOU MUST READ THIS OR YOU WILL BRICK YOUR DEVICE:
You have to know this - read carefully:
Tested with a lot of CM11 and CM12 Roms
It will only work for fashable zips that contain a boot.img, like @SultanXDA CM11, @ivanich CM12, @shantur CM12 - it will NOT work e.g. for @mike1986 Android Revolution, as this does not contain a boot.img.
ViperS 5.2.1 / Viper 5.3.0 do not work at the moment.
You should only make your sd-ext to the new /data partition if you have got a highspeed sd-card e.g. SanDisk Extreme-series; otherwise it will work, but your Sensation will slow down.
You need a sd-ext partition on your sd-card as second (!) partition (/dev/block/mmcblk1p2); create it within the recovery or use e.g. MiniTool Partition Wizzard and create a first partition as primary fat-formated and a second partition as primary ext4 formated. IF YOU HAVE NOT A SECOND PARTITION, YOUR DEVICE WILL NOT BOOT!
This is ONLY for the HTC Sensation/XE; it can work also for flashable images of other devices, but then you have to make your changes to fstab and/or init.rc manually!
After flashing the new image the /data partition will be created on the second SD-Card partition (sd-ext).
After booting for the first time you can restore a backup by using e.g. Titanium.
If you want to look at /data within the recovery you have to mount sd-ext and then flash the Aroma Filemanager; there you can see the complete data partition by browsing to sd-ext.
You can make a nandroid backup within the recovery. Note, that the sd-ext tar file is your (new) data partition.
If you want to go back, then just flash a nandroid of a former backup or flash a not patched zip and make a clean installation.
If your rom thread provides a seperate zip for the kernel, then have a look at the provided zip! If it contains a boot.img, then it has to be patched at first by using MakeNewImage.bat in the same way as with a complete rom. If the kernel zip does not contain a boot.img but only the kernel, then you can flash it directly.
If you want to wipe Dalvik-Cache you can't do it with the "wipe Dalvik"-command in Recovery; instead go into Recovery, mount sd-ext, flash the Aroma Filemanager or use the TWRP-Filemanager, navigate to the directory sd-ext (your new /data) and delete the directory dalvik-cache.
You can not restore a data partition from a former installation to sd-ext, because the tar file also stores the partition name and, therefore, does not restore a data file to the sd-ext partition, even it you rename the backup file. As said before: Make a clean installation and then restore via e.g. Titanium.
Click to expand...
Click to collapse
Thanks:
Special thanks to:
carliv (http://forum.xda-developers.com/member.php?u=5186178)
for mkbootimg.exe (https://github.com/bgcngm/mtk-tools)
GnuWin32 (http://gnuwin32.sourceforge.net/packages.html)
for sed.exe and grep.exe (libiconv2.dll, libintl3.dll, pcre3.dll, regex2.dll)
Igor Pavlov (http://www.7-zip.de/)
for 7z.exe and 7z.dll
Karl M. Syring (http://unxutils.sourceforge.net/)
for dd.exe, gzip.exe, od.exe, printf.exe, rm.exe, sha1sum.exe, tee.exe
@danishaznita for testing the first version
Click to expand...
Click to collapse
USE IT AT YOUR OWN RISK - NO SUPPORT! READ SECTION 'MUST READ' ABOVE CAREFULLY!​
DOWNLOAD TURBO DATA MOD V3.01​
DOWNLOAD Delta-Roh cpio Package V1.51 (already integrated in Turbo Data Mod)​
If you like my work, press​
THANKS for delta-roh ​
And, please, don't forget to rate this thread - thank you!​
If you want to use my work, please don't ask for permission, but leave my headers in my files, make a reference to me in your thread and respect the other persons in the thanks section, if you use their tools.​
copyright by delta-roh 2016
Reserved
Mod for Delta-Roh MakeNewImage-V3.01
EXPLICITLY for Ivanich CM11 ONLY!!!
This mod mounts a sd-ext partition to /data and leaves the dalvik-cache on the internal
memory. Therefore you will get e.g. an 4 GByte (depends ob your sd-ext partition size) data
partition and the original 1.1 GByte internal memory as additional and fast memory for
the dalvik cache. This is the fastest way regarding the porformance of the Sensation.
Installation:
- Download and extract "Delta-Roh MakeNewImage"
- start "MakeNewImage.bat" with "cm-11-20160810-UNOFFICIAL-pyramid.zip"
- answer the question "Do you want to auto-patch fstab [y/n]" with "n" (no) - don't close the command box!
- an explorer will open in the subdir of the new ramdisk, now do the following mods:
--- override the existing "init.rc" with the new one from this zip (Download below)
--- override the existing "fstab.pyramid" with the new one from this zip (Download below)
--- create a new directory "data0" in addition to the already existing data directory
--- copy/paste (press Ctrl-C then Ctrl-V) the file "data.attrib"
--- rename the new file ("data - Copy.attrib" or named similar) to "data0.attrib"
--- now you can close the Explorer and answer the question "Manual changes finished [y/n]" with "y" (yes)
Now you will get a "sdext_cm-11-20160810-UNOFFICIAL-pyramid.zip" that can be flashed.
NOTE: You will need a sd-ext partition on your sd-card.
DOWNLOAD Ivanich CM11 DATA MOD​
I think this a great idea, many thanks. I've been wanted to do it the since you mentioned the other day, I wanted a new phone too xD Well I did it today and then just seen your post. I did it on PC though (Linux) and mounted userdata as dalvik-cache so easy to wipe and maybe quicker loading (in theory). I may have mounted it differently to you (see screenshot), and are your attributes/flags the same?
hinxnz said:
I think this a great idea, many thanks. I've been wanted to do it the since you mentioned the other day, I wanted a new phone too xD Well I did it today and then just seen your post. I did it on PC though (Linux) and mounted userdata as dalvik-cache so easy to wipe and maybe quicker loading (in theory). I may have mounted it differently to you (see screenshot), and are your attributes/flags the same?
Click to expand...
Click to collapse
My Turbo Data mounts sd-ext to data (same to you) but don't mounts the old data to the dalvik-cache, because I have a SanDisk Extreme Plus and it is faster than the internal memory xD
BTW, my batch works completely with Windows and even without cygwin. At the moment I am working at a cpio batch that works with Windows without elevated rights and without cygwin as well...... xD
Question: what did you do to mount dalvik-cache to the original data partition? And which Filesystem manager did you use in the screen shots?
delta-roh said:
My Turbo Data mounts sd-ext to data (same to you) but don't mounts the old data to the dalvik-cache, because I have a SanDisk Extreme Plus and it is faster than the internal memory xD
BTW, my batch works completely with Windows and even without cygwin. At the moment I am working at a cpio batch that works with Windows without elevated rights and without cygwin as well...... xD
Question: what did you do to mount dalvik-cache to the original data partition? And which Filesystem manager did you use in the screen shots?
Click to expand...
Click to collapse
Yeah I must have the same SDcard as you by the sounds of it xD have so for ages and probably the reason I've been using Mounts2SD for so long but yeah got sick of it not working as expected as CM12/Android 5.x matures. Thanks to your idea/earlier post though and a bit of mucking around with it as I did have a few hiccups, eg. offset ramdisk address, all went well in the end and is quite a simple process once the know how. Over the time of using M2SD I felt like write speeds were slower (not actually tested but just how it felt) hence the reason why I use the f2fs file system on the sd-ext and I didn't want to leave my internal data partition all alone and unused. I was deciding and still am really for what to use it for, first ideas was for private storage or for app data but then I thought Dalvik-cache could be good because wiping it would be easier without modifying recovery or applying a script. I did this all on native linux (ubuntu) with a few binaries added, I was thinking of making a flashable zip to do the whole process if possible and I think it is but would be a bit of experimenting process and don't really have the time as yet and also you have got this underway already, so I probably wont. I don't mind posting the binaries I used and what I did if it will help, maybe you'd be into creating a version that doesn’t require a PC. The file manager I'm using is FX File Explorer (pro), I only just switched to it, well bout a month ago and I find it a good alternative to ES or Root explorer, it also has the material design theme which goes nicely with CM12 and has 90% of all the necessary features I need. I mounted internal data with fstab which I've attached for you and I've linked the /data/dalvik-cache/arm directory to it. You can name the internal data partition to whatever you like too.
This also could be good for those that corrupted their data partition too that was caused by the twrp recovery version from their site (not ivanich's version).
This is also good because I don't have to link things like Googles Drive cache to sd-ext anymore, for example it caches a copy into data say from a ROM downloaded with it.
Edit: Just checked my SDcard and it older than yours and probably not as quick but mines a 32Gb SanDisk Ultra SDHC-I and works fast enough for now.
hinxnz said:
Yeah I must have the same SDcard as you by the sounds of it xD have so for ages and probably the reason I've been using Mounts2SD for so long but yeah got sick of it not working as expected as CM12/Android 5.x matures. Thanks to your idea/earlier post though and a bit of mucking around with it as I did have a few hiccups, eg. offset ramdisk address, all went well in the end and is quite a simple process once the know how. Over the time of using M2SD I felt like write speeds were slower (not actually tested but just how it felt) hence the reason why I use the f2fs file system on the sd-ext and I didn't want to leave my internal data partition all alone and unused. I was deciding and still am really for what to use it for, first ideas was for private storage or for app data but then I thought Dalvik-cache could be good because wiping it would be easier without modifying recovery or applying a script. I did this all on native linux (ubuntu) with a few binaries added, I was thinking of making a flashable zip to do the whole process if possible and I think it is but would be a bit of experimenting process and don't really have the time as yet and also you have got this underway already, so I probably wont. I don't mind posting the binaries I used and what I did if it will help, maybe you'd be into creating a version that doesn’t require a PC. The file manager I'm using is FX File Explorer (pro), I only just switched to it, well bout a month ago and I find it a good alternative to ES or Root explorer, it also has the material design theme which goes nicely with CM12 and has 90% of all the necessary features I need. I mounted internal data with fstab which I've attached for you and I've linked the /data/dalvik-cache/arm directory to it. You can name the internal data partition to whatever you like too.
This also could be good for those that corrupted their data partition too that was caused by the twrp recovery version from their site (not ivanich's version).
This is also good because I don't have to link things like Googles Drive cache to sd-ext anymore, for example it caches a copy into data say from a ROM downloaded with it.
Click to expand...
Click to collapse
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?
delta-roh said:
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?
Click to expand...
Click to collapse
Yes that is correct.
Code:
# symlink dalvik-cache to internal location
symlink /dalvik-cache/arm /data/dalvik-cache/arm
hinxnz said:
Yes that is correct.
Code:
# symlink dalvik-cache to internal location
symlink /data/dalvik-cache/arm /dalvik-cache/arm
Click to expand...
Click to collapse
Why not this way?
Code:
symlink /data/dalvik-cache /dalvik-cache
delta-roh said:
Why not this way?
Code:
symlink /data/dalvik-cache /dalvik-cache
Click to expand...
Click to collapse
I did it this way because in the past, I've had issues with linking dalvik-cache to other locations due to SELinux but only on later versions of Android 5.x though.
But then again I haven't tried this approach with this configuration yet.
thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?
phan_tom said:
thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?
Click to expand...
Click to collapse
Sandisk Extreme is the highest u can go , i think any Class 10 sdcard can handle this , but with a little lower speed
Sent from my Note 2
phan_tom said:
thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?
Click to expand...
Click to collapse
The internal memory (original /data) has got about 30 MB/s read and about 15 MB/s write speed. The card has to match these values. But the speed declarations of the cards are allways higher, than they are in real life! A SanDisk Extreme matches these speeds in real live. The Extreme Plus and Pro are better and will give you REAL FUN!
Just try it - to have a Senni with e.g. 8GB internal memory is awesome!
danishaznita said:
Sandisk Extreme is the highest u can go , i think any Class 10 sdcard can handle this , but with a little lower speed
Sent from my Note 2
Click to expand...
Click to collapse
Right! Having 8GB of internal memory and no mem-problems any more is also worth a little bit less speed (in the case you got no SanDisk Extreme). BTW: Thank you for testing the pre-releases and did you try the release 1.04?
Unfortunately,
Your method does NOT suits me fine - extremely laggy and slow.
I have tried it with the latest ivanich CM11 and CM12 builds.
I have preliminary made an 8Gb ext4 partition on my 32GB class 10 MicroSD card.
I always set governor to intellidemand, clock to 1242MHz and use cfq for I/O.
Will test Links2SD method now.
Nevertheless,
keep up the good work!
ChimeyJimmey said:
Unfortunately,
Your method does NOT suits me fine - extremely laggy and slow.
I have tried it with the latest ivanich CM11 and CM12 builds.
I have preliminary made an 8Gb ext4 partition on my 32GB class 10 MicroSD card.
I always set governor to intellidemand, clock to 1242MHz and use cfq for I/O.
Will test Links2SD method now.
Nevertheless,
keep up the good work!
Click to expand...
Click to collapse
I tried the CM12 build of ivanich and it has got an extrem low performance of the runtime environment (in Antutu 77 compared to Sultans CM11 with 900) and I tested it with dalvik-cache in the data partition and not on sdext. It seems as if the runtime system was compiled with debug options.
delta-roh said:
I tried the CM12 build of ivanich and it has got an extrem low performance of the runtime environment (in Antutu 77 compared to Sultans CM11 with 900) and I tested it with dalvik-cache in the data partition and not on sdext. It seems as if the runtime system was compiled with debug options.
Click to expand...
Click to collapse
Huh I just downloaded Antutu from playstore to test myself, still on the same configuration and my score is way higher than you got on CM12 and even higher than your CM11 score, only ran the benchmark once so it not like the highest out of several either on stock frequency, governor, scheduler etc.
Will it work on viper sense5.0 and what if my mcard crashes because sometimes it stops working and I have to format my mcard. So what if it crashes will it affect my senny
cutejerk420 said:
Will it work on viper sense5.0 and what if my mcard crashes because sometimes it stops working and I have to format my mcard. So what if it crashes will it affect my senny
Click to expand...
Click to collapse
Nobody is able to answer these questions. Normally SD-Cards are absolutely stable. Make a regular nandroid backup e.g. every day.
hinxnz said:
Huh I just downloaded Antutu from playstore to test myself, still on the same configuration and my score is way higher than you got on CM12 and even higher than your CM11 score, only ran the benchmark once so it not like the highest out of several either on stock frequency, governor, scheduler etc.
Click to expand...
Click to collapse
Remarkable! Please post your configuration - do you use F2FS and on which partitions?
delta-roh said:
Remarkable! Please post your configuration - do you use F2FS and on which partitions?
Click to expand...
Click to collapse
I use f2fs on sd-ext and ext4 on userdata, I use the fstab which I posted earlier and added the symlink to init.rc, on line 319 to be exact xD
Unpacking, repacking and making boot image was done on Linux, not sure if that would make a difference though.

Categories

Resources