[MOD]SD Swap v5+Initd for any 4.1.2 rom Locked or unlocked xt907+CM4.3alpha-version

Search This thread

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
Update something
[Edit Philz 6.2.3+ is perfect & does not mess with my swap anymore.]
messed with the install-recovery.sh!
So just reflash the swap , not sure what did it : an xposed modual?
v5 up.
Works now even if on bone stock.


Step 1: (for those rooted, on the ota or out of the box)
Install this https://play.google.com/store/apps/details?id=stericson.busybox
Use the smart install & choose 1.21.1 not 1.22. http://xdaforums.com/showpost.php?p=50064227&postcount=4
Do not use Universal init d.
Reboot.
Step 2:
Flash v5 with Twrp2.6.3 e33 or Philz v6079.
For SafeStrap users using bootstrap, should work.
Reboot.

TWRP e33: http://xdaforums.com/showpost.php?p=49509466&postcount=1

Fixed conflicts with my ◢ PurePerformances™X ◣ mod.
You can only successfully install with Plilz v6079. I only use, for now the one below.
Once installed TWRP does not seem to be a problem.

Plilz v6 for msm8960 phones: Atrix HD, Razr M & Photon Q is here

Took down the deodexed version as it was only the ui from this 1% battery mod that made it different. You can flash it to any deodexed 412 xt907 or xt905 rom.

All storage defaults to storage0 (your real SD card) which is the way it should have been from Motorola, well closer anyway.

Flash from recovery or SS bootstrap Philz v6. Wipe dalvik & cache only. Not for cm based, multuser, or anything but 4.1.2 stock roms!
My ◢ PurePerformances™X ◣ mod must be followed by the SD Swap. Because of a conflict with install-recovery.sh file.

Do not use cwmr 6044 as it messes up the swap by forcing data/media/0. Plilz is better as you can choose data/media only. See my goodies for Philz.


Always use TWRP 2.6.3 e33 OR Philz v6079.(for install use Philz only)
Always choose any NO when rebooting from Philz.
Go Recovery Goodies


Because install-recovery.sh is now an agent in the initd setup & needs to be protected.

Notes on the SD swap: When you choose "Device storage", sdcard0 or storage0 you will browsing your real SD card. When you choose "SD card", sdcard1 or storage1 you will be browsing the internal SD ("data/media").

This internal SD ("data/media") memory now has no purpose. You can move what you want to your real SD & delete everything else to let the phone use it all. All storage defaults to storage0 (your real SD card) which now is the way it should have been from Motorola, well closer anyway.

ZaYAC-ua's swap thread
The formerly unwanted file: install-recovery.sh is now an agent in the initd setup & needs to be protected, as noted above, and it's permissions, if altered, can be restored to rwxr-xr-x.
If this file is not protected you boot up with 2 internal SD cards.

Known issues:

Two things will Kill the SD swap: (by messing with install-recovery.sh)
1)Using TWRP older then v2.6. (To install use Philz only)
2)If you boot from CWMR and choose yes to "disable recovery flash".
Also) If you mess with multiuser roms feel free to delete 0 , obb & legacy folders in internal sd (storage1).
One more) It is expected for your settings-storage info to be out of whack.
Finally) Create folder in root of the phone with Root Explorer results in an error but is the same as the Rabbit's version & of no consequence. The folder does get created anyway. All else works in the root of the phone.

UsbMassStorage: BE SURE TO EJECT FROM PC/MAC BEFORE YOU UNMOUNT. DO NOT USE WITH ANDROID FILE TRANSFER.
".files" are a nuisance when mounting to osx: just delete them AFTER YOU UNMOUNT. Warning: If you do not enable your file browser to show hidden files & you unmount while your (os x is one) trash is full the .file can be huge!
More http://xdaforums.com/showpost.php?p=43434787&postcount=3

V1 DL stats: deodexed-31, odexed-49
 

Attachments

  • SDswapFOR4.3ROMs.Solutor.v1alpha.zip
    142.3 KB · Views: 198
  • UsbMassStorageDevice.apk
    316.9 KB · Views: 372
  • xT907-v5.SDswapFOR4.1.2ROMS.zip
    143.7 KB · Views: 264
Last edited:

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
V3 up. Fixes compatibility w/ PP mod. Twrp will not install the swap & let it work! Plilz v6 will & does twrp restores too....
 

The Solutor

Senior Member
Dec 14, 2006
1,043
160
Turin
I'm using this script to swap the storage on PACman and other 4.3 roms that lacks the swap option natively, I guess your solution is more or less the same, using the restore recovery script instead of the real init.d script.

Right ?

Code:
#!/system/bin/sh
sleep 3
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/shell/emulated
mount -o bind /data/media/0 /storage/sdcard1
chown system /data/media/0
chgrp sdcard_rw /data/media/0
chmod 0075 /data/media/0
mount -o remount, ro /
 
  • Like
Reactions: aviwdoowks

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
I'm using this script to swap the storage on PACman and other 4.3 roms that lacks the swap option natively, I guess your solution is more or less the same, using the restore recovery script instead of the real init.d script.

Right ?

Code:
#!/system/bin/sh
sleep 3
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/shell/emulated
mount -o bind /data/media/0 /storage/sdcard1
chown system /data/media/0
chgrp sdcard_rw /data/media/0
chmod 0075 /data/media/0
mount -o remount, ro /

Thanks. Did you have a link? I have never found one that works for 4.1.2 + !
 

The Solutor

Senior Member
Dec 14, 2006
1,043
160
Turin
Thanks. Did you have a link? I have never found one that works for 4.1.2 + !

A link ? o_O

That's all I'm using, just copy it save it to (say) 02sdswap, put the file in the /etc/init.d folder and set the permissions as the other init.d files.

Then reboot the phone.

That's all

Keep in mind to use a decent editor and set the end line format to UNIX.

I'm using it on 4.3 on PhotonQ but it should work, as is, on other similar phones like the Razr M, or with little adjustment in other phones.

Is far from perfect but looks to be enough to solve the problem.
 

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
A link ? o_O

That's all I'm using, just copy it save it to (say) 02sdswap, put the file in the /etc/init.d folder and set the permissions as the other init.d files.

Then reboot the phone.

That's all

Keep in mind to use a decent editor and set the end line format to UNIX.

I'm using it on 4.3 on PhotonQ but it should work, as is, on other similar phones like the Razr M, or with little adjustment in other phones.

Is far from perfect but looks to be enough to solve the problem.
Just tried it, removing the "/0" from each line w/ datamedia.
No go for 412.
 

The Solutor

Senior Member
Dec 14, 2006
1,043
160
Turin

Practically I've never used JB 4.1.2, as I see no point in doing it.

Depending on my moot I use my internationalized ICS, or a good 4.3 unofficial rom.

Bacause this, I don't remember exactly the changes in paths and symlinks between 4.1.2 and 4.3

But very likely the /mnt/shell/emulated is not present on 4.1.2, just check if I'm not wrong, and eventually change the /mnt/shell/emulated to the correct mountpoint.
 
  • Like
Reactions: aviwdoowks

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
V4 up. Much improved. Only the install-recovery.sh annoyance to overcome. I am trying a "userint.sh" version. Anyone know if that is do-able on a moto phone? Htc phones use it with a swap.
 

aviwdoowks

Senior Member
Sep 18, 2012
3,174
617
Couple this concise commentary of the data media problem,
http://teamw.in/DataMedia
[translation: data/media is useless if you have ext sd as default storage.
It needs to be formatted for reliable rom flashes (esp. 4.4)
& you can do it from Philz! ]

With the ability to use a large sd card on our phone,
then you understand why keeping data media zeroed out along with a sd swap is so nice.
Where oh where is a swap for 4.4?

Btw a new Plilz with ext sd cwm folder detection :fingers-crossed: due out soon.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I'm using this script to swap the storage on PACman and other 4.3 roms that lacks the swap option natively, I guess your solution is more or less the same, using the restore recovery script instead of the real init.d script.

    Right ?

    Code:
    #!/system/bin/sh
    sleep 3
    mount -o remount,rw /
    mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/shell/emulated
    mount -o bind /data/media/0 /storage/sdcard1
    chown system /data/media/0
    chgrp sdcard_rw /data/media/0
    chmod 0075 /data/media/0
    mount -o remount, ro /
    1

    Practically I've never used JB 4.1.2, as I see no point in doing it.

    Depending on my moot I use my internationalized ICS, or a good 4.3 unofficial rom.

    Bacause this, I don't remember exactly the changes in paths and symlinks between 4.1.2 and 4.3

    But very likely the /mnt/shell/emulated is not present on 4.1.2, just check if I'm not wrong, and eventually change the /mnt/shell/emulated to the correct mountpoint.