increase the interior phone storage - HD2 Android Q&A, Help & Troubleshooting and Genera

hi everyone,
I am using mattc evoleo build and it is really great.
but I am almost out of space so I need to increase the interior phone storage from 1 GB to 2 GB.
can you show me the proper way to increase it or a data file I can replace to do so ????!!!

Kev007 posted this a while back
Manually edit data.img if you want a different size or use a different build!
I wrote this tutorial using a European HD2, 8GB microSD card, DarkStone's Froyo_v1 and a laptop running Ubuntu 10.04, your experience may vary.
Requirements:
* Desktop/Laptop running some form of Linux.
IMPORTANT NOTE: Both, a PC and a Mac, can resize the .img file but not modify (specifically - run resize2fs) the ext2 file system that Android uses. I was in a hurry to post the resizing instructions and didn't fully test the procedure on a PC. Currently, this procedure is only possible on a Linux based operating system. I apologize if your time was wasted.
* data.img file
* HD2, microSD card, microUSB cable etc, etc (you might be better off using a card reader)
--------------------------------------------(Running Linux)----------------------------------------------
Procedure:
1. UnZip Android or your present data.img file to your Home Folder. Or a folder of your liking (or even on your memory card!), just remember to cd before you do the following:
2. Open Terminal and Copy&Paste (Ctrl+C, Ctrl+Shift+V) this:
Code:
dd if=/dev/zero bs=1M count=XXX >> data.img
where XXX is the amount, in MB, by which data.img should be increased by.
My filesize started out as 256MB and I wanted a total of 512MB. That would mean I needed a extra 256MB, so I executed this:
Code:
dd if=/dev/zero bs=1M count=256 >> data.img
3. Run a file system check and file system resizer
Code:
e2fsck -f data.img
resize2fs data.img
e2fsck -f data.img
if prompted, press "y" for "yes"
4. Copy all of the Android files onto your SD card, put it into your phone, and run CLRCAD.exe and HARET.exe!
-----------------------------------------------TIPS!-------------------------------------------------
Don't know how to cd?
If you're running a modern build of Linux you can just mount your SD card (phone or cardreader), open File Browser and paste "dd if=/dev/zero bs=1M count=XXX >> " into your open Terminal. This way you can just drag and drop the file into Terminal rather than typing out the file location!
Mounting:
If you're switching between builds and need to copy more than just your apps (apps are easily backed up by ASTRO File Manager - found on the Android Market), mount your data.img file and copy/backup the relevant data before moving on!
Linux:
Code:
mount -o loop data.img /mnt/data
Apart from that, I've nothing else to suggest, except maybe moving most of your apps etc from the "internal storage" to the sd card.
Maybe someone with a lot more knowledge than I can help

You could try this program too, not tried it myself, but others report it works
http://forum.xda-developers.com/showthread.php?t=824154

Related

[TUTORIAL] A BETTER Ubuntu on Android method

As many of you have probably heard, you can load Ubuntu along side your Android OS. This has been confirmed on many devices, including N1, Desire, and Incredible. Here is the nexusonehacks post describing how to do it.
But I have found a better way to do it. Normally you mount ubuntu.img as a loopback and run from that. The problem with this is that is has very limited space (250mb or so) as you cannot exceed the size of the .img.
My method is to extract the contents of the .img and run it directly from the sdcard's filesystem.
Please be aware that if you use ClockworkMod Recovery, it will try to backup our new EXT2 partition! It thinks its an app-to-sd partition! I've yet to figure a way around this. Do not follow this tutorial if you make nandroids!
Requirements
- ubuntu.img (must be an ARM port)
- A Linux distro so you can 'cp' to your sdcard
- You will have to make a second partition on sdcard, ext2 type
- Patience and experience. This guide assumes you already know the basics of how to work with Linux
Step 1 Create the partition on sdcard
- Open your Linux distro and insert your sdcard (or enable disk drive on phone)
- Start GParted (or similar) and create an ext2 partition on your card. The partition should be as big as ubuntu.img. I recommend atleast 25% bigger so you have room to install packages and whatnot. FAT32 or NTFS will not work here!
Step 2 Mount ubuntu.img
- Mount ubuntu.img with the following commands (on the Linux distro, not phone):
Code:
sudo su
mkdir /mnt
mkdir /mnt/ubuntu
cd [B]/path/to/ubuntu/image[/B] **IMPORTANT!
mount -t ext2 -o loop ubuntu.img /mnt/ubuntu
Step 3 Copy contents of ubuntu.img to sdcard
- Make sure your new ext2 partition is mounted. We will assume its at /media/ext2sd
- Copy the contents. This will take a very long time depending on speed of card. Mine took roughly 70 minutes
Code:
cp -dRP --preserve=all /mnt/ubuntu/* /media/ext2sd/
Step 4 Update bootubuntu script
Here is a rundown of the modified script:
- Mount root as r/w
- Ensure /mnt/sdcard2 exists
- Mount the second sdcard partition
- Everything else, including chrooting to start Ubuntu! I use 'nice' to lower the priority of chroot so it won't make phone sluggish. Change this if you want.
Download the script
Step 5 Get Ubuntu running
- From here out its the same as any other tutorial. do a 'sh ubuntu.sh' to copy files to phone, then 'bootubuntu' to start it. Hopefully everything goes good for you! You now have much more room to do things!
Reserved..
Is it possible to use ext3/4 and would there be any performance gains?
ext3/ext4 use journaling. Unless you know for sure that your sdcard does wear-leveling, I would not advise using these as they may degrade the life of your card quickly. Another option would be to specifically make the partition without these options, but there is little to no performance gain as sdcards are already slow.

Partitioning microSD card

After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
jazzbone said:
After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
Click to expand...
Click to collapse
You needed to make a second partition EXT2 and format it. You then need to mount the partition. I did this by using the install-recovery.sh that it located in /system/etc. I used the following tutorial and it worked. I got over 12gb of space to install apps.
http://forum.xda-developers.com/showthread.php?t=832799
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
I did not use adb, i used a app called quicksshd which allows you secure ftp into the tablet and make changes. I suggest using a windows programs called winscp and putty.
Thanks for replying rfisher.
Turns out that my laptop lost the drive letter for the sd card. That's fixed now. When I insert the card into my laptop, it says that you need to format the card in the drive to use it. Any idea why?
I am confused by your instructions.
You said
You needed to make a second partition EXT2 and format it.
Click to expand...
Click to collapse
I did that. First partition is FAT 32, and second partition is EXT2, primary.
Maybe I didn't format the partition? I just created it.
I'll install busybox and see how far I can get with it.
With the other A7, I was never able to work with ADB.
This device really makes me feel like an idiot.
Still can't believe I was the first to get Google Apps working on my wife's tablet!
no adb
Well, the hours of frustration have returned...
I can't get adb running on my laptop.
I installed Android SDK.
When I type adb in the cmd window on my laptop, I get
"adb" is not recognized as an internal or external command, operable program or batch file"
I have tried moving the ADK folder to c:\
and
to:
C:\Users\Bucks HP
No luck.
I added the path c:\android-sdk-windows\platform-tools
to the environment variables in my system properties.
My head is going to explode!
Well, I got adb working, I think...
Problem was in the cmd window. I had to change the path.
Now, I can't install busybox. I followed the instructions from the wiki.
When I type "adb push busybox /data/local"
it returns: cannot stat 'busybox' : no such file or directory.
I pasted the busybox file in the
C:\android-sdk-windows\platform-tools
folder.
Was that the right place for it?
Is the busybox file just a text file?
Also, mine is named busybox-armv6l
Should it be renamed? I tried "adb push busybox-armv6l /data/local"
and got the same result...
I gave up on installing busybox via the wiki instructions.
I installed Titanium Backup and installed busybox through it.
Now, when I type: cd /system
mkdir sd
I get :
mkdir failed for sd, read-only file system
What does that mean and how do I fix it?
Thanks
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
You would create them with notepad++ which is a windows program. Then using adb push them to the /system/etc directory.
I used a app called quicksshd and a windows program called winscp to copy the files to the directory. If you used my method you first need to make the /system directory rw before it will let you copy the files. It worked for me, the only thing i did differently is edit init.rc to mount the first partition of the sd card to /storage, but this was creating a modded 1.0c rom. So the result is about 4gb for my sd memory and 12gb for installing apps.
jazzbone said:
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
Click to expand...
Click to collapse
Hi rfisher
Thanks for replying!
While waiting, I opened Notepad++, copied the text in the tutorial window into it and saved the file as Unix.
Then, I copied it to a USB drive, put it in the A7, and copied to the system/etc folder.
Is that acceptable?
Then, I followed steps 13-15.
I think I did something wrong. I am not seeing it in Root Explorer. What should I be looking for?
Was I supposed to install Apps2SD already?
I got winscp and quicksshd working. YEAH!
Used them to copy the files as you did.
Restarted A7.
Still don't see the other partition.
PS. I was just rereading your earlier post and you mentioned:
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
Looking on my A7, I don't see a location that is /storage
My tablet is fresh out of the box, without any firmware updates yet.

[scripts] (untested) app2sd scripts, sd card speed fix script

hi all! im new TF user but i tough i could post here some fixes and scripts that i use on my Samsung galaxy 3 but beaware that i have not tested these but they should work on every device im not responsible for any damage that may occur when you apply these scripts!!
1st there are 3 app2sd scripts
What is App2sd? App2sd is a utility which automatically moves some/all your data partition to your ext sd partition. So, your internal space is partially/not used
Which app2sd version should i choose? As you can see, there are 3 versions: App2sd-v1, App2sd-v2 & App2sd-v3.
Differences in versions App2sd-v1: It is the normal app2sd script. This script moves your /data/app/ & /data/log/ to your sdcard's ext partition. It is very fast but your real internal space will be full if you install many apps. This version is not recommended. App2sd-v2: It is an enchanced version of app2sd, which moves /data/app/, /data/log/ & /data/dalvik-cache/ to your sdcard's ext partition. It is fast and you can install many apps until your internal memory reaches 0mb.. Is is recommended for sdcards class2 - class4. App2sd-v3: It is an ultra enchanced version of app2sd, which is like data2sd, but you won't have so many lag like data2sd. App2sd-v3 moves /data/app/, /data/log/, /data/dalvik-cache/ & /data/data/ to your sdcard's ext partition. Your internal memory won't be used unless you do install so many apps and your sdcard's partition get full! SDcard class6+ is highly recommended! Conlusion: If you have class2 or class4 sdcard use App2sd-v2. If you have class6 sdcard use App2sd-v3.
Requirements You must have a kernel which supports init.d & ext4. And you must have an ext partition in your sdcard. Ext4 is recommended. And last thing... You need android 2.2.
How do i check my sdcard's class? Remove your sdcard from your phone and check if you see a circle with a number. If your dont see anything, you may have a class2 sdcard.
How to partition my sdcard? Download MiniTool Partition Wizard Home Edition 6.0. But make a backup before
How to install the script? Take a nandroid backup. Download it from links below and decompress it to your sd. You can either adb push this script in /system/etc/init.d/ or copy it with root eplorer to /system/etc/init.d/. Type the commands: adb shell (adb only) su mount -o rw,remount /dev/block/stl6 /system chmod 777 /system/etc/init.d/* chown 0.0 /system/etc/init.d/* Then reboot in recovery and do a wipe data/factory reset. All your data will be wiped. From now on some/all of your data (depends on the script version) will be moved to your sd automatically. Before you restore your apps with titanium, go in titanium preferences and select to force restore apps to internal memory. Don't move apps to external!!
Why i see only 200mb as internal? App2sd is invisible You can check your sdcard's ext partition in Titanium Backup.
=> app2sd script v.1
http://forum.xda-developers.com/attachment.php?attachmentid=592379&d=1305062488
=>app2sd script v.2
http://forum.xda-developers.com/attachment.php?attachmentid=592380&d=1305062488
=> app2sd script v.3
http://forum.xda-developers.com/attachment.php?attachmentid=592381&d=1305062488
credits go to KYRILLOS13 who introduced these on SG3!
then there is sd card reading speed fix
How to make it work!
At first it needs root & busybox...
Download the script, choose the cache size you want between 1024, 2048, 3072, 4096 kb! (Recommended size: 2048kb)
Extract the .zip file you downloaded and put the 77sdcardspeedfix in your sdcard.
Run root explorer and move the file in /system/etc/init.d/ (If there is no init.d folder, create one!).
You can also adb push 77sdcardspeedfix /system/etc/init.d/
Run a Terminal Emulator/Adb and type the commands:
Code:
adb shell (if you are using Terminal Emulator, skip this command)
su
chmod 777 /system/etc/init.d/77sdcardspeedfix
chown 0.0 /system/etc/init.d/77sdcardspeedfix
reboot
After that the phone will reboot. You will see that your sdcard reading speed has increased!
thanks for BRAINMASTER who made the script!

How to upgrade my ext partition with cwm?

I'm guessing theres no way in CWM recovery to get ext4 am i correct. I've heard that it's ext3 by default, so my question is what program would i need to do this. I am running winblows 7, i do have a built in card reader so i could mount the microsd card from there to partition it.
d12unk13astard said:
I'm guessing theres no way in CWM recovery to get ext4 am i correct. I've heard that it's ext3 by default, so my question is what program would i need to do this. I am running winblows 7, i do have a built in card reader so i could mount the microsd card from there to partition it.
Click to expand...
Click to collapse
taken from
Here
How to manually partition your SD card for Android Apps2SD
Taylor Wimberly on Aug 21, 2009 at 9:27 pm119 comments
5share0share4 42
How to manually partition your SD card for Android Apps2SD
Update: You might also want to check out the Amon_RA recovery image which will automatically partition your SD card.
This article is for people with rooted Android phones. Everyone else please ignore. There are dozens of ways to partition your SD card and I would like to share the one that has worked for me every time. I prefer to manually partition my SD card because it gives me complete control.
Requirements before getting started:
Cyanogen Recovery Image v1.4 or greater (Easy to install with the 1-click hack)
SD Card (Class 6 suggested): A-DATA has good prices on Amazon (4GB, 8GB, 16GB)
Android Device Bridge(ADB): Comes with the Android SDK.
Android build that supports Apps2SD: I suggest Cyanogen’s latest stable release (Does Apps2SD automatically)
These instructions apply to both the Windows command prompt and the Mac terminal. As you can see from my screens, I was using Windows Vista. You can partition your SD card at any time, but you might as well do it before you flash a new build of Android. As always, back up your data when performing any hacks. Partitioning your SD card will erase all data on it. I split this guide into 9 steps, but it is not as difficult as it looks. Read the whole thing before starting.
All commands you need to type are in bold (my comments are in parenthesis). If you do not know how to use ADB, leave a comment for help or read ADB for Dummies over at XDA.
Step 1: Connect your phone to your computer via USB. Reboot into recovery mode.
Command:
Code:
adb shell reboot recovery
(this will reboot your phone into Cyanogen’s recovery image. Or power on phone when holding home button)
Command:
Code:
adb shell
(type this after your phone has booted and on the recovery screen. it should take you to a # prompt)
Step 2: Open parted to partition your SD card.
Command:
Code:
parted /dev/block/mmcblk0
(opens parted and mounts your SD card)
Step 3: Check the size and partitions of your SD card. The print command will display this info. You can see the size of my SD card is 7969 MB (8 GB). I have 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 5.
Command:
Code:
print
(displays SD card information)
Step 4: Remove all existing partitions. If you have multiple partitions, remove each one at a time.
Command:
Code:
rm 1
(deletes partition number 1)
Command:
Code:
rm 2
(if needed. keep going till all partitions are removed)
Command:
Code:
print
(check when you are done to make sure all partitions are removed)
Step 5: Create your new partitions. You can make these any size, but the most common setup is 32 MB linux-swap partition, 512 MB ext2 partition, and remaining free space as a fat32 partition. In order to work properly, the partitions must be created in this order: fat32, ext2, linux-swap.
The linux-swap partition is used for a swap file on some builds. Not all builds use linux-swap, but I create one just in case I ever need it.
The ext2 partition is where your apps will be installed. I use 512 MB which gives me plenty of room but you can go larger like 1024 MB if you want. Parted only creates ext2 partitions and we can convert them to ext3 or ext4 later.
When using the Linux command mkpartfs, you must tell it where to start and and end each partition. This can be done by taking the total SD card size and subtracting the linux-swap then ext2 partition sizes. See the following example for my 8 GB card.
Command:
Code:
mkpartfs primary fat32 0 7425
(start is 0 and end is Total C)
Command:
Code:
mkpartfs primary ext2 7425 7937
(start is Total C and end is Total B)
Command:
Code:
mkpartfs primary linux-swap 7937 7969
(start is Total B and end is Total A)
Partition sizes for a 8 GB SD card.
Partition sizes for a 8 GB SD card.
Step 6: Check the sizes of your partitions. Use the command print again to display the partition sizes. If you made any mistakes you can return to Step 4 and remove them.
command:
Code:
print
(displays your partition information)
Step 7: Exit parted and upgrade your ext2 file system to ext3. For most users this is the final step. We suggest all users upgrade to ext3. Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean shutdown.
command:
Code:
quit
(exit parted and return to # prompt)
command:
Code:
upgrade_fs
(script to upgrade from ext2 to ext3)
Step 8 (Optional): If you wish, you can upgrade your ext3 partition to ext4. Skip to Step 9 is you wish to use ext3. I asked Cyanogen what file system he uses and he tweeted ext4. The file system offers enhancements like delayed allocation. See Wikipedia for more info on ext4.
command:
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
(enter this command from the # prompt)
command:
Code:
e2fsck -fpDC0 /dev/block/mmcblk0p2
(run e2fsck after tune2fs. wait for the file check to finish)
Step 9: Finished. Check your work with print.
command:
Code:
parted /dev/block/mmcblk0
(open parted again)
command:
Code:
print
(check all your system partitions and their sizes)
command:
Code:
quit
(exit parted)
command:
Code:
reboot
(reboot your system to the operating system)
I was under the impression only CWM worked for our mt4g phones... So the AMON_RA recovery would work as well or just the older cyanogenmod 1.4?
I've known about the older cyanogen and amon ra recoveries back when i had my g1, that had ext4 partition built in(cyanogen i had to type in all that extra stuff e2kfs to get ext 4) but had no idea they were avalable fo rour mt4g, where do i download the mt4g amon ra recovery!?
@neidlinger
I appreciate your help, tho i knew those commands and recoveries back when i had the OG tmobile g1 the amon ra 1.7 recovery was the shizznit as it had soo many better options compared to cwm. I answered my own question by reading up into the forums about the dark tremor apps 2sd, i dunno how i missed it the first time but there was an obvious command list that will let you convert an ext partition to 3 or 4 lol It really does help to read up on older posts in development.
All those commands work on CWM. Koush converted the scripts into binary c programs.
You can use adb to run these commands inside the recovery console.
RichieDaze said:
All those commands work on CWM. Koush converted the scripts into bindary c programs.
You can use adb to run these commands inside the recovery console.
Click to expand...
Click to collapse
so just boot into recovery and run adb commands, or do i need to mount sd card thru recovery first.
Sent from my HTC Glacier using XDA Premium App
Try it without mounting. The binary should mount it or display a message telling you to mount it manually.
Please, Let us know the out come!
Have you tried sdparted from the recovery command line? (included in CWM)
It takes the guess work out of using parted!
Source:
[UTIL] sdparted v0.6 - easy sdcard partitioning, upgrading to ext3/4

[Q] What is using up my internal storage?

Noob question but hopefully someone here can help with something that's puzzling me.
My Iconia is a 16GB, of which 12.7 is available (seems like a lot to lose for the OS, etc, but whatever). The other day I notice I only have approx. 2GB available for use. Now I don't store tons of stuff on my tablet nor do I have too many apps on there IMO, so I thought that number was a little low. I hook my tab up to my computer and go through the properties of each folder to see how much space they're using. Adding everything up I get about 4GB worth, which should leave me 8.7 GB available for use. So why is it telling me I only have 2??? Where did that 6.7 GB go?
Thanks for any help.
P.S. Yes I will back everything up and move as much as I can to the SD card.
Is your tablet rooted? If yes then open Terminal Emulator or connect with adb shell and run (as root) following command:
Code:
du -had 1 /data
It will display sizes for direct subdirectories and files in /data partition (internal storage is also on this partition in /data/media directory).
Meaning of used "du" parameters:
-h - shows file/dir sizes in human readable form
-a - shows file sizes (without this du only shows directory sizes)
-d - max deep to display (-d 1 means only direct subdirectories)
Use this
https://play.google.com/store/apps/...DEsImNvbS5nb29nbGUuYW5kcm9pZC5kaXNrdXNhZ2UiXQ..

Categories

Resources