[MOD] Internal <> External storage "swap" for 4.2.2. Simply, easy, safe. - Xperia Z Android Development

[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.

Kyrie1965 said:
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.
Click to expand...
Click to collapse
Hey Thank u for mod... Reserved..

Kyrie1965 said:
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.
Click to expand...
Click to collapse
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)

Ape187 said:
Could you please tell me which files and lines you edited...
Click to expand...
Click to collapse
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.

Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
Okay, thanks. I use notepad++ for editing.

Is it possible to have another version for stock rom?

Explain More
Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
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

anielkumar said:
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
Click to expand...
Click to collapse
My message about Environment.smali was not for ordinary users. Only for users who know what is decompile, java, dalvik, etc.

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--

anielkumar said:
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--
Click to expand...
Click to collapse
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.

GL2SD (temp Solution)
Ape187 said:
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.
Click to expand...
Click to collapse
Hi
Thanks. I am on it.
Mean while I am using GL2SD program for "data and obb" files for running the Games or Apps from SD1 card (ExternelSD).

External_storage_dumb ?
Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
Hi,
I have decompile the framework.jar files (Both modified one and Original one).
Modifed (Your framework.jar) contains Following Line:
const-string v2, "EXTERNAL_STORAGE_DUMB"
const-string v3, "/storage/sdcard1"
Original ( from deodexed rom) contains Following Line:
const-string v2, "EXTERNAL_STORAGE"
const-string v3, "/storage/sdcard0"
So, Why have u modified ---
EXTERNAL_STORAGE To EXTERNAL_STORAGE_DUMB ???????????????
for Sdcard0 to Sdcard1 is OK.
Plz Check ?
Currently I am on progress......

anielkumar said:
So, Why have u modified ---
EXTERNAL_STORAGE To EXTERNAL_STORAGE_DUMB ???????????????
Click to expand...
Click to collapse
EXTERNAL_STORAGE is environment variable. If it exists system will use it value (path) and not your. It is not good and you must prevent it. EXTERNAL_STORAGE_DUMB is not exist at any case.
Please do not post such questions here. This topic is not for that.

Can we use this mod with rooted stock .434 version? Is anyone tried?
Sent from my C6603 using xda app-developers app

HoboTR said:
Can we use this mod with rooted stock .434 version? Is anyone tried?
Click to expand...
Click to collapse
No, you cann't. You need deodexed ROM.

Yep tried it on a stock rom and as he mentioned, it's not working in a stock rooted rom.
If he can manage to pull this off for stock roms it'd be really great, nice work though man. keep it up.

Can you share the smali script about swapping internal storage from framework.jar ?

danisariandi said:
Can you share the smali script about swapping internal storage from framework.jar ?
Click to expand...
Click to collapse
Here you go. The file is attached. Just unzip it. This is the full swap one.

Ape187 said:
Here you go. The file is attached. Just unzip it. This is the full swap one.
Click to expand...
Click to collapse
Could you give me a tutorial ?
Sent by brand new mindmap

danisariandi said:
Could you give me a tutorial ?
Sent by brand new mindmap
Click to expand...
Click to collapse
Of course.
First things first, you must have Java installed on your Windows computer and set the path variables. To do this go to Control Panel>System and Security>System>Advanced, till it looks someting like this. I have downloaded the 32bit version of java. It might look different to you. Just copy the path of your java bin folder and add it to the path field. Be sure to add a semicolon after the last entry before you add it.
After that install the program from here. It requires .NET Framework, but the necessary files you will find there.
Next thing, open the GUI apktool, select your framework.jar file you extracted from the .434 firmware and decopile shown here. Be sure to keep the original, you will need it later. I unticked the "Sign recently compiled apk?" box for safety. Check always the log after decompiling/compiling before doing anything!
After that, go to the decompiled path located in your personal folder. You can simply go there by clicking "Open decompiled output directory". Don't close the program. Go to framework.jar>smali>android>os and replace the Environment.smali I posted.
Then go to the program again and compile it. Name the compiled file "framework.jar" (without the quotes) for simplicity's sake. After it successfully compiled, go to the path by clicking on "Open compiled output directory" and open it with 7zip (very useful tool). Open your original framework.jar as well. Drag and drop the classes.dex file from your recently compiled file to your original and overwrite it. Don't flash the freshly compiled file, or the ROM will not boot.
All you need to do now, is to put it into a flashable zip and flash it via recovery. For safety, make a flashable zip with your untouched framework.jar in case something went wrong.
I hope, I covered everything. If I made some errors, then anyone can correct me.

Related

without odex

I am using the GT540 with 2.1 rom
i want delete in the system/app-> odex files
but when i delete any odex files
app does not work
examples
delete system/app-> music.odex... music does not work
There are some applications run with odex
some applications run without odex (example lgecamera.apk)
I would like in working without odex every app on 2.1
how do I
please help
Thank you for answers
I'm sorry for my English
I think first you need to understand the concept of ODEXing. In stock LG roms the system applications are Odexed. "ODEX" stands for Optimized DEX - Classes.dex is usually a file that stands inside the apk file of any application. When a program is odexed the file is extracted from the apk, optimized, and saved alongside the application in the odex format. However, since the apk no longer contains its (albeit optimized) classes, deleting the odex file leaves the application broken and unusable, until you reinstall it again. Now, I can think of only one way to deodex right now, but I really don't think it's a good idea(The rom i'm using was deodexed, yet I odexed it intentionally). What you need to do is:
1. Make a backup of your phone using clockworkmod recovery
2. From that backup take system.img and boot.img
3. You will need to download and run Android Kitchen. Since it's a Linux program, you'll need that as well. Look into it.
4. Insert the 'boot' and 'system' img files into the kitchen, and use the deodex option, then export the rom as update.zip
5. Put the file in your sdcard, boot into recovery, and format system
6. Choose 'install update.zip', and install the one you've created
7. From 'Advanced' menu clean Dalvik-Cache, and see if the phone works now.
While this *should* work *in theory*, as far as I know using a backup to modify it in the kitchen doesn't always work. Also, since I imagine some of your system apps are now broken, what I told you to do should be done after first reinstalling the rom in some way, in order to get your apps straight.
Well, I hope I've been helpful. Good luck.
if I'm not wrong there should be a script somewhere i the forum
bs828 said:
if I'm not wrong there should be a script somewhere i the forum
Click to expand...
Click to collapse
For deodexing? There's one for odexing, but I'm not sure about the opposite one. I'll do a search. Besides, some of his system apps are already screwed up, so I doubt that will help.
This kitchen can run on Cygwin (author mentioned it)
nutterbg said:
I think first you need to understand the concept of ODEXing. In stock LG roms the system applications are Odexed. "ODEX" stands for Optimized DEX - Classes.dex is usually a file that stands inside the apk file of any application. When a program is odexed the file is extracted from the apk, optimized, and saved alongside the application in the odex format. However, since the apk no longer contains its (albeit optimized) classes, deleting the odex file leaves the application broken and unusable, until you reinstall it again. Now, I can think of only one way to deodex right now, but I really don't think it's a good idea(The rom i'm using was deodexed, yet I odexed it intentionally). What you need to do is:
1. Make a backup of your phone using clockworkmod recovery
2. From that backup take system.img and boot.img
3. You will need to download and run Android Kitchen. Since it's a Linux program, you'll need that as well. Look into it.
4. Insert the 'boot' and 'system' img files into the kitchen, and use the deodex option, then export the rom as update.zip
5. Put the file in your sdcard, boot into recovery, and format system
6. Choose 'install update.zip', and install the one you've created
7. From 'Advanced' menu clean Dalvik-Cache, and see if the phone works now.
While this *should* work *in theory*, as far as I know using a backup to modify it in the kitchen doesn't always work. Also, since I imagine some of your system apps are now broken, what I told you to do should be done after first reinstalling the rom in some way, in order to get your apps straight.
Well, I hope I've been helpful. Good luck.
Click to expand...
Click to collapse
Thank you for your excellent explanation
definitely going to try them
but where do I find Android kitchen for the GT540
and the running xp or win7?
Can you give the web address?
thanks a lot.
Here you are
http://forum.xda-developers.com/showthread.php?t=633246
You can use kitchen on Windows thanks to Cygwin .
Wystukane z mojego Swifta przy użyciu Tapatalk.

[MOD][ICS] Working Facelock for ICS

That's true! Perfectly working on my stock rooted ICS for 24h+!
This mod is for test porpoises only. Although I'm using it with success right now, I can not guarantee you that it will work, so:
I'm just reproducing the method I used to make it works on my own device. I have no intentions of being a developer, I don't wanna any donations and I'm not encouraging you to try this, and I'm warning you this can potentially brick your device. So, if even knowing this you assume these risks, be warned that I'm not responsible for any problem you could have trying to do this. In short: do it by yourself!
It works on my stock ICS with rooted system.img, and I did as following:
- Backup your internal SDcard, because if anything goes wrong, you will have to use smartflash/nvflash to recover your phone, and your internal sdcard can be formated if you need to reinstall your system.
- Download ES File explorer from market (of course this is for not so advanced user, since they don't need this instructions)
- Enable all root options on it (menu, settings, root settings, check all the three first options)
- Click on the zip you downloaded from here
- Unpack the system folder from the zip attached to your sdcard
(on ES File explorer, click on "select" button, than on "system" folder, than on "extract" button)
- Go to /data
- Create a new dir called ICS
- Move the extracted "system" folder to /data/ICS/
- Enter /data/ICS/system
- There should be 4 folders: addon.d, app, lib and vendor
- Enter addon.p, long-click on 71-gapps-faceunlock.sh, click properties
- Change its properties to owner:read, write and execute; group: read, execute; others: read, execute
- Go back to /data/ICS/system, enter app folder
- long click on FaceLock.apk and change its permissions to owner:read, write; group: read; others: read
- Go back to /data/ICS/system, enter lib folder
- Change the permissions as you did for FaceLock.apk in all the 9 files, one by one, inside this folder
- Go back to /data/ICS/system
- Click on select, than select the four folders, than on CUT
- Go to /system (note: now it's /system, not /data/ICS/system anymore)
- Click on "Paste", confirm the changes on all the files/folders
- Reboot
Well, at this point, if you are a lucky guy and didn't get a 90% of a bootloop chance, you should be able to change your lockscreen to facelock.
I have no idea if this will work on tonyp/harsh's stock ICS flashable zip, because I don't have it to test. It should work since they are almost the same rom, however they have deleted a lot of LGs stuff to make the zip flashable on GB partition layout, so you can try it (the zip itself should be flashable on CWM), however:
- DO A NANDROID BACKUP firstly and
- YOU WILL NEED at least 39MB free on /system to do it! I have no idea if it's even possible to get this on GB partition layout
Link: http://db.tt/daf7KCmD
If you did this and it worked, press thanks and let us know.
reserved
reserved
I will try but it look too hard
Enviado desde mi LG-P990 usando Tapatalk 2
It is working thanks.
how do you unlock youre phone in the dark on lights off???
You just don't
It's really great that you write this to help others, but there is no need in such long instruction. Why just not to say easier:
1. Download lates ics gapps: http://goo.im/gapps/gapps-ics-20120429-signed.zip
2. Copy-past folders "optional/app" and "optional/vendor" into device system folder. (There is no need in addon.d on a stock rom)
3. Copy-past optional/noneon/lib/libfacelock_jni.so into system/lib folder. (There is no need to replace other libs)
4. Change permissions for system/app/FaceLock.apk and system/lib/libfacelock_jni.so to 644 (-rw-r--r--) (just look how it is set for other files in these folders).
5. Reboot.
I tried earlier to extract the face unlock files from gapps, but it didn't work for me... This way it works perfectly, thanks!
working thanks.........
mivv said:
how do you unlock youre phone in the dark on lights off???
Click to expand...
Click to collapse
Facelock always have a secondary method of PIN number. If facelock fails you can enter PIN number (numeric code) and it unlocks,
Has anyone tried this on CM10... I guess I will be the first then would be nice a .zip to flash
louiscypherbr said:
That's true! Perfectly working on my stock rooted ICS for 24h+!
This mod is for test porpoises only. Although I'm using it with success right now, I can not guarantee you that it will work, so:
I'm just reproducing the method I used to make it works on my own device. I have no intentions of being a developer, I don't wanna any donations and I'm not encouraging you to try this, and I'm warning you this can potentially brick your device. So, if even knowing this you assume these risks, be warned that I'm not responsible for any problem you could have trying to do this. In short: do it by yourself!
It works on my stock ICS with rooted system.img, and I did as following:
- Backup your internal SDcard, because if anything goes wrong, you will have to use smartflash/nvflash to recover your phone, and your internal sdcard can be formated if you need to reinstall your system.
- Download ES File explorer from market (of course this is for not so advanced user, since they don't need this instructions)
- Enable all root options on it (menu, settings, root settings, check all the three first options)
- Click on the zip you downloaded from here
- Unpack the system folder from the zip attached to your sdcard
(on ES File explorer, click on "select" button, than on "system" folder, than on "extract" button)
- Go to /data
- Create a new dir called ICS
- Move the extracted "system" folder to /data/ICS/
- Enter /data/ICS/system
- There should be 4 folders: addon.d, app, lib and vendor
- Enter addon.p, long-click on 71-gapps-faceunlock.sh, click properties
- Change its properties to owner:read, write and execute; group: read, execute; others: read, execute
- Go back to /data/ICS/system, enter app folder
- long click on FaceLock.apk and change its permissions to owner:read, write; group: read; others: read
- Go back to /data/ICS/system, enter lib folder
- Change the permissions as you did for FaceLock.apk in all the 9 files, one by one, inside this folder
- Go back to /data/ICS/system
- Click on select, than select the four folders, than on CUT
- Go to /system (note: now it's /system, not /data/ICS/system anymore)
- Click on "Paste", confirm the changes on all the files/folders
- Reboot
Well, at this point, if you are a lucky guy and didn't get a 90% of a bootloop chance, you should be able to change your lockscreen to facelock.
I have no idea if this will work on tonyp/harsh's stock ICS flashable zip, because I don't have it to test. It should work since they are almost the same rom, however they have deleted a lot of LGs stuff to make the zip flashable on GB partition layout, so you can try it (the zip itself should be flashable on CWM), however:
- DO A NANDROID BACKUP firstly and
- YOU WILL NEED at least 39MB free on /system to do it! I have no idea if it's even possible to get this on GB partition layout
Link: http://db.tt/daf7KCmD
If you did this and it worked, press thanks and let us know.
Click to expand...
Click to collapse
From your description it seems that you are more elaborative person so i need on help?
Stefen has give some instruction to root V28G Rom using NVflash but i am unable to find the meaning of those commands available in NVFlash
can u peovide me step by step along with commands to save system partition and all..............
i've just flash it on my 28g (samrtflash install) and work like a charme! thx
I get an error about the end, I can't move "VENDOR" folder into system, says it cannot move vendor folder.... any idea?
after rebooting I tried faceunlock, it was there but unable to initiate, then i tried again to move the VENDOR folder, i could now, after a reeboot still doesnt work
Anyone willing to test it in CM10?
Face unlock works
It's working on 30a version, did exactly the same way just copied the files from the folder to another. Will try in the morning if it can read the face easily as its night at my place now. Thanks

[SOLVED]How to convert system.sin to system.img?

Been looking around and I cannot get info(or I may have missed it) on how to convert system.sin to system.img.
The reason I want the system.img is I'd like to try deodexing my own JB(HKversion) stock rom.
how can I manage it in dsixda's kitchen, it says I need a system.img or either one of the following:
The format for each ROM must be one of the following:
- system.img + optional boot.img/lib.img (e.g. stock ROM or Nandroid)
- ZIP file for a custom ROM (e.g. update.zip)
- ZIP file containing *.img (e.g. stock rom.zip)
- ZIP file containing shipped ROM in SYSTEM + BOOT folder format
- Working folder made with this kitchen (e.g. WORKING_old_rom)
What I've already done so far was pulled out the system.sin from an FTF and made it system.ext4 in flashtool. And I also have extracted all the system files but I don't know how to go from here LoL.
Thanks in advance for any inputs guys.
Rycon33 said:
Been looking around and I cannot get info(or I may have missed it) on how to convert system.sin to system.img.
The reason I want the system.img is I'd like to try deodexing my own JB(HKversion) stock rom.
how can I manage it in dsixda's kitchen, it says I need a system.img or either one of the following:
The format for each ROM must be one of the following:
- system.img + optional boot.img/lib.img (e.g. stock ROM or Nandroid)
- ZIP file for a custom ROM (e.g. update.zip)
- ZIP file containing *.img (e.g. stock rom.zip)
- ZIP file containing shipped ROM in SYSTEM + BOOT folder format
- Working folder made with this kitchen (e.g. WORKING_old_rom)
What I've already done so far was pulled out the system.sin from an FTF and made it system.ext4 in flashtool. And I also have extracted all the system files but I don't know how to go from here LoL.
Thanks in advance for any inputs guys.
Click to expand...
Click to collapse
Just rename it.
That works if you want to use system.sin in dsixdas kitchen to make your own rom.
The instructions say to rename system.sin to system.img
PS, in fact you can just use system.sin, check in the first post for supported devices, it tlks about what to do for sony phones
gregbradley said:
Just rename it.
That works if you want to use system.sin in dsixdas kitchen to make your own rom.
The instructions say to rename system.sin to system.img
PS, in fact you can just use system.sin, check in the first post for supported devices, it tlks about what to do for sony phones
Click to expand...
Click to collapse
- If using stock FTF for kitchen:
1) Unzip FTF file, extract the system.sin
2) Dump system image from system.sin w/ Flashtool
(Advanced-> SIN Editor)
3) Rename dumped file to system.img
mate, I tried renaming it and put it on "original_update" folder but still the file cannot be detected I still cannot create a working folder and says
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
?
I also tried renaming the flashtool's dumped data(system.ext4) to system.img but still to no avail.
Any other way aside from system.img thing?
Rycon33 said:
- If using stock FTF for kitchen:
1) Unzip FTF file, extract the system.sin
2) Dump system image from system.sin w/ Flashtool
(Advanced-> SIN Editor)
3) Rename dumped file to system.img
mate, I tried renaming it and put it on "original_update" folder but still the file cannot be detected I still cannot create a working folder and says
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
?
I also tried renaming the flashtool's dumped data(system.ext4) to system.img but still to no avail.
Any other way aside from system.img thing?
Click to expand...
Click to collapse
wait, let me boot into linux and I will check
gregbradley said:
wait, let me boot into linux and I will check
Click to expand...
Click to collapse
mate, btw I'm only using cygwin in win7 if that matters on my issue
Rycon33 said:
mate, btw I'm only using cygwin in win7 if that matters on my issue
Click to expand...
Click to collapse
No, it doesnt matter, I did it with that setup, but its much easier with a ubuntu dual boot.
What you did should work.
Extract system.sin
Dump it with flash tool to get system.ext4, rename to system.img and put in original input folder.
then choose create working folder....
try it again,
gregbradley said:
No, it doesnt matter, I did it with that setup, but its much easier with a ubuntu dual boot.
What you did should work.
Extract system.sin
Dump it with flash tool to get system.ext4, rename to system.img and put in original input folder.
then choose create working folder....
try it again,
Click to expand...
Click to collapse
thanks mate, after I re-do the dump-data in flashtool, now system.img(renamed from system.ext4) can be detected
got another question again, just to confirm what's the API level? is it 16 for Android 4.1.2? coz I only see 4.1.1 for level 16
Rycon33 said:
thanks mate, after I re-do the dump-data in flashtool, now system.img(renamed from system.ext4) can be detected
got another question again, just to confirm what's the API level? is it 16 for Android 4.1.2? coz I only see 4.1.1 for level 16
Click to expand...
Click to collapse
if you have the latest version of everything it should be OK.
Just give it a go and see...
I used the same setup I have for my latest release as I did for my original ICS release, so the api level should be OK
EDIT
I do love your sig pic, where did you get it from? Or did you make it yourself?
gregbradley said:
if you have the latest version of everything it should be OK.
Just give it a go and see...
I used the same setup I have for my latest release as I did for my original ICS release, so the api level should be OK
EDIT
I do love your sig pic, where did you get it from? Or did you make it yourself?
Click to expand...
Click to collapse
with regards to my sig banner, i got it from one of the post from G+ last time, here's a copy of the actual file -> https://dl.dropbox.com/u/28587036/Android/Android_Evolution.jpg
ok I used 16, another question , what will I do to the one file that was never deodexed? it is the playstationcertified.odex
Could not deodex the following (you can try to deodex these files again):
playstationcertified.odex
A summary of the deodexing has been logged in deodex_040813_020606.log
71 *.odex files remain in system/app
1 *.odex files remain in system/framework
Rycon33 said:
with regards to my sig banner, i got it from one of the post from G+ last time, here's a copy of the actual file -> https://dl.dropbox.com/u/28587036/Android/Android_Evolution.jpg
ok I used 16, another question , what will I do to the one file that was never deodexed? it is the playstationcertified.odex
Could not deodex the following (you can try to deodex these files again):
playstationcertified.odex
A summary of the deodexing has been logged in deodex_040813_020606.log
71 *.odex files remain in system/app
1 *.odex files remain in system/framework
Click to expand...
Click to collapse
I have always just left it in for my releases, but seeing as I dont use it, i have personally deleted both the file and the odex file.
I think its the same for all stock based roms...there will be some aditional sony security on that file as it enables you to download sony play station games so the kitchen is not set up to integrate the odex file into the original one.
gregbradley said:
I have always just left it in for my releases, but seeing as I dont use it, i have personally deleted both the file and the odex file.
I think its the same for all stock based roms...there will be some aditional sony security on that file as it enables you to download sony play station games so the kitchen is not set up to integrate the odex file into the original one.
Click to expand...
Click to collapse
oh ok.
mate, apologies for many questions, this is my first try so I'm still confuse of many things
so after I de-odexed, what's next?
> ADVANCED OPTIONS
11 - De-odex files in your ROM
12 - Tools for boot image (unpack/re-pack/etc.)
13 - Add /data/app functionality
14 - Add /etc/init.d scripts support (busybox run-parts)
15 - Unpack data.img
16 - Sign APK or ZIP file(s)
17 - Convert update-script or updater-script
18 - Plugin scripts
99 - Build ROM from working folder
0 - BACK TO MAIN MENU
basically I only want a deodexed ROM and the CWM and root retained
Rycon33 said:
oh ok.
mate, apologies for many questions, this is my first try so I'm still confuse of many things
so after I de-odexed, what's next?
> ADVANCED OPTIONS
11 - De-odex files in your ROM
12 - Tools for boot image (unpack/re-pack/etc.)
13 - Add /data/app functionality
14 - Add /etc/init.d scripts support (busybox run-parts)
15 - Unpack data.img
16 - Sign APK or ZIP file(s)
17 - Convert update-script or updater-script
18 - Plugin scripts
99 - Build ROM from working folder
0 - BACK TO MAIN MENU
basically I only want a deodexed ROM and the CWM and root retained
Click to expand...
Click to collapse
What do you want to do?
You cant do (12) use championshipswimmers kernel kitchen for that.
But i do suggest adding 14, and rooting it (thats in the main menu)
also, zipalign apks...but it will ask you to do that when you compile it
Other than that its up to you. Just try some different options out and see what you think...thats the best way to learn, if you see my releases, the first two versions were not released because I was learning and playing around with it
Make sure though that you dont use the updater script it produces, its wrong for our phones.
"Borrow" one from a working ROM in our dev section, just ask permission first.
Rycon33 said:
thanks mate, after I re-do the dump-data in flashtool, now system.img(renamed from system.ext4) can be detected
got another question again, just to confirm what's the API level? is it 16 for Android 4.1.2? coz I only see 4.1.1 for level 16
Click to expand...
Click to collapse
For android 4.1.2 api must be set @16 othervise it wont boot
Sent from my LT29i using xda app-developers app
gregbradley said:
What do you want to do?
You cant do (12) use championshipswimmers kernel kitchen for that.
But i do suggest adding 14, and rooting it (thats in the main menu)
also, zipalign apks...but it will ask you to do that when you compile it
Other than that its up to you. Just try some different options out and see what you think...thats the best way to learn, if you see my releases, the first two versions were not released because I was learning and playing around with it
Make sure though that you dont use the updater script it produces, its wrong for our phones.
"Borrow" one from a working ROM in our dev section, just ask permission first.
Click to expand...
Click to collapse
asterix005 said:
For android 4.1.2 api must be set @16 othervise it wont boot
Sent from my LT29i using xda app-developers app
Click to expand...
Click to collapse
ok mates, thank you very much, I managed to de-odexed my stock ROM:good:
This is what I did. Using flashtool, I dumped my system.sin file to get a ext4 file. Then I open it with ext4 reader and extracted the contents. I then placed it in a folder called 'system' and proceed with the android kitchen.
Humans have evolved to be smarter, but there's one thing we can't get rid off. It's human stupidity.
If you still want to deodex playstationcertified.odex rename it to com.playstation.playstationcertified.odex.
That did the trick for me in earlier firmware versions.
Sent from my phone using XDA Premium
i try many times but it's all show this
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
any idea or should i press enter to continue?
i try with system.img from xperia TX rom 1.67
lucky92 said:
i try many times but it's all show this
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
any idea or should i press enter to continue?
i try with system.img from xperia TX rom 1.67
Click to expand...
Click to collapse
why don't you press it an see?
anyway, have you used flashtool to extract the system.sin into an ext4 extension yet?
gregbradley said:
why don't you press it an see?
anyway, have you used flashtool to extract the system.sin into an ext4 extension yet?
Click to expand...
Click to collapse
i tried extract thee system.sin into ext4 and rename it to sysmtem.img but no luck
update: after re-dump system.sin and press countinue, it's seem ok, maybe my fault.
Thank you anyway :laugh:
Sorry but I have another question, after i make a flashable zip and flash through CWM, it always stuck at Sony logo, any idea ?

[Q] How to enable mass storage in CM 10.1 ?

Does anyone know how to enable USB Mass Storage on our phones under CM10.1? I've searched around and found this thread. But since I'm not familiar with changing build.prop I don't dare to do it myself. There are some CWM .zip files around to enable it, but they are on other phone's forums and I'm sure they just replace/change the build.prop so it's definitely not a good idea to flash those on a different phone than the ones they were intended for....
Long story short, does anyone know how to enable it on ours?
TIA!
Update on the process:
I was able to edit the build.prop according to the instructions, but that alone doesn't seem to do anything.
So I decided to try the next step, but where it tells me to do the changes below I wasn't sure what to do.
Thom75 said:
in framework-res.apk/res/xml/storage_list.xml
where oryginal line look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:maxFileSize="4096" />
after change look like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" android:maxFileSize="4096" />
Click to expand...
Click to collapse
I was able to find the framework-res.apk file, copied to my computer and tried to open it with an XML editor... looked too complicated so I left it alone.
Does anyone know how to mess with that?
Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you
Sivvis said:
Open the .apk file with WinRar
-Drag the file you want to edit on your computer
-Edit the file on your computer
-Delete the old file in Winrar from the apk file
-Put the new file from your computer back in Winrar and save the "new" apk file
-Put the new .apk file on your smartphone
Before you install the new .apk file take a Root Explorer and look at the permissions of the old .apk file and set this permission on the new once...
I hope i could help you
Click to expand...
Click to collapse
Thank you very much for your help! I didn't know apk files were just a compressed library of other files.
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
I attached the file below:
Apoena said:
Now I am stuck trying to edit the "storage_list.xml" file... I tried to open with a few different xml editors, but could not get clean text like the example before. Any sugestions?
Click to expand...
Click to collapse
Well, how about decompiling the .apk file with APK Tools instead of just opening it with WinRar? :laugh:
Yes, now I get a clean, editable, decompiled xml file.
I'll try editing both when I get home tonight and will post the results.
I guess this is a problem because of the emulated layout. There is a trick with setprop sys.usb.storage.config mass_storage but it does not work.
Keep me informed if you find something valuable (i'm on original CM10.1, latest nightly 0423 actualy).
Ok, here's the update from last night:
I started over since I flashed the nightly, which is good so I restarted with a clean slate.
- Edited build.prop - OK
- Copied framework-res.apk to my computer
- Decompiled framework-res.apk
- Edited storage_list.xml
- Recompiled framework-res.apk with new storage_list.xml
- Copied framework-res.apk back to my phone
- Deleted original framework-res.apk
- ...... instant restart & bootloop before I could paste the new framework-res.apk in its place
No big deal, just restored a nandroid backup I made before messing with anything and I'm back in business.
Apparently you can't mess with the framework-res.apk while your phone is on (with the OS running)... so now I need to research the right way to push/pull these files from ADB while on CWM recovery. I appreciate if someone could point me in the right direction since I'll be busy at work today.
To be honest, my gut feeling tells me that this is not going to work anyway. But look at what I learned so far... two days ago I wouldn't even think of compiling/decompiling anything... this is what XDA is all about, right?
Imho, the framework_res.apk and various tricks are all enabling or disabling a sys.usb.storage.config key. I'm not understanding nor finding informations about CM10.1 emulated layout, and if there are any reasons to forbid mass storage (because, yes, it seems it is disabled because it is not compatible).
This is something i have hard time with. On Android, you have tons of improvement for rom or kernel XY, but generally undocumented. If you apply this 'per device', the information is very fragmented and difficult to grab.
I was looking for a simple brief on base MTD partitions layout for LG P880, it seems the only way to have this is to dig KDZ files. Perhaps a Wiki would help the wannabe contributers like me to start ?
Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????
Nooby305 said:
Any Solution For This Problem ??? I Can't Transfer Any Files To My O4X , What's The Point Of Cyanogenmod Then ??????????????
Click to expand...
Click to collapse
Flash the latest nightly. MTP is working and you cab transfer files that way.
Sent from my tree using a ladder
effectively, if you are flashing for USM, you should stay on LG stock.
I know that the topic got a little old but I'd like to refresh it since more people (e.g. Ubuntu users) could be interested in enabling Mass Storage.
What I've done is:
1) pulled /system/framework/framework-res.apk
2) decompiled it with APKtool
3) added
Code:
android:allowMassStorage="true"
in storage_list.xml
4) builded a new apk
then I've rebooted my phone into recovery and (@Apoena you may be interested in it - there is a possibility to access /system through adb connected with phone in recovery mode) pushed the new framework-res.apk. I've also changed the entry in build.prop to
Code:
persist.sys.usb.config=mass_storage,adb
Everything seemed fine until I've tried to reboot the phone: instead of CM boot logo I got a black screen. Anybody has an idea what went wrong (maybe something during recompilation of the apk)?
And of course sorry for any language mistakes, I'm not a native speaker

[Tutorial]How To Swap Internal & External Storage (Xperia 2012)

[Tutorial]How To Swap Internal & External Storage​This Swap Mod is based on This Thread
So Thanks and Credit should be Kyrie1965
I think this mod will be compatible with all stock rom and stock based custom rom (I already tested on Stock ROM, Revelation HD, and some people already used at Warrior ROM). This mod compatible with XT, XTX and XV
....and maybe with another Xperia 2012 Phone lines​
ATTENTION:
I'm not responsible with any problems of your phone/sdcard, or any effect that could be happen.
Please make CWM Backup before do any mod.
And it's would be better if you make backup of your sdcard or internal storage first.
Wtih this mod, System will work as default, SDCard0 will still be Internal Storage, SDCard1 will still be real SD-card or Ext_Card. But after flash this mod, you can move installed apk to SDCard1 or External Storage through Titanium Backup.
You can look all your storage under /mnt folder by any File Explorer for Rooted Device from Playstore.
Here we go......
WHAT WE NEED?
Deodexed ROM
Apktool 4.2.2 : How to Decompile/Compile/Sign Apk/Jar from Rizal Lovins, see this thread
Winrar
Windows File Explorer or Total Commander
Environment.smali, download here
HOW TO
STEP 1 - PREPARATION
Follow instruction from Rizal Lovins thread, prepare any files needed (Android SDK, Apktools and Notepad++) and installed them all
Pull out your framework.jar files from /system/framework folder and copy to PC (Apktool folder)
STEP 2 - FRAMEWORK EDITING
Extract framework.jar
Goto extracted framework.jar folder and copy classes.dex file to root Apktool folder. You may renamed classes.dex
Extracting classes.dex
Open readme.txt and copy this line : java -jar baksmali-1.3.3.jar -o classout/ classes.dex
At Apktool root folder, press SHIFT + RIGHT MOUSE BUTTON and "Open Command Window Here"
Paste at Command Window and ENTER
Goto Extracted Classes.dex folder
Copy attached environment.smali to \android\os folder
Repacking classes.dex file
Open readme.txt and copy this line : java -Xmx512M -jar smali-1.3.3.jar classout/ -o new-classes.dex
Here a repacked new classes.dex file
Push new-classes.dex into framework
Open framework.jar with Winrar
Copy new-classes.dex file into framework
Delete original classes.dex file and rename new-classes.dex file to classes.dex
STEP 3 - FINISHING
Copy edited framework.jar into /system phone folder
Set permission rw-r--r--
Move to /system/framework
Restart to CWM, wipe cache and wipe dalvik
RESULT :
Thanks To :
Rizal Lovins for this thread
Kyrie1965 for this thread
Great People at http://forum.xda-developers.com/
Reserved 1
Reserved 2
I'm sorry for asking, but why should we swap INternal and sdcard? because heavy app's data files are stored in sdcard while Xperia V's internal memory is lower than its sdcard (1.97vs 3.65 Gb) so...? Can you get this straight for me?
Thanks in advance
Dis mod help phone with lower internal.... Like V has lower internal memory, swapping external memory to Internal memory gives tha internal memory more space... Yur SD Card will be seen as internal memory!!!
sent from tsubasa using XDA 4 app
---------- Post added at 12:19 AM ---------- Previous post was at 12:18 AM ----------
Thanks for dis mod buddy.... Will try ot it out on when am on PC!!!
sent from tsubasa using XDA 4 app
works like a charm buddy.....
but i notice dat all my files in SDCard1/Android re also present in SDCard0/Android
is dat how it works?
What do I do to extract the classes.dex? I get error with 7zip and winrar
Can you help me modify my files? : D
Rojikaft said:
What do I do to extract the classes.dex? I get error with 7zip and winrar
Can you help me modify my files? : D
Click to expand...
Click to collapse
using dis tool buddy.... http://forum.xda-developers.com/showthread.php?t=2195680
but if yhu like, yhu can post yur framework.jar, i ll help!
This and thank you!
Rojikaft said:
This and thank you!
Click to expand...
Click to collapse
rename & give it a shot brov... dnt forget to fix permission!
http://www20.zippyshare.com/v/98517129/file.html
whalesplaho said:
rename & give it a shot brov... dnt forget to fix permission!
http://www20.zippyshare.com/v/98517129/file.html
Click to expand...
Click to collapse
Thank you! works fine!
Rojikaft said:
Thank you! works fine!
Click to expand...
Click to collapse
enjoy mate...... my pleasure!!! :highfive:
is there any workaround for 4.3 framework.jar?
Still sort it, totaly different framework.jar on JB 4.3
Important
thunder888 said:
Still sort it, totaly different framework.jar on JB 4.3
Click to expand...
Click to collapse
Please Let Us Know When U Can Do The Swap MOD For JB 4.3 >> Cause I'm Not Going To Update To JB 4.3 Unless The Swap MOD Work With It
Thanks Bro
me too havent update...... dnt think tha script one will work too!
sirkay said:
is there any workaround for 4.3 framework.jar?
Click to expand...
Click to collapse
Did anyone find a way to do this on 4.3? Am also reluctant to upgrade until its possible.
thunder888 said:
Still sort it, totaly different framework.jar on JB 4.3
Click to expand...
Click to collapse
Is the only thing you changed in framework.jar 'sdcard0' to 'sdcard1' and 'EXTERNAL_STORAGE' to 'EXTERNAL_STORAGE_DUMB'?
The only lines in Environment.smali that could need changing are: (EDIT: changing EXTERNAL_STORAGE in environment.smali results in bootloop)
Code:
.field private static final ENV_EXTERNAL_STORAGE:Ljava/lang/String; = "EXTERNAL_STORAGE"
.............
const-string v1, "EXTERNAL_STORAGE"
and inside Environment$UserEnvironment.smali (Edit: changing these make no difference!!)
Code:
const-string v7, "EXTERNAL_STORAGE undefined; falling back to default"
invoke-static {v6, v7}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 128
const-string v3, "/storage/sdcard0"
would changing this in theory work? I haven't installed the rom yet as want to know there is a possibility to swap storage first.
I don't want to move the entire 10GB of sdcard0 into internal memory. What do I need to modify in this process to end up with about 3GB of internal storage and the rest as sdcard0?

Categories

Resources