Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
1
votes
0
answers
110
views
Redirect local WhatsApp directory to second partition ext4 in microSD in Android 10
I have googled from a month ago about on how to reach my goal, and I have found only https://android.stackexchange.com/questions/217741/how-to-bind-mount-a-folder-inside-sdcard-with-correct-permissions My goal is to link the WhatsApp directory in Samsung Galaxy S9 running Android 10 (so it is `stora...
I have googled from a month ago about on how to reach my goal, and I have found only https://android.stackexchange.com/questions/217741/how-to-bind-mount-a-folder-inside-sdcard-with-correct-permissions
My goal is to link the WhatsApp directory in Samsung Galaxy S9 running Android 10 (so it is
storage/emulated/0
) in the second partition of my microSD card in ext4 (I have chosen that filesystem because I have got some issues when coping some data inside exFAT partition, related discussion if you are interested in [XDA Forums](https://xdaforums.com/t/copy-of-big-files-from-pc-to-microsd-return-error-trimming-file-message-error.4578733/#post-88848923))
Now, in the upper link, there are 2 modes but both doesn't satisfy me:
1. MOUNT SD CARD MANUALLY: but it's referred only to exFAT or FAT32 filesystem
2. ADOPTABLE STORAGE: it's related to the ext4 filesystem, but I'm forced to use adoptable storage that I haven't understood very well how it's different from mounting manually, and if all apps can be installed into microSD or only the apps where it's explicitly mount such this command
mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /mnt/expand/[UUID]/media/0/WhatsApp /mnt/runtime/write/emulated/0/Whatsapp
So, from what I have understood, I have executed the following commands referred to link explanation:
mkdir /data/media/0/sdext2
mount -t ext4 -o rw /dev/block/mmcblk0p2 /data/media/0/sdext2
mkdir /data/media/0/sdext2/prova
restorecon -rv /data/media/
mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /data/media/0/sdext2/prova /mnt/runtime/write/emulated/0/prova
And I have made a folder called "prova" to verify that from /storage/emulated/0/prova
I can see the only file inside /data/media/0/sdext2/prova
. But nothing is viewed while if from X-plore I navigate into mnt/runtime/write/emulated/0/prova
the file is shown.
Questions:
1. What are the commands to reach my goal? (I'm not an expert in Linux and Android)
2. When I use WhatsApp, the only important thing is that mnt/runtime/write/emulated/0/Whatsapp
can read all files (and so no matter if from /storage/emulated/0/Whatsapp
files aren't viewed?) Nothing can be made to read /storage/emulated/0/Whatsapp
with files into MicroSD from X-plore as it's worked with local storage?
3. I don't remember how I created the second partition, but now the second partition is used by Link2SD and own and the group is system:system
, and permission is drwxrwx--x
. Is this ok?
Link2SD automatically mounts partitions into /data/sdext2
, but if this is a problem, I can remove the mount inside /system/bin/debuggerd
script
4. Can the new commands be added to /system/bin/debuggerd
script? I'm not sure, but seems that the Android 10 firmware of my Galaxy S9 doesn't support init.d
.
n3o
(11 rep)
Aug 25, 2024, 06:13 PM
• Last activity: Aug 26, 2024, 03:05 PM
2
votes
0
answers
316
views
simg2img silenting failing to convert Fairphone 4 super.img?
I want to mount super.img from [Fairphone 4's factory images](https://support.fairphone.com/hc/en-us/articles/18896094650513). ```bash > file super.img super.img: Android sparse image, version: 1.0, Total of 1572864 4096-byte output blocks in 229 input chunks. ``` I installed the [android-simg2img p...
I want to mount super.img from [Fairphone 4's factory images](https://support.fairphone.com/hc/en-us/articles/18896094650513) .
> file super.img
super.img: Android sparse image, version: 1.0, Total of 1572864 4096-byte output blocks in 229 input chunks.
I installed the [android-simg2img package](https://aur.archlinux.org/packages/android-simg2img) to convert this to an ext4 image. After executing simg2img, no errors are generated, but trying to mount the file fails.
> file super.raw.img
super.raw.img: data
> sudo mount -o loop ./super.out.img /mnt/image
mount: /mnt/image: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
> sudo dmesg
[1074956.090619] loop0: detected capacity change from 0 to 12582912
[1074956.092396] FAT-fs (loop0): bogus number of reserved sectors
[1074956.092398] FAT-fs (loop0): Can't find a valid FAT filesystem
[1074956.092450] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[1074956.092560] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[1074956.092632] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[1074956.093484] NILFS (loop0): couldn't find nilfs on the device
How can I mount the image?
Mattwmaster58
(234 rep)
Dec 9, 2023, 09:39 AM
20
votes
3
answers
53128
views
How to recover a deleted file from /data partition on a rooted phone?
I factory reset my rooted Android M phone but now I realize that there was a file in the ***/data*** directory which I need. Is it possible to create an image (.img or something similar) of the /data partition so that I could run some recovery software for ext4 on that image? I have a little knowled...
I factory reset my rooted Android M phone but now I realize that there was a file in the ***/data*** directory which I need.
Is it possible to create an image (.img or something similar) of the /data partition so that I could run some recovery software for ext4 on that image? I have a little knowledge about ADB.
K. Hatake
(315 rep)
Feb 21, 2019, 08:56 AM
• Last activity: Nov 12, 2023, 01:04 PM
0
votes
0
answers
162
views
How can I copy files from an ext4 partition on my USB drive to a fat32 partition on the same drive?
I tried mounting the ext4 partition as root, but it didn't work. My phone is rooted, but as it seems no one has managed to do what I want to do. I couldn't find any solution, that worked for me. How can I mount the ext4 partition? What I have tried so far: 1. Manually mounting the partition. I tried...
I tried mounting the ext4 partition as root, but it didn't work. My phone is rooted, but as it seems no one has managed to do what I want to do. I couldn't find any solution, that worked for me. How can I mount the ext4 partition?
What I have tried so far:
1. Manually mounting the partition. I tried running
mount -t ext4 /dev/block/sda2 /mnt/media_rw/usbotg
, but that doesn't work and outputs mount: '/dev/block/sda2'->'/mnt/media_rw/usbotg': Invalid argument
. I was trying this, because of this answer - https://android.stackexchange.com/a/220020 .
2. I also tried using vold-posix
, but for some reason Magisk fails to install the module and shows Unable to unpack boot image
, even though it is able to install Magisk updates on the boot image.
RadoslavL
(11 rep)
Jul 12, 2023, 12:44 PM
• Last activity: Jul 12, 2023, 05:21 PM
1
votes
1
answers
630
views
Shrinking encrypted ext4 partition
I have a micro SD card adopted by an Android phone as internal storage extension. While being adopted it was partitioned/formatted by the phone with two ext4 partitions: android_meta and android_expand, which is easily decryptable in a Linux laptop using the key under /data/misc/vold. I'd like to fr...
I have a micro SD card adopted by an Android phone as internal storage extension. While being adopted it was partitioned/formatted by the phone with two ext4 partitions: android_meta and android_expand, which is easily decryptable in a Linux laptop using the key under /data/misc/vold. I'd like to free up some space on the card for an "external" aka "portable" partition for music storage etc, ideally using that Linux laptop: the idea is to shrink android_expand somehow. How do I do that? E.g. GParted won't let me do it - if that's just 'cos it's encrypted can I perhaps decrypt it, write it back onto the card, move/resize it as necessary using GParted or the like and then encrypt and write it back again? Thanks in advance!
dandreye
(23 rep)
May 15, 2023, 05:30 PM
• Last activity: May 16, 2023, 08:00 AM
0
votes
0
answers
139
views
Cloning encrypted ext4 partition
I have a micro SD card adopted by an Android 8 Oreo phone as internal storage extension, so it has two encrypted ext4 partitions: android_meta and android_expand. I've cloned those partitions into the "far end" of a bigger card using Macrium Reflect 8 (selecting the byte by byte copy mode w/o any an...
I have a micro SD card adopted by an Android 8 Oreo phone as internal storage extension, so it has two encrypted ext4 partitions: android_meta and android_expand. I've cloned those partitions into the "far end" of a bigger card using Macrium Reflect 8 (selecting the byte by byte copy mode w/o any analysis and optimization if I got it right) and created "external" aka "portable" partition in its free space later so that it goes first (just to please Windows). I also cloned the GUID. Unfortunately my phone is reporting "Adopted missing" upon booting up with it. What else am I missing? Many thanks in advance!
dandreye
(23 rep)
May 16, 2023, 07:56 AM
• Last activity: May 16, 2023, 07:57 AM
9
votes
1
answers
10001
views
How would you use your ext4 formatted thumb drive via OTG on Android?
Is there a workaround to use an `ext4` formatted thumb drives on Android phones? Right now when I plug it (thumb drive has micro usb end and phone supports thumb drives) Android says it doesn't recognize the file system. Android formats the micro SD cards to `exFat` by default so I guess that's all...
Is there a workaround to use an
ext4
formatted thumb drives on Android phones? Right now when I plug it (thumb drive has micro usb end and phone supports thumb drives) Android says it doesn't recognize the file system.
Android formats the micro SD cards to exFat
by default so I guess that's all it supports for thumb drives too? But I would prefer to have the same (ext4
) file system across all my PCs and thumb drives. Any non-painful way to achieve that?
user240891
(91 rep)
May 14, 2015, 05:52 PM
• Last activity: Dec 12, 2022, 08:00 AM
4
votes
1
answers
7122
views
Change File System of Internal Storage to EXT4
I have an Ainol tablet Novo 7, which has 16GB internal storage in FAT32 format. Due to the file system restriction, it can accept up to 4GB file size only. How can I format the internal storage to EXT4, which I can put bigger files inside? Can't use MicroSD, as the slot is damaged / broken.
I have an Ainol tablet Novo 7, which has 16GB internal storage in FAT32 format. Due to the file system restriction, it can accept up to 4GB file size only. How can I format the internal storage to EXT4, which I can put bigger files inside?
Can't use MicroSD, as the slot is damaged / broken.
Raptor
(173 rep)
Oct 28, 2014, 04:21 AM
• Last activity: Jun 13, 2022, 07:47 AM
2
votes
1
answers
1280
views
Is it possible to convert the filesystem from ubifs to ext4?
because i want to install a custom rom for my smartphone (MT6572 based) i need my smartphone to be in ext4-fileformat (currently it is in ubifs) because all the ported ROMS for MT6572 are ext4-based. Is it possible to change the filesystem of a smartphone?
because i want to install a custom rom for my smartphone (MT6572 based) i need my smartphone to be in ext4-fileformat (currently it is in ubifs) because all the ported ROMS for MT6572 are ext4-based. Is it possible to change the filesystem of a smartphone?
binaryBigInt
(121 rep)
Oct 25, 2015, 03:03 PM
• Last activity: Mar 26, 2022, 09:04 AM
5
votes
1
answers
5928
views
Why do partitions get unmounted automatically after some time?
I have an Android phone running Oreo 8.1.0. I have two partitions in sdcard. One partition is ext4 formatted. I mount it using: mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 But after some time, the partition gets unmounted automatically and I have to mount it again. Even when it is mounted,...
I have an Android phone running Oreo 8.1.0. I have two partitions in sdcard. One partition is ext4 formatted. I mount it using:
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
But after some time, the partition gets unmounted automatically and I have to mount it again.
Even when it is mounted, the contents are not visible in file explorer apps like MiXplorer and ES Explorer, and are only visible in terminal.
So, what is the best way to mount ext4 partition in Android persistently and what is the reason of such behavior?
jonny789
(385 rep)
Jul 9, 2018, 12:04 PM
• Last activity: Mar 25, 2022, 05:39 AM
1
votes
0
answers
51
views
How to mount external µSD card partition filesystems on Moto g Power?
A µSD card has several partitions, but the phone mounts only the vfat partition, not the ext4 partitions. I see that there are existing internal ext4 filesystems, so it can handle that type. Is there something I need to do to allow the ext4 µSD card partitions to be mounted?
A µSD card has several partitions, but the phone mounts only the vfat partition, not the ext4 partitions.
I see that there are existing internal ext4 filesystems, so it can handle that type.
Is there something I need to do to allow the ext4 µSD card partitions to be mounted?
Ray Butterworth
(163 rep)
Jan 25, 2022, 01:56 AM
1
votes
0
answers
37
views
Will dumping the partition to enable `oem unlock` and flashing back the edited partition work for unlocking the bootloader on Huawei devices?
I'm trying to unlock the bootloader/FRP of several Huawei devices. But it is difficult because there is no support from the manufacturer and the `oem unlock` is not present in the system. So, I have come with the next method: Since the main partition is formatted with `erofs` - Compile the kernel mo...
I'm trying to unlock the bootloader/FRP of several Huawei devices.
But it is difficult because there is no support from the manufacturer and the
oem unlock
is not present in the system. So, I have come with the next method:
Since the main partition is formatted with erofs
- Compile the kernel module (for Linux) to enable support of
the partition.
- Next, dump the whole partition into an image file.
- Change the format into one editable.
- Mount an edit the /system/build.prop
, to enable oem unlock
option.
- Flash back the edited partition.
- Try to unlock the FRP/bootloader.
Does this method have viability? Or I'm missing something?
Alternatively, the whole partitions system can be dumped and flashed again, but I can convert the erofs > ext4.
This last one, AFAIK, should pose no problem, but since I'm not too used to android (EMUI8/9/10) well.
riccs_0x
(151 rep)
Jan 13, 2022, 05:43 PM
• Last activity: Jan 13, 2022, 07:10 PM
0
votes
1
answers
1070
views
Mounting external sd-card on rooted Android 7.1 tablet fails, but only if partition not empty
Edit: I have tried mounting the sd-card with an empty ext4-partition, and it worked just fine, but after I ran debootstrap on the sd-card, the problem reappeared with identical symptoms. ---- I want to mount an ext4-formatted sd-card, but # mount -t ext4 /dev/block/mmcblk1p1 mountpoint returns mount...
Edit: I have tried mounting the sd-card with an empty ext4-partition, and it worked just fine, but after I ran
debootstrap
on the sd-card, the problem reappeared with identical symptoms.
----
I want to mount an ext4-formatted sd-card, but
# mount -t ext4 /dev/block/mmcblk1p1 mountpoint
returns
mount: mounting /dev/block/mmcblk1p1 on mountpoint/ failed: Invalid argument
So far I have:
* made sure the sd-card itself is OK (mounts fine on my debian laptop)
* made sure the block device is the right one
* replaced mount
with busybox mount
, which is a different binary, but gives the same error
The mountpoint exists, and the kernel supports ext4. My device is a rooted Samsung Galaxy Tab S2 running a Lineage OS 14.1 ROM (Android 7.1), SELinux is set to permissive.
----
Any pointers are appreciated!
townhall
(36 rep)
Feb 19, 2017, 08:10 PM
• Last activity: Jan 7, 2022, 02:00 AM
1
votes
1
answers
5162
views
How to mount (or auto mount) a USB stick formatted with ext4 and be visible or working with apps on Android 5 Marshmallow and later versions?
The question appears in variant forms 1 just to say it is ridiculous on Android that ext4 is the default file system that doesn't recognize USB pen drive formatted with ext4 (but Android 4.4 recognizes it without any problem). As a Linux user, this is a big regression, and I still have not found a w...
The question appears in variant forms1 just to say it is ridiculous on Android that ext4 is the default file system that doesn't recognize USB pen drive formatted with ext4 (but Android 4.4 recognizes it without any problem). As a Linux user, this is a big regression, and I still have not found a way for a USB to be detected as a USB, like pens with FAT32 or NTFS. I have root on my device.
---
1 Related questions:
- https://android.stackexchange.com/questions/176203/mounting-a-ext4-formatted-sdcard-on-android-marshmallow
- https://android.stackexchange.com/questions/197959/partition-gets-unmounted-automatically-in-android-oreo
- https://android.stackexchange.com/questions/123615/external-ext4-card-mounted-only-for-root-on-android-5-1-64-bits
- https://android.stackexchange.com/questions/174308/how-to-use-an-ext4-formatted-sd-card-as-external-storage-with-working-app-permis
Sérgio
(131 rep)
Nov 20, 2018, 08:21 PM
• Last activity: Jan 5, 2022, 07:09 AM
0
votes
1
answers
967
views
Link2sd, partition unmounted itself, can't mount back
I have Sony Xperia M2 (D2303), and i have had Link2sd for quite some time. A while back I created a partition in Minitool and mounted it as ext4 in Link2sd. Sometimes it crashed, but usually waiting or restarting would help, because all it needed was to link lib, obb and dex files. However couple da...
I have Sony Xperia M2 (D2303), and i have had Link2sd for quite some time.
A while back I created a partition in Minitool and mounted it as ext4 in Link2sd. Sometimes it crashed, but usually waiting or restarting would help, because all it needed was to link lib, obb and dex files. However couple days ago i set up Sleep as Android, and before i woke up a family member took the phone for a while (Facebook, Candycrush - which heat up the phone a lot). So when i woke up and tried to shut down the alarm i couldn't, Sleep app kept crashing.
After that I rebooted the phone, only to find out i have 10 installed apps showing, apps showing crash messages, even if i didn't have them in the background. On top of all there is an alarm icon below the clock which i can't turn off because Sleep app is not showing in app drawer.
After 2 days I figured i might flash SuperSu again from twrp, because it wouldn't update binaries.
Tried turning Link2sd into a system app to mount ext4, it only shows some grey screen for a second, nothing changes.
In settings there is Sdcard present with similar space i had before(1 GB more space- probably just app data wiped)
In Link2sd there is Sdcard, as well as the second partition which is showing as unmounted
In DiskInfo app i see partition by its name and allocated size(mmcblk1p2)
I see Sdcard in computer when plugging in usb.
However, I don't see it in Minitool, Disk Management or when running cmd - "diskpart" - "list disk" commands
SDHC card is Kingston 32 GB class 10. Total commander app allows exploring Sdcard which is not appearing in Minitool. Not only is partition missing but Sd card as well.
Thank you.
Ikarus
(1 rep)
Jul 9, 2016, 07:04 PM
• Last activity: Dec 21, 2021, 08:04 AM
2
votes
0
answers
1608
views
Mount ext4 formatted sdcard on Lineage 18.1
I currently have Lineage 18.1 (20211007-microG-pioneer) loaded on a phone with Magisk 23. I have tried inserting an sdcard that has an `/dev/sda1` partition formatted with ext4. In the past I've used the Magisk addon "Vold - exFAT/NTFS/EXT4/F2FS Support", however I now get an "Only support Oreo 8.1"...
I currently have Lineage 18.1 (20211007-microG-pioneer) loaded on a phone with Magisk 23. I have tried inserting an sdcard that has an
/dev/sda1
partition formatted with ext4. In the past I've used the Magisk addon "Vold - exFAT/NTFS/EXT4/F2FS Support", however I now get an "Only support Oreo 8.1" when trying to install it.
Is there any way to get ext4 sdcard support on Lineage 18.1 (fully rooted).
djsumdog
(201 rep)
Oct 17, 2021, 07:17 AM
1
votes
0
answers
528
views
mount multiple ext4 partitions manually
I have rooted android phone running android 10. I have one ext4 partition created using : # dd if=/dev/zero of=/sdcard/ext1.img bs=1M count=1024 # mkfs.ext4 -F /sdcard/ext1.img which I mount using below commands: # mknod /dev/block/loop52 b 7 0 # losetup /dev/block/loop52 /sdcard/ext1.img # mkdir /m...
I have rooted android phone running android 10. I have one ext4 partition created using :
# dd if=/dev/zero of=/sdcard/ext1.img bs=1M count=1024
# mkfs.ext4 -F /sdcard/ext1.img
which I mount using below commands:
# mknod /dev/block/loop52 b 7 0
# losetup /dev/block/loop52 /sdcard/ext1.img
# mkdir /mnt/ext
# mount -t ext4 -o rw,noatime /dev/block/loop52 /mnt/ext
ext1.img
file gets mounted successfully but when I create another ext4 file and try to mount in /mnt/ext2
using following commands. It gets mounted but the contents of ext1.img
are shown in /mnt/ext2
.
# mknod /dev/block/loop62 b 7 0
# losetup /dev/block/loop62 /sdcard/ext2.img
# mkdir /mnt/ext2
# mount -t ext4 -o rw,noatime /dev/block/loop62 /mnt/ext2
What changes do I need to make to mount multiple ext4 files in android ?
jonny789
(385 rep)
Apr 29, 2021, 07:27 AM
3
votes
1
answers
2245
views
Linux Deploy ext4 and Adoptable Storage
**Edit:** I created [an issue][1] in the Linux Deploy project. I have a smartphone with the following settings: [![enter image description here][2]][2] And the following SD: [![enter image description here][3]][3] Ok, it's not a good SD, but that's what I have for today... I was using SD as an exten...
**Edit:**
I created an issue in the Linux Deploy project.
I have a smartphone with the following settings:
And the following SD:
Ok, it's not a good SD, but that's what I have for today... I was using SD as an extension to internal storage, and I was able to store applications and files there normally.
I would like to use Kali Linux through Linux Deploy (if there is no other way), but the system can only have a maximum of 4GB per account of the created *.img* file and the format of the card, which is very little in my opinion. So I tried to follow this tutorial for an installation with more space for the operating system. I created a three partitions: - Fat32 to continue using on my smartphone as before (with less space of course); - An additional swap... - And an ext4 for the operating system installation.
I've ejected the ext4 partition to install Kali Linux. And everything worked perfectly!
Well... Almost everything!
Kali Linux was working just the way I wanted it, but when I tried to use my smartphone as before, I realized that I could no longer transfer my applications to the fat32 partition I created for it.
The option to transfer applications to SD is no longer displayed.
I tried to transform part of SD as Adoptable Storage again but do it directly from the smartphone, formatting all the storage, undoing all created partitions.
I then followed this answer (both with
Ok, now I can transfer my applications to SD, and I also have the ext4 partition for installing Kali Linux, but now Linux Deploy can not see this partition mounted or ejected by Android.
**Monted:**
[12:36:31] >>> status
[12:36:32] Device: MotoG3
[12:36:32] Android: 7.1.2
[12:36:32] Architecture: armv7l
[12:36:32] Kernel: 3.10.49-MPI24.241-2.35-1-g4023d70
[12:36:32] Memory: 38/898 MB
[12:36:32] Swap: 273/511 MB
[12:36:32] SELinux: yes
[12:36:32] Loop devices: yes
[12:36:32] Support binfmt_misc: no
[12:36:32] Supported FS: ext2 ext3 ext4 f2fs fuseblk vfat
[12:36:32] Installed system: unknown
[12:36:32] Status of components:
[12:36:32] :: extra/dbus ... stopped
[12:36:32] :: extra/ssh ... stopped
[12:36:32] :: graphics/vnc ... stopped
[12:36:32] Mounted parts:
[12:36:32] ...nothing mounted
[12:36:32] Available mount points:
[12:36:33] * /system 0.9/2.2 GB (ext4)
[12:36:33] * /data 4.5/11.8 GB (f2fs)
[12:36:33] * /cache 0.2/0.2 GB (ext4)
[12:36:33] * /fsg 0.0/0.0 GB (ext4)
[12:36:33] * /firmware 0.0/0.0 GB (ext4)
[12:36:33] * /persist 0.0/0.0 GB (ext4)
[12:36:33] * /mnt/runtime/default/emulated 4.5/11.8 GB (sdcardfs)
[12:36:33] * /storage/emulated 4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/runtime/read/emulated 4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/runtime/write/emulated 4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/media_rw/f86f8583-23fb-d201-f063-858323fbd201 13.0/13.7 GB (ext4)
[12:36:33] * /mnt/runtime/default/f86f8583-23fb-d201-f063-858323fbd201 13.0/13.7 GB (sdcardfs)
[12:36:33] * /storage/f86f8583-23fb-d201-f063-858323fbd201 13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/runtime/read/f86f8583-23fb-d201-f063-858323fbd201 13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/runtime/write/f86f8583-23fb-d201-f063-858323fbd201 13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/expand/bd43c04c-2500-40bd-9325-1de5ae577eb6 14.2/14.8 GB (f2fs)
[12:36:33] Available partitions:
[12:36:34] ...no available partitions
[12:36:34] >> status
[12:39:49] Device: MotoG3
[12:39:49] Android: 7.1.2
[12:39:49] Architecture: armv7l
[12:39:49] Kernel: 3.10.49-MPI24.241-2.35-1-g4023d70
[12:39:49] Memory: 42/898 MB
[12:39:49] Swap: 216/511 MB
[12:39:49] SELinux: yes
[12:39:49] Loop devices: yes
[12:39:49] Support binfmt_misc: no
[12:39:49] Supported FS: ext2 ext3 ext4 f2fs fuseblk vfat
[12:39:49] Installed system: unknown
[12:39:49] Status of components:
[12:39:49] :: extra/dbus ... stopped
[12:39:49] :: extra/ssh ... stopped
[12:39:49] :: graphics/vnc ... stopped
[12:39:49] Mounted parts:
[12:39:49] ...nothing mounted
[12:39:49] Available mount points:
[12:39:49] * /system 0.9/2.2 GB (ext4)
[12:39:49] * /data 4.5/11.8 GB (f2fs)
[12:39:50] * /cache 0.2/0.2 GB (ext4)
[12:39:50] * /fsg 0.0/0.0 GB (ext4)
[12:39:50] * /firmware 0.0/0.0 GB (ext4)
[12:39:50] * /persist 0.0/0.0 GB (ext4)
[12:39:50] * /mnt/runtime/default/emulated 4.5/11.8 GB (sdcardfs)
[12:39:50] * /storage/emulated 4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/runtime/read/emulated 4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/runtime/write/emulated 4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/expand/bd43c04c-2500-40bd-9325-1de5ae577eb6 14.2/14.8 GB (f2fs)
[12:39:50] Available partitions:
[12:39:50] ...no available partitions
[12:39:50]
> Is it possible to do what I'm trying? Use half the SD as Adoptable Storage and
> the rest as ext4 to install Kali Linux? Am I forgetting to set
> something up?

And the following SD:

Ok, it's not a good SD, but that's what I have for today... I was using SD as an extension to internal storage, and I was able to store applications and files there normally.



I would like to use Kali Linux through Linux Deploy (if there is no other way), but the system can only have a maximum of 4GB per account of the created *.img* file and the format of the card, which is very little in my opinion. So I tried to follow this tutorial for an installation with more space for the operating system. I created a three partitions: - Fat32 to continue using on my smartphone as before (with less space of course); - An additional swap... - And an ext4 for the operating system installation.



adb
, and with Root Essentials ). Which again undid my partitions. But I re-did it again following the following steps:
1. Format everything and use 50% for Adoptable Storage (by adb
or Root Essentials).
2. Remove the SD from the smartphone and insert it into the computer to create the other partitions (ext4) with MiniTool because Android Partition Tool (AParted) was not able to do this.


Jedaias Rodrigues
(131 rep)
Jul 12, 2017, 03:47 PM
• Last activity: Mar 18, 2021, 02:01 PM
3
votes
3
answers
11674
views
External Ext4 card mounted only for root (!) on Android 5.1 64 bits
**In short**: if I mount my Ext4 8GB SD card, **only root (SU) can see** it. The rest of users (so, the rest of apps) don't detect it. As long as my **Ext4 SD** card is not correctly mounted (Android always yields `Damaged SD card. Format it... blah blah blah`), I followed [this guide][1] to mount i...
**In short**: if I mount my Ext4 8GB SD card, **only root (SU) can see** it. The rest of users (so, the rest of apps) don't detect it.
As long as my **Ext4 SD** card is not correctly mounted (Android always yields
Damaged SD card. Format it... blah blah blah
), I followed this guide to mount it. And it works:
SD Card is at /dev/block/mmcblk1
, so first partition is at /dev/block/mmcblk1p1
.
I performed the (not very clear for me) prior ADB process:
su
setprop service.adb.tcp.port 5555
adb kill-server
stop adbd
start adbd
HOME=/sdcard adb start-server
adb connect localhost
adb -s localhost:5555 shell
exit
stop adbd
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
start adbd
And then the card is **correctly mounted** by doing (as root):
# mount -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard && sleep 5 && /system/bin/vold
Note how it works as SU but **not as normal user**:
root@unknown:/ # ls /storage/sdcard1
lost+found
root@unknown:/ # exit
u0_a98@unknown:/ $ ls /storage/sdcard1
ls: can't open '/storage/sdcard1': Permission denied
I have tested the above steps via *SSH* (remote shell).
The SD Card has been formatted from Windows using *Minitool Partition Wizard*.
I have tested too:
- Editing the /system/etc/permissions/platform.xml
file manually (adding `) to
WRITE_EXTERNAL_STORAGE` section, as referred here.
- SDFix .
- Using Xposed framework with HandleExternalStorage module.
But the apps (Total Commander, Ghost Commander, or any other program) have no access to the Ext4 SDCard.
What else could I try?
**Workarounds** to make apps read (and write) SD Card accepted too.
Extra data 1:
Note the output of the mount
command for both users:
root@unknown:/ # mount | grep "sdcard" -i
/dev/block/mmcblk1p1 /storage/sdcard1 ext4 rw,seclabel,relatime,data=ordered 0 0
root@unknown:/ # exit
u0_a98@unknown:/ $ mount | grep "sdcard"
u0_a98@unknown:/ $ mount | grep "mmcblk"
As can be seen, the root user has a mounted device that the normal user has not (!). I did not know this could happen on Linux.
Sopalajo de Arrierez
(591 rep)
Sep 19, 2015, 11:19 PM
• Last activity: Jun 3, 2020, 07:43 PM
9
votes
4
answers
29796
views
How can I mount an ext4-formatted SD card with correct permissions (with root)?
I see some mentions here of creating an ext4-formatted SD card, but no guide. [This][1] closely-related question suggests there is no way to do it, but my question differs in that my phone is specifically rooted. I formatted my card as ext4 (GUID partition-table); my Cyanogenmod phone mounted it at...
I see some mentions here of creating an ext4-formatted SD card, but no guide. This closely-related question suggests there is no way to do it, but my question differs in that my phone is specifically rooted.
I formatted my card as ext4 (GUID partition-table); my Cyanogenmod phone mounted it at
/mnt/fuse/sdcard1
. I followed instructions here to mount the card at /storage/sdcard1
, by creating the following script at /data/local/userinit.sh
#!/system/bin/sh
REALMNT=/mnt/fuse/sdcard1_real
if ! [ -d "$REALMNT" ]; then
mkdir "$REALMNT" || exit 1
fi
mount -t ext4 /dev/block/mmcblk1p1 "$REALMNT"
sdcard "$REALMNT" /storage/sdcard1 1023 1023 &
I restarted and attempting to copy a file (using ES File Explorer) and paste it into its parent directory, which failed:
/storage/sdcard1/foo/bar.mp3: open failed: EACCES (Permission denied).
I can actually play the file fine, so I *can* open it. FWIW, when I try copying from the original mount point (/mnt/fuse/sdcard1
), I get a slightly different error:
Failed to copy the file bar.mp3
I'm using a Samsung Galaxy S3 with Cyanogenmod 10.2.0-i9300.
==EDIT==
su
ls -l /mnt/fuse
drwxrwxr-x media_rw media_rw 2014-03-04 22:08 sdcard1
That was all. There is no sdcard1_real
in this directory, so I suppose the script is failing?
==EDIT2==
I tried modifying the script to troubleshoot. The script begins fine, but then fails on mkdir "$REALMNT"
with the error /data/local/userinit.sh: : not found
.
==EDIT3==
I know that the script doesn't work, so fixing it might solve my question, but I thought the following was interesting. I formatted my SD card in my Linux computer, and transferred some files to it. Oddly enough, permission errors only occur in the subdirectories that I created. In the root of the partition (via /storage/sdcard1
), I already have write permission.
Sparhawk
(335 rep)
Mar 4, 2014, 11:29 AM
• Last activity: May 9, 2020, 02:05 PM
Showing page 1 of 20 total questions