Problems when installing app in external memory and using swap partition - Moto E Q&A, Help & Troubleshooting

First of all I want to beging telling that my device is locked and it is a Moto E XT1021 1st generation. Previously of this locked state, it was unlocked and it had the following files to made the flash via fastboot installed gpt.bin, boot.img, NON-HLOS.bin and fsg.mbn from the Moto E android 5.1 of the 23.201.3.condor_retuglb.retuglb.en.US version (condor_retuglb-user 5.1 LPCS23.13-34.8-3 1), and the rest of the installed files where from the version 23.201.3.condor_tefla.tefla.en.01 (condor_tefla-user 5.1 LPCS23.13-34.8-3 3) @lost101 That’s how I solve my connection problem here in Venezuela. My phone come from USA and contradictorily as it seems it works well with the basebends of USA and not with the ones of Latin americans, in internet to users that are from argentina and which cellphones comes from France, their cellphones works great with the bands of Europe and not with the bands of latin America, here is a post that narrates the same issue in a differen situation
HTML:
https://www.taringa.net/comunidades/motoe/9278193/Ayuda-Motorola-moto-e-XT1023-no-recibe-senal.html
. Do you thing that this could be a contribution to the community? Well, returning to what I was telling after doing some modifications in my cellphone with busybox, Mount2sd, and swapper 2 when I reboot it using a personalize key set up by xedege by jozein, an xposed module, it started in fastboot mode and the status of the device is LOCKED, and when I started it up by Normal power it appears Failed to initialize partition table, when I start it up in recovery (I had twrp recovery) it said boot image fail or something like that and invalid recovery image, when I started it by factory it also appears boot image can’t be executed (it’s something that means this) and invalid boot img and the same with the rest of the otion except for Barcodes where my IMEI appears to be 00000…., you can’t erase, flash or boot nothing via fastboot it all shows invalid validation and Fail or something similar and when I entered fastboot oem get_unlock_data it throws Could not access to unlock data! Please help me, here in Venezuela because of the miserable value of Bolivares, cellphones are unbuyable.
P.D. I have found these threads: https://forum.xda-developers.com/moto-e/help/device-locked-status-code-0-t3534725, and https://forum.xda-developers.com/moto-e/help/moto-e-fastboot-device-status-lock-t3471046, if you think that in one of those is my solution please tell me. I'll read them next day. I'm very tired today.
What I did with busybox?
Just installed it via recovery and from a zip file. I installed the 1.24.2 from Stericson.
What I did with mount2sd of spaze dog?
I downloaded Mount2sd app and installed it in my cellphone and also installed its scripts, because all my applications where being installed in my external sd and I had enough free space for some other app in my internal memory I tried to force android to install application in my internal memory executing adb shell in the CDM of my windows computer and when it appears the terminal I wrote su pm set-install-location 0 but it shows location not found, the same for 1 or 2 location. The next thing that I do was to uninstall mount2sd, I didn’t unistall mount2sd binaries, and remove my sd card and install some apps in my internal sd, then I mount again the sd card, and install Mount2sd app and install another application and it goes to the internal memory. Mount2sd said that External storage was not mounted 0 GB of 0GB, The threshold thing also appears 0GB of 0GB, so in settings I activate fix (activate it if you have problems with threshold, that was what it had said this option, and is under use busibox binaries). I also activate Swap in Mount2sd.
I read here in XDA, that making a card partition by Partition wizard tool or a custom recovery other than 4ext for HTC phones are of bad quality or can damage your memory card, and that a correct way to do this is using gparted, specifically gparted live, to execute from the dvd player when you start up your machine so I did it this way. I made three primary partition and when they were created all said write in or something like that in dev/mmcblk0. Once the partitions had finished they showed the following information: 1st fat32, 6.15GB, path: dev/sdb1; 2nd ext4 , 1GB, dev/sdb2; 3rd linux-swap, 255MB, dev/sdb3. I don’t know if these strange path could affect Mount2sd or Swapper.
The question is, Is really better doing a partition with gparted? And if it is this way, how can I use this partition to install apps in my external sd card? If it is not better to partition an sd card with gparted I could let my applicatons installed or moved, for me they are for the same purpose, by doing the card partition by twrp and using Link2sd, thing that I did satisfactorily previously.
What I did with swapper 2, version 0.2.8.r2 by Elvis KuAitans?
In settings I checked Run swapper at start up. In advanced preferences I checked swap partition, and in swap location I tried Dev/block/mmcblk0, dev/block/mmcblk?, dev/bock/mmcblk1p3, and dev/block/mmcblk1p? withn insatisfactory results showing in the screen after I pressed On in the principal screen of the application dev/block/… invalid argument or something like that and FAIL. I also had wrote the correct location of busybox in the space set for this in the application. How can I get use swap partition as ram with the previously partition of the sd card? And if it is not better this partition how can I do the same thing? Do you think that I shouldn’t have problems if I made the partition via TWRP?
When I reboot my cellphone it occurs what I described first. Please, tell me that there is a solution, I heard bad things about this lock state. I already appreciate your help. I can also pray for the ones who help me (really I can do this). Thank you.

Related

Followed instructions to install cwm but didnt work - Windows

Hey guys im a bit frustrated right now:
ive created the partitions just like in this guide:
http://forum.xda-developers.com/showpost.php?p=22201029&postcount=43
Ive got 2x Ext4 partitions and an active primary fat32 with about 100megs on it. You can find some screenshots in the attachments.
The Problem is if i restart my nook it doesnt pop up with cwm, it just normaly boots.
Did i forget something?
To make it boot you need to active the LBA flags, but i think 7. Right click on the new Primary partition and make sure "Set Active" is selected from the Modify submenu step is the equivalent of LBA flags in gparted ubuntu but i could be totally wrong. That is an important step. That is the hint
~ Veronica
yea i have done that, next to the "Primary" it says "active" so yeah..
Try rebooting the NT with the USB cable attached to the computer. This has worked for a few people.
yea tried that to but didnt change anything :/
That being the case, I'm sorry to say that you probably have a messed up partition, flag or something else is wrong with the SD card or it's structure.
I would recommend (although it is more work) that you try the Linux Partition method. The additional work will come from having to find a bootable version of Linux.
I created a brief outline of various methods HERE. Perhaps you could one a go and use Gparted instead of Windows to partition the SD.
It's worth a shot.
thanks ill try tomorrow
EDIT: ignore post.
Sent from my BNTV250 using Tapatalk
well i tried again to put these files on, this time using ubuntu and it still doesnt boot. ive setted the flags and put the files from http://forum.xda-developers.com/showthread.php?t=1446987 into my "root" partiotion which has the boot flags and so on but it still doesnt boot cwm. Do i need to press any keys while booting?
My Nook Tablet is rooted btw, should i do a factory reset and maybe make a movie? I really dont know what more i can do
Try the following (Linux) to unzip the files and get them on the SD. This could be the problem. Simply opening them and dragging them might not properly decompress them. Thank you to CelticWebSolutions for the following steps which I copied from the CM7 Rom Thread.
Open a terminal window and issue the command:
sudo file-roller
You will be asked for your password and after that a zip software window will open up, click open open and find the file "NT-CWM-SD.zip".
Drag all the files form this archive into your newly created system partition on your sd.
This can take a couple of minutes to actually complete so be patient, often it looks like it's finished but it's still copying in the background.
Close all windows and right click on your SD card on the desktop and select to "safely remove drive" if files are still writing to the disk it will warn you and the warning windows won't disappear until the files have finished writing to you SD.
Make sure you leave the SD in there until this process has finished otherwise your card probably won't work.
do you mean system partition or boot partition?
Edit:
my created partitions are all primary:
first partition with the cwm files on it: 50MB - Primary - FAT 32 - boot and lba flag
second partition: nothing on it - 2000MB - Primary - EXT4 - no flags
third partition: nothing on it - 2000MB - Primary - EXT4 - no flags
Pain12345 said:
do you mean system partition or boot partition?
Click to expand...
Click to collapse
Boot. My bad on choice of words. Bottom line is the card should look the same as the first one you tried. I'm only trying to insure that the files get extracted properly.
Also, to eliminate possible variables that may be causing yourissue, make sure the USB cable is plugged in when you try to boot.
Fingers crossed.
yea copied the files like you said and it still doesnt work. The nook does start and instantly boots "nook reader" not cwm. I really dont know what mroe i should do, i might record a movie if im home.
While booting the nook i have connected the usb cable
Thats how my partitions look like:
first partition with the cwm files on it: 50MB - Primary - FAT 32 - boot and lba flag
second partition: nothing on it - 2000MB - Primary - EXT4 - no flags
third partition: nothing on it - 2000MB - Primary - EXT4 - no flags
Edit2:
i didnt fill the sdcard with zeros, should i do this b4 partitioning?
Also my Nook is rooted, does this matter?
Indirect's APK?
I couldn't get the SD card method to work either and then I found Indirect's APK and that worked perfectly, just a thought... It's in the development section.
Really trying to help you here. Honestly I have never used the method in the actual CWM thread but I have successfully on two occasions created bootable SD cards. It is my understanding that it is the way the card is partitioned that tells and allows the system to "boot" from it. That said I have copied the instructions from the CM7 Rom thread below which use the Linux GParted partitioning method. Not having the SD card setup properly is the only thing I can think of to help at this point besides perhaps that you have a bad card. Try the below (which it sounds like you already have) just to be 100% sure the card is setup properly.
Delete all partitions on your SD card first using GParted and use the following
------------Thanks CelticWebSolutions--------------------
Open GParted select your SDcard in the top right hand side of the window.
Select create partition table form the device menu select the empty space on the newly wiped SD card and click the paeg icon with a green plus on it, a window will appear with some boxes to fill in, change the box that says New Size (Mib) to 50, Change file system to Fat32 and write boot in the label., then click add.
Again click on the unallocated space and add another partition as around 2000(MiB) as EXT4 and label it as system (LandMaster Note: Not needed for CWM only)
Add a 3rd partition in unallocated space again of about 2000(MiB) EXT4 and label it as data. (LandMaster Note: Not needed for CWM only)
now you have three partitions waiting to be created click the green tick to apply your changes
Once changes have applied right click on boot and select the menu item 'Manage Flags', tick boot and lba and close the window, your SDCard is now ready to get it's data for it to work
-------------------------------------------------------
You DONT even need the 2nd (system) and 3rd (data) partition as outlined above if all you want is a bootable CWM. Just one (I used 74MB) MS-DOS (FAT32), Active Partition with "boot" and LBA" flags set.
Lastly, since you are rooted you could always flash the internal recovery partition with CWM using the method in This Thread and get into CWM by clicking reboot recovery from within the app.
I never did ask .... What is your ultimate goal?
I spend a few more hours to it and it still doesnt work. Via the app i can run cwm but only via the app. The goal is that i have a working recovery sd card if i brick my nook..
I installed ubuntu on my computer and i did exactly the same steps like you have posted but it wont work. Ive also tried multiple other sd card but that didnt change anything
Maybe any development settings on the nook that i should change?
As i live in germany would maybe anyone of u sell me a working sd card with cwm on it so i can test?
Pain12345 said:
I spend a few more hours to it and it still doesnt work. Via the app i can run cwm but only via the app. The goal is that i have a working recovery sd card if i brick my nook..
I installed ubuntu on my computer and i did exactly the same steps like you have posted but it wont work. Ive also tried multiple other sd card but that didnt change anything
Maybe any development settings on the nook that i should change?
As i live in germany would maybe anyone of u sell me a working sd card with cwm on it so i can test?
Click to expand...
Click to collapse
Thats what I thought and it is a good plan. Unfortunately I'm stumped.
Albert Wertz is in the SD Card "business". Check with him to see about getting one.
FYI, now that you have CWM "written" to the internal recovery partition you should be able to enter recovery even if you can't boot the tablet to android.
N+Pwr from off condition should do the trick.
Pain, sorry, I just saw this thread. I made a small update to the instructions. I left out something which I thought was obvious. This was a fault on my part. Did you label each partition correctly? It should be BOOT, system, and data.
I used this method (don't forget the ext4fsd part) and it does work. But if you're still having trouble the CD-boot version of Ubuntu will work just fine too.
i allready have ubuntu running on a cd, in the past i labeld it "boot" (case sensitiv - all small letters) so this could be the fault?
Edit:
i can see that cwm work, it pops up 4 a half second or even less if i start the nook but than it instantly disappears
after installing cwm on my NT after that (my B&N store has been disabled and it doesn't let search, download, or view anything on the store..... has anyone a solution to this issue

[Q] Error mounting CD card via Link2SD

(Title of this should read SD card, not CD card)
I have read & tried every suggested method I've found on here & in web searches without success. I think the main reason may be the phone model.
I have a Huawei U8652, from Consumer Cellular (NOT AT&T Version) which I was able to root. I partitioned the SD card via mini-tool partition wizard using FAT32 Primary for both the Main & Ext2 partitions. However, when I open Links2SD I get the prompt to select the partition 2 which I choose ext2, then I get the "mount script error. mount: invalid argument". Sometimes it is busy/not available.
As I said I have tried EVERY single suggested method & each has a step that won't work or is not applicable to this phone.
Does anyone have any experience with a Consumer Cellular version of the Huawei U8652?
The end game is to remove bloatware & move apps to the SD card to remove the 'low storage' error that I got after downloading literally 1 app. (facebook). The phone is 2 weeks old. It has now been rooted with superuser & Link2SD installed successfully but I am still not seeing any free space.
Any help is greatly appreciated. I would be embarrassed to admit how many hours have been spent on this up to this point....
Thanks!

[Q] HTC Chacha/Cyanogenmod 11 Insufficient storage available. Tried everything

A few days ago I successfully installed the newest Cyanogenmod 11 for HTC Chacha.
When I installed it for the first time, I also installed the Link2SD app. After a while, I started getting the "Insufficient storage available" message, so I decided to do a hard reset and reinstall the mod.
Now I have it installed for the second time. At the beginning [this time I skipped Link2SD] everything was alright. Now I keep getting the message again.
Things I have done:
1. After installing Cyanogenmod, I partitioned the SD card and used the CronMod INT2EXT script. Right now my phone says that I have 203 MB of free storage.
2. I have tried the LuckyPatcher fix. It didn't work.
3. I have also tried the adb shell command. I have tried setting it both to 1 and to 2, none of which worked.
4. My app-asec folder is completely empty. The app-lib only contains the folders with the apps I have managed to install. The logs are not the problem either.
5. This happens whenever I try to install ANY app, no matter the size.
6. I have tried clearing the cache of both Play Store and Play Services. It didn't work.
7. What's weird is that at first, simply rebooting my phone worked and I was able to install 2 or 3 apps before getting the message. Right now I can't install anything.
Does anyone have any idea what else I can try?
Note: Somewhere in the process, after rebooting my phone, I found that the Google Services were gone. I had to flash it and reinstall it using CWM. I still don't know why they disappeared, right now they seem to be working fine, except now I can't get anything from the Play Store.
Thanks in advance for any solutions, I really appreciate it!
Check out this page:
http://forum.xda-developers.com/showthread.php?t=2735775&page=71
Grab the newest build of CWM and there's a guide there on how to use CronMod with it. I've modded some Wildfires for customers and definitely find CronMod to be the best all around solution for more space, if the SD card is up to it. Also, make sure you are partitioning the SD card the right way. I found that making the partition in Windows with a tool like MiniTool Partition just doesn't seem to work right. If you can use GParted in Linux (you can even do it from a LiveCD) then that seems to do a better job of it. Also make note of what type it is (ext2 / ext3 / ext4) with the appropriate CronMod script.
es0tericcha0s said:
Check out this page:
http://forum.xda-developers.com/showthread.php?t=2735775&page=71
Grab the newest build of CWM and there's a guide there on how to use CronMod with it. I've modded some Wildfires for customers and definitely find CronMod to be the best all around solution for more space, if the SD card is up to it. Also, make sure you are partitioning the SD card the right way. I found that making the partition in Windows with a tool like MiniTool Partition just doesn't seem to work right. If you can use GParted in Linux (you can even do it from a LiveCD) then that seems to do a better job of it. Also make note of what type it is (ext2 / ext3 / ext4) with the appropriate CronMod script.
Click to expand...
Click to collapse
How do I check the type (ext2/ext3/ext4)? And will choosing the right setting in Link2SD do the trick?
You know, I've checked the page of CM11 for ChaCha and the dev said that it's a bug that needs to be fixed - the perks of running a new software on an old device, so there's probably not much I can do.
Well, the tool you used to partition the SD card should tell you. Alternatively, your custom recovery should have an option to partition for you (this is better than Windows as well) and then it'll set it up as ext 2 at first and allow you to change it to ext 3 or 4.

[HOWTO] Use external SD card as internal storage in KitKat

Beware, this guide is more or less untested, it will interfere with stuff like memory encryption and OTA or other firmware updates. You have been warned, I assume no warranties for bricked phones, SD cards or lost data.
Many cheap-ass Mediatek phones ship with Android 4.4.2 or later and only ridiculous amounts of internal storage (2GB in my case, CAT B15Q). That may be enough for basic apps, but as soon as you install Navigon or other data-heavy apps (or WhatsApp with a load of videos) you're going to run out of space in no time - and because Google is a bunch of fools, they disallowed app installations to SD cards entirely in 4.4!
So, we're going to move /data in its entirety to our nice huge SD card and be able to use even bigger apps on small phones. It might be possible that this guide works on other phones, but that depends on how they boot and where the fstab and init.rc reside!
Prerequisites:
Mediatek-based 4.4.2 or later phone with root access in recovery (boot it in recovery, run adb shell, therein run id. If it says root, all fine. If not, install CWM)
A large enough SD card (I chose a 32GB card with a 50:50 split between /data and the "external sd card")
Solid Linux knowledge, one Linux PC and one Windows PCs. I urge you to NOT use any kind of VM unless you have experience with USB passthrough.
spFlashTool and the Mediatek drivers from http://forum.xda-developers.com/general/general/stock-rom-cat-b15q-rom-development-t2988774, for a flashing guide see http://forum.xda-developers.com/android/help/howto-firmware-flashing-cat-b15q-t2989627
mtkdroidtools from https://www.androidfilehost.com/?fid=23501681358558543 on the Windows PC
mtk-tools from https://github.com/bgcngm/mtk-tools on the Linux PC (no, Cygwin does not work, it messes up the permission bits), cloned on an ext4 partition (not sure if ext2/3 can handle the extended permission bits...)
a network connection between the PCs or a USB stick to transfer files
Take the sd card out of the phone and insert it into your computer. Many laptop SD slots don't like SDXC (>4GB), you might need e.g. a Huawei 3G stick or a SDXC-compatible USB dongle.
Repartition the SD card using Acronis Disk Director, gparted or whatever you're familiar with. The first partition must only be resized (this is the FAT partition), the second partition is a ext4 (!) partition. Both MUST be primary partitions. Acronis and other tools on Windows might require a reboot to repartition SD cards. I recommend a 50:50% split, but if you're heavy on apps or their data, you might go for a 25% FAT: 75% EXT4 split.
Boot your phone into recovery, connect to it with adb in a root shell.
Assuming your data partition is at /dev/mmcblk0p8 (look in /fstab to find it out, followed by mount /data and ls /data to verify), execute the command "dd if=/dev/mmcblk0p8 of=/dev/mmcblk1p2", wait until it is finished. This can take up to ten minutes or more, depending how much data there is.
Shut down the phone, take out battery and SD card.
Insert the SD card into your Linux machine, run resize2fs /dev/sdb2 (or wherever the ext4 sd card partition ended up, check it in dmesg) as root so that the filesystem grows; then eject the SD card and put it back into your phone
Readback your BOOTIMG partition, transfer it to the linux PC (or, if you already have a boot.img for your current firmware, use this one)
On the Linux PC, open a rootshell (to avoid permission issues when building the ramdisk).
Run "./unpack-MTK.pl /path/to/bootimg"
"cd boot.img-ramdisk" (directory might be named different, depending on how you named the bootimg dump file)
Using a text editor, edit the "fstab" file(s) (there might be multiple, with suffixes): From (adjust if needed)
Code:
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
to:
Code:
/dev/block/mmcblk1p2 /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
Now, edit the init.rc file (beware, other .rc files in the ramdisk root might also contain mount commands!).
Search for "on fs_property:ro.mount.fs=EXT4" and again replace /[email protected] (or whatever the node for /data had been) with /dev/block/mmcblk1p2 in the commands in this block (should be fsck, tune2fs,ext4_resize and mount).
Repack the boot image: ./repack-MTK.pl -boot boot.img-kernel.img boot.img-ramdisk/ /path/to/newboot.img
Transfer newboot.img to the Windows PC and flash it using spFlashTool
boot your phone, look in Settings->Memory to see if it went OK!
If the memory view didn't change, also modify the other blocks of on fs_property, in case your device does not use an ext4 rootfs (but yaffs or ubifs instead).
Functionality
It is a good idea, but
Are I still have part of it as external storage?
If yes, it means I can not remove it because there are some apps used it.
If no, it means I will not have external storage anymore!
e.ahmedmahfouz said:
It is a good idea, but
Are I still have part of it as external storage?
If yes, it means I can not remove it because there are some apps used it.
If no, it means I will not have external storage anymore!
Click to expand...
Click to collapse
The SD card is now both internal and external storage! You are not able to remove it because else your system will not boot anymore.
harddisk_wp said:
The SD card is now both internal and external storage! You are not able to remove it because else your system will not boot anymore.
Click to expand...
Click to collapse
what if the sd card is damaged ?
Can my phone boot again..or will booltloop
madthinker said:
what if the sd card is damaged ?
Can my phone boot again..or will booltloop
Click to expand...
Click to collapse
If you manage to kill your sdcard while you have my sdcard hack installed, then the phone will bootloop until you insert a new sd card partitioned just like the old one. Then it will act like you had factory-resetted it.
Alternatively you can always reflash original boot.img/recovery.img and use the phone with limited internal memory.
harddisk_wp said:
If you manage to kill your sdcard while you have my sdcard hack installed, then the phone will bootloop until you insert a new sd card partitioned just like the old one. Then it will act like you had factory-resetted it.
Alternatively you can always reflash original boot.img/recovery.img and use the phone with limited internal memory.
Click to expand...
Click to collapse
i see, thanks to explain me :good:
There is another way to get more space: Link2SD (2.- euros) with a second partition on your external SD-card exactly like shown above (ext4 partition, primary).
The advantage is, that if the sdcard is faulty the system still runs, just the apps which are symlinked to the ext4 partition won't run.
So I use this for all these not absolutely important apps which needs lots of internal memory, e.g. kindle bookreader, Amazon, WhatsApp etc. I dont use it for all apps, most importantly not for any app, where there is no alternative. Last week my two years old 64 GB MicroSD card (SanDisk, with warranty 10 years) in my SGS4 stopped working and this could happen all the time. They are not that reliable I think, that I would put my system on it.
I did this now with the Cat B15Q of my friend.
EDIT: and she has now more than 1 GB free internal space
I think this is the best solution, 2 GB for the pure ROM and the system apps is more than enough and all user apps go to the external sd-card (2nd partition).
good day!
hope you can help me.
what if i want vice versa? because my phone's default storage (0) is sd card.and i want my default storage will be its internal since it is 32gb rom. tried all ways but i think the answer is its boot.img. thank you..hoping for a help

[MOD][STOCK] Int2Ext.mikewse for Xperia 2011 Stock ICS firmware

ABOUT
This is a solution for the dreaded warning about running low on internal memory on 2011 Xperia phones. My own Xperia Mini Pro has only 420MB of internal storage and this fills up quickly when installing apps. In this post I provide instructions and scripts to use the external SD card to extend the available internal storage, a so called “int2ext” solution which there are many flavours of.
The goal has been to solve the storage problem while at the same doing as small changes as possible to the system as possible (not unlocking bootloader, not installing custom recovery, etc).
Note that when the SD card is used to extend internal storage you should never power on the phone without the SD card inserted. Failing that you will probably need to factory reset and start over with the installation.
The whole 2011 Xperia range should be compatible, maybe other devices too.
BACKGROUND
After trying (and failing) with a number of the other solutions for enlarging internal storage with the external SD card, I've made my own solution that works on the Xperia Mini Pro (XMP) stock ICS ROM. In the second post I describe some properties of my implementation that may count as advantages for some, YMMV though.
COMPARED TO OTHER SOLUTIONS
See second post for technical description.
PREREQUISITES
Sony-Ericsson stock ICS ROM installed on your phone (you don’t need unlocked bootloader, recovery or any other mods)
Remove any other similar apps or tweaks (Link2SD, Apps2SD, INT2EXT etc) as they may interfere with this implementation. The installation script will abort if any of these are found.
USB Debugging enabled in your phone’s Developer settings.
Micro-SD card to install in the phone’s SD slot.
Cydia Impactor (optional)
Download from http://www.cydiaimpactor.com/.
Flashtool (optional)
Download from http://www.flashtool.net/. I have used version 0.9.18.6 which worked fine for the XMP while 0.9.20.0 had some problems. I have been told this has been fixed in 0.9.21.0 but have not verified it myself.
DOWNLOAD SCRIPTS
You find zip files as attachments at the bottom of this post.
INSTALLING
Check current firmware CDA (optional)
It is good to have a record of the exact firmware variant and version currently installed in case you need to flash back the stock ROM.
Go to the right place in the phone’s service menu:
open Phone Dialer
dial the secret code appropriate for your phone (for XMP it is *#*#7378423#*#*)
go into Service Info
go into Software Info
Note down the CDA number shown under the Customization Number heading
(see also http://www.hanfei.name/what-is-cust...xperia-device-and-how-to-view-or-find-it.html)
Partition your SD card
Your SD card should be partitioned as an MBR disk with (at least) two primary partitions:
The first partition should be formatted as FAT32 and will become your new (and smaller) SD card storage that you seen when connecting the phone to a computer.
The second partition should be formatted as Linux Ext2 and will become your extended internal storage.
You can have more partitions after these but these scripts will only care about the first two. I use a 16GB SD card and split even with 8GB to each partition.
There are many ways to perform the partitioning; I put the card in the SD slot on my computer and use the Minitool Partition Wizard Free Edition (http://www.minitool.com/partition-manager/partition-wizard-home.html) under Windows. For kicks you can install it using the Chocolatey auto-installer (https://chocolatey.org/packages/partitionwizard) if you like. You have more info about Minitool and other tools here:
http://forum.xda-developers.com/wiki/index.php?title=SD_card_partitioning
Note 1: Remember to set that partitions should be primary as some tools may default to logical and not primary partitions.
Note 2: You probably want to copy all your SD card files to your computer while partitioning and formatting, and copy them back after, as all data will be erased on the SD card.
Prepare your phone
Insert the partitioned SD card.
Enable USB debugging in Developer settings.
Have a USB cable ready for connecting between your phone and computer.
Root
If you have already rooted you can skip this step. All you need is the su binary on the system - you don't need the SuperSU app installed.
I use Cydia Impactor to root:
connect phone
select "# drop SuperSU su to /system/xbin/su"
click Start
(see also http://forum.xda-developers.com/showthread.php?t=2399464)
You can verify that it worked by opening a root shell.
I do this from Cydia Impactor:
menu Device > Open Shell…
type “su” at the prompt
type “id”
“uid=0(root)” should be shown
Update Busybox
The existing Busybox on the XMP is too old and will not support the way directories are mounted here. I have used Busybox 1.22.1 so I highly recommend that you install this version using the procedure below. If you already have this or a higher version installed you can skip this step but please verify that you have all the needed applets in your Busybox binary by checking against all the busybox aliases at the top of my scripts.
I use Flashtool to upgrade Busybox:
connect phone
Device menu > Install busybox
choose version 1.22.1
Install init.d support
The stock ROM does not have init.d support so we need to add it. If you have already added init.d support using some other software then you can skip this step.
Unpack the init.d.mikewse-<nn>.zip file to a directory (f ex init.d.mikewse) on your SD card.
Open a root shell on the phone using Cydia Impactor:
menu Device > Open Shell…
su
Install by running the install script:
Code:
sh /sdcard/init.d.mikewse/install.sh
You can verify the installation by checking the existence of the init.d directory:
Code:
ls -d /system/etc/init.d
The init.d function will be active after the next reboot and you can see messages from it in the kernel log:
Code:
dmesg | grep init.d
Install int2ext support
Unpack the int2ext.mikewse-<nn>.zip file to a directory (f ex int2ext.mikewse) on your SD card.
Open a root shell on the phone using Cydia Impactor:
menu Device > Open Shell…
su
Install by running the install script:
Code:
sh /sdcard/int2ext.mikewse/install.sh
You can verify the installation by checking the existence of the int2ext boot file:
Code:
ls /system/etc/init.d/40int2ext
The int2ext function will be active after the next reboot and you can see messages from it in the kernel log:
Code:
dmesg | grep int2ext
You should also be able to see the new larger size of your storage in the Storage menu of system settings.
Tweak what’s put on the SD card
The default int2ext script is set up with a good compromise between what files are delegated to the SD card vs are kept in the original location in internal storage. Apk files and app data are delegated to the SD card while unpacked app code (dalvik-cache) is kept on internal storage for speed and availability.
If you are installing a large number of apps your dalvik-cache may grow too large for internal storage. You can check how much it has filled up from a root shell:
Code:
df /mnt/int-stor
and also see how much of this is due to files in dalvik-cache:
Code:
du -s /mnt/int-stor/dalvik-cache
If you are hitting the limit then you can configure delegation of dalvik-cache to the SD card:
open a text editor with the 40int2ext file that you unzipped to the SD card in the int2ext.mikewse directory
edit the line
Code:
EXTDIRS="app app-private data"
so it becomes
Code:
EXTDIRS="app app-private data dalvik-cache"
then reinstall int2ext by running the install script again
REFLASH STOCK ROM
If you want to start from fresh or need to recover from some failure in the installation then you can flash back the stock ROM using Flashtool.
First let Flashtool download and assemble the appropriate stock ROM for you:
click XperiFirm icon in toolbar (furthest to right)
select your phone model
select the appropriate CDA (collected at the beginning of this post)
click the release info in the right pane to start download
Then flash it to the phone:
click Flash icon in toolbar (furthest to left)
choose Flashmode
follow instructions (for XMP press Volume Down)
If you have any questions or problems regarding Flashtool there are lots of threads on XDA were you can find solutions about drivers etc.
CREDIT / INSPIRATION / OTHER ALTERNATIVES
Extend internal storage
CronMod-INT2EXT http://forum.xda-developers.com/showthread.php?t=1716124
Int2ext fixed for Xperia mini http://forum.xda-developers.com/xpe...fix-loosing-network-flashing-int2ext-t3039205
Link2SD http://forum.xda-developers.com/showthread.php?t=919326
Apps2SD http://forum.xda-developers.com/android/apps-games/apps2sd-partition-sd-card-link-apps-to-t3122919
Mounts2SD http://forum.xda-developers.com/showthread.php?t=2432479
init.d support
init.d Terminit http://forum.xda-developers.com/showthread.php?t=1933849
init.d for stock ROM http://forum.xda-developers.com/showthread.php?t=1417375
Bye now and hope it works well for you
DEVELOPER INFO
If you publish a modified version of these scripts or include them in a ROM then please give credit by linking to this thread.
GOALS AND TECHNICAL DESCRIPTION
Here's a few thoughts that have influenced the implementation:
Working for autostart apps, widgets etc
I have seen mentions that Link2SD and others have problems with redirecting widgets and other types of early-start apps. I have not seen this myself and suspect this may have to do with other factors (f ex doing install steps in the wrong sequence may bork your installed apps).
Anyway, I have verified that my solution works with all apps (early-start, system and downloaded) on the XMP.
No extra bells and whistles
Many of the available solutions add extra "nice to have" features to make scripts more universal or maybe optimize speed on some devices. I actually ran into problems with some of these optimizations on the XMP so deciced to only perform what is exactly necessary on the XMP and nothing else. This script only performs mounting of partitions and moving of files therein.
Mount the /data base directory on external SD card
Several other solutions keep /data mounted on internal storage and just redirects /data/app and others to the SD card. That is good in theory but at least on the XMP this causes you to still get warnings that storage is full as the phone detects that your apps take up more space than fits in /data. With my solution the phone will see the enlarged /data partition and will f ex report this correctly in the Storage menu.
Keep most /data subdirs uninterrupted on internal storage
There are some critical directories on /data that should be available without interruption from boot and onwards. Having these come and go during startup can lead to different problems such as signal loss (correlated to /data/radio). To avoid surprises this script only keeps the typical hogger directories app, app-private and data on the SD card and rebinds everything else back to internal storage in one rbind-mount command that eliminates interruption of these subdirs.
If you want you can customize which /data subdirectories are used on the SD card by simply editing the EXTDIRS variable in the 40int2ext script. Existing files will be moved accordingly on the next boot.
Simple install script run from terminal instead of flashing from recovery
Stock ROM doesn't have recovery with flash function so I have instead made simple install scripts that you run from the Android shell.
Follow standard principles
Like several other solutions this script hooks the debuggerd binary as that seem to be triggered earliest during startup. I also look for installations of other solutions and will abort if any are found as that could lead to problems.
Naming is kept similar to other solutions apart from the strange habit to use "sd-ext" as the name for internal storage. In my implementation internal storage is mounted to /mnt/int-stor and the external SD card to /mnt/sd-ext.
CHANGE LOG
1.0 (2016-05-03)
Inital version

Categories

Resources