Data2ext and Partitioning? - myTouch 3G Slide Q&A, Help & Troubleshooting

I'm still trying to wrap my head around this.
Basically, if I follow this guide ->
androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
Click to expand...
Click to collapse
Then go back and type this ->
mke2fs -m0 -b4096 /dev/block/mmcblk0p2
Click to expand...
Click to collapse
I'm set?

icoman said:
I'm still trying to wrap my head around this.
Basically, if I follow this guide ->
Then go back and type this ->
I'm set?
Click to expand...
Click to collapse
Nop, that last command was only to make a 4kb block size, you are missing another command that enables it. It is (if on cmd) :
Select Partitions Menu on Recovery and mount the ext and system, then:
adb shell
data2ext --enable
If on terminal app:
Su
Data2ext --enable
Phone reboots that's it.
But is not worth it if you don't have a class 6 sd-card, it's maaaad slow on a regular class 2. So I use a2ext instead..
Sent from my T-Mobile myTouch 3G Slide using XDA App

Related

Trying to save internal memory?

What is the best way to keep my internal memory low I am rooted but dont really want to move any stock apps because of future updating?
there is no other way then.Im not sure 100% but if you use Move2SD Enabler you can move the system apps you dont want to SDCard,i am NOT sure if you will still be able to update..
Move apps to sd
Type the following two lines in the terminal window and press Enter after each line:
adb shell
pm setInstallLocation 2
Now on your phone go to Settings->Applications->Manage Applications->All.
Press hardware Menu button and select Sort by Size.
Tap on each app that is taking significant amount of space and tap Move to SD card button. Press hardware Back button and repeat.
(optional) To change the default installation location for new apps back to the internal phone memory, go back to your terminal window and type:
pm setInstallLocation 0
(important) Go to Settings -> Applications -> Development and disable USB debugging. Leaving USB debugging enabled makes your phone vulnerable (e.g. lock pattern can be reset).
Enjoy!
You can buy titanium backup pro, it has a few tricks, and it cleans up daviks cache for extra 50 or so MB, or you can move the entire cache by following a thread in the dev section. I think
Sent from my Xperia Play
jutley said:
Type the following two lines in the terminal window and press Enter after each line:
adb shell
pm setInstallLocation 2
Now on your phone go to Settings->Applications->Manage Applications->All.
Press hardware Menu button and select Sort by Size.
Tap on each app that is taking significant amount of space and tap Move to SD card button. Press hardware Back button and repeat.
(optional) To change the default installation location for new apps back to the internal phone memory, go back to your terminal window and type:
pm setInstallLocation 0
(important) Go to Settings -> Applications -> Development and disable USB debugging. Leaving USB debugging enabled makes your phone vulnerable (e.g. lock pattern can be reset).
Enjoy!
Click to expand...
Click to collapse
Thankyou i will try when i get home later from work
Cat_On_Droid said:
there is no other way then.Im not sure 100% but if you use Move2SD Enabler you can move the system apps you dont want to SDCard,i am NOT sure if you will still be able to update..
Click to expand...
Click to collapse
Thanks i tried that app even so it said that it was not compatible for my phone on the market i got it on, but it does not really let me move any apps from internal i.e sims or flash player etc, thanks anyway
jutley said:
Type the following two lines in the terminal window and press Enter after each line:
adb shell
pm setInstallLocation 2
Now on your phone go to Settings->Applications->Manage Applications->All.
Press hardware Menu button and select Sort by Size.
Tap on each app that is taking significant amount of space and tap Move to SD card button. Press hardware Back button and repeat.
(optional) To change the default installation location for new apps back to the internal phone memory, go back to your terminal window and type:
pm setInstallLocation 0
(important) Go to Settings -> Applications -> Development and disable USB debugging. Leaving USB debugging enabled makes your phone vulnerable (e.g. lock pattern can be reset).
Enjoy!
Click to expand...
Click to collapse
Can we do this on terminal emulator? what are we gonna type exactly?
Has to be done on pc using adb just type as per instructions.
jutley said:
Has to be done on pc using adb just type as per instructions.
Click to expand...
Click to collapse
Anything that can be done in ADB can be done in a terminal emulator. ADB is nothing more than a remote terminal.
Sent from my R800i using Tapatalk
AndroHero said:
Anything that can be done in ADB can be done in a terminal emulator. ADB is nothing more than a remote terminal.
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
Thankyou so what do i input into terminal?
adb shell
pm setInstallLocation 2
jutley said:
adb shell
pm setInstallLocation 2
Click to expand...
Click to collapse
su
# pm setInstallLocation 2
Sent from my R800i using Tapatalk
jutley said:
adb shell
pm setInstallLocation 2
Click to expand...
Click to collapse
says adb not found?
garner said:
says adb not found?
Click to expand...
Click to collapse
Terminal does not know what android debug bridge is, plus you are already logged into shell.
Sent from my R800i using Tapatalk
you need to have usb debuging on your phone enabled.
AndroHero said:
Terminal does not know what android debug bridge is, plus you are already logged into shell.
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
Thankyou im great with a nexus one just not xperia yet lol i wanna try cyanogen on xperia but it looks like a right pain to get on lol
garner said:
Thankyou im great with a nexus one just not xperia yet lol i wanna try cyanogen on xperia but it looks like a right pain to get on lol
Click to expand...
Click to collapse
If your using a GSM play it's simple.
1) use flashtool to flash recommended official rom first
2) download CM7
3) flash CM7 kernel from fastboot.
4) boot into recovery and flash rom
Sent from my R800i using Tapatalk
AndroHero said:
If your using a GSM play it's simple.
1) use flashtool to flash recommended official rom first
2) download CM7
3) flash CM7 kernel from fastboot.
4) boot into recovery and flash rom
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
Thankyou how would i know the difference with CDMA and GSM?
garner said:
Thankyou how would i know the difference with CDMA and GSM?
Click to expand...
Click to collapse
if your phone uses a SIM card it's GSM. Afaik the only CDMA plays out are the verizon ones
Sent from my R800i using Tapatalk
AndroHero said:
if your phone uses a SIM card it's GSM. Afaik the only CDMA plays out are the verizon ones
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
Its deffo gsm then on step one u say flash official rom, my rom is stock 4.0.A.2.368
is that ok?

[GUIDE] Setting Up and Activating SWAP Partition Without Breaking USB Mass Storage

Okay, many of you complain about USB MASS STORAGE not working with swap enabled. So heres a guide, using CWM (latest version) to set it up with working USB.
NEEDED:
MicroSD (i use class 4 sandisk 8gb)
Root+Busybox
CWM Recovery* (see post 2 for reasons of the *)
Terminal Emulator/ADB
Download this file http://dl.dropbox.com/u/1169731/swap_enabler.sh and place it IN THE ROOT OF YOUR SD!!!
Precautionary:BACKUP EVERYTHING ON MICRO SD CARD.
Steps:
Making the partition
Make sure you have everything backed up, as this WILL wipe your SD.
Boot into clockworkmod recovery.
Go to Advanced->Partition SD Card->EXT and Swap. I chose 128mb for EXT and 256 for SWAP.
Activating Through ADB
Make sure you downloaded that file earlier.
Type this into the CMD:
Code:
adb shell
chmod 755 /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
And reboot
When your phone has rebooted, go back into ADB, and type:
Code:
adb shell
free
and if you didnt not get 0's next to SWAP, it worked.
Activating through Terminal Emulator
Load up Terminal Emulator
Type in this:
Code:
su
chmod 755 /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
reboot. when your phones has booted back up, load terminal emulator once more, and type:
Code:
su
free
and if there isnt a bunch of 0's next to SWAP, it worked
And thats that!
Enjoy
TO DISABLE THROUGH ADB:
adb shell (skip if you're already in adb shell)
sh /mnt/sdcard/swap_enabler.sh disable
Click to expand...
Click to collapse
TO DISABLE THROUGH TERMINAL EMUALTOR
su
sh /mnt/sdcard/swap_enabler.sh disable
Click to expand...
Click to collapse
NEW QUICK EASY WAY (HIT AND MISS)
1) download script manager from the market
2) run swap_enabler.sh with script manager
3) reboot
SPECIAL THANKS TO: Nv for the script, and cimer for the original guide.
also, thanks to cjward for reminding me to put in the thanks ;D
* this guide is for CWM recovery, as the steps for 4EXT may be different. Also, when i tried to do it with 4EXT, it never activated the swap partition correctly.
Man, I've been trying to get this right. Think I messed up because I did not restart after running the script, so when I did the free command I got them zeros.
enserio said:
Man, I've been trying to get this right. Think I messed up because I did not restart after running the script, so when I did the free command I got them zeros.
Click to expand...
Click to collapse
what SD card you have? also, i have noticed it does not work on some roms, but most it does.
I used this method to set swap up to use with virtuous 3.5 and work great for me on my first try. It definately helps out.
Sent from my HTC Vision using xda premium
xT4Z1N4TRx said:
what SD card you have? also, i have noticed it does not work on some roms, but most it does.
Click to expand...
Click to collapse
The 8GB one that came standard with the G2 in the US, Dec 2010. If you need me to take it out and confirm what kind, I will, because this something I want to learn how to do. Also, I tried it with the ILWT Rom. I was trying to get to to work because I wanted to flash that Virtuous 3.5
PS - Anyone have a better method for backing up the SD card besides creating a folder on the desktop and dragging everything in there?
when i type su in terminal emulator I get
"[1] + Stopped (signal)"
I'm now getting a +2 error.
This is mildly frustrating because it seems so easy. I've learned several other processes to do to my phone, and THIS is the one that I get hung up on?
Latest debacle:
I wipe using G2+Superwipe. Make partitions of 128 and 256. Sdcard goes completely blank, so I have to mount it in recovery, and load up a nandroid. I figure, its still all good, go through with it. So I run the commands in Terminal Emulator and get the +2 error. damn damn damn
enserio said:
I'm now getting a +2 error.
This is mildly frustrating because it seems so easy. I've learned several other processes to do to my phone, and THIS is the one that I get hung up on?
Latest debacle:
I wipe using G2+Superwipe. Make partitions of 128 and 256. Sdcard goes completely blank, so I have to mount it in recovery, and load up a nandroid. I figure, its still all good, go through with it. So I run the commands in Terminal Emulator and get the +2 error. damn damn damn
Click to expand...
Click to collapse
Have you tried with ADB?
Sent from my Desire Z running @ 2GHZ
now on terminal emu i get: arith: syntax error: "65 on +2"
I'd try adb but i dont know much about adb
Hi everybody
I was asking myself, before doing it, do I really need it ?
I mean, I'm on Cyanogen Nightly and I've seen it's needed on virtuous (awesome) roms. But on CM, will it change something to activate swap ?
Thanks in advance
xT4Z1N4TRx said:
Have you tried with ADB?
Sent from my Desire Z running @ 2GHZ
Click to expand...
Click to collapse
well, new SDK is giving me problems setting up on my mac. Now you have to use SDK manager, which says to run 'android' file, and when I do it gives me an error just as its about to finish setting up.
Ugh, I want this to happen.
EDIT: got ADB fixed. gonna gee it a go this way.
KeitaroSenpai said:
Hi everybody
I was asking myself, before doing it, do I really need it ?
I mean, I'm on Cyanogen Nightly and I've seen it's needed on virtuous (awesome) roms. But on CM, will it change something to activate swap ?
Thanks in advance
Click to expand...
Click to collapse
This I would also like to know! Thx!
While I can't be 100%, I would say that it wouldn't help you much at all, on any CM based ROMs. Just the ones that are RAM intensive (i.e., sense roms). I know that I only want it to run the Virtuous 3.5 ROM.
Can anyone tell me is there a difference between doing it this way, or just using the app "swapper for root" from the app market..?
Thanks
Thought I would pop in. Doing it via terminal does not normally work you need to do it via ADB. If you're unfamiliar with ADB please go to here: http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/ and learn about it. It can be such a useful tool. You do not need swap for CM7,MIUI, or Sense 2.1. It can be needed for Sense 3.0 or Sense 3.5 because Sense is such a memory hog at those version levels.
fredcorp6 said:
Can anyone tell me is there a difference between doing it this way, or just using the app "swapper for root" from the app market..?
Thanks
Click to expand...
Click to collapse
Yes, using this way restricts it to one partition, whereas using swapper allows it to use the FAT partition. This means, with this only your swap part will get corrupted over time, whereas with swapper your FAT will, losing your data.
Sent from my Desire Z running @ 2GHZ
Ah ok I see.. cheers
Anyone able to overcome the +2 error? Using Umaro kernal on EliteMod CM7.
Code:
# sh /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
* Some tests.
/mnt/sdcard/swap_enabler.sh: arith: syntax error: "65 on +2"
EDIT:
Probably something not being compatible either busybox or CM7 but I got it to work by doing the following after looking at the code in the swap_enabler.sh file.
Since it was "65 on + 2" I figured that the cut commands weren't being executed properly somewhere and that it should have been 65 + 2 = 67..... =)
in shell i typed swapon /dev/block/vold/179:67
and it worked. Of course I had to manually make an entry in init.d and test it =)....
Maybe this can help OP edit the code.
Nshih422 said:
Anyone able to overcome the +2 error? Using Umaro kernal on EliteMod CM7.
Code:
# sh /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
* Some tests.
/mnt/sdcard/swap_enabler.sh: arith: syntax error: "65 on +2"
EDIT:
Probably something not being compatible either busybox or CM7 but I got it to work by doing the following after looking at the code in the swap_enabler.sh file.
Since it was "65 on + 2" I figured that the cut commands weren't being executed properly somewhere and that it should have been 65 + 2 = 67..... =)
in shell i typed swapon /dev/block/vold/179:67
and it worked. Of course I had to manually make an entry in init.d and test it =)....
Maybe this can help OP edit the code.
Click to expand...
Click to collapse
Why do you want to use swap on cm7. There are zero benefits. But there are disadvantages, it could affect battery life, performance and wear your sdcard out faster
Sent from my HTC Vision using Tapatalk

How to make some apps to remove or make it stop on 2.3?

Best dear xda members,
i was wondering how to remove apps or make them stop working example '' googlemaps ''
aygul12345 said:
Best dear xda members,
i was wondering how to remove apps or make them stop working example '' googlemaps ''
Click to expand...
Click to collapse
Info please.
Are you:
Rooted?
If Yes:
Using a custom ROM?
S-OFF?
If No, you need to be at least rooted. Please let me know exactly what your set up is.
rootSU said:
Info please.
Are you:
Rooted?
If Yes:
Using a custom ROM?
S-OFF?
If No, you need to be at least rooted. Please let me know exactly what your set up is.
Click to expand...
Click to collapse
Thanks fo ya reply,
i'm on 2.3 officeel htc rom,
Yes S -off,
Yes rooted
no not a custom rom, i'm on 2.3 officeel htc rom,
aygul12345 said:
Thanks fo ya reply,
i'm on 2.3 officeel htc rom,
Yes S -off,
Yes rooted
no not a custom rom, i'm on 2.3 officeel htc rom,
Click to expand...
Click to collapse
OK, s-off is the biggest enabler. You can do 3 things. 2 cost, one is more involved....
1) Simply "Freeze" the applications with titanium backup. This stops them running and hides them from the app drawer
2) Using root explorer, navigate to /system/app (mount R/W) and delete the apks.
3) Use adb (I have a guide for this but if you own either of the above applications, its not worth it).
If you were not s-off and using a custom rom, another option would be to remove the apk's from the rom zip file and reflash it. Thats not an option here though.
Hope this helps.
rootSU said:
OK, s-off is the biggest enabler. You can do 3 things. 2 cost, one is more involved....
1) Simply "Freeze" the applications with titanium backup. This stops them running and hides them from the app drawer
2) Using root explorer, navigate to /system/app (mount R/W) and delete the apks.
3) Use adb (I have a guide for this but if you own either of the above applications, its not worth it).
If you were not s-off and using a custom rom, another option would be to remove the apk's from the rom zip file and reflash it. Thats not an option here though.
Hope this helps.
Click to expand...
Click to collapse
I think to '' freeze '' best sulution is and to delete i gues...
Use ADB? why is it not worth for this? explain, i wanna learn it!
aygul12345 said:
I think to '' freeze '' best sulution is and to delete i gues...
Use ADB? why is it not worth for this? explain, i wanna learn it!
Click to expand...
Click to collapse
Oh ok, yeah if you want to learn...
Well its just more complex and uses command line. I have a guide to do this in my signature if you're interested.
If you want to learn adb and fastboot, I have an FAQ for those too. Read both of those
rootSU said:
Oh ok, yeah if you want to learn...
Well its just more complex and uses command line. I have a guide to do this in my signature if you're interested.
If you want to learn adb and fastboot, I have an FAQ for those too. Read both of those
Click to expand...
Click to collapse
But first... if i get it right... there a 3 ways to do it right? Step 1-2 must to do.. but what means step 3 ? How it works? What is the different about 1,2
Sent from my HTC Desire using xda premium
Im sorry, I dont know what you mean?
There's more to English than just words. I can't for the life of me, understand the meaning of this thread title. OP post seems ok, so why not make the title meaningful?
rootSU said:
Im sorry, I dont know what you mean?
Click to expand...
Click to collapse
Hahaha, you said they are 3 ways to do this, step 1 and 2 are the steps you must to do,
but like i said.. step 3 .. what is the diffence than about step 1 and 2? ,
Sent from my HTC Desire using xda premium
aygul12345 said:
Hahaha, you said they are 3 ways to do this, step 1 and 2 are the steps you must to do,
but like i said.. step 3 .. what is the diffence than about step 1 and 2? ,
Sent from my HTC Desire using xda premium
Click to expand...
Click to collapse
Oh you mean Option 1, option 2 and option 3.
Option 1 and 2 use an application that you have to pay for. In fact these applications, all rooted users should own.
Option 3 uses adb so you have to connect to a PC to do it.
Actually, you could do it in terminal emulator if you are s-off, instead of adb, but adb is easier.
In adb, you can boot to recovery, connect to adb and simply
Code:
mount /system
where as in terminal emulator you would have to
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
But thats annoying to type on a soft keyboard.
Err.. I think there's two commands in that one line.
...which you need to mount system read / write whilst android is running. Unless you have a simpler line that works?
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
-t should be required only the first time you mount it.
Droidzone said:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
-t should be required only the first time you mount it.
Click to expand...
Click to collapse
Seems to work. Whatys teh Yaffs2 actually doing then and why is it almost every solution on the internet?
yaffs2 needs to be specified the first time you're mounting something, or mounting after umounting, where you need the -t to specify file system type.
mount -t yaffs2 /dev/block/mtdblock3 /system
While specifying a re mount, system is already aware of the type.
Ah thank you.
rootSU said:
Oh you mean Option 1, option 2 and option 3.
Option 1 and 2 use an application that you have to pay for. In fact these applications, all rooted users should own.
Option 3 uses adb so you have to connect to a PC to do it.
Actually, you could do it in terminal emulator if you are s-off, instead of adb, but adb is easier.
In adb, you can boot to recovery, connect to adb and simply
Code:
mount /system
where as in terminal emulator you would have to
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
But thats annoying to type on a soft keyboard.
Click to expand...
Click to collapse
Soo.. step 1 and 2 are apps that cost, but yea indeed you must to pay it.
Soo option 3 is the easyist way? And can you learn me more about that coding/ commands, soo what do i have to download it?
Sent from my HTC Desire using xda premium
Have a read of the faq I wrote, then the guide. They both tell you what to download and do
Sent from my HTC Desire using Tapatalk
rootSU said:
Have a read of the faq I wrote, then the guide. They both tell you what to download and do
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
Can you post the link please. i see differents lot a links of you.. give me the correct one.

[Tip] Mounting swapfile from init.d

After some experimentation, I finally figured out how to mount a swapfile from init.d
But first! A disclaimer!
STANDARD DISCLAIMER: I am TOTALLY not reponsible if you brick your own phone. This procedure is provided 'as-is', with no guarantee of non-damage, or functionality.
I *do* use this script, and it's working as I expected, but YMMV.
Now, on with the Tip...
SAFETY PRECAUTION
Install (flash) the TWRP recovery first. If all goes well, you can flash your favorite recovery back.
PREREQUISITE
You need:
A rooted phone (of course!)
.
A kernel that supports swapfiles
.
A busybox that provides the following applets: nohup, basename, dirname, renice
The latest busybox by @stericson happens to provide all needed applets.
.
A working init.d infrastructure
PROCEDURE
Make sure that the directory /data/scripts exists (create one if it doesn't)
Create a swapfile by running the following commands from within Terminal (change "64" to the size (in MiB) of the swapfile you want):
Code:
su
TARG=/sdcard/.swapfile
dd if=/dev/zero of=$TARG bs=$((1024*1024)) count=64
mkswap $TARG
echo "SWAPFILE=$TARG" > /data/scripts/wait-mount-swap.conf
Download the attached script, rename it to "wait-mount-swap.sh"
Copy the script to the /data/scripts folder
Run the following commands from within Terminal:
Code:
su
WMS=/data/scripts/wait-mount-swap.sh
FIL=/system/etc/init.d/99swap
chmod 0777 $WMS
mount -o remount,rw /system
echo "#!/bin/bash
nohup $WMS &
" > $FIL
chmod 0755 $FIL
WARNING: Unless you know exactly what you're doing, you must follow the above code *exactly*!! DO NOT add spaces to 'make it easier to read'; DO NOT forget to enter the whole line (including that ampersand '&' symbol).
Reboot
Wait up to 1.5 minutes
Check the /data/scripts/wait-mount-swap.log; the last line should declare "..successful!"
Check using the 'free' command from Terminal
Got Stuck in BootLoop?
Power off your phone, then boot into TWRP recovery.
Tap "Mount".
Check (X) "Mount System"
Tap "Home icon"
Tap "Advanced"
Tap "File Manager"
Go to /system/etc/init.d
Tap on "99swap"
Tap "Rename File"
Append ".disabled" (that's dot-disabled), and tap Enter
Swipe to confirm
Tap "Home icon"
Tap "Reboot"
Tap "System"
--- Sent from Opera on Lenovo T420 ---
Technical Explanation
The gist of the method are two parts: The script and the nohup line. We'll begin with the latter.
If you analyze the 99swap file in /system/etc/init.d, you can see that it has only one all-important line:
Code:
nohup /path/to/script.sh &
The ampersand "&" at the end of the line means: Run this line as a background (separate) process.
The 'secret sauce' is the "nohup" command: It makes the background process stay alive even when the invoking process (i.e., the init.d script) terminates.
So, at the end of the 99swap initscript, the initscript terminates, but wait-mount-swap.sh is still running in memory.
Now, for reasons unknown, the SD Card is not mounted during init.d processing. So, the wait-mount-swap.sh script must wait until the SD Card is available before it can activate the swapfile located in the SD Card.
If you analyze the wait-mount-swap.sh script, you can see that after being invoked, the script will sleep for 30 seconds before attempting to activate the swapfile. If after the 'initial sleep' the script doesn't find the swapfile, it sleeps again for 10 seconds, and repeat the process. If after 5 attempts the swapfile still hasn't appear, it gives up and exits gracefully.
-- Sent from Opera on Lenovo T420 --
Wow! You finally did it man.
Congrats! Will try this asap. Thank you.
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Technical Explanation
The gist of the method are two parts: The script and the nohup line. We'll begin with the latter.
If you analyze the 99swap file in /system/etc/init.d, you can see that it has only one all-important line:
Code:
nohup /path/to/script.sh &
The ampersand "&" at the end of the line means: Run this line as a background (separate) process.
The 'secret sauce' is the "nohup" command: It makes the background process stay alive even when the invoking process (i.e., the init.d script) terminates.
So, at the end of the 99swap initscript, the initscript terminates, but wait-mount-swap.sh is still running in memory.
Now, for reasons unknown, the SD Card is not mounted during init.d processing. So, the wait-mount-swap.sh script must wait until the SD Card is available before it can activate the swapfile located in the SD Card.
If you analyze the wait-mount-swap.sh script, you can see that after being invoked, the script will sleep for 30 seconds before attempting to activate the swapfile. If after the 'initial sleep' the script doesn't find the swapfile, it sleeps again for 10 seconds, and repeat the process. If after 5 attempts the swapfile still hasn't appear, it gives up and exits gracefully.
-- Sent from Opera on Lenovo T420 --
Click to expand...
Click to collapse
very clever, i remember my good dos/windows days, how i wish i could do the same with linux/android
just looking and understanding your script, i feel i feel like i've gained additional 50% knowledge in linux scripting :good:
Edit: Man i have a joke for you, i mean it's not really a joke but sort of. If you decide to venture into rom development, i want to be the first person to try and test it.
Tq for tips
try your method..
Sent from my GT-I8150 using xda premium
I've figured out a way to make installation *much* easier... stay tuned for R2
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
I've figured out a way to make installation *much* easier... stay tuned for R2
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
looking forward
Hello, I tried this but when I do 'chmod +x $WMS', then shel tell me 'Bad mode'. What's wrong?
Sent from my GT-I8150 with CM 10.1 by Arco using xda premium
honzin2009 said:
Hello, I tried this but when I do 'chmod +x $WMS', then shel tell me 'Bad mode'. What's wrong?
Sent from my GT-I8150 with CM 10.1 by Arco using xda premium
Click to expand...
Click to collapse
Oops, I made a mistake there. I replaced 0777 with +x post-facto.
Try entering 'chmod 0777 $WMS' instead.
The OP has now been fixed, thanks for the report
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Oops, I made a mistake there. I replaced 0777 with +x post-facto.
Try entering 'chmod 0777 $WMS' instead.
The OP has now been fixed, thanks for the report
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Thank you, script now working well but the swap file is still not mounted after boot .
I will solve it by manual mounting of swap file after each boot, as I do now.
Sent from my GT-I8150 with CM 10.1a2 by Arco using xda premium
honzin2009 said:
Thank you, script now working well but the swap file is still not mounted after boot .
I will solve it by manual mounting of swap file after each boot, as I do now.
Sent from my GT-I8150 with CM 10.1a2 by Arco using xda premium
Click to expand...
Click to collapse
Hmmm, strange.
It does take up to 30 seconds after boot for swap to be activated.
However, I will not pursue this issue anymore with the current version; I'll be releasing version 2 sometime later this week
Sent from my GT-I8150 using xda app-developers app
boot
pepoluan said:
Hmmm, strange.
It does take up to 30 seconds after boot for swap to be activated.
However, I will not pursue this issue anymore with the current version; I'll be releasing version 2 sometime later this week
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
:good:
pepoluan said:
Hmmm, strange.
It does take up to 30 seconds after boot for swap to be activated.
However, I will not pursue this issue anymore with the current version; I'll be releasing version 2 sometime later this week
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
so is the simpler version 2 out yet? cuz the current one seems slightly overwhelming for me haha!
mount -o remount,rw /system
Click to expand...
Click to collapse
on terminal emulator, this will not run becoz of the comma after remount.
it works if it busybox b4 mount like this:
busybox mount -o remount,rw /system
Click to expand...
Click to collapse
or replace the comma with a space, like this:
mount -o remount rw /system
Click to expand...
Click to collapse
Great mounting with delay
Hi everybody
too late to post in this forum?
I see last reply is of 2013
The man who invented this delayed engine did a great thing :good::good::good::good::good:
The Background is a GT-P5200 stock ROM - android 4.4.2. In less words: Samsung Galaxy Tab 3.
I tried different methods, apps and scripts, but without lucky. I tried with Rhoesoft RAMExpander Test, that told me: your device is compatible...
Not sure 100%, I tried some free apps, with the target to see confirmed that swapfile works, before spending money and discovering that the swap don't autostart at boot. The apps I tried, they created the swapfile, but at boot it was never loaded... Furthermore I don't like having one more app continuously in execution, only to drive the swapfile. So with many doubts, I tried some scripts... But one of them tolds me that my (stock) kernel hasn't swap support :crying:
I'm little stubborn, because I began my swapfile adventure, inputting commands on terminal emulator, forced to learn what does every command. And learning I had feeling that swapfile works, with the only exception of being constrained to swapon manually from the emulator.
So (stubborn) I tried other scripts, to perform this autoload on boot... but never working! I read so many things in many forums, looking for a solution, but for an inexperienced ... things too heavy to digest.
The turning point is thanks to you, @pepoluan
You must know that after every boot, if I open the terminal rapidly, the cursor becomes active after a few minutes.... about 3-4 minutes.
So maybe... if my device is slow to boot, when the SD card will be available?
The conclusion: I took the pepoluan script, and modified the swapfile lines, and initial delay: where there was 30 I put 250
it is better to wait 5 minutes, as long as they are quiet

[GUIDE]Swap Internal Memory to External & Vice Versa

The Xperia M sure packs a lot in such a small device, but then, does it pack enough internal memory to install a huge number of applications? It does not. With just a little over 2 GB, it is very cumbersome to find that you cannot download data for large games. This guide aims to resolve that issue. Although it is not very user friendly at the moment (it requires you to type a few lines on the phone), I will get back to creating a script that you can execute this weekend.
Note: This guide requires you to be rooted. For rooting, you can follow this guide.
Step 1: Setting up stuff
Find and download a suitable file explorer that allows you to modify and browse system files. I recommend Root Explorer. (Optional)
Download and install Terminal Explorer from the Google Play Store.
Download and install Script Manager from the Google Play Store. (Optional)
Step 2: Walking the path
Open Terminal Emulator and type in
Code:
su
Your root manager should request you for permission. Grant the app superuser permission.
Type in
Code:
vold
Press enter
Type in
Code:
mount -t vfat -o umask:0000,uid=1000,gid=1023 /dev/block/vold/179:33 /storage/sdcard0
Press enter.
Type in
Code:
mount -o bind /data/media /storage/sdcard1
Press enter.
Click to expand...
Click to collapse
And, that's it! You're almost done. Go to Settings > Storage and check the internal and external storage to see that they have been mounted. You can now install huge games and enjoy them on your M. This is a temporary workaround until this weekend as I will write a script to automate this once my exams are over. If anyone else wants to do it, they're welcome to!
Note: You will have to type this again every time you reboot the device. A bit cumbersome, but I hope you can hold on till the weekend.
Credits:
 @darz
 @raw235
 @mattiadj
 @Ace King 34
not work in FW XM Dual
how to swap internal and external in FW XMD ?
@gadgetroid , will it work in Xperia M Dual 4.2 ?
It Worked!!!
gadgetroid said:
The Xperia M sure packs a lot in such a small device, but then, does it pack enough internal memory to install a huge number of applications? It does not. With just a little over 2 GB, it is very cumbersome to find that you cannot download data for large games. This guide aims to resolve that issue. Although it is not very user friendly at the moment (it requires you to type a few lines on the phone), I will get back to creating a script that you can execute this weekend.
Note: This guide requires you to be rooted. For rooting, you can follow this guide.
And, that's it! You're almost done. Go to Settings > Storage and check the internal and external storage to see that they have been mounted. You can now install huge games and enjoy them on your M. This is a temporary workaround until this weekend as I will write a script to automate this once my exams are over. If anyone else wants to do it, they're welcome to!
Note: You will have to type this again every time you reboot the device. A bit cumbersome, but I hope you can hold on till the weekend.
Credits:
@darz
@raw235
@mattiadj
@Ace King 34
Click to expand...
Click to collapse
Worked for me
13 GB internal storage
aerialus said:
not work in FW XM Dual
how to swap internal and external in FW XMD ?
Click to expand...
Click to collapse
I will need your help for that. If you can use ADB and pull these files for me and zip and upload here, it would certainly be very helpful.
Pull the folder "/dev/block/vold"
Open Terminal Emulator that you downloaded and run these scripts
Code:
cat /proc/partitions > partitions
Press enter
Code:
mount > mount
Then, on the computer, open a command prompt window (or terminal on Linux) and type in
Code:
adb pull /partitions
Code:
adb pull /mount
Put these two files in the zip along with the vold folder and post them here. I will look into it and provide you the guide.
jereMarfil24 said:
@gadgetroid , will it work in Xperia M Dual 4.2 ?
Click to expand...
Click to collapse
Since it runs 4.2, I can't be very sure, as Sony may have changed device names. Once the above user submits the files, I will look into it and post the guide.
gadgetroid said:
I will need your help for that. If you can use ADB and pull these files for me and zip and upload here, it would certainly be very helpful.
Pull the folder "/dev/block/vold"
Open Terminal Emulator that you downloaded and run these scripts
Code:
cat /proc/partitions > partitions
Press enter
Click to expand...
Click to collapse
i never use ADB ,, but i will try,,
when i do
Code:
cat /proc/partitions > partitions
in terminal emulator, the result is "can't create partitions: read only file system"
what is my fault?
Did u written su above?
Sent from my C1904 using Tapatalk 4
aerialus said:
when i do
Code:
cat /proc/partitions > partitions
in terminal emulator, the result is "can't create partitions: read only file system"
what is my fault?
Click to expand...
Click to collapse
Perhaps you aren't rooted. That is why the script in the OP didn't work for you either.
When you type in su in the terminal, do you get any prompt on your phone?
Or perhaps it could be that you haven't rooted the device completely. You need busybox for making any operations on the ~/ partition.
gadgetroid said:
Perhaps you aren't rooted. That is why the script in the OP didn't work for you either.
When you type in su in the terminal, do you get any prompt on your phone?
Or perhaps it could be that you haven't rooted the device completely. You need busybox for making any operations on the ~/ partition.
Click to expand...
Click to collapse
my device is already rooted and have Busybox installed,,
please look at my attachment
aerialus said:
my device is already rooted and have Busybox installed,,
please look at my attachment
Click to expand...
Click to collapse
Have you used root fixer? As mentioned by the OP of the root thread? If you have ES File Explorer, just try mounting the system partition as r/w over there. If it reboots immediately, then you aren't rooted properly yet.
aerialus said:
i never use ADB ,, but i will try,,
when i do
Code:
cat /proc/partitions > partitions
in terminal emulator, the result is "can't create partitions: read only file system"
what is my fault?
Click to expand...
Click to collapse
If I understand right the command will create the files "partitions" and "mount" directly into the root path that's why it claims "r/o file system"
try
Code:
cat /proc/partitions > [COLOR="Red"]/sdcard/[/COLOR]partitions
and pull it on your computer then with
Code:
adb pull [COLOR="red"]/sdcard/[/COLOR]partitions
same with "mount"
this should create those files into the sdcard which is not read only.
gadgetroid said:
Have you used root fixer? As mentioned by the OP of the root thread? If you have ES File Explorer, just try mounting the system partition as r/w over there. If it reboots immediately, then you aren't rooted properly yet.
Click to expand...
Click to collapse
in XM Dual no need use rootfixer anymore,,
just root with tools and success full root,,
magicw said:
If I understand right the command will create the files "partitions" and "mount" directly into the root path that's why it claims "r/o file system"
try
Code:
cat /proc/partitions > [COLOR="Red"]/sdcard/[/COLOR]partitions
and pull it on your computer then with
Code:
adb pull [COLOR="red"]/sdcard/[/COLOR]partitions
same with "mount"
this should create those files into the sdcard which is not read only.
Click to expand...
Click to collapse
ok i will try :fingers-crossed:
Yes. That is exactly what it does. It works if you put in sdcard
Script
I have created a script for this. If OP gives me permission i can publish it.
pull partitions and mounts success,,
but when i try to pull folder "/dev/block/vold"
the result is " 0 files pulled, 0 files skipped"
see my attachment
icoolguy1995 said:
I have created a script for this. If OP gives me permission i can publish it.
Click to expand...
Click to collapse
Sure, go ahead. Publish it. Are you sure its working? Cause when I created a script, it used to give me errors. That is why I posted this huge tutorial.
gadgetroid said:
Sure, go ahead. Publish it. Are you sure its working? Cause when I created a script, it used to give me errors. That is why I posted this huge tutorial.
Click to expand...
Click to collapse
I have attached the script in attachments.
STEPS TO EXECUTE
1) Download script
2) place it in SD card and open any Explorer in which you can change permissions.
3) Go where you have placed script and change its permission (Thick all the boxes)
4) Execute it.
But it will last till a reboot only
Simple Way
1) Download script manager from play store
2) Execute script with it and tick the boot,su option and tick it is executable.
Your memory is swapped
icoolguy1995 said:
I have attached the script in attachments.
STEPS TO EXECUTE
1) Download script
2) place it in SD card and open any Explorer in which you can change permissions.
3) Go where you have placed script and change its permission (Thick all the boxes)
4) Execute it.
But it will last till a reboot only
Simple Way
1) Download script manager from play store
2) Execute script with it and tick the boot,su option and tick it is executable.
Your memory is swapped
Click to expand...
Click to collapse
I'll add it to the op soon. BTW, if you place the script in /data folder and set it to rw-r--r--, it will be easier. That way, the script won't be in the wrong drive after it's been switched.
No it will not work unless all the options are ticked on permission setting.
icoolguy1995 said:
No it will not work unless all the options are ticked on permission setting.
Click to expand...
Click to collapse
It works for me with rw-r--r--
This message was brought to you by my Sony Xperia M (C1905), using the XDA app.

Categories

Resources