new rootfs... - Touch CDMA General

posted a new rootfs over at http://code.google.com/p/vogue-android
If you have a system partition AND a swap partition, but no data partition, it'll blow up.
to use it normally, just drop it in and go.
If you want to do partitions, bring up partition magic(windoze), or gparted(linux) with the card inserted but not mounted.
Resize or delete the first/primary partition, then create partitions as follows:
p1: most of the disk, fat32
p2: about 256MB should be plenty, ext2 for system
p3: about 256MB should be plenty, ext2 for data (optional)
p4: whatever you want, ext2 for swap (optional and not recommended)
then reformat p1 and add all your stuff to it. you don't have to bother formatting the other partitions as the built-in installer will do that for you.
boot up and when prompted push volume down to initiate the installer, then follow the on-screen prompts.
quick history:
11/14: lots of progress with data, but disconnecting failed
11/15: fixed disconnects in data and made it work with a partitioned card (but broke it for a non-partitioned card)
11/16: fixed non-partitioned cards and made it work if you only have a system partition.

Trying now.
ED: Aw craps. I'm using an ext2-style installation and it doesn't work.

Nice, thanks.
Will this be compatible with what Msmison has going on?

cybik said:
Trying now.
ED: Aw craps. I'm using an ext2-style installation and it doesn't work.
Click to expand...
Click to collapse
I'm using an ext2 image (system.ext2) just fine. R u using an ext2 image or ext2 partition?
Thanks vilord - so far everything works well but I'll post results after using it all day.

sshark said:
Nice, thanks.
Will this be compatible with what Msmison has going on?
Click to expand...
Click to collapse
Today or tomorrow The work is done it just has to be tested and integrated.

thanks vilord! and welcome back
I've altered the init to boot off of the ext2 partition:
Code:
diff rootfs-vilord/init rootfs-14-11-09-ext2part/init
86,104c86,87
< if [ -e $card/system.ext2 ] ; then
< echo "Using uncompressed system"
< losetup /dev/block/loop1 $card/system.ext2
< [ $? -eq 0 ] || fail "Failed to reach system.ext2 on SD Card"
< e2fsck -y /dev/block/loop1
< mount -t ext2 -o noatime,nodiratime /dev/block/loop1 /system
< [ $? -eq 0 ] || fail "Failed to mount /system"
< elif [ -e $card/system.sqsh ] ; then
< echo "Using SquashFS system"
< losetup /dev/block/loop1 $card/system.sqsh
< [ $? -eq 0 ] || fail "Failed to find system.sqsh on SD Card"
< mount -t squashfs -o ro,noatime,nodiratime /dev/block/loop1 /system
< [ $? -eq 0 ] || fail "Failed to mount /system"
< else
< losetup /dev/block/loop1 $card/system.img
< [ $? -eq 0 ] || fail "Failed to find system.img on SD Card"
< mount -t cramfs -o ro,noatime,nodiratime /dev/block/loop1 /system
< [ $? -eq 0 ] || fail "Failed to mount /system"
< fi
---
> mount -t ext2 -o noatime,nodiratime /dev/block/mmcblk0p2 /system
> [ $? -eq 0 ] || fail "Failed to mount /system"
Available for download here. Removed at mssmisions request
Testing now...

Vilord you ARE the man!! I was having odd problems with senseHero 1.3.3 where data only worked with a fresh system installation and fresh data... No more problems!!! I am using my rootfs posted above with senseHero on my Kaiser. WOW. I'll test some donut builds soon and see if that solved our Kaiser donut problem too!.
/me kicks himself for talking about Kaisers again in the Vogue forum
Edit: I made a thread in the Kaiser forum so us Kaiser users can talk over there.

polyrhythmic said:
Vilord you ARE the man!! I was having odd problems with senseHero 1.3.3 where data only worked with a fresh system installation and fresh data... No more problems!!! I am using my rootfs posted above with senseHero on my Kaiser. WOW. I'll test some donut builds soon and see if that solved our Kaiser donut problem too!.
/me kicks himself for talking about Kaisers again in the Vogue forum
Edit: I made a thread in the Kaiser forum so us Kaiser users can talk over there.
Click to expand...
Click to collapse
thanks man i was gonna add ext2 support you beat me to it

Thanks, the parition support is really coming along, with an all new way of doing things, my phone was drying after falling in the dog dish so vilord has been working on it today.

Maybe a placebo but it seems to have made my Xrom (1.5) more snappy.

I removed the link from my post, now you just have to remove it from your quote
It already runs so well, looking forward to whatever could be better!
Cheers

I'm having slow home screen refreshes using this rootfs with donut on Vogue... if I visit a few sites and then go back to home (long cam press) the screen takes some time to come up. This is new behavior with this rootfs... can somebody confirm this or is it just me?

updated with the partitioning support and a refactored installer based on mssmison's work.
now if you have three partitions, mmcblk0p1, p2, and p3, where p1 is your regular vfat/fat32, p2 is system, and p3 is data, it will use the partitions. To install a system to those partitions, press volume down when prompted, and it'll guide you through the options for installing your system and data to the partitions.
memfree values were updated slightly to improve performance, but at the expense that it will kill off a couple more background processes (like home screen) when things are eating up lots of memory... try it without compcache and see what you think... the numbers can be adjusted again if it sucks to much.

vilord said:
updated with the partitioning support and a refactored installer based on mssmison's work.
now if you have three partitions, mmcblk0p1, p2, and p3, where p1 is your regular vfat/fat32, p2 is system, and p3 is data, it will use the partitions.
Click to expand...
Click to collapse
Interesting and thanks.
Could you pl tell what should be partition type for data partition? FAT32 or Ext2?

sshark said:
Interesting and thanks.
Could you pl tell what should be partition type for data partition? FAT32 or Ext2?
Click to expand...
Click to collapse
For now, data and system partitions should be ext2, although the filesystem will be created when running the installer, you just need to create the partitions.
Coming eventually will be either nilfs2 or some other log-centric filesystem that doesn't freak out when you pull the plug.
For the partitions, I would suggest about 256MB for each of system and data, although if you're tight on space, 128 should be enough for now for each.

New partitionning system works, zen's 1.6 Droid-Ion-Donut is purring. So, a beer to you, Jesse (i think i owe you two now!). And it also got the GPS working!
Ed. : Scratch the PPP issues. My signal sucked.

what are you seeing specifically with the PPP? I'm seeing rock-solid right now, but i don't know what'll happen tomorrow on the subway to work
regarding GPS, It might only work the first time, and only if it was turned on in winmo before you rebooted... we're still looking into that one.

vilord said:
For now, data and system partitions should be ext2, although the filesystem will be created when running the installer, you just need to create the partitions.
Coming eventually will be either nilfs2 or some other log-centric filesystem that doesn't freak out when you pull the plug.
For the partitions, I would suggest about 256MB for each of system and data, although if you're tight on space, 128 should be enough for now for each.
Click to expand...
Click to collapse
This thing works flawlessly, as you suggested, I have fat32, ext2 (sys) and ext2 (data) partitions. No errors in upgrade and this things flies.
thanks.

Are three partitions really necessary? Can we not use two like with v2.2? IE, Fat32 and 500mb ext2.

I think this thread should focus toward the new installation system. I see it being confusing what it all means for new users without new instructions. Esp. determining size of partitions and what steps to take for installation.
EDIT: Things seem to be going significantly slower with the three partitions and the new installation than it was before with two. Not sure why.

Related

A2SD help

Sorry for the newbie question but I haven't been able to find the answer to my question (too many a2sd references in forum).
I've been using a couple of ROMs that supposedly use the "a2sd" but the "SD & Storage" menu always only shows the normal Intermal memory free space. Installed apps go directly to the internal memory and will only go to sd-ext when I do "a2sd repair".
On the other hand, the MIUI rom is the only ROM that actually displays a "a2sd+" tab on the "SD & storage" menu, shows correct sd-ext free memory and installs every application to sd-ext automatically.
Is this behaviour normal?!? Shouldn't I be able to always see the "a2sd+" tab on the "SD & storage" menu ??
I am at a loss here ...
Help is greatly appreciated.
Try and download Spare Parts from the market. Should display if I recall. Also, I know for a fact that eViLs ROM displays and if you set to old style ext, they automatically move. I run cm6 nightlies with DarkTremors script and it works fine. Try a2sd reinstall, a2sd zipalign, and then see what happens.
Sent from my Nexus One using Tapatalk
I tried the "a2sd zipalign" and "a2sd reinstall" and installed a bunch of applications to internal phone memory and seems like internal phone memory space didn't reduce. This seems to imply that a2sd is actually working but I still cannot see any reference to a2sd free space in "SD & storage".
Is this normal?
Nope. I thought spare parts did but I guess that's just for Enomther. I meant Enomther earlier, not eViL sorry. I'm sure there are apps on the market. Try OS Monitor
Sent from my Nexus One using Tapatalk
OS Monitor didn't make it but I've found an app called "Quick System Info" that shows my A2SD free/used space. Seems like everything is working fine
thanks for the support
folavo said:
OS Monitor didn't make it but I've found an app called "Quick System Info" that shows my A2SD free/used space. Seems like everything is working fine
thanks for the support
Click to expand...
Click to collapse
Assuming you're running the DarkTremor a2sd, you can verify it is working with
Code:
# a2sd check
You should get output similar to
Code:
[ ] Apps2SD is launching...
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.2 (2010-09-30)
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /sd-ext
[ ] Starting Apps2SD Check Program.
[ ] Checking for ext partition
Darktremor 2.7.5.2 Apps2SD Status Report
================================================================================
===
Legend: [*]=Setting is correct
[!]=Setting is correct, but not optimal.
[X]=Setting is incorrect and needs to be fixed or option is not availabl
e.
================================================================================
===
Block Device - [*] Found
- [*] /dev/block/mmcblk0p2
EXT Partition - [*] Mounted
Mount Point - [ ] /sd-ext
Partition Type - [*] EXT2
Support EXT2? - [*] Yes
Support EXT3? - [*] Yes
Support EXT4? - [*] Yes
Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Programs run from SD card
To run from internal storage, type a2sd remove
Private Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Private Programs run from SD card
To run from internal storage, type a2sd remove
You can also verify disk usage:
Code:
# df -h
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 203.1M 0 203.1M 0% /dev
tmpfs 203.1M 0 203.1M 0% /mnt/asec
/dev/block/mtdblock3 145.0M 142.5M 2.5M 98% /system
/dev/block/mtdblock5 196.3M 137.8M 58.5M 70% /data
/dev/block/mtdblock4 95.0M 1.6M 93.4M 2% /cache
/dev/block/mmcblk0p2 686.4M 577.0M 72.8M 89% /sd-ext
/dev/block/vold/179:1 28.8G 20.3G 8.4G 71% /mnt/sdcard
If you have /sd-ext being used, then it's working.
Darktremor Apps 2 EXT
I would sugest checking out apps 2 EXT by darktremor, thats what I use and its doing the job perfectly. This will allow you to move your cache and your apps. I believe that the Froyo default will only move the app and it will only work on non copyright apps. I have about 50 apps installed and I have 89megs of free space.

[Q] Increase Usable Memory, Dev to Port MTD program (System, Data, Cache )

There are plenty of smart devs for the Eris, but almost none have touched the /cache, /data, /system memory portion of our phones. XTR, I think was the first, did with his Cache2Cache programing, which is very cool. It is also currently limited to his nice ROMs. But this is only for cache usage from my understanding. Granted, messing with this MTD area may brick your phone (but so can rooting hehe).
Anyone want to port this over to the Eris?
http://forum.xda-developers.com/showthread.php?t=806321
Eris stock has roughly:
Cache @ 130MB (I dont think we need that much)
System @ 160MB
Data @ 170MB
basically I used this tool on my sisters Desire, and increased the amount of memory for the /data folder (for apps) reduced the cache, and system as follows:
OEM:
System @ 250MB
Cache @ 40Mb
Data @ 147MB
AFTER:
System @ 160MB
Cache @ 35MB
Data @ 242MB
anyone up for the challenge? IF you want more space for apps, and standard caching you should just vote yes here. If enough of us vote for this, maybe a dev will take the challenge to heart.
+1
Sent from my ERIS using XDA App
Here's my current space usage summary:
Code:
# df /system /data /cache
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mtdblock3 174080 103240 70840 59% /system
/dev/block/mtdblock5 163328 118560 44768 73% /data
/dev/block/mtdblock4 133120 38432 94688 29% /cache
This is a CELBFroyo 4.1 Eris, 40+ apps, no movement of anything to the SD card. I don't accumulate E-mails, SMS/MMS, or call logs. Nuke 'em every so often an move along.
So, judging from this single snapshot - I could stand to give up space in both /system and /cache to get a litte more (or a lot more!) /data. But I'm honestly not hurting for anything - I still have 44 MB free in /data.
Those three partitions (system-cache-data) are contiguous in the Eris:
http://forum.xda-developers.com/attachment.php?attachmentid=431912&d=1288689612
The methods described in the URLs you provided work for the Eris, but (obviously) the offsets and partition sizes need to be adjusted correctly to account for the Eris flash memory layout. The from-the-factory Flash memory layout can be found here
I have unpacked (split_bootimg.pl) and repacked (mkbootimg) Amon_RA's recovery, injecting up to 14 (yes, the Eris has 14 partitions) partition definitions in the kernel command line simultaneously, and everything boots up just fine (and /system, /data, and /cache) all mount just fine doing that.
e.g.
Code:
[ 2.845275] allocated dma buffer at ffa47000, dma_addr 2482b000
[ 2.845489] read CFG0 = aa5400c0, CFG1 = 8744a
[ 2.845520] CFG0 = e85408c0, CFG1 = 8744a
[ 2.845550] CFG0: cw/page=3 ud_sz=516 ecc_sz=10 spare_sz=0 num_addr_cycles=5
[ 2.845642] NAND_READ_ID = 5501bcec
[ 2.845855] status: c03120
[ 2.845855] nandid: 5501bcec maker ec device bc
[ 2.845947] CFG0: cw/page=3 ud_sz=512 ecc_sz=10 spare_sz=4
[ 2.846038] DEV_CMD1: f00f3000
[ 2.846130] <6>NAND_EBI2_ECC_BUF_CFG: 1ff
[ 2.846160] flash_id: 5501bcec size 20000000
[ 2.846282] 14 cmdlinepart partitions found on MTD device msm_nand
[ 2.846313] Creating 14 MTD partitions on "msm_nand":
[ 2.846343] 0x00001ff60000-0x000020000000 : "misc"
[ 2.848449] 0x000002c60000-0x000003160000 : "recovery"
[ 2.854888] 0x000003160000-0x0000033e0000 : "boot"
[ 2.859344] 0x0000033e0000-0x00000dde0000 : "system"
[ 3.054595] 0x00000dde0000-0x000015fe0000 : "cache"
[ 3.214691] 0x000015fe0000-0x00001ff60000 : "userdata"
[ 3.393402] 0x000000000000-0x000002980000 : "radio"
[ 3.440734] 0x000002980000-0x0000029a0000 : "gap"
[ 3.441955] 0x0000029a0000-0x000002a60000 : "hboot"
[ 3.443969] 0x000002a60000-0x000002aa0000 : "misc3"
[ 3.445556] 0x000002aa0000-0x000002ae0000 : "mfg"
[ 3.447021] 0x000002ae0000-0x000002ba0000 : "sp1"
[ 3.449096] 0x000002ba0000-0x000002c00000 : "misc2"
[ 3.450714] 0x000002c00000-0x000002c60000 : "mfg2"
The arguments to "mkbootimg" for the "standard" layout of the Eris can be found here - all you need to do is modify the sizes and offsets appropriately to get the desired sizes.
[SIZE=+4]BUT! ...[/SIZE] ( <- that'a a big but! )
...there is a problem that you need to be aware of.
This hack does not alter the actual partition table stored in Flash Memory. So, you could re-package a custom recovery (Amon_RA or ClockworkMod) so that it had your new (desired) sizes for /system, /cache, /data, and flash it to your recovery, and that would allow you to flash things to the newly sized partitions...
[SIZE=+2]...but you would also need to do this for the boot image of every ROM you wanted to use![/SIZE]
That is to say, you need to provide the same kernel command line to every bootable image on the phone - both the recovery partition image, and the boot partition image.
It would be a much easier go if the actual partition table was written, rather than overriding the "real" partition table with kernel command line arguments - then you would be free to use whatever recovery image and whatever ROM you wanted without hassle; doing it this way requires that for every ROM you might want to try, you:
1 unpack the ROM
2 split_bootimg.pl on the boot.img
3 mkbootimg (with the mtdparts=msm_nand: kernel command line arguments )
4 re-zip the ROM
5 re-sign the ROM.
This could all be automated with some scripting, but it is still a bit of a hassle for the average user.
Maybe to gauge relevancy we could have folks post up their results for
Code:
adb shell df /system /cache /data
to get a sense of how often people are really bumping in to memory problems.
bftb0
Thought I'd share haven't really ran into much storage space/memory issues since I've had my Eris.
Here's a df -h /system /cache /data for thought. I'm using FroShedYo Vanilla. Mainly use the new Gingerbread KB and a metamorph theme and a few games and Launcher Pro. Haven't really used the SD install apps either.
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 170.0M 109.1M 60.9M 64% /system
/dev/block/mtdblock4 130.0M 55.5M 74.5M 43% /cache
/dev/block/mtdblock5 159.5M 65.7M 93.8M 41% /data
Here's adb df:
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mtdblock3 174080 103796 70284 60% /system
/dev/block/mtdblock4 133120 51032 82088 38% /cache
/dev/block/mtdblock5 163328 33508 129820 21% /data
adb df -h:
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 170.0M 101.4M 68.6M 60% /system
/dev/block/mtdblock4 130.0M 49.8M 80.2M 38% /cache
/dev/block/mtdblock5 159.5M 32.7M 126.8M 21% /data
I'm always bumping into my memory usage no matter what rom I use. I'm always shifting downloaded apps from /data to /system, which is why I'm looking to realllocate the partition memory usage.
I'm running at around 15MB free space on /Data, but after work emails and maps and caching I get the fun low memory message. Granted I like to have a crap load of apps.... i'll get my memory allocation details later when I get a chance.
Izeltokatl said:
XTR, I think was the first, did with his Cache2Cache programing, which is very cool. It is also currently limited to his nice ROMs.
Click to expand...
Click to collapse
OT, but just wanted to clarify that Cache2Cache is not limited to xtr's ROMs. Besides some other ROMs that include it by default, you can also flash the old style Apps2SD even if you don't use it for the Ext3 Apps2SD function, and use it to enable Cache2Cache. I do on every CM6.x Froyo ROM that I flash that doesn't have Cache2Cache by default, and I don't use the Ext3 Apps2SD, instead using Froyo's native Apps2SD.

unCoRrUpTeD SD--PARTITIONER [Partition SDCARD without losing fat32 contents] (SCRIPT)

This is outdated and probably does not work.
UnCoRrUpTeD SD--PARTITIONER​
I have made this really easy to partition your sdcard while preserving all data on the fat32 partition.This one is used to setup your sdcard for a2sd and swap instead of using the built in partitioning program, which will destroy all your fat32 contents. Eventually I will add support for backing up the ext partition if you want to resize the existing partitions.
You have the option of specifying the size of the partitions in /sdcard/sdpartmap.txt
To specify your own sizes and filesystem do..
Code:
c:\xxxxxx\adb shell
/ # echo 150 200 ext4 > /sdcard/sdpartmap.txt
replacing 150, 200, ext4 with your own
.
The 1st number is a2sd data partition (system/sd or sd-ext mounted at /dev/block/mmcblkXp2)
The 2nd number is swap partition. (mounted at /dev/block/mmcblkXp3)
The 3rd entry will be for ext3 or ext4 FS
It's best to do a2sd data in increments of 256MB and
swap in increments of 32MB
If you don't specify an ext type it will default to ext2.
If there is no sdpartmap.txt file the partitions will be automatically set to
a2sd data = 256
swap = 0
ext type = ext2
Make sure you have enough free space on the card to accommodate the extra partitions until I incorprate checks for that.
INSTRUCTIONS:
1. Download unCoRrUpTeD_SD--PARTITIONER.zip
2. Reboot into recovery
Code:
adb shell reboot recovery
3. Unzip the contents of sdpart.zip. There should be a folder named sdpart. Push the files inside sdpart folder to /tmp/
Code:
adb push c:\xxxxxx\sdpart /tmp/
4. run /tmp/sdpart.sh in adb shell
Code:
adb shell /tmp/sdpart.sh
If sdpart.sh doesn't run then you will have to chmod it before running it, but it should already have permission to run.
Code:
adb shell chmod 777 /tmp/sdpart.sh
If for some reason you can not push the files mount your sdcard through your phone and copy the sdpart folder to your sdcard and then
Code:
adb shell reboot recovery (might need to do adb reboot recovery or just reboot into recovery)
adb shell
mount /sdcard
cp -a /sdcard/sdpart/* /tmp
/tmp/sdpart.sh
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
mahalocat said:
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
Click to expand...
Click to collapse
That's why I put step by step instructions. I'll have to find the flashable one.
Sent from my HERO200 using XDA App
Worked wonderfully!!!
will try out, thanks.
Does this work for the droid incredible?
It should work on any phone, but you should back up your sdcard to a PC every once in a while just in case your sdcard gets corrupted or quits working.
Sent from my HERO200 using XDA App
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
nagasgura said:
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
Click to expand...
Click to collapse
I'll add some things to the OP later today. When you run the script it should output your SD partitions before and after.
Sent from my dual-booted liquidsense 2.1
how to do in te???
no pc guy/....
You've got to be kidding me.
Saves me the trouble of transferring 16 GB everytime I partition.
Waiting for the flashable zip.
Sent from my Galaxy Fit @ 801Mhz- RazoDroid
Dude what ever happened to the whole dualboot thing for every phone I really wanted that
via tha xquizit EII4G ♚ of phonez
Hey you did a good job but there's some bugs in it
the script
Code:
$parted $extmount -s mkpartfs primary ext2 $newfat $newa2sd &> /dev/null ;
if [ "$exttype" = "ext4" ] ;
then
$mke2fs -T ext4 ${extmount}p2 &> /dev/null ;
fi
obviously ,it can't creat ext3
so I crrect it
Code:
$parted $extmount -s mkpartfs primary ext2 $newfat $newa2sd &> /dev/null ;
if [ "$exttype" = "ext2" ] ;
then
$mke2fs -T ext2 ${extmount}p2 &> /dev/null ;
elif [ "$exttype" = "ext3" ] ;
then
$mke2fs -T ext3 ${extmount}p2 &> /dev/null ;
elif [ "$exttype" = "ext4" ] ;
then
$mke2fs -T ext4 ${extmount}p2 &> /dev/null ;
fi
great work man, thanks for this!
dswaggz said:
Dude what ever happened to the whole dualboot thing for every phone I really wanted that
via tha xquizit EII4G ♚ of phonez
Click to expand...
Click to collapse
I ran into a problem with my java code and got frustrated with trying to figure out why it doesn't work correctly. That and my wife was getting upset that I was on the computer all the time. I have been running the stock ROM on my EVO 3D since getting it on launch day and just recently flashed some ROMs in Boot Manager to test some things out.
What if I wanted to go back and delete the ext partition?
Somehow I fail to see how this is easier than using the parted that's built in to almost every recovery out there.
But maybe that's just me.
Just make the fat partition the size of the sdcard and swap and ext both 0.
When using parted in recovery you lose your data (pics, downloads, backups, etc). This way you won't lose anything.
Sent from my PG86100 using XDA App
Sounds great.. is flashable zip available yet?
Sent from my HD2 using xda premium
If i already have a 2048 mb ext4 and i want to add a swap partition what i have to do
Sent from my HTC HD2 using XDA

NexusHD2-ICS-CM9 A2SD Discussion

How to increase the internal storage size for the NexusHD2-ICS-CM9 ROM.
May 17 updated:
Another choice. Don't need to flash anything.
Just install Link2SD app from the Google Play (a.k.a. Android Market).
Jan. 20:
Flash any of the A2SD scripts below when you install too many apps and the internal memory (i.e. data partition) is out of space.
Caution: Don't use any of them if you are not an advanced user. Otherwise you may have low volume, performance lag and other strange issues.
Installation guide for 40ad2sdx-a2Recovery.zip
Installation guide for Data2SD.
Installation guide for AD2SDX - AMARULLZ DATA TO SD-EXT.
This rom gets better by the hour! Thank you very much Tytung
Sent from my HD2 using XDA App
Thanks
Does the freeze issue related to A2SD ? My phone working and connected to GSM network but the touch screen is not working at all.
Thank you very much Tytung for the nice Rom !!!!
From the other thread:
manu44 said:
I have installed the Rom v1.1 by using the 40ext script to move the dalvik to sd card
and now i used it without the script
The DIfferemce is there
- No more apps lagging...Whatsapp used to take around 25 sec to show up when i was using my adtosd script
- No more screen lagging
- No more low sound issue
Click to expand...
Click to collapse
Of course you will get no more low sound issue, but since I have changed the read ahead SD speed to 2048 (not sure if thats the reason though) and changed the script that it copies all to SD card ext partition, I have a lot fewer lags than before, when the read ahead was 8mb and I used the unmodified Amarullz script (which leaves dalvik on internal).
Here are my posts for reference:
geenyous said:
Thanks tytung, will upload there next time.
Hmm, but I am using Amarullz script and still have ~300mb left.
Appears that it does the same as the app2sd script TyphooN is using, so every app you install still leaves a bit on internal but the majority goes to sd-ext. This would be about right as I have now 50mb less internal than with TyphooN (150mb partition compared to 200 now) and I had roughly 57mb free space on TyphooN internal with the same apps installed.
Anyone has an idea what to do besides uninstalling some apps?
Thx!
Click to expand...
Click to collapse
bobjbain said:
You can delete the stuff in the cache directory under /sd-ext/data_s/com.android.providers.downloads
...
That's bizarre, I don't know where it gets the 208m for /sd-ext when I have 2G ext4 partition on my card.
And why is /data 1G??
Anyway geenyous, in adb cd to /sd-ext/data_s/com.android.providers.downloads and issue a 'df *' that will tell you how much free space the system actually thinks you have in that directory.
HTH
Click to expand...
Click to collapse
This didn't work, that directory was almost empty...
uzi2 said:
http://forum.xda-developers.com/showpost.php?p=21216357&postcount=384
http://forum.xda-developers.com/showpost.php?p=21232738&postcount=438
http://forum.xda-developers.com/showpost.php?p=21233560&postcount=445
Click to expand...
Click to collapse
OK, just to report on the above Issue:
I have now reinstalled everything with the modified script posted by uzi2 above, now I have plenty of space (actually the internal sd-ext is empty, feels like bit of a waste) as all my stuff is on sd-ext4 (SD card), even dalvik cache. I can now install and update apps again. Just to make it clear for everyone: there is an sd-ext, which is located on NAND and there is sd-ext4 which is located on your SD card after you format it properly.
If you look at Amarullz script, you will see that per default, it will leave dalvik cache as well as system apps on sd-ext (internal). Now, this together with a 200mb system partition will lead to the sd-ext filling up as you install more apps which are considered system apps and consequently you will not be able to dl and update from market anymore. What uzi did, is remove the parts from the script that copy dalvik and those apps to sd-ext. Now, sd-ext is empty, no matter how many apps you install. Maybe it would be good to keep dalvik on sd-ext and only remove the "system apps move to sd-ext" part of the script? Dalvik was like 170mb of size last time I checked, is that constant or number of apps dependent? I must say I don't see any performance issue with dalvik on SD, but it just feels like a bit of a waste
Btw, I also changed the SD speed fix value to 2048 from ~8000 in the script as I think I can recall to have read that this would give the best performance.
Here is the code I am using atm (all the same like uzis except the SD speed):
Code:
#!/system/bin/sh
#
# AMARULLZ DATA TO SD-EXT MOD FOR ANDROID ( AD2SDX )
# ==================================================
#
# by amarullz [at] yahoo [dot] com
# xda-developers : amarullz
# (c) 2011
# * Oct 19 (ALPHA01)
#
# Info: ~ For Changing Log
##
###
# Initializing
###
#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;
#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;
#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict - MODIFIED
###
for i in dalvik-cache tts_s app app_s lib_s plugins_s app-private framework_s weather_s data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
#
# ~ ALPHA02 - Fix ls to ls -a, it's ok, because we test -h for symlink
###
cd /sd-ext;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
fi;
done;
cd /;
###
# It should also need to create the rest non Symlink Directories and Files on /data to /sd-ext
# ~ ALPHA02 - Some Directory may be missing if we don't use it
###
cd /data;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /data/$i ]
then
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
fi;
fi;
done;
cd /;
#-- Of Finished.... :D
And this is the part I would suggest maybe you could leave it in to get dalvik to sd-ext (internal):
Code:
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict
###
for i in framework_s app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###[ INTERNAL mtdblock5 STRICT ]###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
And this the part that should be removed:
Code:
###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###
#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;
#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;
#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;
Or you could do it the other way around, leave system apps on sd-ext (internal) and move dalvik to SD card? Uzi2, as you say your script is tested, did you test this and what were your findings?
I have attached the script in a flashable zip the way I use it now, all on SD card as well as SD speed fix change for anyone that also runs into market install / update troubles.
You have to do a fresh install though, clearing dalvik with the modified script will not move it to SD card and you have to install it the tried way, i.e. flash ROM (kernel), boot, reboot, reboot into recovery, flash script, reboot, set up google account and restore apps. Putting it in right from the beginning gave me bootloops (factory wipe install).
EDIT: Ok, it is confirmed that Dalvik cache is app dependent, it now has a size of 187MB (compared to the 178 I saw before) and I have another 200mb of sd-ext4 left to install more apps. So it is very well possible, that after installing further apps, the 10% space threshold of sd-ext (internal) will be reached again and Market will quit dl / updating apps as it did before. So it looks like the only viable option will be to leave the second part of the script in, the one where all the system (and htc) apps get moved to internal. Looking at the script, it appears that you could put this part in and it will move the apps to internal even after all has been on SD card, can anyone with coding skills please confirm?
Best way to use this script
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
This is because, there is no need to fix permissions using this method.
Obviously there is no need to wipe dalvik-cache on a fresh install, but if you refrain from doing so on an update, you should not encounter problems.
Please remember to copy the script into init.d on every update.
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
This then worked for me:
- Format SD card with one FAT32 partition (primary, 32kb block) and one ext4 partition (primary, 4kb block)
- Boot into CWM
- Flash ROM (& Flash Kernel)
- Reboot and don't touch anything
- Reboot into recovery
- Flash script
- Reboot into ROM
- Reboot into CWM and fix permissions
- Reboot into ROM and start setting up your phone
- Done
If you update your ROM, then do the following:
- Unzip script zip (not ROM!)
- Copy the script (called something like "10ad2sd" or "40ad2sdx") to system/etc/init.d/ in ROM zip with something like 7zip
- Boot to CWM
- Flash ROM (& Kernel)
- Done
Thank you for this
This solved all my storage issues. Especially on this new rom. Now I am not experiencing any bugs whatsoever.
geenyous said:
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
Click to expand...
Click to collapse
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Edit:Having read the FAQ, I think you may be using Amarullz RC02, whilst I am using Alpha02 (amended)
uzi2 said:
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Click to expand...
Click to collapse
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
geenyous said:
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
Click to expand...
Click to collapse
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
uzi2 said:
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Click to expand...
Click to collapse
Yes, I have replied before you edited, but still I am using your script
I have never used the one I linked to, just took that from OP. Before using yours I also took the one from Amarullz thread, but the flashable one (added link to FAQ).
Anyhow, it may be that 10 mins are not enough, but I am sure as hell that any other second on this topic is wasted, so I am going to leave it here.
nueloc said:
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
Click to expand...
Click to collapse
4 or 6 is best.
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Cold-Tea said:
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Click to expand...
Click to collapse
As I understand it, 40a2sdx is Amarullz RC02, which is known to cause problems with this ROM. The Alpha02 is 40a2sd and should work well.
Edit: Sorry, I see that Alpha02 is also 40adsdx. The script I used is based on Alpha01 (40a2sd) - Sorry for the confusion.
The links are now correct in the FAQ
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
RyanGDI said:
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Click to expand...
Click to collapse
mare.djurdjev said:
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
Click to expand...
Click to collapse
Please state which version of A2sd you are using, how it is installed and why you think it is a2sd related. Otherwise the main thread may be more appropriate for your questions.
I'll forward this over to the main thread then...I actually don't know what the A2sd version is. x.x

[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM

[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Link2SD 2nd Partition getting full
Hi,
I saw that you are using Link2SD and seems to have a good understanding of the subject. I am new to using Android!
Maybe you could help. I think I properly installed Link2SD and that it is working correctly (I don't know of any way to check that).
When I go into the menu and ask for storage, I get the following: it is in french, but "libres" means "free".
Interne (85% Libres)
/data
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Externe SD (98% Libres)
/storage/external_SD
Total: 27,42 Go Utilisés: 516 Mo Libres: 26,92 Go
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Système (23% Libres)
/system
Total: 1,67 Go Utilisés: 1,28 Go Libres: 407 Mo
Cache (98% Libres)
/cache
Total: 787 Mo Utilisés: 12,58 Mo Libres: 774 Mo
As you can see the 2nd partition is almost full.
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Thanks for your help.
Jacques
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
jacques_xda said:
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Click to expand...
Click to collapse
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
jacques_xda said:
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Click to expand...
Click to collapse
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
jacques_xda said:
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Click to expand...
Click to collapse
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
link2SD resize ext partition
Warre101 said:
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
Click to expand...
Click to collapse
Hi,
Thanks for your response. I have a question: do I need to unmount the SD card before closing the phone and pulling it out?
If the answer is yes, when I put it back and open the phone, will it mount automatically?
Jacques
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Warre101 said:
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Click to expand...
Click to collapse
Hi,
I closed the phone and took off the SD card without any problem.
I made an image of the content with ext2explore.
I then use MiniTool Partiton to try to extend the ext4 partition. The problem is there: MiniTool Partition cannot handle the job!
On the SD card, I have one FAT32 Partition and one ext4 linux patition. MiniTool can resize the FAT32 partition, leaving an unallocated space between the FAT32 and the ext4 partition, but it cannot resize the ext4 partition to take advantage of the unallocated space! I can move the ext4 partition closer to the FAT32, leaving the unallocated space at the end; that is all I can do with MiniTool.
Of course I could delete the ext4 partition and create a new one, using all the unallocated space. But then , will I be able to load the ext4 image I created before in that new partition, since it is not the same size? When ext2explore create an image, does it make a clone of the partition (content, size, etc...) there is no explanation or help on that product!
I will try with Gparted to see what it does and try to simply copy the content of the ext4 partition instead of creating an image.
Thank again for helping.
Jacques
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Warre101 said:
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Click to expand...
Click to collapse
Hi,
It is realy odd! I created that ext partition with the same tool! Now I can move it, but not resize it....I will try with Gparted with my old computer running Linux (Ubuntu)...later on, expecting it will work fine.
Thanks again,
Jacques
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
jacques_xda said:
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
Click to expand...
Click to collapse
That looks exactly like the problem I had. I suggest you first try Jacques' idea (changing ext2 into ext4 or vice versa) and if that doesn't work, use the method I put in the very first post. Let us know if you have any problems with that...
Been trying to get link2sd to work for awhile now
My init-link2sd.sh file looks a bit different though. For me, it looks like:
set +e
echo "$(date) mounting..." >$LOG
sleep4
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Whenever I try to use Link2SD, it gies me the "mount: No such file or directory error," would you be able to help me?
A couple of things stand out to me; I'll go through the script you posted step by step:
FinalFreeze said:
set +e
echo "$(date) mounting..." >$LOG
sleep4
Click to expand...
Click to collapse
A space is missing between "sleep" and "4". Was it lost in copy-pasting?
FinalFreeze said:
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
I expected this to be on a single line like this:
Code:
mount-t [B]vfat[/B]-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>$LOG
Is it like that in your file?
Anyway, I notice the second argument in the mount command is "vfat". If you use the "recreate mount scripts" in Link2SD, which option do you use for the file system? Does it correspond to the way your SD card is partitioned? I used EXT2.
FinalFreeze said:
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
This is the information you would need to follow the tutorial that I posted. You could try putting the following in an init.d script:
Code:
#!/system/bin/sh
sleep 4
mount -t [B]ext2[/B] -o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2
Note that I'm assuming here that your SD card uses an EXT2 partition, as shown in bold.
FinalFreeze said:
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Click to expand...
Click to collapse
The last line (starting with chmod) is something I haven't seen before. If you create your own init.d script, you may need to add the same line.
Warre101 said:
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Click to expand...
Click to collapse
Mount script error
Mount Script cannot be created
Moun Invalid arguement
I've been at this every day for a week i inserted the txt file with ur script rebooted and nothing same old bs script error. PLEASE tell me som1 knows A REAL WORKING FIX.
I've tried fat32/ext2 fat32/ext4 fat32/fat32 The mount DOES NOT EXIST. i have int.d support How do I create the mount? Not just a file directory?
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
mikeroku said:
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
Click to expand...
Click to collapse
That's difficult to tell based on the information you provided. Can you look for this file:
Code:
/data/data/com.buak.Link2SD/files/init-link2sd.sh
and post the contents please?
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Stabbey said:
Mount script error
Mount Script cannot be created
Moun Invalid arguement
Click to expand...
Click to collapse
psantos1091 said:
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Click to expand...
Click to collapse
Hey guys,
Some time ago my phone started having the exact same problem that Stabbey describes: mounting the second partition no longer works, manually mounting the second partition results in the "Invalid argument" error when running this command in a terminal emulator:
Code:
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This started happening after I installed an update for busybox and some other apps and then rebooted. Something might have changed in the mount applet of busybox with that update, and that might have broken the mount command. Right now I don't know for sure if this is the case; I haven't figured out how to roll back the busybox update yet. In any case, if I can't manually mount, it certainly won't work on startup with init.d, so I'm stuck for now.
I'm sorry I can't give any of you a solution right now. If anyone else wants to take a crack at it, my problems started after installing busybox 1.25.1, so a version *before* that might work.
大神你好:
这是个非常厉害的好办法!您帮我解决了这个疑难杂症!让我手机重新获得新生,而且问题分析得非常准确。
致敬!
机油
Hi Warre101
thank you so much for your solution!
However, I still have a small issue:
When I created a file in the init.d folder, I ended with a .txt file while the others in that folder have no extension. I wrote the code you mentioned. Then with Universal init.d app, I executed the file, and it worked -> the partition get mounted. But, when I reboot my phone, it is not done automatically: I have the error message on Link2sd, then I have to come back to Universal init.d, execute the script, and come back to Link2sd to see it is mounted. Do you have an idea to have it done automatically?
the init-link2sd.sh file is like this (when the partition in mounted) :
Code:
set +e
echo "$(date)mounting..." > $LOG
sleep 2
mount -t ext4 -o rw /dev/block/vold/public:179_130 /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
The partition I created using minitool is in ext4
The 11link2sd.txt file is:
Code:
#!/system/bin/sh
sleep 2
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
Then in /data I got a new file link2sd-boot-receiver-mount.log:
Code:
Tue Oct 24 09:47:50 CEST 2017 mounting...
mount: No such file or directory
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/public:179,129 /mnt/media_rw/319C-76D0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /mnt/runtime/default/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0
Tue Oct 24 09:47:50 CEST 2017 mount finished
I used MiXplorer that I found on thi forum as a file explorer and to create the script file.
I am on Android 6.0, stock ROM but not original (eg when I bought the phone the stock ROM was on Android 5, then I discovered they changed to Android 6 so I downloaded the new stock ROM from the official website and flashed it).
Thank you for your help !

Categories

Resources