yashsingh1/xdaforums huggingface dataset:
[Motorola Milestone Android Development] scoutme:
Given my setup:

12GB FAT

3.75GB ext4

256MB swap

If I run the 2GB resize command what will I get?

------------

EDIT: ok, I read the script... If everything goes right I should have this setup

0 to [card size - ext size - swap size] => FAT

[card size - ext size - swap size] to [card size - swap size] => EXT with restored apps

[card size - swap size] to [card size] => swap

nice script...
[Motorola Milestone Android Development] -FuFu-:
just test ^^ but make a backup befor...

at the moment i dont have tme to take a look at the script, but i think it will work, if not, only the swap partition are deletet (i think but dont know exactly)

on my 2gb test sdcard the resize works...

an when you start the resize, the script ask you for ext size, if you want to create swap partition, if so it ask for swap size, then the script will make a backup from ext partition, then delete all partitions only the fat will stay, then it resize if needed the fat and recreate the other partitions, after that it restore the ext backup
[Motorola Milestone Android Development] scoutme:
Actually the script resized swap partition by adding extra space to ext partition and leaving fat unaltered...
[Motorola Milestone Android Development] CanAndroid:
It seems like its trying to perform the steps slightly out of order. It looks like it's trying to resize the FAT before doing anything with the ext or swap, which might be fine if making the FAT smaller, but if going the other way, it will overlap the partitions and cause an error. I'm no expert, but IMO, the steps should be:

1. Backup sd-data

2. unmount and remove ext and swap partitions

3. resize FAT

4. create ext and swap

5. Restore sd-data
[Motorola Milestone Android Development] -FuFu-:
i look at the script and resize option may do the step like it must be...

you can take a look at /OpenRecovery/bin/sd_tools.sh starts at line 158...

may there a bug but at the first look i cant see any bug
[Motorola Milestone Android Development] CanAndroid:
Hm, I had a quick look, and nothing jumps out at me. All I know is that when it ran, it seemed to not remove the old ext partition properly - it gave an error about already being in use, and then the fat resize gave an error about overlapping partitions.

Does it need another line after the umount /sddata? ie:

umount /dev/block/mmcblk0p2.....
[Motorola Milestone Android Development] -FuFu-:
try to change this

go to line 184 and change

to

make a backup befor test it... if you change while [ $NUM != 1 ]; do to while [ $NUM != 0 ]; do all partitons will be delete
[Motorola Milestone Android Development] CanAndroid:
It does get inside the If statement though... when it runs, it does display the message "delete old ext partition...", and then immediately after, I get the error message. The actual message is:

"Error: Partition /dev/block/mmcblk0p2 is being used. You must unmount it before you modify it with Parted."

The next line says:

"Resize fat32-partition on card 0. This may take a while..."

Followed by the next error:

"Error: Can't have overlapping partitions"

So based on the first error message, I don't think removing that if statement will help - it is actually attempting to remove the partition, it just thinks it is still mounted.

I really don't understand why it's not working - the split works fine, and it is essentially the same code....
[Motorola Milestone Android Development] -FuFu-:
then just add befor

echo "delete old ext partition..."

while [ $NUM != 1 ]; do (line 185) this

sync
sleep 5
umount /sddata

may it helps
[Motorola Milestone Android Development] CanAndroid:
Unfortunately I still get the same thing.... maybe it's just me?
[Motorola Milestone Android Development] -FuFu-:
i think the ext partition is still busy after create the backup... you can also test to use umount -f /sddata

other way is to delete the backup option for the ext partition, in splitt option it works with umount /sddata

just change

if [ "$NUM" != "0" ]; then
echo "delete old ext partition..."
while [ $NUM != 1 ]; do
"/sbin/parted" -s /dev/block/mmcblk0 rm $NUM
NUM=`expr $NUM - 1`
done
fi

to

sync
sleep 5
umount -f /sddata
if [ "$NUM" != "0" ]; then
echo "delete old ext partition..."
while [ $NUM != 1 ]; do
"/sbin/parted" -s /dev/block/mmcblk0 rm $NUM
NUM=`expr $NUM - 1`
done
fi
[Motorola Milestone Android Development] CanAndroid:
Still no luck so far... I haven't tried without the backup yet though.
[Motorola Milestone Android Development] CanAndroid:
Yeah, it works fine without the backup.... so for some reason it's holding something open and not allowing an unmount.
[Motorola Milestone Android Development] -FuFu-:
thanks for test it

i try to upload a update this weekend, and add another option for backup old sddata if i find a way to get it work
[Motorola Milestone Android Development] nagabushan.c:
Dear -FuFu-,

I observed a bug. Once a enter to Nandroid menu then do a wipe, there is no option to comeback to main menu, it just loops within nandroid.. please check that and fix in next update. I'm speaking about 0.21v
[Motorola Milestone Android Development] -FuFu-:
this was a bug in v0.20... in v0.21 it is fixed....

please recopy OpenRecovery to your sdcard but befor please delete the folder bin and init from OpenRecovery folder on your sdcard...

here it works fine, i just use the wipe menu 10 minutes ago and i dont have a loop here
[Motorola Milestone Android Development] mileykong:
hi FuFu

i Have some problem with my swap, i can't install any app from play store, i have some error mssg "insufficient storange available" when installing app. i Think my swap is not working. my internal mmry have 185mb available space. can you help to solve this problem?
[Motorola Milestone Android Development] walker666:
That has nothing with swap, it's phone's internal storage. Try freeing some space with removing some apps or if you have sd-ext type this in your terminal:

su

lib2ext 1

Then restart your phone. Hope it helps...
[Motorola Milestone Android Development] CanAndroid:
Hey FuFu, I was playing around with it a bit more, simply added the line "cd /" after the tar backup, and everything appears to be working again. I guess it doesn't let you unmount if your current directory is inside the partition?
[Motorola Milestone Android Development] -FuFu-:
thanks, that may can be the problem

i will test it this weekend and upload a update
[Motorola Milestone Android Development] Tiago Costa:
I don't know if it happens just with me, but the "Show Free Space" script is not working. It runs, but the numbers don't appear, e.g., "SDCard: free".
[Motorola Milestone Android Development] -FuFu-:
at the moment i'm just busy but i try to upload a update this week with some new features and also some fixes in some scripts

for now i work on a menu for my 98swapon script where it will be possible to change some values like swapfile size

@Tiago Costa

for me the "Show Free Space" script works fine, but i will take a look at it... is it show no numbers for any partition? or just for some?
[Motorola Milestone Android Development] Tiago Costa:
All partition have no number of free space reported. It's not so important, but sometimes it would be useful to me.
[Motorola Milestone Android Development] mrvek:
That is an issue with recovery and CM10. If I remember correctly on CM7 there are no such problems. Using busybox provided with recovery instead invoking commands from /system (the underlying OS) might help.
[Motorola Milestone Android Development] -FuFu-:
i will test it, thx
[Motorola Milestone Android Development] zeffiro:
is there any problem in using minimod with ROMs that do not use 2ndboot?

advantage, swap your script works on CM6?
[Motorola Milestone Android Development] -FuFu-:
no porblem, my OR Mod will work on all roms...

but swap only work on cm7 and cm10
[Motorola Milestone Android Development] zeffiro:
ok.....thanks!
[Motorola Milestone Android Development] -FuFu-:
i will try to upload a update soon cause kabaldan updated the 2ndboot OR

at the moment i'm busy but i work on it, the update is included in my MiniMod OR and i also fix some litte bugs and add new wipe options for ext partition.

if there any requests please post them here, also if you find bugs or miss a feature please post them here ;) i try to do my best to fix/include them

http://xdaforums.com/member.php?u=2218140
[Motorola Milestone Android Development] pnsdhrn:
Thank you FuFu for your prior intimation,And please don't forget to include "98swapon" in this update as promised by you.Waiting with thanks,

pnsdhrn
[Motorola Milestone Android Development] -FuFu-:
UPDATE Time

New MiniMod Version 0.22

*Changelog:*

- some little script changes

- update to latest 2ndboot OR from nadlabak

Download: http://code.google.com/p/minimod/downloads/detail?name=Minimod_V0.22.zip

i just update to latest 2ndboot OR from nadlabak and fix the bug when resize sdcard...

also i add new options to wipe menu, to wipe ext partition or only delete apps from ext partition...

if find some bug, please just post here i try do fix them
[Motorola Milestone Android Development] pnsdhrn:
Thank you dear FuFu for the Update. Has 98swapon included in this Update?

pnsdhrn
[Motorola Milestone Android Development] -FuFu-:
yes, you can found it in SD Tools Menu
[Motorola Milestone Android Development] Quentin himself:
Hi FuFu,

I'm currently trying to do a clean & fresh install for CM10 (already on this ROM). I just delete my ext-partition and resize it and add a LinuxSwap partition (about 500Mo). And now, under your recovery I got : E: can't mount /dev/block/mmcblk0p2

Any idea? The ROM installation succeeded but now I'm afraid I'm stuck on Android logo (no CM animation so can't read the ext-part, isn't it?).

I format Ext-part in ext3 (saw it was ext2 before and it worked previously ;) )

Will give it a try with ext2 and give feedbacks. BTW, I'm such a noob: can't find the wipe data & cache options ^^

EDIT: It was what I thought. It's an EXT2 partition we should make and not an EXT3. Error is solved. Now I've to boot on CM10 :p
[Motorola Milestone Android Development] -FuFu-:
wipe options are in the nandroid menu ;)

it the recovery cant mount the ext partition it is maybe corrupt, open the OR Console and type in:

parted -s /dev/block/mmcblk0 print

this will show the partitions and filesystems, last week my ext partition also not mounted cause it was corrupt, i must resize my card to fix it

you can use the resize option in SD Tools Menu for that and after resize you can use the convert ext2 to ext3 option if you want to use ext3
[Motorola Milestone Android Development] Quentin himself:
Thanks for the tip I've already change via MiniTool the ext3 in ext2 partition ;) And now it's working.

I find it's weird to put it in Nandroid (look at all directories except this one LOL ><) Thanks for your help and your mod

Quick question: should I use Link2SD or is it already a feature included in CM10 (maybe you know? )?

Is it recommended to apply 98swapponscript before rebooting (just after applying the ROM) or after a complete reboot?

(I'm planning to make a guide for noobies "like me" because I think it's starting to be a little less easier than before to apply new CM7 and CM10 and there is a lot of known bugs (easily solved but hidden in posts: like the black Appolo or the third-party battery doesn't charge under OR etc...)) and I'm tired people don't read posts (sometimes it's hidden 100 pages ago so it's normal but sometimes just the page ago grrrrrr) and ask same question already answered or not)

BTW, if you are interested by a french traduction of your Minimod, I would be glad to offer my help.
[Motorola Milestone Android Development] -FuFu-:
you can apply the 98swapon befor rebooting or after, i think there will be no problems

and with a ext partiton you dont need to use Link2SD cause all CM Versions have apps2ext included

you can make a french translation, at the moment i work on a simple multilingual support for the Testbased Menu, best way for me to include it is to make a txt file that looks like:

english=french

really apply?=vraiment appliquer?

hope its the right translation ^^ i use google translate for the example ;) but i think this way i can include it...

most importantly is the Menu i think (its in /OpenRecovery/init folder) all the rest can be done step by step, cause all scripts in OpenRecovery/bin must be edit for that
[Motorola Milestone Android Development] pnsdhrn:
Thank you very much dear FuFu.

pnsdhrn
[Motorola Milestone Android Development] Quentin himself:
I pass my exams and after I will take a look to translations (and maybe more appropriate titles of sections ; still can't understand why wipes in Nandroid :p)
[Motorola Milestone Android Development] -FuFu-:
:D its there cause i move it there :p
[Motorola Milestone Android Development] Quentin himself:
Ahahah, good explanation ^^
[Motorola Milestone Android Development] -FuFu-:
you can move the menu by yourself ^^ maybe i move it back to main menu in next release
[Motorola Milestone Android Development] Erovia:
FuFu, i have an idea for the MiniMod. I don't know if it's possible or not, i let you decide that.

So, MiniMod already has zeppelinrox's famous SuperCharger script. So here comes the idea:

If i'm right, the SC scripts doesn't really work on ICS and JB without editing services.jar

So it would be awesome if you could implement it in some way to the OR so it can be used by noobs like me.
[Motorola Milestone Android Development] -FuFu-:
the new script dont work perfect in recovery, cause there is no way to use keyboard imput, to make it work i must rewrite the script and i dont really know how this script work ;)

and thats the thing why im use the old script in OR
[Motorola Milestone Android Development] rayleigh2010:
hi FuFu, I am a 1st time user of your OR.. my only question is, why does it seem that when I type in the terminal "free" there is no number under swap? how would I check if swap is running?

thanks a lot for your work!
[Motorola Milestone Android Development] -FuFu-:
in OpenRecovery swap is not activ cause we dont need it there

to check if swap running run Terminal Emulator in android an type in free
[Motorola Milestone Android Development] rayleigh2010:
yes FuFu, that's where I typed it. from the terminal emulator in android. I can see the partitions, however, when in terminal emulator, there is no value under swap..
[Motorola Milestone Android Development] Erovia:
Is the swapon script properly installed?

Type in Terminal Emultator: ls -l /system/etc/init.d

You should see, a file named 98swapon with -rwxr-x--- permissions.
[Motorola Milestone Android Development] rayleigh2010:
@Erovia, I typed that and no 98swapon script appeared.. guess it didn't install properly from the OR mod of FuFu.. sorry for being such a novice here, but can you tell me how did you use the OR from FuFu? what I did was to copy it in the root of my sd card the same way I did for the OR done by kabaldan.. :(
[Motorola Milestone Android Development] Erovia:
Download the " 98swaponV5or.zip" from THIS post and flash from OR.
[Motorola Milestone Android Development] -FuFu-:
or use sd tools menu and there apply "Copy 98swapon script" ;)
[Motorola Milestone Android Development] pnsdhrn:
Sorry to disturb you once again dear FuFu.But I have one doubt.I have copied 98swapon using the SDTools menu in the MiniMod OR.Now whether I have to type "chmod 750/system/etc/init.d/98swapon" in the console of the OR to become swapon in force?And by doing this how much MB will be moved into swap partition and from where it is moved?Waiting for the advice with thanks,

pnsdhrn
[Motorola Milestone Android Development] Eiertschik:
You only have to run the 'chmod' command once, to make the script executable.

After that it will be executed automatically on every boot.
[Motorola Milestone Android Development] pnsdhrn:
Thank you Eiertschik for the reply.But sorry to say that it does not seem to be the specific reply to my doubt.My dilemma is that I already applied "copy 98swapon" using SD Tools Menu in OR.After that whether I have to type "chmod 750 /system/etc/init.d/98swapon in OR Console again?I am doing the swapon for the first time.

pnsdhrn
[Motorola Milestone Android Development] Eiertschik:
My bad - seems I misunderstood you.

I don't know how exactly this SD Tools Menu works, but you can check the permissions of the (and any other) file yourself by using the 'ls' command

ls -l /system/etc/init.d/98swapon

The beginning should look like this:

-rwxr-x---

If not - apply 'chmod 750' command.
[Motorola Milestone Android Development] -FuFu-:
the SD Tools Menu copy the script and set right permissons (chmod 750)...

just apply the option and done... nothing to do more
[Motorola Milestone Android Development] pnsdhrn:
Thank you very much dear FuFu. My doubt is all cleared with your reply.Hence thanking you once again...

pnsdhrn

---------- Post added at 09:51 PM ---------- Previous post was at 09:46 PM ----------

Thank you Eiertschik for your help.With FuFu',s clarification also I got what was seeking.

pnsdhrn
[Motorola Milestone Android Development] Strokesws:
Where can I find Wipe data/cache/davilk option?

My bad, I found it. http://xdaforums.com/showpost.php?p=33759284&postcount=276
[Motorola Milestone Android Development] pnsdhrn:
Sorry for Disturbing you again dear FuFu.While installing CM10 20121122 afresh I applied 98swapon using the SD Tools Menu in the Open Recovery and rebooted.As you said I had applied "copy 98swapon" and "continue" menus of the SDTool Menu and nothing else is done.And in the OR Log I saw "Apply swapon complete".So I did not further type "chmod 750 /systm/etc/init.d/98swapon" in the OR Console and rebooted.Afterwards, seeing an instruction in Kabaaldan's CM10 Thread, I checked this by typing "free" in the Terminal Emulator for seeing whether 32768 is showing in the swap line.But in my phone the swap line showed"0 0 0" instead of 32768.So I rebooted to OR and in the Console typed "chmod 750 /system/etc/init.d/98swapon" and rebooted.Then I checked with Terminal again and the swap line still shows "0 0 0".Whether the swap is not functioning in my phone?How can I confirm it?If it is not functioning ,how can apply it again?My SDCard is 16 GB and I partitioned it using Mini Tool to 14gb in Fat32 and 4GB in Ext3.Waiting for your advice with thanks and expressing sorry for taking up your precious time again,

pnsdhrn
[Motorola Milestone Android Development] -FuFu-:
if it wont work, just use one of my 98swaponOR.zip and apply it in or apply update...

in the new Version 9 its possible to set the script by using the swapon.conf on sdcard...

Download V9: http://droid-world.bplaced.net/load.php?file=download/scripts/98swaponV9or.zip

if you want more infos about the script use google translate to translate this side: http://droid-world.bplaced.net/index.php?cat=Milestone&page=Swap Aktivieren

importent is the first UDATE sektion, the rest is for the older version of the script
[Motorola Milestone Android Development] pnsdhrn:
Thank you very much dear FuFu.I applied your V9.zip through Updates in OR. Now the swap works very well.So will you consider the rectification of the bug of 98swapon in the SD Tools Menu of the OR in the next update.It will be very useful.Also one more question if won't feel annoyed.Will it be necessary to apply the 98swapon.zip each time when the new CM10 and Gapps are applied?

pnsdhrn
[Motorola Milestone Android Development] -FuFu-:
yes, after updating cm you must reapply the 98swapon script via OR

and in next minimod update i will also upade/fix the swapon option in sd tools menu
[Motorola Milestone Android Development] Ricfil:
Still doubts concerning FuFu´s swap script

Hello all. I own a Motorola Milestone. Today I´ve been tinkering for a few hours trying to implement FuFu´s swap script. The thing is, I seem not to be able to correctly implement it on my device...

I´m using the latest version (V.9). I´ve already read the instructions provided by FuFu, I´ve done the script "install" using 2ndbootOR by Nadlabak´s, I´ve granted chmod permissons using the OR console, and an "online" terminal emulator. I´ve checked the permissions on the file and they appear as "rwxr-x---...

Still, when using the "free" command to check swap space used only zeros appear...

Any idea what might be hapening here. Is there any complete tutorial around here (besides the one on FuFu´s page)?

Many thanks for any help/idea on the issue.

See you
[Motorola Milestone Android Development] Erovia:
The script you've downloaded already has the proper permissions.

Just install it from OR, reboot and it should be working.
[Motorola Milestone Android Development] -FuFu-:
what firmware you use?

swap only works with cm7/10 with 2ndboot
[Motorola Milestone Android Development] Ricfil:
Thanks for the quick help Erovia and FuFu.

"The script you've downloaded already has the proper permissions." That is exactly the problem, I understand it should be doing that, but in my case it isn´t as explained above... As I said I´ve used V.9 of the script. Answering Fufu´s question, I´m using Cyanogenmod 7 (v.2.3.7) from Nadlabak. I´m also using his 2ndboot OR (used it to install the script via "apply update menu option)...

Strange how I can´t for the life of me put it to work.... free command spits back zeros...

I´ve had some tough configurations going my way with this device.Similar trouble happens with creating Ext partitions (phone does not recognize them, but that´s another story...)

Anything else I could test? Will try out FufFu´s Minimod OR to see if any change occurs.

Thanks for the help guys and girls :)
[Motorola Milestone Android Development] Erovia:
Are you using the latest CM7? (7.2.4b)
[Motorola Milestone Android Development] Ricfil:
I´m using version 7.2.2. It seems pretty much stable enought so to risk upgrading to a newer one an risk losing stuff on the phone? Anyway, will this little version update be the one causing the issue I´m having?... What about earlier versions? They could probably work, could´t they? Will give them a shot.

:good:

Thanks for the help.
[Motorola Milestone Android Development] sfahadzb:
well that's the problem, swap support came with custom kernel support from 7.2.3 onwards
[Motorola Milestone Android Development] Ricfil:
Ok. Did not have that info with me. Always updating Cyanogen. I´ll have to keep in touch. Will update my version to the latest one and see if all goes according plan.

Thanks for the extra info man. :good:
[Motorola Milestone Android Development] Erovia:
7.2.2 doesnt have swap support.

Dont worry about your stuff. You only have to wipe cache and dalvik-cache when upgrading to the latest CM7, so all your stuffs be there.
[Motorola Milestone Android Development] pnsdhrn:
Thank you very very much FuFu...

pnsdhrn
[Motorola Milestone Android Development] Ricfil:
Thanks for the info man. I´m afraid (as I was before) it isn´t that simple in my case... I´ve already upgraded to the latest rom. The thing is, whenever I do that(as expected), I tend to have LOTS of dificulties getting Link2SD (using it for an external partition for apps) to mount... Literally, yesterday, I´ve had to reboot the phone probably 10 times at least for it to mount correctly the partition on the system and link all the files correctly (and I´m pretty shure there are still some apps missing (not linked) )...:( Not that easy to do the upgrades in my case. I´ve got around 300 apps installed on my phone, there are still 55 remaining to be recognized and mounted by the system... argh... Also the bootanimation file (custom) goes tits up and the synchronization apps already configured went away (had to configure them again manually). Nothing serious this last part, but just to point out sometimes it is not a so easy process the upgrade. It would be WAY easier if the Milestone had an onboard flash chip of some sorts for the apps save space:rolleyes:

Still have to try the swap script. Hope it all goes well.

Thanks again man. :good:
[Motorola Milestone Android Development] -FuFu-:
why using link2sd? cm7 have a native app2ext included...

only think to do is to have a ext2/3/4 partition on sdcard (mmcblk0p2) and thats it... then all apps are on ext and not on internal storage