[Q] Why i keep losing my swap partition - XPERIA X8 Q&A, Help & Troubleshooting

Please, i need really need ur help, somebody, why do i keep losing my swap partition???
Please somebody, help me

i have problem with swap and ext3 partition with alfs kernel too, that's why i change the kernel..i don't know why alfs kernel have bug with partitions, because he don't mount the partitions. i want to see this problem solved too
sorry my bad english

akaSk8krew said:
i have problem with swap and ext3 partition with alfs kernel too, that's why i change the kernel..i don't know why alfs kernel have bug with partitions, because he don't mount the partitions. i want to see this problem solved too
sorry my bad english
Click to expand...
Click to collapse
Thanks for ur help, right now i had it solved by restored sd ext partition and wipe dalvik cache before reboot. for now it works but i cant sure that i wont lost my swap partition again. thanks for ur help

phoenix883 said:
Thanks for ur help, right now i had it solved by restored sd ext partition and wipe dalvik cache before reboot. for now it works but i cant sure that i wont lost my swap partition again. thanks for ur help
Click to expand...
Click to collapse
yes, if i clean dalvik cache and boot, the device recognize again the ext partition..but for me if i boot again, i loose again the partition. and swap don't work..i need boot million times to make swap work, but if i reboot again i loose the swap too..the solution for me is don't use ext partition, (but have problems with swap too) but i use much apps, then i have less memory.
alfs kernel in performance it's the best..alfs could fix the partition bug, i don't know..
sorry my bad english

akaSk8krew said:
yes, if i clean dalvik cache and boot, the device recognize again the ext partition..but for me if i boot again, i loose again the partition. and swap don't work..i need boot million times to make swap work, but if i reboot again i loose the swap too..the solution for me is don't use ext partition, (but have problems with swap too) but i use much apps, then i have less memory.
alfs kernel in performance it's the best..alfs could fix the partition bug, i don't know..
sorry my bad english
Click to expand...
Click to collapse
same hope for me also...its not that i dont want to use nAa kernel but the fps uncap make gaming in x8 much more better...thats why i choose alfs kernel...and because of this kernel i can use mdpi theme much more smoother....let's wait patiently for his new update....i believe this will be fix by alfs soon...by the way, thanks for helping me akaSk8krew

with versio 6 of alfs the problem persists..anybody helps?? anybody knows why this kernel dont mount the partitions? because in alfs thread, in first post, alfsamsung said that ext2\3\4 works..but for me and for much people don't work too

I want to help you guys,but I don't have this problem and I can't reproduce your errors....
Try this:
1 format sd card with fat32,ext*,swap if you not allready have done this
2 remove system/etc/init.d/10app2sd Remove swapper and use link2sd to move apps
3 edit system/etc/fstab to look like this
Code:
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/mtdblock5 /data yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
/dev/block/mmcblk0p2 /sd-ext auto rw
[B]/dev/block/mmcblk0p3 /swap swap rw[/B]
now all 3 partitions will be mounted at boot
4 add this to system/etc/hw_config.sh
This will turn on swap on swap partition
Code:
#enable swap
swapon /dev/block/mmcblk0p3 #turn on swapp
echo "60" > /proc/sys/vm/swappiness #swap amount
To turn off swap do this and reboot
Code:
#enable swap
#swapon /dev/block/mmcblk0p3 #turn on swapp
#echo "60" > /proc/sys/vm/swappiness #swap amount
check on terminal if swap is working using #free
If you used app2sd before,then try and put it back to see if app2sd is the problem

@alfsamsung
thanks for your reply..the swap partition is mounted with app2sd or without thanks..the ext partition dont work..i test app2sd link2sd and nothing..a few days ago, i test without swap and link2sd and ext work..but also 1 or two days passed and stopped working..this only happens to me with your kernel..in stock or nAa works always..but your kernel is the best. the problem is in kernel..please: can you fix this? it's just a request

same here the ext wont work for me

Can you test this.I patched mmc with fixes.
Please post output from adb shell or terminal if it's not working
Code:
dmesg | grep mmc

alfsamsung said:
Can you test this.I patched mmc with fixes.
Please post output from adb shell or terminal if it's not working
Code:
dmesg | grep mmc
Click to expand...
Click to collapse
don't work i flah your kernel 07 wipe device, flash gingerDx v22, flash vold patch, wipe device again and boot..with root explorer go to \sd-ext and nothing..reboot, go again with root explorer and nothing..i put your code in terminal, but how i post it here, or better, how i make a txt file with output? can you put the code for this? i'm sorry. and thanks for your work
edit: i attached the files..is this what you want??

Tis is my output
Code:
<6>mmc0: Qualcomm MSM SDCC at 0x00000000a0400000 irq 24,113 dma 8
<6>mmc0: 8 bit data mode disabled
<6>mmc0: 4 bit data mode enabled
<6>mmc0: polling status mode disabled
<6>mmc0: MMC clock 144000 -> 49152000 Hz, PCLK 100000000 Hz
<6>mmc0: Slot eject status = 0
<6>mmc0: Power save feature enable = 1
<6>mmc0: DM non-cached buffer at ffc21000, dma_addr 0x0cdca000
<6>mmc0: DM cmd busaddr 0x0cdca000, cmdptr busaddr 0x0cdca300
<4>mmc0: host does not support reading read-only switch. assuming write-enable.
<6>mmc0: new high speed SDHC card at address b368
<6>mmcblk0: mmc0:b368 USD 7.46 GiB
<6> mmcblk0: p1 p2 p3
<6>EXT4 FS on mmcblk0p2, no journal
<6>EXT4-fs: mounted filesystem mmcblk0p2 without journal
and everything is working fine here.I use link2sd and my sd-ext is empty to,because link2sd is using data/sdext2.
why do you have this output: mmcblk0: p1 p2 p3 < p5 >
This is my output from parted in adb shell or terminall.Run the comands in bold
Code:
# [B]parted /dev/block/mmcblk0[/B]
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)[B] print[/B]
print
print
Model: SD USD (sd/mmc)
Disk /dev/block/mmcblk0: 8018MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 7600MB 7596MB primary fat32
2 7600MB 7921MB 321MB primary ext2
3 7921MB 7987MB 65.8MB primary linux-swap(v1)
(parted)

alfsamsung said:
Tis is my output
Code:
<6>mmc0: Qualcomm MSM SDCC at 0x00000000a0400000 irq 24,113 dma 8
<6>mmc0: 8 bit data mode disabled
<6>mmc0: 4 bit data mode enabled
<6>mmc0: polling status mode disabled
<6>mmc0: MMC clock 144000 -> 49152000 Hz, PCLK 100000000 Hz
<6>mmc0: Slot eject status = 0
<6>mmc0: Power save feature enable = 1
<6>mmc0: DM non-cached buffer at ffc21000, dma_addr 0x0cdca000
<6>mmc0: DM cmd busaddr 0x0cdca000, cmdptr busaddr 0x0cdca300
<4>mmc0: host does not support reading read-only switch. assuming write-enable.
<6>mmc0: new high speed SDHC card at address b368
<6>mmcblk0: mmc0:b368 USD 7.46 GiB
<6> mmcblk0: p1 p2 p3
<6>EXT4 FS on mmcblk0p2, no journal
<6>EXT4-fs: mounted filesystem mmcblk0p2 without journal
and everything is working fine here.I use link2sd and my sd-ext is empty to,because link2sd is using data/sdext2.
why do you have this output: mmcblk0: p1 p2 p3 < p5 >
Click to expand...
Click to collapse
i don't know why i have this <p5> lol..you don't have.
and the parted output, mine is different..how i can make the output to a txt file?? lol i'm sorry but i don't know..can you help me?

If you are on win7 you have Windows Powershell.Use this instead of cmd.
Just mark the text and right click on it and now you can paste the text anywhere

Code:
# parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 print
Model: SD SD08G (sd/mmc)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 6597MB 6596MB primary fat32 boot, lba
2 6597MB 7666MB 1069MB primary ext3
3 7666MB 7937MB 271MB extended lba
5 7666MB 7937MB 271MB logical ntfs
#
with mini tool partition wizard i put a 1gb ext3, 256 mb of swap and the rest is fat 32...
the "p5" is ntfs????? why??? look at the atachment pls:/

try to remove the 2 partitions that is wrong.and make a new swap partition.Remember all partitions must be primary.
You can try this guide which you can run from recovery with card inside phone
And you need an external card reader if you use mini tool partition.Are you using this?

alfsamsung said:
try to remove the 2 partitions that is wrong.and make a new swap partition.Remember all partitions must be primary.
You can try this guide which you can run from recovery with card inside phone
And you need an external card reader if you use mini tool partition.Are you using this?
Click to expand...
Click to collapse
no. always when i partition my sdcard, i only connect the usb cable to the pc and click on "select to copy files to sdcard" and next use mini tool partition manager..using your link to tutorial, if i use the command to reboot recovery, the phone only boot, don´t go to recovery..if i manually put in recovery mode and proceed with the tutorial, the command give me this:
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
i don´t have an external reader. laptop have but is for sd..i have a pen vodafone internet in home that have a reader too.will it work well with this?
i'm sorry something alfsamsung..i am limited at 8 thanks per day, so tomorrow i click thanks to you and again, thanks for this.thanks.

After you entered recovery, mount system, then continue with parted

don't work..always give me the same error:
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
i don't know why

Are you on gingerdx?

Related

is there a way to format ext3 partition (app2sd) from g1 phone or from recovery mode

help please .. paragon partitiion is not working
wc326 said:
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
-repeatedly bangs head against wall-
follow this guide but in the beginning where it says use adb and type adb shell
just be in recovery console and hit enter then from there out all the commands should be the same.
if you need more help pm me and i will walk you through the steps
cant; do itr without adb ??
wc326 said:
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
this has been covered many times in many other threads
NOTE:dont type in the # signs. but do however type in the * sign.
go to recovery console hit enter
parted /dev/block/mmcblk0
print
the fourth line in the 'print' command output shows you the total size of sdcard in MB(or GB if you card is large)..mine says: Disk /dev/block/mmcblk0: 7969MB
use this number(XXXXMB) and do some simple math to get the size of your partitions.
7969MB - 32MB linux-swap = 7937MB
7937MB - 500MB ext2 = 7437MB fat32
32MB seems to be alright size for swap, though it can be lower depending on your sdcard size.
500 MB is a good round number for the ext2 partition...no need for more.
that leaves us with 7437MB for fat32 storage.
Click to expand...
Click to collapse
if you do not want linux-swap then do not figure it in
after figuring out the size of your partitions from using the above method type rm 1 (if you only have one partition skip next part) then rm2
then to make the partitions type (numbers are from above example substitute your own in)
mkpartfs primary fat32 0 7437
mkpartfs primary ext2 7437 7937
mkpartfs primary linux-swap 7937 7969 (only if you want linux-swap)
then type print again to see if it worked. if it did you will have 1 and 2 (and 3 if you want linux-swap) come up under all the other info.
then type quit
then to upgrade to ext3 type upgrade_fs
then if apps2sd is automatic in your rom of choice reflash it and you are set. i am too nice tonight.
brian_v3ntura said:
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
this has been covered many times in many other threads
NOTE:dont type in the # signs. but do however type in the * sign.
Click to expand...
Click to collapse
too bad its not that simple. i think he means partitioning since he references not having adb to do the partitioning in the guide i linked him to. (sorry for assuming your gender OP)
i just want to format my ext3 app2sd partition....
it already has fat32 , ext 3 , and linus swap
really only want to format ext3 partition so i can install my new rom
just wondering can you format ext3 partition without havn'ing to erase fat32 and linus swap
david1171 said:
too bad its not that simple. i think he means partitioning since he references not having adb to do the partitioning in the guide i linked him to. (sorry for assuming your gender OP)
Click to expand...
Click to collapse
actually its clear as day that he means he JUST wants to format his ext.
wc326 said:
is there a way to format ext3 partition (app2sd) from g1 phone or from recovery mode
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
paragon partition is aprogram that will enable you to partition your card on your computer and format.
wc326 said:
i just want to format my ext3 app2sd partition....
it already has fat32 , ext 3 , and linus swap
really only want to format ext3 partition so i can install my new rom
just wondering can you format ext3 partition without havn'ing to erase fat32 and linus swap
Click to expand...
Click to collapse
THIS IS WHAT YOU NEED TO DO to format ext. the other guy must've confused u
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
NOTE:dont type in the # signs. just push enter when done typing each line. and be sure to type everything exact and carefully.but do however type in the * sign.
errr wrong post

fdisk with optimus 2x

Hello
I am trying to use fdisk to partition optimus' nand. I want to delete the last 2 partitions /dev/block/mmcblk0p9 and p8 and merge them into p8 but fdisk wont let me do it. It says "value is out of range" and gives me as default 511kb of space each logical partition by default.
If i delete all partitions till p5 and remake the extended partition everything can go ok but these include things i dont wont to touch
For your quick reference the o2x partitions.
/dev/block/mmcblk0p1 = system partition
/dev/block/mmcblk0p2 = cache partition
/dev/block/mmcblk0p3 = misc partition
/dev/block/mmcblk0p4 = unknown partition
/dev/block/mmcblk0p5 = boot partition
/dev/block/mmcblk0p6 = lgdrm partition
/dev/block/mmcblk0p7 = recovery partition
/dev/block/mmcblk0p8 = data partition
/dev/block/mmcblk0p9 = internal SD partition
How can Solve this? Any ideas?
Can someone please upload the contets Of p5 p6 p7?
P5 depends on your ROM
P6 attached
P7 you can get CWM from anywhere really
Thank you a lot rusty its very much aprisiated
Do you know anything about the original question?
No idea I'm afraid.
busybox fdisk -l /dev/block/mmcblk0
d
9
d
8
n
57537
976128
w
didn't worked btw
get notification that i got damaged sd so i removed the internal sdcard part from the vold
but still no big ass data partition xD
btw i don't know anything about fdisk i just gave it a shot
look at that... looks like our phone has 16gbs or wrong declare from fdisk?
http://forum.xda-developers.com/showpost.php?p=17001387&postcount=12
edit: apparently it was a wrong declare from my brain
Apparently the SU660 has more internal storage than the P99x, so maybe it's got the same amount really, but the P99x is set up to ignore some of it?

[9001]Mounting external SD Card as ext3

Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
u need a kernel that supports ext3. u can ask one of the guys compiling at the moment if they have time to add an ext3 module for u.
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
filesystem is already ext4
wintel_mac said:
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
Click to expand...
Click to collapse
well the system uses ext4 so it should work, but i'm not sure what u're trying to achieve. i use a 16 gb class 10 formatted fat32
Blumdum said:
filesystem is already ext4
Click to expand...
Click to collapse
He's talking about formatting external sd-card
When I get him right, he has a file that exceeds the 4GB FAT32 limit.
So he looks for an alternative to FAT32, which might be some kind of ext*-FS.
wintel your right!
In the Android-Hilfe Forum someone said the system expect first an vfat partition and then the ext. I think thats wrong cause its not working but somehow it has to go.
Hmm should I write these mount command I postet in the init.rc? Or something else. Would be very nice if you post your ideas!
Thanks
init.rc+ ext3 module/object included in kernel
Hmm okay thats good but how do I use them? So I can read and write to my external sd card with an ext3 or ext2 partition.
Thanks
Come on guys where are the great developers?!
Ok I did a test with busybox inbuilt mount, but I tried only with an image.
Not with a real SD card! This worked for me:
On a linux box:
# dd if=/dev/zero of=/tmp/image bs=1M count=1k
# mkfs.ext4 /tmp/image
Copy file to your phone. Then:
On the phone with terminal:
# mkdir /sdcard/mmnt
# busybox mount -o loop /sdcard/image /sdcard/mmnt
To unmount:
# busybox umount -l /sdcard/mmnt
Anybody tried that?
If I understand u right u puting an image file (ext3/4) on the sd and mount that as a virtual disk. Wouldn't the image file be bound to the same restrictoins as other content on a fat32 file system? Like the 4 gig limit!
YOU WILL LOSE ALL DATA ON YOUR SDCARD IF YOUR FDISK
BACKUP WHATEVER IS ON THERE FIRST!!!
YOU'VE BEEN WARNED
using a photon 4g but....
what i did was get an external sdcard reader writer...
(used ubuntu) and let it mount
fdisk device and DELETE ALL PARTITIONS
write
fdisk again
create a linux primary type 83
type mount and grab the /dev/sdcX value (it was /dev/sdc1 for me)
umount that
then
mkfs.ext3 /dev/sdcX ... ( heres the thing though with cyanogen mod 7 kernel 2.6.32.9 SMP PREEMPT)
had to reboot twice for it to be seen in file manager...
its buggy but it does work for the most part
Reviving an old thread, but I just found that I can format a MicroSD under NTFS and it will work with Paragon's NTFS module. At the very least, my phone will mount the drive. I partitioned and formatted it with ext4 on my Linux machine and it didn't recognize it, but I did have it use the GUID partition table. Hoping to be able to load up some videos to take with me.
ext4 sdcard mount works
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
The problem is with the shell interpreting the special character ":"
To make it work, first create a symlink to the device node:
Code:
ln -s /dev/block/vold/197\:17 /dev/sd2
Then mount it:
Code:
busybox mount /dev/sd2 /mnt/tmp
Code:
sh-4.1# ls -l /dev/sd2
lrwxrwxrwx root root 2013-11-16 14:45 sd2 -> /dev/block/vold/179:17
sh-4.1# mount|grep sd2
/dev/sd2 /mnt/tmp ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
success mounting ext formatted SD Card on Android
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
tribh said:
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
Click to expand...
Click to collapse
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
tetakpatak said:
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
Click to expand...
Click to collapse
Since it's generic Linux kernel and busybox functionality it should work on any 'droid. The SDcard device name might be different than in the above example - you will see the correct device and partition names after you insert SDcard and run `dmesg | tail` on the tablet or phone.
(of course your device must be rooted and have busybox...)
Typically Windows is engineered not to recognise anything that does not come from Microsoft, so you will not be able to mount the Linux partition via Windows.

Safestrap on ME863

(sorry for my bad english and i still cant post link now)
According to http:// forum.xda-developers.com/showpost.php?p=20976390&postcount=294 ,
I think it may work to redirect partition into SD card, so that safestrap will work on non-VZW-phones.
Safestrap uses /preinstall as a new /system partition to install 2nd ROM on it,
We can make a new partition on SD card to replace "/preinstall".
Here is my steps:
backup your SD card and make partitions
boot to safestrap recovery with usb connected to your PC
plug to PC first, then boot to safestrap recovery mode,
now you can use adb shell to control your system.
1.1 make partitions on your SD Card (ref: http:// forum.xda-developers.com/showthread.php?t=534714)
SD card is /dev/block/mmcblk0 so use parted to modify it
Code:
~ # [B]parted /dev/block/mmcblk0[/B]
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 7946MB 7946MB primary fat32 lba
(parted)
as you can see i have a 8G SD card, fullly used as fat32 partition,
we use rm and mkpartfs to modify our SD card partition, make sure you have backuped your SD card.
for compatibility i choose to make fat32 partition first,
(512mb/1G for new system size is enough, but i want my 2nd system partiton bigger)
Code:
rm 1
mkpartfs primay fat32 0 6G
mkpartfs primay ext2 6G 100%
after done all the things you can see your partition by print,
e.g.
Code:
(parted) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 5996MB 5996MB primary fat32 lba
2 5996MB 7946MB 1949MB primary ext2
(parted) [B]quit[/B]
1.2 format fat32 partitions
Code:
busybox mkdosfs /dev/block/mmcblk0p1
1.3 make ext2 -> ext3
sometimes you have to mount /dev/block/mmcblk0p2 first, depends on the tune2fs version
Code:
tune2fs -j /dev/block/mmcblk0p2
or you can do ext3 -> ext4 by typing (i never tried, dont know if safestrap support ext4 ??)
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
Modify safestrap to use our new partition as 2nd system partition
after you install safetrap 1.08, you have some files in your original system,
we have to modify the /preinstall partition (/dev/block/mmcblk1p23) to our new partition (/dev/block/mmcblk0p2 as example here):
2.1 modify /system/bin/logwrapper
find /dev/block/mmcblk1p23, replace to your new partition
Code:
# mount preinstall and move /preinstall/etc/rootfs/* to /
/sbin/busybox mount -t ext3 [B]/dev/block/mmcblk0p2[/B] /preinstall
2.2 modify fixboot.sh in /system/etc/safestrap/2nd-init.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/sbin/busybox ln -s [B]/dev/block/mmcblk0p2[/B] system
2.3 modify etc/recovery.fstab in /system/etc/safestrap/recovery.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/system ext3 [B]/dev/block/mmcblk0p2[/B]
reboot for reloading settings
safestrap need to reload settings, we need reboot.
modify your 2nd ROM to make sure everything works
safestrap loads etc/rootfs from your new partition,
we need to modify /dev/block/mmcblk1p23 to our partition.
you can modify the ROM (.zip) file directly or edit them after installing ROM
just find /dev/block/mmcblk1p23 and replace them to your new partition (e.g. /dev/block/mmcblk0p2 here)
Special thanks to hashcode.
Enjoy safestrap on non-VZW-phones !

[GUIDE] External2Internal Ultimate for Galaxy Tab P1000

I thought about this idea while comparing my Android phone to my iPhone.
Both systems use variants of Unix, but the implementation is very different: there is one partition available to iPhone users, where all apps/music/everything gets installed. If you have a 64GB iPhone, this means you never run out of space for apps.
On the other hand, having a 16GB Android phone and a 64GB Micro SD puts you in a bit of a predicament, rather than a better place compared to the iPhone owner. Some genius has decided that there should be a 1-2GB /data partition where your apps go, and their data goes into the internal SD card; about 100-200 apps down the line (clearly, more than you need, but who are the android designers to judge), you run out of /data space and you end up doing ridiculous things like moving apps to SD, using some form of link2sd/data2sd script etc… Meanwhile you realise that your 64GB microSD is dead space and all you can do is store photos, music, video etc in it - rather than Asphalt data or Navigon maps.
This can change if you have a rooted phone! It took me a while to figure it out, but I first did it on my Galaxy Note N7000 following this guide: http://forum.xda-developers.com/showthread.php?t=1887864 and then decided to create a new guide for my Galaxy Tab 7 (P1000). Credits to badge2033 for the first guide.
After following this guide you will have:
* supersized data partition (12 gigs): no more move to sd needed and then again the stock move to sd feature will work as expected (it will move data to the actual external sd card)
* external sd card mounted as internal sd card: nothing to say here, just does what is expected
* real internal sd (ums partition) shrunk to minimum (half gig) because it needs to stay present: used to mount a swap file (optional)
What you will need:
* Rooted Galaxy Tab P1000 - hopefully running Android 4.3 HumberOS CyanogenMod, but not necessarily (this guide is made with CM10.2 in mind)
* Working knowledge of ADB / Google to get you through bits if you get stuck
Code:
/* Standard disclaimer: Your warranty is now void. Use at your own risk.
Modifying or replacing your device's software may void your device's warranty,
lead to data loss, hair loss, financial loss, privacy loss, security breaches, or
other damage, and therefore must be done entirely at your own risk.
Every time you do not backup and complain a puppy dies.
No one is responsible for your actions but yourself. Good luck. */
Procedure:
1. reboot to recovery, and connect your phone to your pc
2. run a command prompt and type the following (wait a little bit until the adb server starts on the phone, you can verify it by typing "adb devices" if you get a serie of digits then you're good to go.
Code:
adb shellcat /proc/partitions
You should see something like:
Code:
31 0 7680 mtdblock0
31 1 7680 mtdblock1
31 2 443904 mtdblock2
31 3 22528 mtdblock3
31 4 12800 mtdblock4
31 5 11264 mtdblock5
179 0 15552512 mmcblk0
179 1 13455328 mmcblk0p1
179 2 1994752 mmcblk0p2
179 3 102400 mmcblk0p3
179 16 1024 mmcblk0boot1
179 8 1024 mmcblk0boot0
179 24 31166976 mmcblk1
179 25 31162880 mmcblk1p1
Backup your /data to External SD. REMEMBER YOU HAVE ALREADY COPIED YOUR INTERNAL SD TO THE EXTERNAL ONE!!! I did a dd backup and a nandroid in CWM. You only need the nandroid to restore later.
Code:
dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/databack.img bs=4096
Code:
/*** WARNING!!! Do your own backups / nandroids /
write important things down on a napkin, if this does not work for you
and you lose data I'm not responsible!!! ***/
You should see something like:
Code:
498688+0 records in
498688+0 records out
2042626048 bytes (1.9GB) copied, 277.149450 seconds, 7.0MB/s
Then use parted, the partition editor:
Code:
parted /dev/block/mmcblk0
you'll get into the parted interactive shell, this is where serious work done
Code:
unit b
print
You should see something like:
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15925772288B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32768B 13778288639B 13778255872B primary fat32
2 13778288640B 15820914687B 2042626048B primary ext4
3 15820914688B 15925772287B 104857600B primary ext4
Code:
did i remind you to backup your system,this is your last stop before the no back pointso you just might wanna "move" all your internal sd stuff to the external sd,and backup your system to the external sd also (you just need to restore the data partition afterwards the rest of the system is safe but who knows :p)ps: you can do your backup on cwm without leaving adb shell on the pc just like you will do the format later thanks to cwm
remove the partitions
Code:
rm 1
rm 2
make the new changed size partitions
Code:
mkpart primary 32768 536903167
mkpart primary 536903168 15820914687
print
you should see this output
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15925772288B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32768B 536903167B 536870400B primary fat32
2 536903168B 15820914687B 15284011520B primary
3 15820914688B 15925772287B 104857600B primary ext4
Format the data partition as ext2 (so that CWM can see it)
Code:
mkfs
Then choose 2, ext2
now in cwm go to mounts and storage and select "format /storage/sdcard0" and "format /data"
now restore your data partition in CWM.
and you will be able to boot you system normally. and you go to your storage information you will find that your app storage is now 13gigs and the usb storage is just 500 megs yay
For Android 4.3 modifying vold.fstab file (but for other versions do so with ciphray's guide on how to do so)
you can use the modified file from ciphray thread here which i didn't beacuse his file was smaller
What DOES work is the free External 2 Internal app in Google Play: https://play.google.com/store/apps/details?id=eu.codlab.int2ext&hl=el
Settings are (for CM 10.2 ROM):
Original Internal mounting point: /storage/sdcard0
Original External mounting point: /storage/sdcard1
Ext.sdcard device access: /dev/block/vold/179:25
[Have not done this - badge2033 suggests it]
as a final step you can use the now pretty useless internal space (500megs remember) as a swap sapce
download swapper2 from the play store here https://play.google.com/store/apps/d...v.n3o.swapper2
run it and go to settings
set swap place as /sdcard/external_sd/swapfile.swp
set swap size to the max
set the swappiness to 20 ( you can rise the value a little but don't put a high value or the system will do much swapping all the time -value of 100 means any memory not used actively will be swapped- )
wait until the process finishes then reboot your phone
you can verify that swap is working by typing "free" in the shell if the line beginning with swap is not all zeros then you're swap is working.
Phew! That was a long guide. Questions / comments below.
Good idea!
im waiting for better CM 10.2 and will try (my p1000 is on alroger's cm 10.1 now)
Sent from GT-P1000 using Tapatalk4
Just to be sure to have understood everything.
You have convert the internal storage in data partition but It can't be use anymore as a storage?
Thanks
Yes. The original partitioning of internal storage is about 2gb data / 12gb storage, now it's just 500mb storage. Then with the sd card swap this 500mb becomes obsolete as a 32 or 64 gb microSD takes the place of storage.
help me.
I really like the way you propose, I like to do this but,
after going to recovery and plug in,i open a cmd(admin) and type adb devices and this massage appear:
##################################
C:\Users\farzad>adb devices
List of devices attached
32348202BA2300EC device
C:\Users\farzad>
##################################
after that when I type this code:
>adb shellcat /proc/partitions
the help of adb appear:
##################################
Android Debug Bridge version 1.0.25
-d - directs c
e
returns a
present.
-e - directs c
returns a
unning.
-s <serial number> - directs c
ith
the given
##################################
what should I do? where is my mistake?
tnx
farza(db)astany said:
help me.
after going to recovery and plug in,i open a cmd(admin) and type adb devices and this massage appear:
after that when I type this code:
>adb shellcat /proc/partitions
the help of adb appear:
what should I do? where is my mistake?
tnx
Click to expand...
Click to collapse
Try entering separate commands in the command line
adb shell
cat /proc/partitions
You are welcome.
---------- Post added at 02:32 AM ---------- Previous post was at 01:58 AM ----------
Thanks for this post. In my case, this method somehow unlocked hidden 16GB storage. Without microSD inserted, it has 14GB of internal storage (where you can have your apps)... and 15GB of SD internal storage. (can be used as usb drive and storage for movies and music and books)
Moving EVERYTHING to external SD card
Hello,
Sorry for necroposting, but I'm looking for a way to revive a Samsung Galaxy Tab GT-P1000 that had a damaged internal storage chip physically removed.
I managed to intall CyanogenMod 13 on the external SD card partitionned as follow :
Code:
cat /fstab.p1
# Android fstab file.
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
recovery /recovery mtd defaults recoveryonly
boot /boot mtd defaults recoveryonly
radio /radio mtd defaults recoveryonly
/dev/block/mtd/by-name/cache /cache yaffs2 defaults recoveryonly
# LVM Volumes
/dev/lvpool/system /system ext4 ro,discard wait
/dev/lvpool/userdata /data ext4 noatime,discard,nodev,nosuid,nomblk_io_submit,errors=panic wait,encryptable=footer,length=-16384
/dev/lvpool/userdata /data f2fs rw,noatime,discard,nosuid,nodev,nodiratime,inline_xattr wait,encryptable=footer,length=-16384
/dev/block/mtd/by-name/datadata /datadata yaffs2 defaults recoveryonly
/devices/platform/s3c-sdhci.0/mmc_host/mmc0/*/mmcblk0 auto auto defaults voldmanaged=sdcard0:1,noemulatedsd,nonremovable
/devices/platform/s3c-sdhci.2/mmc_host/mmc1/*/mmcblk1 auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
# zRAM
/dev/block/zram0 none swap defaults zramsize=134217728
However, most apps crash when started, as they expect a writable internal storage, and there is none.
Additionnal data :
Code:
[email protected]:/ # cat /proc/partitions
major minor #blocks name
254 0 131072 zram0
31 0 7680 mtdblock0
31 1 7680 mtdblock1
31 2 432128 mtdblock2
31 3 17920 mtdblock3
31 4 12800 mtdblock4
31 5 16384 mtdblock5
31 6 11264 mtdblock6
179 0 15558144 mmcblk0
179 1 10844160 mmcblk0p1
179 2 4193280 mmcblk0p2
179 3 510976 mmcblk0p3
253 0 921600 dm-0
253 1 3768320 dm-1
Code:
[email protected]:/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00780000 00040000 "boot"
mtd1: 00780000 00040000 "recovery"
mtd2: 1a600000 00040000 "datadata"
mtd3: 01180000 00040000 "cache"
mtd4: 00c80000 00040000 "efs"
mtd5: 01000000 00040000 "radio"
mtd6: 00b00000 00040000 "reservoir"
What I'm looking for is a way to use the external SD card as /system, /data, AND internal storage. Can anyone help me achieve this ?

Categories

Resources