5,599,616 Members 44,849 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Internal <> External storage "swap" for 4.2.2. Simply, easy, safe.

Tip us?
 
Kyrie1965
Old
(Last edited by Kyrie1965; 26th June 2013 at 11:49 AM.) Reason: New version
#1  
Member - OP
Thanks Meter 100
Posts: 85
Join Date: Nov 2010
Database [MOD] Internal <> External storage "swap" for 4.2.2. Simply, easy, safe.

UPDATE 26.06.2013

OK, we are alive again!

Some users have reported about boot loop. Use it at your own risk (be ready to use backup or ExternalStorageRestore).

ExternalStorageFullSwap_v1 for 10.3.A.0.423 DEODEX
ExternalStorageRestore_v1 for 10.3.A.0.423 DEODEX

Install it from Recovery.

Best swap solution. No root, no init.d, no remounts, exFAT support, easy to restore, full emulated storage support (4.2.2).

System will work as usual, sdcard0 will still be internal storage, sdcard1 will still be real SD-card. But all (most) apps (and games) will use sdcard1 as global storage path (getExternalStorageDirectory).

It is for any DEODEXED ROM based on 10.3.A.0.423 (4.2.2).

Patch will replace only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card. If anything will go wrong just restore original framework.jar.
The Following 29 Users Say Thank You to Kyrie1965 For This Useful Post: [ Click to Expand ]
 
cjcelo
Old
#2  
cjcelo's Avatar
Senior Member
Thanks Meter 58
Posts: 196
Join Date: Mar 2013
Quote:
Originally Posted by Kyrie1965 View Post
It is for any DEODEXED ROM based on 10.1.A.1.434.

Patches will replaces only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card.

There are two versions:

ExternalStoragePartialSwap (recommended). Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_ANDROID_DATA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_MEDIA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_OBB_DIRECTORY to external storage (sdcard1).

Most of games and apps stores their data and cache at /sdcard0/Android/data, /sdcard0/Android/obb, /sdcard0/Android/media. sdcard0 - is internal storage. After patching games and apps will use /sdcard1/Android/data, /sdcard1/Android/obb, /sdcard1/Android/media. After patch applying you need to move Android folder from sdcard0 to sdcard1 (by any file manager). Most of all other apps will use internal storage as usual.

ExternalStorageFullSwap (not recommended). Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_DIRECTORY to external storage (sdcard1).

Most of all apps will use sdcard1 as internal storage. By default when apps asks for a storage dir (getExternalStorageDirectory), system returns "/storage/sdcard0". After patch it will be "/storage/sdcard1" by default.


If anything will go wrong just restore original framework.jar (DEODEX, 10.1.A.1.434) ExternalStorageRestore. Install it from Recovery.
Hey Thank u for mod... Reserved..
The Following 3 Users Say Thank You to cjcelo For This Useful Post: [ Click to Expand ]
 
Ape187
Old
#3  
Ape187's Avatar
Senior Member
Thanks Meter 21
Posts: 136
Join Date: Nov 2009
Location: Anime World
Quote:
Originally Posted by Kyrie1965 View Post
It is for any DEODEXED ROM based on 10.1.A.1.434.

Patches will replaces only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card.

There are two versions:

ExternalStoragePartialSwap. Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_ANDROID_DATA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_MEDIA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_OBB_DIRECTORY to external storage (sdcard1).

Most of games and apps stores their data and cache at /sdcard0/Android/data, /sdcard0/Android/obb, /sdcard0/Android/media. sdcard0 - is internal storage. After patching games and apps will use /sdcard1/Android/data, /sdcard1/Android/obb, /sdcard1/Android/media. After patch applying you need to move Android folder from sdcard0 to sdcard1 (by any file manager). Most of all other apps will use internal storage as usual.

ExternalStorageFullSwap. Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_DIRECTORY to external storage (sdcard1).

Most of all apps will use sdcard1 as internal storage. By default when apps asks for a storage dir (getExternalStorageDirectory), system returns "/storage/sdcard0". After patch it will be "/storage/sdcard1" by default.

NO need root, init.d, etc. exFAT support (if you have exFAT mod). Absolutly safe (system will work as usual).

If anything will go wrong just restore original framework.jar (DEODEX, 10.1.A.1.434) ExternalStorageRestore. Install it from Recovery.
Awesome! Could you please tell me which files and lines you edited, so I can edit it myself for any ROM I use? (In case this mod breaks some tweaks and mods implemented in the jar file of the ROM)
Current Device: Xperia Zex 6603
ROM: monxDIFIED v01-03
Kernel: DooMKernel v7
Panel: Sharp
CPU Variant (PVS): 1 (nominal) [Instructions on how to find out.]

History of Devices: Siemens C10D->Siemens MC60->Sony Ericsson K800i->Sony Ericsson Xperia X1->HTC Desire AMOLED->HTC Sensation->HTC One X


Steins;Gate 4 Live!!
 
Kyrie1965
Old
#4  
Member - OP
Thanks Meter 100
Posts: 85
Join Date: Nov 2010
Quote:
Originally Posted by Ape187 View Post
Could you please tell me which files and lines you edited...
framework.jar > android > os > Environment.smali (constructor <clinit> method)

Just use any comparing tool and compare original and patched files.
The Following User Says Thank You to Kyrie1965 For This Useful Post: [ Click to Expand ]
 
Ape187
Old
#5  
Ape187's Avatar
Senior Member
Thanks Meter 21
Posts: 136
Join Date: Nov 2009
Location: Anime World
Quote:
Originally Posted by Kyrie1965 View Post
framework.jar > android > os > Environment.smali (constructor <clinit> method)

Just use any comparing tool and compare original and patched files.
Okay, thanks. I use notepad++ for editing.
Current Device: Xperia Zex 6603
ROM: monxDIFIED v01-03
Kernel: DooMKernel v7
Panel: Sharp
CPU Variant (PVS): 1 (nominal) [Instructions on how to find out.]

History of Devices: Siemens C10D->Siemens MC60->Sony Ericsson K800i->Sony Ericsson Xperia X1->HTC Desire AMOLED->HTC Sensation->HTC One X


Steins;Gate 4 Live!!
 
zanndoth
Old
#6  
Senior Member
Thanks Meter 21
Posts: 197
Join Date: Oct 2010

 
DONATE TO ME
Is it possible to have another version for stock rom?
 
anielkumar
Old
#7  
Member
Thanks Meter 12
Posts: 70
Join Date: May 2012
Question Explain More

Quote:
Originally Posted by Kyrie1965 View Post
framework.jar > android > os > Environment.smali (constructor <clinit> method)

Just use any comparing tool and compare original and patched files.

Could you please Elaborate More- I didn't understand Because ExternalStoragePartialSwap_434.zip file contains Only one file framework,jar file.
After extracting the This jar file , I have found 3 files inside-- classes.dex, MANIFEST.MF, and preloaded-classes.
I didn't Understand for "framework.jar > android > os > Environment.smali (constructor <clinit> method)", Where Can I find this and How !

Plz explain.

Thanks-- Anil
 
Kyrie1965
Old
#8  
Member - OP
Thanks Meter 100
Posts: 85
Join Date: Nov 2010
Quote:
Originally Posted by anielkumar View Post
Could you please Elaborate More- I didn't understand Because ExternalStoragePartialSwap_434.zip file contains Only one file framework,jar file.
After extracting the This jar file , I have found 3 files inside-- classes.dex, MANIFEST.MF, and preloaded-classes.
I didn't Understand for "framework.jar > android > os > Environment.smali (constructor <clinit> method)", Where Can I find this and How !

Plz explain.

Thanks-- Anil
My message about Environment.smali was not for ordinary users. Only for users who know what is decompile, java, dalvik, etc.
The Following User Says Thank You to Kyrie1965 For This Useful Post: [ Click to Expand ]
 
anielkumar
Old
#9  
Member
Thanks Meter 12
Posts: 70
Join Date: May 2012
Question After Flash Getting FC for user Installed App and Game not Starting

Hi,
I have flashed the ExternalStoragePartialSwap_434.zip thru TWRP in my C6602/sony Z.
I have doomloard v6 kernel and Glass Xperia V2. But after flashed i was getting FC for Linked Application using Link2SD.
Even if I unlinked the App , Still I am unable to Run. Game is also not launching.

So I have Re flashed ur ExternalStorageRestore file to Back original state.

I think this Patch need more testing.

I am also Semi Developer and tester. I have worked on Visual Studio.
Little bit I know Java.

It will help for me if you guide about What Compiler / decompiler use for Patching for framework.jar.
I have work on Eclipse.

Thanks--
 
Ape187
Old
(Last edited by Ape187; 22nd April 2013 at 06:54 AM.)
#10  
Ape187's Avatar
Senior Member
Thanks Meter 21
Posts: 136
Join Date: Nov 2009
Location: Anime World
Quote:
Originally Posted by anielkumar View Post
Hi,
I have flashed the ExternalStoragePartialSwap_434.zip thru TWRP in my C6602/sony Z.
I have doomloard v6 kernel and Glass Xperia V2. But after flashed i was getting FC for Linked Application using Link2SD.
Even if I unlinked the App , Still I am unable to Run. Game is also not launching.

So I have Re flashed ur ExternalStorageRestore file to Back original state.

I think this Patch need more testing.

I am also Semi Developer and tester. I have worked on Visual Studio.
Little bit I know Java.

It will help for me if you guide about What Compiler / decompiler use for Patching for framework.jar.
I have work on Eclipse.

Thanks--
I use gui apk tool for decompiling/compiling (available here) and for editing the .smali files I use notepad++.
BTW, I use Windows 7 64bit for it.
Current Device: Xperia Zex 6603
ROM: monxDIFIED v01-03
Kernel: DooMKernel v7
Panel: Sharp
CPU Variant (PVS): 1 (nominal) [Instructions on how to find out.]

History of Devices: Siemens C10D->Siemens MC60->Sony Ericsson K800i->Sony Ericsson Xperia X1->HTC Desire AMOLED->HTC Sensation->HTC One X


Steins;Gate 4 Live!!

Tags
mod, patch
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes