Huawei Ascend G330 U8825-1 resize internal partitions to gain space for apps - Android General

the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?

rregn said:
the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?
Click to expand...
Click to collapse
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator

xals1997 said:
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator
Click to expand...
Click to collapse
Did i get the idea? You use link2SD (from Bülent Akpinar) , but instead of using a 2nd partition of the external SD-card with ext2, you use the internal SD-card for link2SD?
But i heard that link2SD need a ext2/3 partition? Also, in my version of link2SD there is:
mount -t ext2 -o rw /dev/block/vold/179:2 ...
btw. how is /system/etc/install-recovery.sh triggered

Related

[Q] Link2sd can't create mount script with Ext partition - Help!

Hello!
My problem basically is that i can't use Link2sd - i'm currently running the latest CronosX mod - because it can't create the mount scripts. I keep getting the following error:
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: device or resource busy
i have a trascend class 10 8gb SD, i have a 6,5 gb Fat partition and the rest is EXT2 (now). I formatted it with minitool partition magic.
I have googled the problem for days now, seems i found nothing useful..
so far i tried:
ext3, ext4 -- then still couldn't create mount scripts, but i also had the following error msg in OR:
"can't mount /dev/block/mmcblk0p2 (invalid argument)"
although in SD utilities when checking the ext partition it recognised as EXT4 or EXT3..
with ext2 it seems working as of i don't see that msg..
still no link2sd. I read in the mod's forum that the app is supported, so it can't be the problem.. or is it?
Same issue, resoved by using FAT32
I had the exact same issue you're having. I tried using EXT2,EXT3, and EXT4 but couldn't get it to work. I finally got it working by using a FAT32 partition.
I know this may sound a bit dumb (like myself in android technicals) but
1. Do you have the specific kernel modules loaded to recognize these filesystems?
2. Are the devices attached to the PC with memory card access? [should not be].
3. Maybe you should try partitioning with a linux distro or some specific tool (might want to check out some instructions.
I am operating Link2SD with a fat16/32 partition (I don't know which )
I have same problem does someone solved it ?
i had no solutions whatsoever.. currently i'm using the mod's built in app2ext
i made an ext2 partition which i transformed into ext3 with openrecovery.. now i have an app folder which is automatically used to store my apps.
no link2sd for me anymore :\
although i have some other issues for i'm about to open a new thread
I found the solution : http://forum.xda-developers.com/showthread.php?t=1713478
linksd mount solved
with the phone plugged in to pc/mass storage i formatted the ext2 partition again. in link2sd mount in ext4.
cwkhong said:
with the phone plugged in to pc/mass storage i formatted the ext2 partition again. in link2sd mount in ext4.
Click to expand...
Click to collapse
Mount as ext4 is not a problem. It should work.
Sent from my XT720 using xda app-developers app
how you can solve this problem, is to make the second partition a active partitons with MiniTool Partition.
When de second disk is a active partition it wil boot before the boot of the system.
reply post ext 4
bSptya said:
Hello!
My problem basically is that i can't use Link2sd - i'm currently running the latest CronosX mod - because it can't create the mount scripts. I keep getting the following error:
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: device or resource busy
i have a trascend class 10 8gb SD, i have a 6,5 gb Fat partition and the rest is EXT2 (now). I formatted it with minitool partition magic.
I have googled the problem for days now, seems i found nothing useful..
so far i tried:
ext3, ext4 -- then still couldn't create mount scripts, but i also had the following error msg in OR:
"can't mount /dev/block/mmcblk0p2 (invalid argument)"
although in SD utilities when checking the ext partition it recognised as EXT4 or EXT3..
with ext2 it seems working as of i don't see that msg..
still no link2sd. I read in the mod's forum that the app is supported, so it can't be the problem.. or is it?
Click to expand...
Click to collapse
you must re-partition your sd card, BUT, just do it for your sd-ext only:
with Partition magic
1. delete your sd-ext partition (JUST YOUR SD-EXT PARTITION)
2. create partition
3. set as Primary
4. and CHOOSE ext4!!,
5. ok and then,
6. Apply
I hope this will help you..:good:
bSptya said:
Hello!
My problem basically is that i can't use Link2sd - i'm currently running the latest CronosX mod - because it can't create the mount scripts. I keep getting the following error:
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: device or resource busy
i have a trascend class 10 8gb SD, i have a 6,5 gb Fat partition and the rest is EXT2 (now). I formatted it with minitool partition magic.
I have googled the problem for days now, seems i found nothing useful..
so far i tried:
ext3, ext4 -- then still couldn't create mount scripts, but i also had the following error msg in OR:
"can't mount /dev/block/mmcblk0p2 (invalid argument)"
although in SD utilities when checking the ext partition it recognised as EXT4 or EXT3..
with ext2 it seems working as of i don't see that msg..
still no link2sd. I read in the mod's forum that the app is supported, so it can't be the problem.. or is it?
Click to expand...
Click to collapse
I had the seem problem and I solved creating 3 partitions. The first is not utilized but it must be create because as the Link2Sd as the AndroidOS search the data partition in the second (or last for AndroidOS) partition. I have created the first more small as Linux Swap, the second in ext2 fot Link2SD and the third in Fat32 for SD-Ext Data.
So the App works fine.
Sorry for my English.
Much Appreciated
thenotec said:
I had the seem problem and I solved creating 3 partitions. The first is not utilized but it must be create because as the Link2Sd as the AndroidOS search the data partition in the second (or last for AndroidOS) partition. I have created the first more small as Linux Swap, the second in ext2 fot Link2SD and the third in Fat32 for SD-Ext Data.
So the App works fine.
Sorry for my English.
Click to expand...
Click to collapse
No apologies necessary, i believe you were clear enough, well what do you know i must say inverting the order does seem to work
1. swap 2. Ext and 3. Fat/ Fat32
yabubonnah said:
No apologies necessary, i believe you were clear enough, well what do you know i must say inverting the order does seem to work
1. swap 2. Ext and 3. Fat/ Fat32
Click to expand...
Click to collapse
if i do that then i cant connect my usb storage to my PC, cuz if you create partitions with minitool, only the first partition is read as usb storage, so if you make the first part e.g. a swap file, then PC wont see your usb storage when plugged in via usb... and in minitool i see all partitions without drive letters, just .* sign after i format and create partitions.... and nothing helped me with mount script error either...
link2sd mount script error resolved
cwkhong said:
with the phone plugged in to pc/mass storage i formatted the ext2 partition again. in link2sd mount in ext4.
Click to expand...
Click to collapse
sir tnx for this info... error already resolved... thanks again so much...
Connect Phone to PC in Mass Storage Mode
Open MiniPartition Tool
Format the 2nd Parition as EXT4
Disconnect the Phone
Open Link2SD and you will see acript created and mounted already (for apps in SD card)
easy solution work for me ;D
after create partition ext 3 , just go to root file manager and change system file from read only RO to read write RW and recreate mount script on link2sd . hope it works happy new year!
NaraRockingMyAce said:
you must re-partition your sd card, BUT, just do it for your sd-ext only:
with Partition magic
1. delete your sd-ext partition (JUST YOUR SD-EXT PARTITION)
2. create partition
3. set as Primary
4. and CHOOSE ext4!!,
5. ok and then,
6. Apply
I hope this will help you..:good:
Click to expand...
Click to collapse
I had the same problem and had been looking for a solution until I found your help. Just want to thank you for this. It helped a lot! Fixed my problem :good:
Hi, I have a same problem.
But before I repartition the ext2 how can I save the content? My previlus installed apps will not work, I think in this case.
final solution
backup your sdcard and format it
recreat 2nd partition ex4
congratulation :good:
Solved!
Zachary57 said:
I found the solution : http://forum.xda-developers.com/showthread.php?t=1713478
Click to expand...
Click to collapse
Zachary had the solution for me! Just convert link2sd to system app (function of link2sd, after that my phone crashed and restarted) and clear the ext3 or ext4 partition (or reformat). I used Minitool Partition Wizard under windows. Don't forget to select primary partition!

fstab.qcom modification

I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
lunaticat said:
I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
Click to expand...
Click to collapse
A little late in the game (I am trying to do the same), but I come across this:
http://forum.xda-developers.com/showthread.php?t=443994
boot partition populates the rootfs. So hack the boot.img (unpack to analyze), and you may find your answer. Hope this helps.
I will give it a shot in the next week.

[Q] Move /data to SD card

I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Binero said:
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Click to expand...
Click to collapse
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Jason Hyunwoo said:
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Click to expand...
Click to collapse
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Binero said:
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Click to expand...
Click to collapse
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Jason Hyunwoo said:
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Click to expand...
Click to collapse
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Binero said:
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Click to expand...
Click to collapse
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Jason Hyunwoo said:
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Click to expand...
Click to collapse
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Binero said:
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Click to expand...
Click to collapse
or you could edit look at other *.rc files!
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
sndsnd said:
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Click to expand...
Click to collapse
I want to mount my sd card to my /data. That simply creates a symbolic link.
Jason Hyunwoo said:
or you could edit look at other *.rc files!
Click to expand...
Click to collapse
There is only 2 rc files, and one of them is specific to my recovery image.

send apps to sd card - avoid low storage advise warning

Hi!
This is a light version from the tutorial described below.
It create a full root WITH option to send your apps to sd card automatically!
How?
Because it create a funtional init.d folder in system/etc where you can put your own scripts to start on boot, giving you full control from your ROM/phone and if you have a ext4 partition in sd card ( 3 GB that's enough ), it will send your apps to sd card releasing storage.
LTE device have a default 2GB /data storage for apps and user definitions, phone call, etc. 3G device is worse!!!
So for a LTE device, 3GB from sd partition + 2GB from data partition = 5GB!
To show you why don´t need more, i have at this momente 61 app in /data/app ( in sd ext4 partition ) that fill 750MB - > 61 apps!!!
If you have a LTE device and your /data partiton is resized you can push a litle the size from external partition to 4GB ( that's enough ), im still trying to find a good size for external partition.
Why don´t need a bigger size?
Because there are file that still inside data partition, in /data/data and dalvik-cache, that still filling up data partition... you can´t take them all ...
3G devices need to be rooted with SuperSu zip first ( i don´t know way ) ... im a LTE user.
UPDATE-Kinguser-3.4.0-Modded_V2.zip
https://mega.nz/#!HoZniaSC
Key:
!tmmKUs-lnmAJo0Y4rcvxgZjYgsath0iTDBUYa7-T3YE
And this video shows how ROM works with a external ext4 partition in sd card what means that all apps go to sd card and let internal storage free:
https://youtu.be/7st6838_aAg
Use it only if you need it. Is your option.
I hope this helps you.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<<<<<<<The END of low storage>>>>>
I test it in L11 with B370 kit kat factory ROM. From 0.
!!!!Attencion!!!! 3G device users, read pinned post, you need to install SuperSU.zip first than this KingUser.zip to root OR WILL FAIL!!!!
In the step when you will install kinguser.zip change for this one, see the default tutorial here: https://www.facebook.com/groups/huawei.g6.development/permalink/578005512358705/
You need a primary external ext4 partition in sd card with the size you think you need for apps.
To create a primary ext4 partition in sd card with the size you want, you can use mini partition tool (for windows OS ).
http://www.partitionwizard.com/free-partition-manager.html
Need bootloader Unlocked:
https://www.facebook.com/groups/huawei.g6.development/permalink/504332286392695/
Need a custom recovery, i use TWRP for my L11, U models use more CWM, you can find it in G6SKnife.
Must have Windows OS to use G6SKnife:
https://www.facebook.com/groups/huawei.g6.development/permalink/577809609044962/
Than i modded this Kinguser flash zip that:
-Roots
-create a working init.d folder where you can store your scripts that will be executed on boot
-it will install busybox apk ( it need it to install some system tools )
- Rashr to change recoverys with the phone ( only need to have the images in sd card )
- It will automatically send all apps to your external ext4 partiton in sd card IF you have one!!!!
How to do it!!!!??????
READ IT CARFULL:
If you already have apps in phone do backup, use the phone default app for that.
Copy this zip to sd card:
UPDATE-Kinguser-3.4.0-Modded.zip
https://mega.nz/#!rhRknYDJ
Key:
!tnT9KAYOOcuSNm9eq7AcW_PHc2p-C4wjvssNI4IHAMU
Turn off and go to recovery ( TWRP or CWM ) by pressing at same time vol + and power.
Do a factory reset.
Go to install and search the UPDATE-Kinguser-3.4.0-Modded.zip and install it. The phone will reboot.
( A) After settings go to KingUser and open it to check if is ok than go back, open busybox, give root permissions, it will take some time seraching for old files than install it!!!!
( you will need this tools )
Reboot, and is done.
If you start from flash is the same process.
Now your apps go all to sd card.
This video show a flash of B370 and the root with this KingUser.zip:
https://youtu.be/CcFdbS20RrY
persona78 said:
#!/system/bin/sh
# apk to sd card
mount -t ext4 -o rw /dev/block/vold/179:66 /data/app
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/app
chown system system /data/app
# apk lib to sd card
mount -t ext4 -o rw /dev/block/vold/179:66 /data/app-lib
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/app-lib
chown system system /data/app-lib
chmod 773 /data/dalvik-cache
Click to expand...
Click to collapse
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?
its possible!
pestevao said:
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?
Click to expand...
Click to collapse
It's possible because works like a symlink. Imagine a room with several doors.
The mmcblk1p2 is the room, the /data/app , /data/app-lib are the doors.
Is working perfectly in my device. No lags.
http://postimg.org/image/8lc3of5pd/
http://postimg.org/image/jjnd6luap/
See this video, it have this script
pestevao said:
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?
Click to expand...
Click to collapse
This video shows how my ROM version works with a external ext4 partition in sd card what means that all apps go to sd card and let internal storage free:
https://youtu.be/7st6838_aAg
Hi!
I create a easy way, go here:
http://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679
I've instaled the B370 and use Link2SD that have already bought. And it works perfectly and smooth!
With the original ROM / Android it displays a warning that mount must be done after a quick reboot but now everything is working on a normal reboot.
Used KingRoot 3.4.o modified to include /etc/init.d folder creation to Link2SD be able to write mount scripts and with the Huawei B370 cleans everything from Vodafone P that came hacked and pre-installed
Now is better than ever!
pestevao said:
I've instaled the B370 and use Link2SD that have already bought. And it works perfectly and smooth!
With the original ROM / Android it displays a warning that mount must be done after a quick reboot but now everything is working on a normal reboot.
Used KingRoot 3.4.o modified to include /etc/init.d folder creation to Link2SD be able to write mount scripts and with the Huawei B370 cleans everything from Vodafone P that came hacked and pre-installed
Now is better than ever!
Click to expand...
Click to collapse
With this option you don't need link2sd
http://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679
Yeah you are maybe right. But when I make it with Link2SD I doesn't find yout tutorial (and even doesn't exists on xda forum) so right now is everything working there no reason to move away from Link2SD
This is how have my phone using a 64 GB SDCARD
pestevao said:
Yeah you are maybe right. But when I make it with Link2SD I doesn't find yout tutorial (and even doesn't exists on xda forum) so right now is everything working there no reason to move away from Link2SD
Click to expand...
Click to collapse
Hi!
I buy a 64 GB sd card, create 3 ext4 partitions and mounted like this:
So, now I have 24GB ext4 for data, 10GB ext4 storage and 27GB fat32 for external storage... For mt G6-L11. I had before resized data storage to 4GB.
By default is 2/3 , I can't remember.
Hi!
Main post is Update!
persona78 said:
Hi!
Main post is Update!
Click to expand...
Click to collapse
Great job congratulations!

Unable to create second partition on SD card

I've been trying to partition my SD card, but all steps I take to try and diagnose why I am unable to partition the card is getting me nowhere.
Initially, I used gparted on my laptop to partition the SD card with a v-fat partition and a f2fs partition, both primary partitiond. This was when I found out that no matter what I do the second partition on the SD card, it doesn't seem like the format actually takes. Whatever tool I use complete the partitioning and formatting steps successfully by all appearances but it doesn't seem like the partition is ever actually formatted. What I mean by that is that no matter what the second partition is it never mounts. I get an invalid argument error or bad super blocks and so forth. I can make the first partition anything I want: fat, v-fat, f2fs, ext4 and so forth and that will mount in my terminal without issue, but no matter what I do the 2nd partition always fails to mount. I've also noticed that blkid never has any fs info for the second partition. It gives me the partition UUID and that's all, while the first partition has both part UUID & fs UUID.
I've even gone so far as to just recently get a brand new SD card thinking that perhaps the first SD card was corrupted but I'm still getting the exact same behavior. Also of note is that in gparted when I try to create a secondary partition, I'm unable to mount the second partition so I don't think it has anything to do with my device. I've tried using fdisk, gdisk, parted in the terminal and I've tried using extended partitions and logical partitions and only primary partitions. I've done this before in the past so I know that it is possible.
It almost seems like the SD cards that I have are simply not capable of being partitioned in any way but it's strange that I now have two 512 GB SD cards and they're both giving the exact same behavior so I'm thinking that I'm missing something obvious. Any help anyone could provide as far as trying to figure this out or debug what's going on what I'm doing wrong would be greatly appreciated.
Thanks,
Ryan
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
aIecxs said:
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
Click to expand...
Click to collapse
I don't need anything to mount automatically. I'm saying I can't manually mount these partitions. I also don't need f2fs, that was just an example. I've tried multiple partitions that are just fat, ext4 and many other combinations. Under no partition scheme can I get anything other than the first partition to mount--using the mount command as root.
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
aIecxs said:
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
Click to expand...
Click to collapse
I have tried with gdisk but I can try with that specific version and report back. I understand we can create imaged file systems, but one of the main reasons I do this is that I find fat partitions are fickle and can easily be corrupted where the whole partition requires wiped. By having a non fat partition I use that as a better backup option where I find it's easier to recover data in case of corruption or other issues. For such use, being tied to the fat FS would still incur the possibility of data loss so that doesn't work for my purpose.
Thanks and I'll report back,
Ryan
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
alecxs said:
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
Click to expand...
Click to collapse
Thanks for the suggestion to use gdisk. I downloaded the version you linked, but I still get the same behavior. I believe it is related to the fact that only the first partition gets a filesystem UUID in blkid. I'm not sure what this means, but it seems clear that the second filesystem isn't being properly created no matter what I do.
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
I'll give that a try and report back
alecxs said:
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
Click to expand...
Click to collapse
Yeah I'm able to create an image, partition it into a vfat & ext4, then mount both of those partitions.
can you dd the file into mmcblk1 for testing purposes?
alecxs said:
can you dd the file into mmcblk1 for testing purposes?
Click to expand...
Click to collapse
Sorry this isn't clear to me. What am I using to dd into the partition, and do you mean mmcblk1p1/2? As mmcblk1 is the whole disk.
Thanks,
Ryan
yes, I meant the whole disk you created a test file that contains MBR or GPT and two partitions including UUIDs and file systems? If you dd it into the mmcblk1 it should create 1:1 copy of that disk image with two partitions including partition table.
Well I'll be:
Code:
/dev/block/mmcblk1p2 on /data/data/com.termux/files/home/i2 type ext4 (rw,relatime,seclabel) /dev/block/mmcblk1p1 on /data/data/com.termux/files/home/i2 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Code:
/dev/block/mmcblk1p2 23M 46K 23M 1% /data/data/com.termux/files/home/i2 /dev/block/mmcblk1p1 4.9M 0 4.9M 0% /data/data/com.termux/files/home/i1
I can possibly use gparted to just resize those! Any thoughts on what was going on, why this method worked? Hrmm looks like resizing fat could be a challenge, but this certainly gets me closer!
there is also parted binary you can use on phone
I have it and I'm playing around with it, thanks for all your help

Categories

Resources