Resize Nook STR Partitions - Nook Touch Android Development

I wanted to increase the available space for my side loaded content and reduce the space for B&N downloads
First I used noogie to make a backup of the pristine nook at v 1.0.0, next I upgraded it to v1.0.1 and made another image
Then these commands on a linux box
Code:
[FONT="Fixedsys"]
dd if=/dev/zero of=new.img bs=1958739968 count=1
(
cat << _EOF
0,8,c,*
,2,c
,64,L
,,E
,128,L
,668,c
,32,L
,,L
_EOF
) | sfdisk -H128 -S32 -D -f new.img
kpartx -a mynookbackup.img
kpartx -a new.img
mkdir x z
cd x
mkdir boot cache data factory NOOK p5 rom
cd ../z
mkdir boot cache data factory NOOK p5 rom
cd ..
mkdosfs -H128 -t32 -F16 -n boot /dev/mapper/loop1p1
mkdosfs -H128 -t32 -F12 -n rom /dev/mapper/loop1p2
mkdosfs -H128 -t32 -F32 -n NOOK /dev/mapper/loop1p6
mkfs.ext2 -L factory /dev/mapper/loop1p3
mkfs.ext2 /dev/mapper/loop1p5
mkfs.ext3 -L cache /dev/mapper/loop1p7
mkfs.ext3 -L data /dev/mapper/loop1p8
cd x
mount /dev/mapper/loop0p1 boot
mount /dev/mapper/loop0p2 rom
mount /dev/mapper/loop0p3 factory
mount /dev/mapper/loop0p5 p5
mount /dev/mapper/loop0p6 NOOK
mount /dev/mapper/loop0p7 cache
mount /dev/mapper/loop0p8 data
cd ../z
mount /dev/mapper/loop1p1 boot
mount /dev/mapper/loop1p2 rom
mount /dev/mapper/loop1p3 factory
mount /dev/mapper/loop1p5 p5
mount /dev/mapper/loop1p6 NOOK
mount /dev/mapper/loop1p7 cache
mount /dev/mapper/loop1p8 data
cd ..
rsync -avP x/ z/
sync
umount x/*
umount z/*
kpartx -d mynookbackup.img
kpartx -d new.img
[/FONT]
after that I now have 1.4 GB for side loaded content.
Hope this helps someone.

Thanks for sharing. This is something that i have been wanting to do so I would not have to use an sd card.
Now I do have a question on this. the part
Code:
(
cat << _EOF
0,8,c,*
,2,c
,64,L
,,E
,128,L
,668,c
,32,L
,,L
_EOF
) | sfdisk -H128 -S32 -D -f new.img
what does this actually do?

It creates a new partition table on the file new.img using sfdisk I can script it instead of doing it manually
Here is the output of fdisk -l on both files
Code:
Disk mynook101.img: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders, total 3825664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
mynook101.img1 * 32 155647 77808 c W95 FAT32 (LBA)
mynook101.img2 155648 188415 16384 c W95 FAT32 (LBA)
mynook101.img3 188416 577535 194560 83 Linux
mynook101.img4 577536 3792895 1607680 5 Extended
mynook101.img5 577568 1167359 294896 83 Linux
mynook101.img6 1167392 1658879 245744 c W95 FAT32 (LBA)
mynook101.img7 1658912 2150399 245744 83 Linux
mynook101.img8 2150432 3792895 821232 83 Linux
Disk new.img: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders, total 3825664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
new.img1 * 32 32767 16368 c W95 FAT32 (LBA)
new.img2 32768 40959 4096 c W95 FAT32 (LBA)
new.img3 40960 303103 131072 83 Linux
new.img4 303104 3825663 1761280 5 Extended
new.img5 303136 827391 262128 83 Linux
new.img6 827424 3563519 1368048 c W95 FAT32 (LBA)
new.img7 3563552 3694591 65520 83 Linux
new.img8 3694624 3825663 65520 83 Linux

and here is the output of df to see where the space has been reallocated
Code:
Filesystem Type Size Used Avail Use% Mounted on
vfat 75M 9.8M 66M 14% /mnt/scratch/tmp/x/boot
vfat 16M 119K 16M 1% /mnt/scratch/tmp/x/rom
ext2 184M 106M 77M 58% /mnt/scratch/tmp/x/factory
ext2 279M 185M 92M 67% /mnt/scratch/tmp/x/p5
vfat 237M 171K 237M 1% /mnt/scratch/tmp/x/NOOK
ext3 233M 6.1M 224M 3% /mnt/scratch/tmp/x/cache
ext3 790M 42M 740M 6% /mnt/scratch/tmp/x/data
vfat 16M 9.8M 6.2M 62% /mnt/scratch/tmp/z/boot
vfat 4.0M 148K 3.9M 4% /mnt/scratch/tmp/z/rom
ext2 124M 106M 13M 90% /mnt/scratch/tmp/z/factory
ext2 248M 185M 51M 79% /mnt/scratch/tmp/z/p5
vfat 1.4G 212K 1.4G 1% /mnt/scratch/tmp/z/NOOK
ext3 62M 5.4M 54M 10% /mnt/scratch/tmp/z/cache
ext3 62M 30M 29M 51% /mnt/scratch/tmp/z/data

Thank you very much, it works very well
Here is what I did with comments of what I understood (might be useful for someone)
Code:
#First, we create a blank image (same size as the nook, mine is 1962934272)
#I used bs=1916928 count=1024 instead of bs=1962934272 count=1, I assume it is the same (or else I didn't have enough memory))
dd if=/dev/zero of=new.img bs=1916928 count=1024
#Then, we create partitions on it with sfdisk (I used a larger data partition to have more space for my apps)
(
cat << _EOF
0,8,c,*
,2,c
,64,L
,,E
,128,L
,620,c
,32,L
,,L
_EOF
) | sfdisk -H128 -S32 -D -f new.img
#We create partition mapping (or something like that) so that we can "access" them in /dev/mapper
kpartx -a mynookbackup.img
kpartx -a new.img
mkdir x z
cd x
mkdir boot cache data factory NOOK p5 rom
cd ../z
mkdir boot cache data factory NOOK p5 rom
cd ..
# We create the filesystems on the partitions (Your mkdosfs commands were invalid for me, so I did something like)
mkdosfs -F16 -n boot /dev/mapper/loop1p1
mkdosfs -F12 -n rom /dev/mapper/loop1p2
mkdosfs -F32 -n NOOK /dev/mapper/loop1p6
mkfs.ext2 -L factory /dev/mapper/loop1p3
mkfs.ext2 /dev/mapper/loop1p5
mkfs.ext3 -L cache /dev/mapper/loop1p7
mkfs.ext3 -L data /dev/mapper/loop1p8
#We mount them
cd x
mount /dev/mapper/loop0p1 boot
mount /dev/mapper/loop0p2 rom
mount /dev/mapper/loop0p3 factory
mount /dev/mapper/loop0p5 p5
mount /dev/mapper/loop0p6 NOOK
mount /dev/mapper/loop0p7 cache
mount /dev/mapper/loop0p8 data
cd ../z
mount /dev/mapper/loop1p1 boot
mount /dev/mapper/loop1p2 rom
mount /dev/mapper/loop1p3 factory
mount /dev/mapper/loop1p5 p5
mount /dev/mapper/loop1p6 NOOK
mount /dev/mapper/loop1p7 cache
mount /dev/mapper/loop1p8 data
cd ..
#We copy the content of the nook's partitions to the new ones
rsync -avP x/ z/
sync
umount x/*
umount z/*
kpartx -d mynookbackup.img
kpartx -d new.img
#Now we just have to "restore" new.img on the nook
For information, my partition table
Code:
Disque new.img*: 1962*Mo, 1962934272*octets
128 têtes, 32 secteurs/piste, 936 cylindres, total 3833856 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)*: 512*octets / 512*octets
taille d'E/S (minimale / optimale)*: 512*octets / 512*octets
Identifiant de disque*: 0x00000000
Périphérique Amorce Début Fin Blocs Id Système
new.img1 * 32 32767 16368 c W95 FAT32 (LBA)
new.img2 32768 40959 4096 c W95 FAT32 (LBA)
new.img3 40960 303103 131072 83 Linux
new.img4 303104 3833855 1765376 5 Étendue
new.img5 303136 827391 262128 83 Linux
new.img6 827424 3366911 1269744 c W95 FAT32 (LBA)
new.img7 3366944 3497983 65520 83 Linux
new.img8 3498016 3833855 167920 83 Linux
#The original one
Disque /dev/sdb*: 1962*Mo, 1962934272*octets
128 têtes, 32 secteurs/piste, 936 cylindres, total 3833856 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)*: 512*octets / 512*octets
taille d'E/S (minimale / optimale)*: 512*octets / 512*octets
Identifiant de disque*: 0x00000000
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 32 155647 77808 c W95 FAT32 (LBA)
/dev/sdb2 155648 188415 16384 c W95 FAT32 (LBA)
/dev/sdb3 188416 577535 194560 83 Linux
/dev/sdb4 577536 3792895 1607680 5 Étendue
/dev/sdb5 577568 1167359 294896 83 Linux
/dev/sdb6 1167392 1658879 245744 c W95 FAT32 (LBA)
/dev/sdb7 1658912 2150399 245744 83 Linux
/dev/sdb8 2150432 3792895 821232 83 Linux
#df
Sys. de fichiers Taille Util. Disp. Uti% Monté sur
/dev/mapper/loop0p1 75M 58M 17M 78% /home/mdall/x/boot
/dev/mapper/loop0p2 16M 120K 16M 1% /home/mdall/x/rom
/dev/mapper/loop0p3 184M 106M 77M 58% /home/mdall/x/factory
/dev/mapper/loop0p5 279M 194M 83M 71% /home/mdall/x/p5
/dev/mapper/loop0p6 240M 104M 137M 43% /home/mdall/x/NOOK
/dev/mapper/loop0p7 233M 14M 217M 6% /home/mdall/x/cache
/dev/mapper/loop0p8 790M 149M 633M 20% /home/mdall/x/data
/dev/mapper/loop1p1 16M 10M 6,0M 63% /home/mdall/z/boot
/dev/mapper/loop1p2 4,0M 150K 3,9M 4% /home/mdall/z/rom
/dev/mapper/loop1p3 124M 106M 13M 90% /home/mdall/z/factory
/dev/mapper/loop1p5 248M 191M 45M 82% /home/mdall/z/p5
/dev/mapper/loop1p6 1,3G 104M 1,2G 9% /home/mdall/z/NOOK
/dev/mapper/loop1p7 62M 13M 47M 21% /home/mdall/z/cache
/dev/mapper/loop1p8 159M 136M 16M 90% /home/mdall/z/data

For those of us tards who have no clue how to use linux and still wanna increase the size of our Nook Touch, is there a nice gui that will do the same thing?

Another helpful trick to add to this mix:
symlink /data/media to
/media so you can actually see the files BN is downloading to your device.
in adb shell or via ssh:
cd /data/media
rm -r *
cd ..
rmdir media
ln -s media /media
After doing this, the reader, etc. put their files where you can pick them up and archive them in Calibre, etc.

One more nook succesfully resized.
Thanks

is a step by step instruction possible......

Hi, I can see the you do not care about bootloader during the resize. Do you know what bootloader is used in nook? grub? (don't have my nook atm so I cannot check it)

cceerrtt said:
Hi, I can see the you do not care about bootloader during the resize. Do you know what bootloader is used in nook? grub? (don't have my nook atm so I cannot check it)
Click to expand...
Click to collapse
x-loader and u-boot, both located on the fat32 /boot partition.
This is the beauty of the omap3 platform

is it possible to create a script that does this automagically?

user4242 said:
is it possible to create a script that does this automagically?
Click to expand...
Click to collapse
If you have access to a Linux distro you can easily write one yourself based on the info posted in xda - B & N N T.
If you need more info I have a post here, just change the values to what you fell suits you

mdall said:
Thank you very much, it works very well
Here is what I did with comments of what I understood (might be useful for someone)
Code:
#First, we create a blank image (same size as the nook, mine is 1962934272)
#I used bs=1916928 count=1024 instead of bs=1962934272 count=1, I assume it is the same (or else I didn't have enough memory))
dd if=/dev/zero of=new.img bs=1916928 count=1024
#Then, we create partitions on it with sfdisk (I used a larger data partition to have more space for my apps)
(
cat << _EOF
0,8,c,*
,2,c
,64,L
,,E
,128,L
,620,c
,32,L
,,L
_EOF
) | sfdisk -H128 -S32 -D -f new.img
#We create partition mapping (or something like that) so that we can "access" them in /dev/mapper
kpartx -a mynookbackup.img
kpartx -a new.img
mkdir x z
cd x
mkdir boot cache data factory NOOK p5 rom
cd ../z
mkdir boot cache data factory NOOK p5 rom
cd ..
# We create the filesystems on the partitions (Your mkdosfs commands were invalid for me, so I did something like)
mkdosfs -F16 -n boot /dev/mapper/loop1p1
mkdosfs -F12 -n rom /dev/mapper/loop1p2
mkdosfs -F32 -n NOOK /dev/mapper/loop1p6
mkfs.ext2 -L factory /dev/mapper/loop1p3
mkfs.ext2 /dev/mapper/loop1p5
mkfs.ext3 -L cache /dev/mapper/loop1p7
mkfs.ext3 -L data /dev/mapper/loop1p8
#We mount them
cd x
mount /dev/mapper/loop0p1 boot
mount /dev/mapper/loop0p2 rom
mount /dev/mapper/loop0p3 factory
mount /dev/mapper/loop0p5 p5
mount /dev/mapper/loop0p6 NOOK
mount /dev/mapper/loop0p7 cache
mount /dev/mapper/loop0p8 data
cd ../z
mount /dev/mapper/loop1p1 boot
mount /dev/mapper/loop1p2 rom
mount /dev/mapper/loop1p3 factory
mount /dev/mapper/loop1p5 p5
mount /dev/mapper/loop1p6 NOOK
mount /dev/mapper/loop1p7 cache
mount /dev/mapper/loop1p8 data
cd ..
#We copy the content of the nook's partitions to the new ones
rsync -avP x/ z/
sync
umount x/*
umount z/*
kpartx -d mynookbackup.img
kpartx -d new.img
#Now we just have to "restore" new.img on the nook
For information, my partition table
Code:
Disque new.img*: 1962*Mo, 1962934272*octets
128 têtes, 32 secteurs/piste, 936 cylindres, total 3833856 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)*: 512*octets / 512*octets
taille d'E/S (minimale / optimale)*: 512*octets / 512*octets
Identifiant de disque*: 0x00000000
Périphérique Amorce Début Fin Blocs Id Système
new.img1 * 32 32767 16368 c W95 FAT32 (LBA)
new.img2 32768 40959 4096 c W95 FAT32 (LBA)
new.img3 40960 303103 131072 83 Linux
new.img4 303104 3833855 1765376 5 Étendue
new.img5 303136 827391 262128 83 Linux
new.img6 827424 3366911 1269744 c W95 FAT32 (LBA)
new.img7 3366944 3497983 65520 83 Linux
new.img8 3498016 3833855 167920 83 Linux
#The original one
Disque /dev/sdb*: 1962*Mo, 1962934272*octets
128 têtes, 32 secteurs/piste, 936 cylindres, total 3833856 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)*: 512*octets / 512*octets
taille d'E/S (minimale / optimale)*: 512*octets / 512*octets
Identifiant de disque*: 0x00000000
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 32 155647 77808 c W95 FAT32 (LBA)
/dev/sdb2 155648 188415 16384 c W95 FAT32 (LBA)
/dev/sdb3 188416 577535 194560 83 Linux
/dev/sdb4 577536 3792895 1607680 5 Étendue
/dev/sdb5 577568 1167359 294896 83 Linux
/dev/sdb6 1167392 1658879 245744 c W95 FAT32 (LBA)
/dev/sdb7 1658912 2150399 245744 83 Linux
/dev/sdb8 2150432 3792895 821232 83 Linux
#df
Sys. de fichiers Taille Util. Disp. Uti% Monté sur
/dev/mapper/loop0p1 75M 58M 17M 78% /home/mdall/x/boot
/dev/mapper/loop0p2 16M 120K 16M 1% /home/mdall/x/rom
/dev/mapper/loop0p3 184M 106M 77M 58% /home/mdall/x/factory
/dev/mapper/loop0p5 279M 194M 83M 71% /home/mdall/x/p5
/dev/mapper/loop0p6 240M 104M 137M 43% /home/mdall/x/NOOK
/dev/mapper/loop0p7 233M 14M 217M 6% /home/mdall/x/cache
/dev/mapper/loop0p8 790M 149M 633M 20% /home/mdall/x/data
/dev/mapper/loop1p1 16M 10M 6,0M 63% /home/mdall/z/boot
/dev/mapper/loop1p2 4,0M 150K 3,9M 4% /home/mdall/z/rom
/dev/mapper/loop1p3 124M 106M 13M 90% /home/mdall/z/factory
/dev/mapper/loop1p5 248M 191M 45M 82% /home/mdall/z/p5
/dev/mapper/loop1p6 1,3G 104M 1,2G 9% /home/mdall/z/NOOK
/dev/mapper/loop1p7 62M 13M 47M 21% /home/mdall/z/cache
/dev/mapper/loop1p8 159M 136M 16M 90% /home/mdall/z/data
Click to expand...
Click to collapse
copy-pasting this into the command line makes the process painless. It's ok as long as you take the time to read what's going on here, and mdall did a good job of explaining. I think 160MB for the data partition is a little big...but better safe then sorry: these are good numbers.

If you really wanted to do this, you might try asking around IRC in NookColor for a copy of the Partition Resize uRamdisk, with sufficient knowledge of uRamdisks/sh scripts, etc you could easily retool it to move around partition space on the N2E. Considering it was designed by BN's Devs for the sole purpose of changing Userspace into /data it shouldn't be hard to make it do the reverse. But something like this could be highly dangerous if it's not done right and there's always the risk of bricking your device if you mess up the script. Just some words of advice.

mkdosfs -H128 -t32 -F16 ....
Click to expand...
Click to collapse
I'm using the latest Knoppix (CD version) to do this, and my mkdosfs command didn't like the -H and -t options.
Are they heads and tracks, and are they important?
Other than that, I modified this line:
dd if=/dev/zero of=new.img bs=1958739968 count=1
Click to expand...
Click to collapse
dd if=/dev/zero of=new.img bs=244842496 count=8
because it complained about exhausted memory.
Did someone mention in this thread about how to write back to the NST?
dd if=new.img of=/dev/sdX
Well, I've updated mine to 1.1 and then did the partition resize, and everything seems to have gone smoothly.
Now, I've now moved on to nooting with TouchNooter v1.11.20, and that itself is a whole new kettle of fish, and for another thread.
ED: Oops... after installing some apps, it's complaining about low memory....
mdall said:
Thank you very much, it works very well
Here is what I did with comments of what I understood (might be useful for someone)
Code:
#Then, we create partitions on it with sfdisk (I used a larger data partition to have more space for my apps)
Click to expand...
Click to collapse
D'OH!!! *sigh* I'm redoing partition resizing by following mdall's script. Thanks mdall.

Hard work for me, but now it's all fine!! Good job!
My experience with Ubuntu 11.10:
Install kpartx: sudo apt-get install kpartx
Became root;
When make mkdosfs partitions, i haven't used flags "-H128 -t32" (thanks Mdall!).
Ex: mkdosfs -F16 -n boot /dev/mapper/loop1p1 instread of mkdosfs H 128 -f32 -F16 -n boot /dev/mapper/loop1p1 ...
when make all partiton with "mkdosfs" i've received this message:
"mkdosfs 3.0.9 (31 Jan 2010)
unable to get drive geometry, using default 255/63 " DON'T WORRY!
I have used a backup of fresh installation of salsichaNooter04, and the "data" folder of my backup image was "userdata", so i'have changed all "data" with "userdata".
Nice work, thanks a lot, sorry for english LoL

Here is another way to resize the partitions (maybe easier)
And I guess that we could also create something like that but for the Nook Touch (now that we have CWM)

A little question:
Can i rename my big new NOOK partition as "sdcard" ?
I use Dropbox and i would utilize my new partition instead of sd card.
It's possible?

I want to simply explain why resizing those partitions is... not clever....
You have those partitions on Your NOOK:
/rom (15.7MB)- self explanatory
/system (278MB)- as above
/data (790MB)- THIS is default internal storage in Android
/cache (232MB)- used for caching compiled java programs (in short way)
/media (240MB)- THIS is completely unnecessary partition
EXPLANATION:
What you really need is only internal storage, rom, system and cache. This is how it is done on most Android phones. B&N wants to block access to /data partition so they created special /media partition which is accessible from PC and you can put your files in there. That was easier for them. So /media partition is some kind of already inserted SD card.
If you have real SD card, probably much bigger, you really don't need another, very small partition to simulate SD card.
If you are not rooting it may sound good to have bigger /media partition and smaller /data partition. Maybe. This will cause many troubles but You can try.
IF you are rooting then making /data partition smaller is the most stupid thing I can imagine. In fact what you really want to do is to make /media partition smaller and make /data partition bigger! Or even better! Delete /media partition, make /data partition bigger and then just creater folder /media for compatibility. I didn't try, but this sounds good!
WHY not to scale /data down? Because /data partition is the place for everything in Android. And specially it is the place for APKs! Also this is the place for everything written by APKs. So when You will have smaller /data you may not install as many APKs as You want. This is not problem in Android 2.2 because You can install APKs on sdcard, but what we have here is Android 2.1.

Related

[Q] How to mount partition 2 (ext3) on SD card?

I used Amon-Ra's recovery to create a 1 GB ext3 partition on my SD card.
When I look at the card in a UNIX like OS the partition is there.
Ideally, I'd like to have partition's file system mount & unmount at /sd-ext
or /mnt/sd-ext programaticly. I've been trying to figure out what its /dev name is.
ADB's shell says partition 1 is /dev/block/vold/179:9 mounted on /mnt/sdcard.
There are 12 /dev/block/vold/179:?? (0-11) how do I find out which is
associated with partition 2?
Or is there another way to reach it? Is there a root app to mount / unmount
a file system? Do I need to use ADB or a local shell?
mouting and using tune2fs -l /dev/block/mmcblk0p2
tune2fs -l /dev/block/mmcblk0p2
you can use tune2fs -l and the block name to get the nitty gritty details of the partition or disk.
you can use df and or mount commands to get the details of your system
you can also cd into /dev/block/ and use ls to see all the files in there: below is my output with is use ls in /dev/block/
[email protected]_targa:/dev/block# ls
ls
dm-0
vold
loop7
loop6
loop5
loop4
loop3
loop2
loop1
loop0
ram15
ram14
ram13
ram12
ram11
ram10
ram9
ram8
ram7
ram6
ram5
ram4
ram3
ram2
ram1
ram0
mmcblk1p27
emstorage
mmcblk1p26
userdata
mmcblk1p25
webtop
mmcblk1p24
preinstall
mmcblk1p23
cache
mmcblk1p22
system
mmcblk1p21
kpanic
mmcblk1p20
cid
mmcblk1p19
misc
mmcblk1p18
cdrom
mmcblk1p17
recovery
mmcblk1p16
boot
mmcblk1p15
mmcblk1p14
mmcblk1p13
mmcblk1p12
mmcblk1p11
mmcblk1p10
mmcblk1p9
mmcblk1p8
pds
mmcblk1p7
mmcblk1p6
mmcblk1p5
mmcblk1p4
mmcblk1p3
mmcblk1p2
mmcblk1p1
mmcblk1
mmcblk0p3
mmcblk0p2
mmcblk0p1
platform
mmcblk0
[email protected]_targa:/dev/block#
mmcblk0... is my external sd card, it has 3 partitions, mmcblk0p1 is the one recognized and mounted by android, mmcblk0p2 is the ext3fs, and mmcblk0p3 is a linuxswap file
This should mount the ext3 partition to /data/sd-ext. You will need to create the sd-ect folder before running the command in the terminal.
mount -t ext3 -o rw /dev/block/vold/179:10 /data/sd-ext
cmlusco said:
This should mount the ext3 partition to /data/sd-ext. You will need to create the sd-ect folder before running the command in the terminal.
mount -t ext3 -o rw /dev/block/vold/179:10 /data/sd-ext
Click to expand...
Click to collapse
and than how to use it with vold to mount to PC via USB?
purportex said:
and than how to use it with vold to mount to PC via USB?
Click to expand...
Click to collapse
I dont believe that is possible, at least as far as i know. It would probably require a modified ramdisk which is over my head, i wouldnt know where to begin.

[Q] How 2 mv system & App2SD data from stock sdcard to new fat32+ext4+swap sdcard

I have an Epic4G running
Code:
Marcusant Revival v1 ROM
Samurai 3.0.1 Kernel
ClockworkMod 5.0.2.7
ROM Manager Premium v4.8.0.6
I've installed
Code:
Titanium Backup Pro v4.6.5.1
App 2 SD Pro v2.42 (http://android.a0soft.com)
I've moved all movable apps to the /sdcard, except for "ROM Manager".
I've backed up "all apps & data" with TitaniumBackup.
This is all 'on' the current /sdcard, which is the stock, out-of-the-box 8GB card:
Code:
adb devices
List of devices attached
393071F74C1D00EC device
adb shell
#
# busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 181.4M 32.0K 181.3M 0% /dev
tmpfs 181.4M 0 181.4M 0% /mnt/asec
tmpfs 181.4M 0 181.4M 0% /mnt/obb
/dev/block/stl9 251.8M 211.9M 40.0M 84% /system
/dev/block/stl10 484.8M 332.8M 152.0M 69% /data
/dev/block/stl11 163.2M 112.0K 163.1M 0% /cache
df: /mnt/.lfs: Function not implemented
/dev/block/vold/179:1
14.7G 13.3G 1.4G 91% /mnt/sdcard
/dev/block/vold/179:1
14.7G 13.3G 1.4G 91% /mnt/secure/asec
/dev/block/dm-1 4.1M 2.6M 1.5M 64% /mnt/asec/com.hcom.android-1
/dev/block/dm-2 2.0M 108.0K 1.9M 5% /mnt/asec/com.HexPlus-1
...
/dev/block/dm-88 5.1M 3.2M 1.8M 64% /mnt/asec/com.amazon.kindle-1
# ls -a /mnt
.lfs
obb
asec
secure
sdcard
I've purchased a new 32GB Class10 sdcard.
I've formatted it @linux desktop to a map of:
Code:
/dev/sde1 -> 29.25 GB FAT23
/dev/sde2 -> 1.5 GB ext4
/dev/sde3 -> * (~62 MB) swap
checking,
Code:
fdisk -l /dev/sde
Disk /dev/sde: 32.0 GB, 32018268160 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62535680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d58e8
Device Boot Start End Blocks Id System
/dev/sde1 2048 59248639 29623296 c W95 FAT32 (LBA)
/dev/sde2 59248640 62396415 1573888 83 Linux
/dev/sde3 62396416 62535679 69632 82 Linux swap / Solaris
I clearly need to move data from the 'old' sdcard to the 'new' one.
I've read a bunch of sources online, and they mention "/system/sd" directory, which I do *NOT* seem to have, and they fail to make any mention of "/mnt/asec", which I *DO* have ...
Since there's a different partition map, and I'm guessing a different directory structure that'll be used (?), what -- exactly -- needs to get copied to what?
The goal is to copy correctly/completely, swap in the new card, and boot successfully.
Better safe than sorry ...
Honestly, I just did an sdcard swap...and all I did; make a folder on my PC desktop, drag all files to folder from phone, unmount and insert new SD in phone, drag and drop files on new SD. No problems.
sent from my EPICally transmogrified EI22: Thunderhawk III- adrenaline injected, SUPERCHARGED
and how did you partition your new sdcard? single partition, FAT32?
[email protected] said:
and how did you partition your new sdcard? single partition, FAT32?
Click to expand...
Click to collapse
I didn't- just moved the files. However, it was just a couple of days before I Odined- went to EC05, rerooted, and then to EI22- so it may have been buggy and I never even had time to notice
- I considered repartition, but wanted to see what would happen if I just dropped the files. Everything seemed to have run smoothly for a couple of days, but like I said, I rerooted and moved to EI22 shortly after
> I didn't
Then that's likely a different case altogether. I'm specifically asking about what-goes-where? in the multiple-partition case.

Read-only file system on microSD

Hi everybody..
I have a strange and boring issue with my micro SD card that I use with my smartphone.. Today, while I was reading a PDF book the phone freezes it self: the only solution was to reboot it!
But.. WOW; 'till that moment the phone doesn't recognize my micro-SD any more!! It doesn't give warnings or messages.. nothing.. the only problem is that my SD card is inserted but the phone won't read it..
I mount the micro sd into my Slackware laptop and it still have partitions but they are all read-only! Every thing I try to do (copy files, move, delete etc) fails with a read-only warning!
So I try to format all from the scratch.. but it is not possible!! It doesn't let me format my SD for the same reason: read-only file system!!
WOW!! It's absurd!!
What can I do? is there a solution for that?
I tried to use fsck, badblocks, mkfs but nothing helped!
fdisk -l output
Code:
Disk /dev/sdb: 15.9 GB, 15918432256 bytes
255 heads, 63 sectors/track, 1935 cylinders, total 31090688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00031a4f
Device Boot Start End Blocks Id System
/dev/sdb1 1 29027343 14513671+ c W95 FAT32 (LBA)
/dev/sdb2 29027344 31027343 1000000 83 Linux
/dev/sdb3 31027344 31090687 31672 82 Linux swap
I have a FAT partition for data, a ext2 one used with Link2sd and a swap one.
This is the result I got when trying to format the second partition..
Code:
# mkfs.ext2 /dev/sdb2
mke2fs 1.41.14 (22-Dec-2010)
/dev/sdb2: Read-only file system while setting up superblock
The same to me. Wish a help!! Thanks

[Guide] Find7 9GB App storage and mount External SD-Card as SD0

In this Guide you will learn how to modify your system to handle the 9GB Partition 29 as Data (App-Storage) and use the external SD-Card as internal.
Don't be afraid, this is a lot of text mostly to explain the whole procedure, the steps are straight forward.
Thanks go to Kishd (oppoforums), Coldbird and alienmind (xdadevelopers)
Beside of the public made solutions i will do the following:
Instead of repartitioning the device i will change only the partition name of "sdcard" to "userdata", mount the external SD as internal and use the remaining 3GB Partition as external SD.
So partition 15 will become "sdcard1" and partition 29 will become "userdata"
On the Find7a you will have 9 gigs of application space and xx gigs for the internal sd (size of the sdcard).
This should work on Find7 too, someone has to check the partition layout if it is equal, than you will have 25 gigs of application space and xx gigs for the internal sd (size of the sdcard).
PRECAUTIONS:
If you mess around with partition table you could brick your device, so be careful!
Thes procedure worked for me, i am not responseable for any missing or mistyped commands/procedures, so THINK BEFORE YOU DO ANYTHING!
I am not an android Pro, nor an Develper. My Spare time is very limited so i can't help you out if something goes wrong!
I've done this with Gummy Rom, not tryed with ColorOS or another custom rom but it should work on all AOSP-based ROMS.
The swapped SD-cards do not belong to recovery, so the internal SD is accessed as before.
What do you need:
1.: Time: This is not done in 5 minutes, so please be patient.
2.: A Linux-PC with working ADB and Fastboot
3.: TWRP recovery image on your PC or installed on the device: http://techerrata.com/browse/twrp2/find7a (I used 2.7.1.0)
4.: An SD card with at least 16Gb inseted into your Find7a
5.: Fully charge your Device before messing around, some jobs will need a lot of time.
6.: A fitting custom ROM installed, i've done this with Gummy-M2.3-06-29-14-NIGHTLY-find7 which is suitable for find7 and find7a which can be found here: http://crackflasher.com/gummy-m2-3-06-29-14-nightly-find7-zip-oppo-find-7a-gummy/
7.: The zip-file of the custom rom on your local PC
What are we going to do:
0.: Boot into recovery and access the Device via ADB
1.: Format external SD to Ext4 Filesystem
2.: Backup the original partition layout and all partitions too
3.: Copy Data from internal SD to external
4.: Rename two partitions
5.: Format the new "userdata" partition and move all content of the old to the new location
6.: Format the new "sdcard1" partition
7.: Edit/replace fstab files in /etc to tell TWRP and System the new mountpoints
OK, let's do the trick
Step0.: Booting into recovery and accessing the Device via ADB-shell:
Put the phone into fast boot mode. (Power Volume Up simultaneously)
Open a terminal in your linux-PC and do the following as root (sudo -r):
#: fastboot devices ( check that fastboot is up and running)
#: fastboot boot openrecovery-twrp-2.7.1.0-find7a.img (or boot into TWRP if already installed)
The phone will boot into twrp.
Connect the phone and go into adb
#: adb shell
After entering the adb shell you should see the following in your terminal:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
~ #
Step1.: Format external SD to Ext4 Filesystem
First we have to write a new partition table as i dont know how your SD-card looks:
umount /external_sd (could cause errors if no filesystem is present on SD - dont mind)
parted /dev/block/mmcblk1 (you should see parted welcome message, no errors!)
mklabel msdos (this will write a new partition table on your sdcard)
mkpart primary ext4 1 -1 (this will make a ext4 partition which uses the whole sd)
quit
Now we are going to format the ext4 partition:
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk1p1
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk1p1
mount /dev/block/mmcblk1p1 /external_sd (Mount the new formatted sd-card -- this should show no errors)
If all is done without errors, proceed to step2
Step2.: Backup the original partition layout and all partitions too
dd makes physical imagea of partitions so you can put it back if needed
While DD is copying you will see no progress bar or any output, so BE PATIENT!
Code:
mkdir /external_sd/backup
parted /dev/block/mmcblk0 print > /external_sd/backup/partitions (original partition Layout for later reference)
dd if=/dev/block/mmcblk0p1 of=/external_sd/backup/modem
dd if=/dev/block/mmcblk0p2 of=/external_sd/backup/sbl1
dd if=/dev/block/mmcblk0p3 of=/external_sd/backup/dbi
dd if=/dev/block/mmcblk0p4 of=/external_sd/backup/ddr
dd if=/dev/block/mmcblk0p5 of=/external_sd/backup/aboot
dd if=/dev/block/mmcblk0p6 of=/external_sd/backup/rpm
dd if=/dev/block/mmcblk0p7 of=/external_sd/backup/boot
dd if=/dev/block/mmcblk0p8 of=/external_sd/backup/tz
dd if=/dev/block/mmcblk0p9 of=/external_sd/backup/pad
dd if=/dev/block/mmcblk0p10 of=/external_sd/backup/modemst1
dd if=/dev/block/mmcblk0p11 of=/external_sd/backup/modemst2
dd if=/dev/block/mmcblk0p12 of=/external_sd/backup/oppodycnvbk
dd if=/dev/block/mmcblk0p13 of=/external_sd/backup/oppostanvbk
dd if=/dev/block/mmcblk0p14 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/system.gz
dd if=/dev/block/mmcblk0p16 of=/external_sd/backup/persist
dd if=/dev/block/mmcblk0p17 of=/external_sd/backup/cache
dd if=/dev/block/mmcblk0p18 of=/external_sd/backup/recovery
dd if=/dev/block/mmcblk0p19 of=/external_sd/backup/fsg
dd if=/dev/block/mmcblk0p20 of=/external_sd/backup/fsc
dd if=/dev/block/mmcblk0p21 of=/external_sd/backup/ssd
dd if=/dev/block/mmcblk0p22 of=/external_sd/backup/misc
dd if=/dev/block/mmcblk0p23 of=/external_sd/backup/LOGO
dd if=/dev/block/mmcblk0p24 of=/external_sd/backup/DRIVER
dd if=/dev/block/mmcblk0p25 of=/external_sd/backup/reserve1
dd if=/dev/block/mmcblk0p26 of=/external_sd/backup/reserve2
dd if=/dev/block/mmcblk0p27 of=/external_sd/backup/reserve3
dd if=/dev/block/mmcblk0p28 of=/external_sd/backup/reserve4
dd if=/dev/block/mmcblk0p30 of=/external_sd/backup/grow
It is not urgently needed to make dd backups of userdata and (internal) sdcard but here for refernce:
Do a compressed multispan backup with dd so you can use the files on an FAT32 filesystem too:
dd if=/dev/block/mmcblk0p15 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/userdata.gz.
dd if=/dev/block/mmcblk0p29 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/sdcard.gz.
Example of restoring partition 29:
cat /external_sd/backup/userdata.gz.* | gzip -dc | dd of=/dev/block/mmcblk0p29
Step3.: Copy Data from internal SD to external SD:
cp -a -i /internal_sd/* /external_sd/ (this can take a while)
ls /external_sd/ (you should see a bunch of files here)
If nothing went wrong go to step4
Step4.: Rename partitions:
umount /internal_sd/
umount /and-sec/
umount /data/
parted /dev/block/mmcblk0
name 15 sdcard
name 29 userdata
print (should show you the renamed layout)
quit
If nothing went wrong go to step5
Step5.: Format the new "userdata" partition and move all content of the old to the new location:
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
mount /dev/block/mmcblk0p15 /internal_sd
mount /dev/block/mmcblk0p29 /data
cp -a -i /internal_sd/* /data/ (this can take a while)
If nothing went wrong go to step6
Step6.: Format the new "sdcard1" partition:
umount /internal_sd/
mke2fs -t ext4 -m 0 -L sdcard1 /dev/block/mmcblk0p15
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p15
If nothing went wrong go to step7
Step7.: Edit/replace fstab.qcom file to tell System the new mountpoints:
Guide from Coldbird: http://www.oppoforums.com/threads/unpack-repack-find-7-a-boot-img.14538/
Unpack update.zip and make a working directory.
copy file boot.img from update.zip into this directory
download https://github.com/xiaolu/mkbootimg_tools
unpack bootimage:
mkboot boot.img extracted (this will create a folder "extracted" with the content of boot.img where you can find fstab.qcom
edit fstab.qcom co match your needs (i.e. swap internal and external storage as shown below)
pack bootimage:
mkboot extracted newboot.img (creates newboot.img)
test bootimage (via fastboot):
sudo fastboot boot newboot.img
flash bootimage (via fastboot):
sudo fastboot flash boot newboot.img
sudo fatboot reboot
This is how the original file looks:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337 wait
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto
Code:
This is the changed file:
# 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
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
# Use internal sdcard as /data
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
#/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
# CM11 hack: Swap sdcard1 and sdcard0 - both in ext4 and (internal)sdcard1 as emulated
#/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard0:auto,noemulatedsd
#/dev/block/platform/msm_sdcc.1/by-name/userdata /storage/sdcard1 ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 defaults
#/dev/block/platform/msm_sdcc.1/by-name/sdcard auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:29,nonremovable,noemulatedsd
# Original Entry of Gummy rom:
#/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
#/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
# Working with switched sd-cards, Aut0mat3d:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Reserved
Reserved1
This should work for most people until we fully unify the storage.
Good job there.
MrColdbird said:
This should work for most people until we fully unify the storage.
Good job there.
Click to expand...
Click to collapse
Thanks. without your Help with storage mounting i'd dropped the project
I really want to try it out but I fear that I screwed something up... I use the unofficial AOSB port. Could somebody check, if my modifications to the fstab.qcom file are correct?
Original file:
Code:
# 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
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/devices/msm_sdcc.1/mmc_host auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
And the new one:
Code:
# 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
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/devices/msm_sdcc.1/mmc_host auto auto noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto defaults voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Did I miss something? I would really appreciate your help because I don't want to mess up my device...
looks pretty fine, just give it a try. If it doesnt work it will not damage your device.
alternatively you can use the following lines tested on Gummy and CM11:
Code:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
For getting the job more easy i have made a AROMA installer that handles with partition renaming and flashing boot.img:
http://www.oppoforums.com/threads/a...rage-and-mount-external-sd-card-as-sd0.17852/
This can use on stock color OS?
vincent_smoox said:
This can use on stock color OS?
Click to expand...
Click to collapse
in principe: Yes
You have to modify fstab in boot.img to swap sd cards
I did it
Thanks a lot. It worked. Now I have a 128 GB SD Card in my Find7.
If anybody reads this and wants the Files needed for AOSB 1.3.6 - I uploaded the ROM including new boot.img and the boot.img alone to mega. Download here:
ROM+Boot.img
Boot.img only
I hope it works for you too
Everything was working fine until after 2 days, without warning, the screen went blank and then when I rebooted, I'm unable to save screenshots and gallery images are unavailable and external storage unavailable is the error. Sdcard0 is empty under /storage
Sent from my Find7 using XDA Free mobile app
Happened Again! Random reboot followed by corrupt partition. Cannot repair via TWRP also.
defective SD card?
Gesendet von meinem Find7 mit Tapatalk
Possible.
Sent from my Find7 using XDA Free mobile app
can you repeat step 7 again? I don't understand which zip file I have to download and how are the next small steps (command lines)?
Thank you very much for your help
jowar said:
can you repeat step 7 again? I don't understand which zip file I have to download and how are the next small steps (command lines)?
Thank you very much for your help
Click to expand...
Click to collapse
update.zip means the zip file of custom rom you have installed. next steps are in command line like steps before.
Aut0mat3d said:
In this Guide you will learn how to modify your system to handle the 9GB Partition 29 as Data (App-Storage) and use the external SD-Card as internal.
Don't be afraid, this is a lot of text mostly to explain the whole procedure, the steps are straight forward.
Thanks go to Kishd (oppoforums), Coldbird and alienmind (xdadevelopers)
Beside of the public made solutions i will do the following:
Instead of repartitioning the device i will change only the partition name of "sdcard" to "userdata", mount the external SD as internal and use the remaining 3GB Partition as external SD.
So partition 15 will become "sdcard1" and partition 29 will become "userdata"
On the Find7a you will have 9 gigs of application space and xx gigs for the internal sd (size of the sdcard).
This should work on Find7 too, someone has to check the partition layout if it is equal, than you will have 25 gigs of application space and xx gigs for the internal sd (size of the sdcard).
PRECAUTIONS:
If you mess around with partition table you could brick your device, so be careful!
Thes procedure worked for me, i am not responseable for any missing or mistyped commands/procedures, so THINK BEFORE YOU DO ANYTHING!
I am not an android Pro, nor an Develper. My Spare time is very limited so i can't help you out if something goes wrong!
I've done this with Gummy Rom, not tryed with ColorOS or another custom rom but it should work on all AOSP-based ROMS.
The swapped SD-cards do not belong to recovery, so the internal SD is accessed as before.
What do you need:
1.: Time: This is not done in 5 minutes, so please be patient.
2.: A Linux-PC with working ADB and Fastboot
3.: TWRP recovery image on your PC or installed on the device: http://techerrata.com/browse/twrp2/find7a (I used 2.7.1.0)
4.: An SD card with at least 16Gb inseted into your Find7a
5.: Fully charge your Device before messing around, some jobs will need a lot of time.
6.: A fitting custom ROM installed, i've done this with Gummy-M2.3-06-29-14-NIGHTLY-find7 which is suitable for find7 and find7a which can be found here: http://crackflasher.com/gummy-m2-3-06-29-14-nightly-find7-zip-oppo-find-7a-gummy/
7.: The zip-file of the custom rom on your local PC
What are we going to do:
0.: Boot into recovery and access the Device via ADB
1.: Format external SD to Ext4 Filesystem
2.: Backup the original partition layout and all partitions too
3.: Copy Data from internal SD to external
4.: Rename two partitions
5.: Format the new "userdata" partition and move all content of the old to the new location
6.: Format the new "sdcard1" partition
7.: Edit/replace fstab files in /etc to tell TWRP and System the new mountpoints
OK, let's do the trick
Step0.: Booting into recovery and accessing the Device via ADB-shell:
Put the phone into fast boot mode. (Power Volume Up simultaneously)
Open a terminal in your linux-PC and do the following as root (sudo -r):
#: fastboot devices ( check that fastboot is up and running)
#: fastboot boot openrecovery-twrp-2.7.1.0-find7a.img (or boot into TWRP if already installed)
The phone will boot into twrp.
Connect the phone and go into adb
#: adb shell
After entering the adb shell you should see the following in your terminal:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
~ #
Step1.: Format external SD to Ext4 Filesystem
First we have to write a new partition table as i dont know how your SD-card looks:
umount /external_sd (could cause errors if no filesystem is present on SD - dont mind)
parted /dev/block/mmcblk1 (you should see parted welcome message, no errors!)
mklabel msdos (this will write a new partition table on your sdcard)
mkpart primary ext4 1 -1 (this will make a ext4 partition which uses the whole sd)
quit
Now we are going to format the ext4 partition:
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk1p1
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk1p1
mount /dev/block/mmcblk1p1 /external_sd (Mount the new formatted sd-card -- this should show no errors)
If all is done without errors, proceed to step2
Step2.: Backup the original partition layout and all partitions too
dd makes physical imagea of partitions so you can put it back if needed
While DD is copying you will see no progress bar or any output, so BE PATIENT!
Code:
mkdir /external_sd/backup
parted /dev/block/mmcblk0 print > /external_sd/backup/partitions (original partition Layout for later reference)
dd if=/dev/block/mmcblk0p1 of=/external_sd/backup/modem
dd if=/dev/block/mmcblk0p2 of=/external_sd/backup/sbl1
dd if=/dev/block/mmcblk0p3 of=/external_sd/backup/dbi
dd if=/dev/block/mmcblk0p4 of=/external_sd/backup/ddr
dd if=/dev/block/mmcblk0p5 of=/external_sd/backup/aboot
dd if=/dev/block/mmcblk0p6 of=/external_sd/backup/rpm
dd if=/dev/block/mmcblk0p7 of=/external_sd/backup/boot
dd if=/dev/block/mmcblk0p8 of=/external_sd/backup/tz
dd if=/dev/block/mmcblk0p9 of=/external_sd/backup/pad
dd if=/dev/block/mmcblk0p10 of=/external_sd/backup/modemst1
dd if=/dev/block/mmcblk0p11 of=/external_sd/backup/modemst2
dd if=/dev/block/mmcblk0p12 of=/external_sd/backup/oppodycnvbk
dd if=/dev/block/mmcblk0p13 of=/external_sd/backup/oppostanvbk
dd if=/dev/block/mmcblk0p14 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/system.gz
dd if=/dev/block/mmcblk0p16 of=/external_sd/backup/persist
dd if=/dev/block/mmcblk0p17 of=/external_sd/backup/cache
dd if=/dev/block/mmcblk0p18 of=/external_sd/backup/recovery
dd if=/dev/block/mmcblk0p19 of=/external_sd/backup/fsg
dd if=/dev/block/mmcblk0p20 of=/external_sd/backup/fsc
dd if=/dev/block/mmcblk0p21 of=/external_sd/backup/ssd
dd if=/dev/block/mmcblk0p22 of=/external_sd/backup/misc
dd if=/dev/block/mmcblk0p23 of=/external_sd/backup/LOGO
dd if=/dev/block/mmcblk0p24 of=/external_sd/backup/DRIVER
dd if=/dev/block/mmcblk0p25 of=/external_sd/backup/reserve1
dd if=/dev/block/mmcblk0p26 of=/external_sd/backup/reserve2
dd if=/dev/block/mmcblk0p27 of=/external_sd/backup/reserve3
dd if=/dev/block/mmcblk0p28 of=/external_sd/backup/reserve4
dd if=/dev/block/mmcblk0p30 of=/external_sd/backup/grow
It is not urgently needed to make dd backups of userdata and (internal) sdcard but here for refernce:
Do a compressed multispan backup with dd so you can use the files on an FAT32 filesystem too:
dd if=/dev/block/mmcblk0p15 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/userdata.gz.
dd if=/dev/block/mmcblk0p29 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/sdcard.gz.
Example of restoring partition 29:
cat /external_sd/backup/userdata.gz.* | gzip -dc | dd of=/dev/block/mmcblk0p29
Step3.: Copy Data from internal SD to external SD:
cp -a -i /internal_sd/* /external_sd/ (this can take a while)
ls /external_sd/ (you should see a bunch of files here)
If nothing went wrong go to step4
Step4.: Rename partitions:
umount /internal_sd/
umount /and-sec/
umount /data/
parted /dev/block/mmcblk0
name 15 sdcard
name 29 userdata
print (should show you the renamed layout)
quit
If nothing went wrong go to step5
Step5.: Format the new "userdata" partition and move all content of the old to the new location:
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
mount /dev/block/mmcblk0p15 /internal_sd
mount /dev/block/mmcblk0p29 /data
cp -a -i /internal_sd/* /data/ (this can take a while)
If nothing went wrong go to step6
Step6.: Format the new "sdcard1" partition:
umount /internal_sd/
mke2fs -t ext4 -m 0 -L sdcard1 /dev/block/mmcblk0p15
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p15
If nothing went wrong go to step7
Step7.: Edit/replace fstab.qcom file to tell System the new mountpoints:
Guide from Coldbird: http://www.oppoforums.com/threads/unpack-repack-find-7-a-boot-img.14538/
Unpack update.zip and make a working directory.
copy file boot.img from update.zip into this directory
download https://github.com/xiaolu/mkbootimg_tools
unpack bootimage:
mkboot boot.img extracted (this will create a folder "extracted" with the content of boot.img where you can find fstab.qcom
edit fstab.qcom co match your needs (i.e. swap internal and external storage as shown below)
pack bootimage:
mkboot extracted newboot.img (creates newboot.img)
test bootimage (via fastboot):
sudo fastboot boot newboot.img
flash bootimage (via fastboot):
sudo fastboot flash boot newboot.img
sudo fatboot reboot
This is how the original file looks:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337 wait
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto
Code:
This is the changed file:
# 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
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
# Use internal sdcard as /data
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
#/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
# CM11 hack: Swap sdcard1 and sdcard0 - both in ext4 and (internal)sdcard1 as emulated
#/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard0:auto,noemulatedsd
#/dev/block/platform/msm_sdcc.1/by-name/userdata /storage/sdcard1 ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 defaults
#/dev/block/platform/msm_sdcc.1/by-name/sdcard auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:29,nonremovable,noemulatedsd
# Original Entry of Gummy rom:
#/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
#/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
# Working with switched sd-cards, Aut0mat3d:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Click to expand...
Click to collapse
Does this work with Color is 2.1.5?
unpack-repack-find-7-a-boot-img
Does anybody has unpack-repack-find-7-a-boot-img ? OppoForums are down. I need this file.

[Q] How to increase partition size on my redmi 1s?

I flashed Yirom on my redmi 1s yesterday and i downloaded PA's GOOGLE STOCK GAPPS PACKAGE (~437MB) to flash with it.But the problem is that the system partition size on my device is too small to flash this GAPPS package and I DON'T WANT TO FLASH ANY OTHER GAPPS PACKAGE. So if anyone here could help me increase the partition size of my redmi 1s without any risks of bricking my device then I would really appreciate it.
I've TWRP recovery installed and there is no other data in my internal memory.Also I don't want to partition my external SD card's space.
Thanks in advance.
I also wanted to resize the system partition by reducing cache.
I thought fdisk can help but it does not work gpt style partitions. We needed gpt-fdisk.
Go here
however, no use of extending system partition... our redmi 1s has around 800 MB system partition..i repartitioned couple of times n extended it to 2gigs by taking some space from data partition.. but still u will get that insufficient error if u flash stock pa lp gapps... but u can flash full pa lp gapps over mokee lp (not cm12) with having even 1 gig of system partition..worked for me... rest couple of apps u can install manually... go to pa gapps for lollipop thread... read point 5 in post 3...
This is an old thread, but this is a good, v cheap (under £70 new) phone and it's one of the top finds on Google for resize redmi s1 system partition, I've just done one for my OH so I thought I share.
Here goes, this is the exact specific instructions for resizing the redmi s1 system partition 400mb larger which you will need to do if you want to run Android 6 with GAPPS, as even pico GAPPS is too big.
You'll need a PC with USB port running the ADB drivers, get them here.
a factory reset Redmi 1S with nothing but custom recovery, easily installed from within the MIUI updater
a micro SD card with you choice of ROM (Mokee 6.0.1 is very good indeed) and GAPPS (nano is fine, pico may not be) zip files
Boot the phone to recovery (power and volume up)
Attach the USB lead from the PC to the phone
Open a CMD prompt (Windows) or whatever if you use Linux/Mac.
Type
Code:
adb devices
adb shell
parted /dev/block/mmcblk0
unit MB
print
and you should see this, as you can see the system partion is just 800mb, not enough! But we have 6gb of user data space which is more than ample.
So we need to delete partions 27, 28 and 29 and recreate them with system 400mb larger and user data 400mb smaller, name them and make them ext4 format again.
Code:
rm 27
rm 28
rm 29
mkpartfs primary ext2 336 1574
mkpartfs primary ext2 1574 1977
mkpartfs primary ext2 1977 7818
name 27 system
name 28 cache
name 29 userdata
print
quit
should get this, all going well.
then
Code:
tune2fs -j /dev/block/mmcblk0p27
e2fsck -fDp /dev/block/mmcblk0p27
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p27
e2fsck -fDp /dev/block/mmcblk0p27
tune2fs -j /dev/block/mmcblk0p28
e2fsck -fDp /dev/block/mmcblk0p28
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p28
e2fsck -fDp /dev/block/mmcblk0p28
tune2fs -j /dev/block/mmcblk0p29
e2fsck -fDp /dev/block/mmcblk0p29
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p29
e2fsck -fDp /dev/block/mmcblk0p29
parted /dev/block/mmcblk0
unit MB
print
quit
will get this.
REBOOT your phone to recovery (any attempt to do anything beforehand will fail with unable to mount errors) and flash your ROM and GAPPS.
All done!

Categories

Resources