i have to assume that its a permission issue, but i cant figure out for the life of me exactly what...
heres the deal, been converting from cm10 to cm10.1 on the warp sequent, have gotten as far as to make the sd card readable using adb shell... i can cd to /storage/sdcard, do an ls, and it shows all my files just as it should. but when i go to gallery, it says no sd card, and when i go to file manager there is nothing there its just an empty folder even with all hidden files, symlinks, system files, etc shown and in root browser mode, it makes no sense to me at all
even when trying to view the size in the storage menu it says its 289mb or whatever size the tempfs is
please help save what little is left of my sanity
init.warp2.rc
on early-init
mkdir /storage/sdcard 0000 system system
# for backwards compatibility
symlink /storage/sdcard /mnt/sdcard
symlink /storage/sdcard /sdcard
export EXTERNAL_STORAGE /storage/sdcard
vold.fstab
dev_mount sdcard /storage/sdcard auto /devices/platform/msm_sdcc.4/mmc_host/mmc2
storage_list.xml
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<!-- removable is not set in nosdcard product -->
<storage android:mountPoint="/storage/sdcard"
android:storageDescription="@string/storage_sd_card"
androidrimary="true"
android:removable="true"
android:allowMassStorage="true"
android:maxFileSize="4096" />
</StorageList>
This isnt a fix for your file manager, but
sudo apt-get install gmtp
try it out
it works for stock
read something interesting the other day, so how is the jellybeer rom i built, not jellybeer ?
no, not linux, android... on the phone, if i go to the cm file manager it cant see anything in the directory as if the sd card isnt mounted, then if i go in through the computer using an adb shell command, which has the exact same function as a terminal emulator program on the phone itself, cd to the sd cards directory, the same directory i was just looking at in cm manager that was supposedly blank, it has the sd cards files in it
android 4.2 changed the sd card access methods completely, and it screwed us. the sd card mounts, but android itself cant read it right
I added a couple lines to PG's boardconfig.mk for the sdcard, after i build without it, i will build one with the changes, it points the sd card to certain dir.
from here https://github.com/animusfl/android_device_zte_warp2/blob/jellybean/BoardConfig.mk
# sdcard
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_USES_MMCUTILS := true
BOARD_HAS_SDCARD_INTERNAL := true
BOARD_SDCARD_DEVICE_PRIMARY := /dev/block/mmcblk1p1
BOARD_SDCARD_DEVICE_SECONDARY := /dev/block/mmcblk1
BOARD_SDEXT_DEVICE := /dev/block/mmcblk1p2
https://github.com/Warped420/android_device_zte_warp2/blob/cm-10.1/BoardConfig.mk
Warped420 said:
I added a couple lines to PG's boardconfig.mk for the sdcard, after i build without it, i will build one with the changes, it points the sd card to certain dir.
from here
# sdcard
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_USES_MMCUTILS := true
BOARD_HAS_SDCARD_INTERNAL := true
BOARD_SDCARD_DEVICE_PRIMARY := /dev/block/mmcblk1p1
BOARD_SDCARD_DEVICE_SECONDARY := /dev/block/mmcblk1
BOARD_SDEXT_DEVICE := /dev/block/mmcblk1p2
Click to expand...
Click to collapse
youre still missing the point. mounts fine, can be seen on the phone using a terminal emulator program, cant be seen in file manager. card is mounted, but android only sees the temp fs version which is blank
Junkie2100 said:
youre still missing the point. mounts fine, can be seen on the phone using a terminal emulator program, cant be seen in file manager. card is mounted, but android only sees the temp fs version which is blank
Click to expand...
Click to collapse
I have this exact same problem.
Have you found any solution to the case ?
Related
Is it possible for a DEV to could come up with a way to mount the ext SD card as the primary and the internal as secondary. Then you could insert a SanDisk 64GB class 10 and resolve the running out of primary memory problem.
Thanks
Bill
Found This from another DEV
I found this from another DEV. Anyone tried it? Can a DEV insert this in a ROM for an easy update? Does this work?
READ ENTIRELY BEFORE TRYING
First off I did a lot of research and found how to mount the ext-sdcard inside the int-sdcard automatically with a lot of trial and error. This only needs to be done if you are planning on porting a rom that does not have an ext-sdcard mount built into vold.fstab file like our Thrive does. This is a quick mod tutorial. If you do not know what you are doing than please do not attempt. I am not responsible for your device(s). Try at your own risk. This mod worked on my Shazaam rom. Here we go....
All these step are as if you are working from your computer on a rom.zip. No adb guidence given.
Unpack the rom.zip....
1. Mod The Build.Prop inside /system/ folder. Open the file with Notepad++ to edit. Copy and paste the code below at the bottom of your build.prop file and save
Code:
# Mount the externel SD card, too
ro.additionalmounts=/mnt/sdcard/sdcard2
2. Mod The Vold.Fstab file inside /system/etc/ folder. Open the file with Notepad++ to edit. Locate the line containing sdcard2 line and delete that entire line. Replace with code below, then save and close.
Code:
dev_mount sdcard /mnt/sdcard/sdcard2 auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
3. You must copy over the vold file from the /system/bin folder from the stock Thrive rom inorder for this to work.
4. Final and hardest mod, Modding the boot.img ramdisk files. Mod the init.antares (If you do not know how to unpack and pack the boot.img then stop here, and forget about this mod until you do know how):
First locat the line:
mkdir /mnt/sdcard 0000 system system
Replace with:
mkdir /mnt/sdcard 0666 system system
Insert the code below right above # create directory for mounting usb drives:
exp ort EXTERNAL_STORAGE2 /mnt/sdcard/sdcard2
mkdir /mnt/sdcard/sdcard2 0666 system system
symlink /mnt/sdcard/sdcard2 /sdcard2
Repack the boot.img. Build your rom with these mods in place and the ext-sdcard will automatically mount inside the int-sdcard. Enjoy......
vold.fstab
Here is a copy of my vold.fstab file. Does anyone know how to rewrite it to flip flop memory in phone and make the SD Card the primary memory?
I have already tried Siyah and Perseus kernel.
What I'm trying to do is create 2 small swap files one in internal sd and the other on the external sd. (Yes just a small memory bump will do)
On windows I did these:
Code:
fsutil file createnew C:\swap1 128000000
fsutil file createnew C:\swap2 128000000
Copied swap1 to /storage/sdcard0
Copied swap2 to /storage/extSdCard
btw /storage/extSdCard is exFat
then on Terminal Emulator.
Code:
su
mkswap /storage/sdcard0/swap1
mkswap /storage/extSdCard/swap2
swapon /storage/sdcard0/swap1
*This is where I get the error "swapon: /storage/sdcard0/swap1: Invalid argument"
(1) Swapper2 app doesnt work for me.
(2) I don't want to use hardswap or swap partition on my external SD.
*NTFS is unstable with uTorrent using Paragon NTFS/HFS+ (i'm getting corrupted files.)
*exFat is unstable when used with more than one partition like exfat/swap or exfat/swap/ext4. (still getting corrupted files.)
I've also tried using losetup, but when I do this:
Code:
# losetup -f
/dev/loop0
# losetup /dev/loop0 /storage/sdcard0/swap1
losetup: /dev/loop0: No such file or directory
I think the loop module is not loaded in the kernel, how do i load it? and where can i find the module?
R: [Q] How to use swapon?
autumnwillow said:
I have already tried Siyah and Perseus kernel.
What I'm trying to do is create 2 small swap files one in internal sd and the other on the external sd. (Yes just a small memory bump will do)
On windows I did these:
Code:
fsutil file createnew C:\swap1 128000000
fsutil file createnew C:\swap2 128000000
Copied swap1 to /storage/sdcard0
Copied swap2 to /storage/extSdCard
btw /storage/extSdCard is exFat
then on Terminal Emulator.
Code:
su
mkswap /storage/sdcard0/swap1
mkswap /storage/extSdCard/swap2
swapon /storage/sdcard0/swap1
*This is where I get the error "swapon: /storage/sdcard0/swap1: Invalid argument"
(1) Swapper2 app doesnt work for me.
(2) I don't want to use hardswap or swap partition on my external SD.
*NTFS is unstable with uTorrent using Paragon NTFS/HFS+ (i'm getting corrupted files.)
*exFat is unstable when used with more than one partition like exfat/swap or exfat/swap/ext4. (still getting corrupted files.)
I've also tried using losetup, but when I do this:
Code:
# losetup -f
/dev/loop0
# losetup /dev/loop0 /storage/sdcard0/swap1
losetup: /dev/loop0: No such file or directory
I think the loop module is not loaded in the kernel, how do i load it? and where can i find the module?
Click to expand...
Click to collapse
Why not use my multitasking mod?
From universe with my gs3
autumnwillow said:
I have already tried Siyah and Perseus kernel.
What I'm trying to do is create 2 small swap files one in internal sd and the other on the external sd. (Yes just a small memory bump will do)
...
Click to expand...
Click to collapse
IMHO swap on internal eMMC is one of the worst ideas ever. There is however somewhere a thread about how you can make one on SD.
xclub_101 said:
IMHO swap on internal eMMC is one of the worst ideas ever. There is however somewhere a thread about how you can make one on SD.
Click to expand...
Click to collapse
It's the same result I think for both SD and MMC. Using them as swap will shorten its life. But I'm okay with that. I plan to upgrade in the near future anyway.
What I'm not okay with is my poweramp music player pauses from playing flac files (choppy, not from notifications). Contacts/Phone/Messaging being too slow to load. Other apps also reloading too much. Not much of multitasking.
Currently i use zram with Yank's kernel. And believe me the 250mb zram is being consumed well.
The idea was to create 2 small swap files (larger) and setting priorities to them. 1 for the faster internal sd and 2 for external sd. Using swapon -p 1/2 swapfile
Why large files? Lesser rewrites. More sd life.
The tablet supports up to 512gb microSD cards but only the FAT32 filesystem by default - not much use if you're dumping large files (>4gb) onto them.
Notes:
I've only tried this with a pre-formatted ext4 card. The stock Dell rom does not ship with mkfs.ext4 binary so I highly doubt you'll be able to format the sdcard as ext4 on the device itself. I also have no idea what happens if you subsequently try to use a FAT32 formatted microSD card. I also haven't tested hotplugging - again, I assume it would work but it's untested.
I stress, be very careful when performing these steps. The bootloaders on these devices currently cannot be unlocked and we only have a tethered CWM at the moment.
I'm not responsible if you brick your device trying to follow the steps.
Requirements:
Root access
Busybox
Terminal emulator/adb shell/ssh access
Pre-formatted ext4 sdcard
Steps:
Download https://dl.dropboxusercontent.com/u/134520/.nemaz_ma/vold.ext4support.tar.gz on the tablet (replace hxxp with http, I can't post links)(found here: hxxp://forum.xda-developers.com/showthread.php?t=2580142)
Open terminal emulator
Code:
cd /sdcard/Download
tar -xvf ./vold.ext4support.tar.gz
su
mount -o remount,rw /system /system
mv /system/bin/vold /system/bin/vold.bak
cp ./vold /system/bin/vold
chmod 0755 /system/bin/vold
Reboot the device
If you're lucky and open Settings->Storage, you should now see the sdcard showing up.
If not:
Open terminal emulator
Code:
cd /etc
vi vold.fstab
Most lines in the vold.fstab file are comments, there should be two lines at the bottom:
Code:
dev_mount sdcard_ext /storage/sdcard_ext auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
dev_mount usbcard /storage/usbcard auto */block/sd
you need to change
Code:
dev_mount sdcard_ext /storage/sdcard_ext auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
to
Code:
dev_mount sdcard_ext /storage/sdcard1 auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
(you're changing the third parameter from /storage/sdcard_ext to /storage/sdcard1)
Give the device a reboot and it should now work.
To undo the patch:
Open terminal emulator
Code:
su
mount -o remount,rw /system /system/
mv /system/bin/vold /system/bin/vold_ext4
mv /system/bin/vold.bak /system/bin/vold
Reboot
Good luck.
@anggusss - Thanks for that! Very cool. I just got a 64GB card, but I'd like a larger card to hold entire ROM sets.
Incidentally, for anyone that wants, you can get a Moga Power Pro at Best Buy for $39.99 (MSRP $ 79.99). Just search for the controller via Target's website, and show them the lower price. They will match it.
anggusss said:
The tablet supports up to 512gb microSD cards but only the FAT32 filesystem by default - not much use if you're dumping large files (>4gb) onto them.
Notes:
I've only tried this with a pre-formatted ext4 card. The stock Dell rom does not ship with mkfs.ext4 binary so I highly doubt you'll be able to format the sdcard as ext4 on the device itself. I also have no idea what happens if you subsequently try to use a FAT32 formatted microSD card. I also haven't tested hotplugging - again, I assume it would work but it's untested.
I stress, be very careful when performing these steps. The bootloaders on these devices currently cannot be unlocked and we only have a tethered CWM at the moment.
I'm not responsible if you brick your device trying to follow the steps.
Requirements:
Root access
Busybox
Terminal emulator/adb shell/ssh access
Pre-formatted ext4 sdcard
Steps:
Download hxxps://dl.dropboxusercontent.com/u/134520/.nemaz_ma/vold.ext4support.tar.gz on the tablet (replace hxxp with http, I can't post links)(found here: hxxp://forum.xda-developers.com/showthread.php?t=2580142)
Open terminal emulator
Code:
cd /sdcard/Download
tar -xvf ./vold.ext4support.tar.gz
su
mount -o remount,rw /system /system
mv /system/bin/vold /system/bin/vold.bak
cp ./vold /system/bin/vold
chmod 0755 /system/bin/vold
Reboot the device
If you're lucky and open Settings->Storage, you should now see the sdcard showing up.
If not:
Open terminal emulator
Code:
cd /etc
vi vold.fstab
Most lines in the vold.fstab file are comments, there should be two lines at the bottom:
Code:
dev_mount sdcard_ext /storage/sdcard_ext auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
dev_mount usbcard /storage/usbcard auto */block/sd
you need to change
Code:
dev_mount sdcard_ext /storage/sdcard_ext auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
to
Code:
dev_mount sdcard_ext /storage/sdcard1 auto /devices/pci0000:00/0000:00:01.2/mmc_host/mmc1 /devices/pci0000:00/0000:00:11.0/dwc3-device.1/gadget/lun0
(you're changing the third parameter from /storage/sdcard_ext to /storage/sdcard1)
Give the device a reboot and it should now work.
To undo the patch:
Open terminal emulator
Code:
su
mount -o remount,rw /system /system/
mv /system/bin/vold /system/bin/vold_ext4
mv /system/bin/vold.bak /system/bin/vold
Reboot
Good luck.
Click to expand...
Click to collapse
I have to say having the removable storage was a nice perk. It wasn't 100% confirmed when I ordered my 7840. I do have a suspicion that on the LTE version that is supposedly due out later this year that the removable storage will become that sim tray. Either way I've got a 64gig card that contains a lot of movies for on the go watching. I forgot how nice it is (coming from a Nexus 10) not to have to stream everything. I also recently have purchased a WD MyCloud 6TB NAS that I am finding all sorts of apps for and am really loving that connectivity with my 7840.
I've just installed this script on 7840 with Android 5.1 (last version) and the device does not boot any more. It hangs on "intel inside" logo.
I've tried to do factory reset using recovery mode - it does not help
Is there any possibility to replace the modified "vold" file with the backup "vold.bak" using default recovery or adb sideload?
Requirements:
Rooted device
SD card formatted to ext4/3/2
Terminal app installed
Optional: A file explorer (I use ES file explorer)
Basic command line knowledge
Step 1: Run as root
Open the terminal app and execute this:
Code:
su
This is necessary for the next commands to be executed with root privilege.
Step 2: Identify SD card partition(s)
Execute:
Code:
blkid
or
Code:
cat /proc/partitions
This will spit out a bunch of partitions but we're looking for a device that reads something like "/dev/block/mmcblk1".
In my case there's two of those, because I have two partitions on my SD card. One reads "mmcblk1p1", which is ExFat and the other reads mmcblk1 and is ext2. We'll be mounting the second one, so my partition is /dev/block/mmcblk1p2. It isn't ext4 but the the process is the same.
Step 3: Create folder to mount to
We will need to create a folder to mount the partition to and I will go along with the "/storage/sdcard0" directory and choose "/storage/sdcard1". You can however choose any name you want.
So run this:
Code:
mkdir /storage/sdcard1
or replace sdcard1 with a different name if desired.
Step 4: Mounting
The command syntax for mounting is as follows:
Code:
mount -t ext4 partition path
My device is "/dev/block/mmcblk1p2" and my path is "/storage/sdcard1" so this is what I'll run:
Code:
mount -t ext4 /dev/block/mmcblk1p2 /storage/sdcard1
(I used ext4 with an ext2 partition but it works regardless.)
If there were no issues the command will run without an output.
Now you can test if it's mounted by going into the folder with
Code:
cd /storage/sdcard1
and making a folder:
Code:
mkdir test
If you list the files:
Code:
ls
you should see "test".
Step 5: Gaining read/write permission
Execute:
Code:
chmod -R 777 /storage/sdcard1
obviously with your own path and now you should be able to open the directory in a file manager and write into it.
Works, but no file managers recognise its mounted.
Spaceboy60 said:
Works, but no file managers recognise its mounted.
Click to expand...
Click to collapse
Check the folder you made with mkdir, it should be there.
Hi, i formatted my sdcard to f2fs and it can be mounted on custom rom i previously use, PixelExtended by changing <type> from vfat to auto in fstab.qcom. Yesterday, i moved to AOSP Kraken and did the same modification to fstab.qcom but sdcard still can't be mounted (unsupported). Is there anything i can do to make my current rom able to mount f2fs sdcard? Maybe like replacing the files or anything using the files from previous rom that is responsible to mounting sdcard?
NB : My device is Redmi Note 9 Pro (joyeuse). Im using same custom kernel in both rom
I have same problem here
Spicy_WinG said:
Hi, i formatted my sdcard to f2fs and it can be mounted on custom rom i previously use, PixelExtended by changing <type> from vfat to auto in fstab.qcom. Yesterday, i moved to AOSP Kraken and did the same modification to fstab.qcom but sdcard still can't be mounted (unsupported). Is there anything i can do to make my current rom able to mount f2fs sdcard? Maybe like replacing the files or anything using the files from previous rom that is responsible to mounting sdcard?
NB : My device is Redmi Note 9 Pro (joyeuse). Im using same custom kernel in both rom
Click to expand...
Click to collapse
@namhoang235
Its possible to mount f2fs/ext4 microSD / usb-otg on android.
i use f2fs since 2017 for microSD on Android.
u need to be rooted, and, a your need to have kernel f2fs-support.
if you can format /data as f2fs and mount it.
then, youtl already have f2fs support.
else you can use any custom kernel with f2fs support.
as (on 2018) for my asus x00td device, i requested @Sakhtlonda69 to add f2fs support in his custom kernel build.
(and, he did it!)
----
these are few values , which u need to know, to execute the below commands
# YOUR_DEVICE_NUMBER = the exact partition which is your memory card's 1st partition.
# If you have a device with UFS storage (not eMMC), then, microSD will be most likely at "mmcblk0p1"
# If you have a device with eMMC Storage (not UFS), then, microSD will be most likely at "mmcblk1p1"
# If you still can't understand what I'm saying,
# Make sure your memory card is inserted,
# then,
# just go to /dev/block from any rooted file manager
# search "mmcblk1" there.
# if it only shows these 2 files: mmcblk1 and mmcblk1p1
# then, "YOUR_DEVICE_NUMBER" is "mmcblk1p1"
but, if you can't find anything with "mmcblk1"
#then, search "mmcblk0" there.
# if it only shows these 2 files: mmcblk0 and mmcblk0p1
# then, "YOUR_DEVICE_NUMBER" is "mmcblk0p1"
so, "YOUR_DEVICE_NUMBER" is actually either "mmcblk0p1" or "mmcblk1p1"
WARNING: (If you format any wrong system's internal storages partition, your device will most likely be bricked!)
Understand?
---
#---Format your microSD part with f2fs---#
simply unmount the memory card from Settings > Storage.
then, launch Terminal Emulator/ Termux App
(make sure you have root)
enter below 2 commands one by one:
su
make_f2fs -f /dev/block/YOUR_DEVICE_NUMBER
#---Formated successfully---#
-----
Now reboot your device
After reboot your device show a notification that your Memory Card is corrupted!
(because most of the android system can't mount anything except fat/exFAT for Memory Card - it's normal)
---
to mount the microSD (Memory Card),
Launch Terminal/Termux: and, enter below lines one by one:
(YOU NEED TO ENTER THESE LINES EVERY TIME AFTER YOU REBOOT YOUR DEVICE)
su
mkdir -p /mnt/extsd
mkdir -p /sdcard/_MemoryCard_
# Mount f2fs-microSD at /mnt/extsd
mount -t f2fs -o rw,nosuid,nodev,noatime,noexec,discard,fsync_mode=nobarrier /dev/block/platform/soc/*.sdhci/mmcblk*p1 /mnt/extsd
# Bind using sdcardfs f2fs-microSD from /mnt/extsd to /sdcard/_MemoryCard_
mount -t sdcardfs -o rw,nosuid,nodev,noatime,noexec,fsuid=1023,fsgid=1023,gid=9997,mask=2 /mnt/microSD /mnt/runtime/default/emulated/0/_MemoryCard_
----
Now,
microSD is mounted under Internal Storage's _MemoryCard_ folder.
---------
(Extra things)
If you dont want to show Memory Card Corrupted (annoying) Notification on each boot,
simply edit your /vendor/etc/fstab* file.
(it will be under : /vendor/etc/fstab.qcom or /vendor/etc/fstab.default or /vendor/etc/fstab.emmc)
(if you have more that one fstab, edit all)
Edit fstab* :
Find the line contains
"/devices/platform/soc/ ......... /mmc_host*"
add a "#" at the starting of that line (without quotation marks)
and save that file.
Reboot your device.
Now, It won't show any corruption device notification.