[Q] ADB - Can't Find Internally Stored Pics - Galaxy S II Q&A, Help & Troubleshooting

Yesterday, a customer brought me a phone that seems to be hanging on boot. The phone is a stock (non-rooted) US Cellular Galaxy S II SCH-R760. I'm not trying to fix the phone. He just wants his pics and contacts. There was no SD card in the phone and he claims there never has been.
This phone was a real pain to get into recovery. I'm pretty sure it suffers from the well known power button issues. ADB will let me connect in recovery mode. It never sees the phone when trying a normal boot.
I've found reference to internal storage being located at /storage/sdcard0. There is no storage folder off the root. I tried cd'ing to it anyway but it doesn't exist. There is nothing shown in /mnt or /dev. There are no files or folders in /sdcard.
I've read about using Kies. The program sees the phone and goes into "Connecting" while attempting a normal boot or in recovery mode but it never gets beyond that point. I'm using driver version 1.5.27.0.
I've tried using "adb pull / ./s2" in an attempt to copy the entire file system. The command just hangs and no files ever copy.
***EDIT - further attempts to pull the entire file system finally worked somewhat. After restarting recovery, I was able to get the command to run but it skipped most of the file system. It only copied over the mnt, sbin, sys, and system folders. The only jpg files in there are files you may see during a firmware upgrade.
Any other thoughts about how to get this guys data?
Here is the folder list:
mnt
persist
dbdata
efs
cache
system2
preload
sdcard
etc
system
sbin
ueventd.smdkc210.rc
sys
init.goldfish.rc
data
init
tmp
init_kernel_only.rc
vendor
init.rc
init.smdkc210.rc
proc
ueventd.rc
default.prop
recovery.rc
lib
fota.rc
lpm.rc
ueventd.goldfish.rc
res
dev

There is a chance, that /storage/sdcard0 is not mounted automatically when you boot into recovery. You could try to adb shell into the device when in recovery mode and try to mount sdcard0 manually.
Another chance to get the pics: do an image backup of the sdcard0 partition and loop mount that image on your PC. On my blog you can also find a tool which is doing that. Unfortunately it's not finished yet (even if the functionality you would need is working ) and there are only a few devices supported out of the box. For other devices you would need to create a device specific config file.
Sent from my Nexus 7 using xda app-developers app

AndDiSa said:
There is a chance, that /storage/sdcard0 is not mounted automatically when you boot into recovery. You could try to adb shell into the device when in recovery mode and try to mount sdcard0 manually.
Another chance to get the pics: do an image backup of the sdcard0 partition and loop mount that image on your PC. On my blog you can also find a tool which is doing that. Unfortunately it's not finished yet (even if the functionality you would need is working ) and there are only a few devices supported out of the box. For other devices you would need to create a device specific config file.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
I'll need some help on this one. I'm a Windows guy. I'm not afraid to try anything but Linux and Android are beyond me without help from Google and the awesome XDA community. I looked for your tool on your blog. I'm guessing you are referring to the Android Remote Toolkit. If that is the case, it has been over 10 years since I've compiled anything. That is beyond me.
From what I can gather, the internal storage is possibly located at /devices/platform/s3c-mshci.0/mmc_host/mmc0/mmc0. If that is correct, how exactly do I mount it? There is no /devices folder. The file system is read only (no root). I can't create a folder for the mount. I've tried using the empty /sdcard folder for a mount point. My best guess at the mount command was:
Code:
mount -r -t auto /devices/platform/s3c-mshci.0/mmc_host/mmc0/mmc0 /sdcard
This produced a result of
Code:
mount: Operation not permitted
Here is a little bit of data for you to help see what the current situation is. This is the output of the mount and fs commands:
Code:
$ mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=111 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,relatime,mode=755 0 0
/dev/block/mmcblk0p9 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p4 /mnt/.lfs j4fs rw,relatime 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nodev,noatime,nodiratime,barrier=1,data=orde
red 0 0
$ df
df
Filesystem Size Used Free Blksize
/dev 417M 76K 417M 4096
/tmp 417M 56K 417M 4096
/system 503M 484M 19M 4096
/mnt/.lfs: Function not implemented
/cache 295M 5M 290M 4096
And here is the contents of vold.fstab. I'm guessing this will show where the internal storage is located but I'm not completely comfortable with reading it.
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = disable
discard = enable
}
dev_mount sdcard /mnt/sdcard 11 /devices/platform/s3c-mshci.0/mmc_host/mmc0/mmc0
# external sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = enable
}
dev_mount sdcard1 /mnt/sdcard/external_sd auto /devices/virtual/block/cyasblkdevblk0
# otg sdcard
{
ums_path = /dev/zero
asec = disable
}
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/s3c_otghcd/usb
#end line ## keep this line

You need to be root to mount a file system, to to call "su" before calling the mount command.

AndDiSa said:
You need to be root to mount a file system, to to call "su" before calling the mount command.
Click to expand...
Click to collapse
That is what I was afraid of. This is the US Cellular version of this phone. I think I can halfway get it rooted but I don't think the phone would ever function again or be able to be returned to stock for warranty. The only good info I can find for getting it rooted and being able to either return to stock or turn it into a functioning phone is found here:
http://forum.xda-developers.com/showpost.php?p=23276856&postcount=3
http://forum.xda-developers.com/showthread.php?t=1677463
The problem is that the USCCROOT-sfx.exe package is not available from the download link. Any downloads I've found by the same name do not include the files mentioned in the instructions.
I think it is time to hand this phone back to the guy and tell him he is out of luck. Keep your stuff backed up and synced.

Do you have a custom recovery installed on it? If yes, you will have root access on cmd line level.
Sent from my Nexus 7 using xda app-developers app

Related

[How to Project] Share SDcard Partition Between EMMC and SDcard OS's

I have Nookie Froyo on a 16GB SDcard and it's fairly stable. I do like to use the NC from the stock or rooted OS on the EMMC on occasion. When I'm running internal and insert the NF card, it only sees the boot partition just like under windows.
So, here is my thought. With Linux, it should be somewhat straightforward to have a script to unmount boot from sdcard and remount the SDcard partition on the SDcard as sdcard. The only similar thread I found was this one.
Can a bright person give me a hand on this one?
UPDATE: The answer lies here.
Homer
Homer_S_xda said:
I have Nookie Froyo on a 16GB SDcard and it's fairly stable. I do like to use the NC from the stock or rooted OS on the EMMC on occasion. When I'm running internal and insert the NF card, it only sees the boot partition just like under windows.
So, here is my thought. With Linux, it should be somewhat straightforward to have a script to unmount boot from sdcard and remount the SDcard partition on the SDcard as sdcard. The only similar thread I found was this one.
Can a bright person give me a hand on this one?
Homer
Click to expand...
Click to collapse
I lost the page but on the forums theres one talking about mount points. What you're going to want to do(or at least this is my guess) is run something like
Code:
adb shell umount /dev/block/mmcblk1 (This is the boot partition normally)
mkdir sdcard
mount /dev/block/"Whatever the sd card mount point is" sdcard
Try This
If you mean mouting the Nookie Froyo/Honey's sdcard partition, you can do it from a Terminal App. You just need to figure out what the Nookie card's mount device is and mount the 4th partition.
Try this:
Code:
(use cd command to non System Folder)
mkdir /nookie
su
mount '/dev/block/mmcblk1p4' '/(location of nookie folder)/nookie/'
This should Mount the Partition to the "nookie" folder. You shouldn't need to unmount the First partition. You just need to mount the 4th to a different location. Then use a File Browser like Astro or Root Explorer to Browse and Transfer files.
Then use this to unmount after done file transfers and stuff:
Code:
unmount '/(location of nookie folder)/nookie/'
Thanks for the replies. I think the goal here would be to make it transparent to applications that are writing to the sdcard partition. That way, I would browse to the files the same way regardless of the OS I happen to have booted. Also, the 117MB or so free on boot is going to fill up with junk and runs the risk of getting overwritten, wrecking the Froyo/Honeycomb installation.
Homer
More Suggestions
Homer_S_xda said:
Thanks for the replies. I think the goal here would be to make it transparent to applications that are writing to the sdcard partition. That way, I would browse to the files the same way regardless of the OS I happen to have booted. Also, the 117MB or so free on boot is going to fill up with junk and runs the risk of getting overwritten, wrecking the Froyo/Honeycomb installation.
Homer
Click to expand...
Click to collapse
Good point. How about this instead.
Code:
su
unmount '/sdcard'
mount '/dev/block/mmcblk1p4' '/sdcard'
This would unmount the boot partition and then mount the sdcard partition in it's place. This is assuming that Rooted Stock mounts the SDcard at folder '/sdcard' by default, I haven't rooted my NC's Stock.
Now Mounting the Media partition(Where your books and other Media are stored) from Nookie Froyo isn't as clear cut. I found the Mount Table for Rooted Stock and Media is listed different then the others. As shown in Bold:
Code:
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mmcblk0p2 /rom vfat rw,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro 0 0
/dev/block/mmcblk0p5 /system ext2 ro,errors=continue 0 0
/dev/block/mmcblk0p6 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
[b]/dev/block//vold/179:8 /media vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0[/b]
As I said I don't have my NC Rooted so I can't investigate this. On the other hand, Accessing Stock System(p5) or Data(p6) partitions should be straight forward.
Code:
cd /sdcard
mkdir /stock-system
mount '/dev/block/mmcblk0p5' '/stock-system'
A few nights ago I set up my NC to dual boot following ...
http://forum.xda-developers.com/showthread.php?t=920347
Which in addition to stealing about 20% of the internal /media partition for the NF system, it also replaced the uboot to selectively choose which distro you wanted to boot from as well as editing the /system/etc/vold.fstab to change how the sdcard was mounted. Perhaps this last step may help(?)
BTW - I'm pleased with the dual booting off of the emmc. I'm a Linux person, so shrinking down the last partition and adding partitions 9 and 10 for FC seems like a nice, transparent solution. It doesn't seem to affect the operation of CWM's nandroid backup and restore (I've done both since dual booting) and I don't have to worry about popping out the SD card to boot the emmc based distro.
working on vold.fstab is the way to go..
Sent from my LogicPD Zoom2 using Tapatalk
samuelhalff said:
working on vold.fstab is the way to go..
Sent from my LogicPD Zoom2 using Tapatalk
Click to expand...
Click to collapse
This is exactly how its done on the honeycomb build floating around here.
Here is what the vold.fstab looks like in there:
Code:
$ adb shell cat /etc/vold.fstab
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
#dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
## Example of a dual card setup
# dev_mount left_sdcard /sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# dev_mount right_sdcard /sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/msm_sdcc.3/mmc_host/mmc1
## Example of specifying a specific partition for mounts
# dev_mount sdcard /sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#dev_mount media /media 8 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
So this effectively mounts the partition 4 of the sdcard as /sdcard and everything works normally.
Mount NC Internal from Nookie Froyo
Ok I successfully mounted the Nook's Media Partition from within Nookie Froyo:
Code:
su
mount -o rw,remount -t rootfs /
mkdir /mnt/media
mount /dev/block/mmcblk0p8 /mnt/media
mount -o ro,remount -t rootfs /
NC Internal Media Partition is now mounted to '/mnt/media' as RW.
j4mm3r said:
This is exactly how its done on the honeycomb build floating around here.
Here is what the vold.fstab looks like in there:
Code:
$ adb shell cat /etc/vold.fstab
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
#dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
## Example of a dual card setup
# dev_mount left_sdcard /sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# dev_mount right_sdcard /sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/msm_sdcc.3/mmc_host/mmc1
## Example of specifying a specific partition for mounts
# dev_mount sdcard /sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#dev_mount media /media 8 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
So this effectively mounts the partition 4 of the sdcard as /sdcard and everything works normally.
Click to expand...
Click to collapse
So I need to modify the vold.fstab on my emmc to mount the 4th sdcard partition as /sdcard. Let me get it up and running again and I'll give that a whirl.
Homer
Did some poking. This file does not exist in the default config. Should I create it with just this line:
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
UPDATE: Nope... either need permissions set right or have to tell the system to look at the file.
Homer
Homer_S_xda said:
Did some poking. This file does not exist in the default config. Should I create it with just this line:
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
UPDATE: Nope... either need permissions set right or have to tell the system to look at the file.
Homer
Click to expand...
Click to collapse
Hold on a sec... are you doing this when booting into the Nook rom? 'Cause if you are then just keep in mind that the Nook is based on Eclair and vold.fstab was introduced in Froyo...
The Idea that I was trying to convey was that in case you happen to be booting from a Froyo image on the SD card, then having such a seupt in the vold.fstab would allow you to mount the remainder of the SD card as /sdcard.
If however, you want to share the SD card partition when you boot into Nook, I'm afraid that this wont work. I think the Eclair vold is kind of dumb and always tries to mount the first usable partition off of the card, which'll be the small boot partition in case you have burned nookiefroyo.
On Eclair, change vold.conf..
Thanks again everyone! The answer is here.
Homer
seems on 1.2 editing vold.fstab works instead of vold.conf Just replaced the first 'auto' with 4 and poof, part. 4 is now the SD card!! Previously before 1.2 update vold.conf was the route. That didn't seem to work this time so once I edited fstab it was perfect.

Nabi 2 vold.fstab

I have been tryying to get the Nabi 2 to mount micro sd card/sdcard2 as internal storage/sdcard. I have altered the vold file on AN7G3 Arnova 7" tablet so as to have 32 gig internal instead of 4 gig, works really well. Also know many have done this for other devices and works on GB 3.2 and ICS 4.03. Nabi2 has ICS 4.0.3 but can not get them to switch. when i change sdcard and sdcard2 and reboot, device can not reconize micro sdcard/sdcard2 and openning settings/storage on the device cause the storage to force close. ES File Exployer does not reconize sdcard2. Is there a way to achieve this with the vold file or does this have to be done thru adb. If adb could someone help me with the commands. This device IS rooted and Google Play installed. I will include a copy of the vold.fstab as a vold.txt. TIA as several folks need this info and i will relay your info or you can on the Nabi 2 thread.
i don`t see the internal storage defined in the vold.fstab
can you put the output from mount ?
globula_neagra said:
i don`t see the internal storage defined in the vold.fstab
can you put the output from mount ?
Click to expand...
Click to collapse
Not really sure what you want. The internal storage is named sdcard and micro sdcard is named sdcard2. In settings/storage they are listed as internal storage and sdcard. Es File explorer sees them as sdcard and sdcard2. If I know what you need, I will get it for you.Need
dev_mount sdcard /mnt/sdcard2 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2 (this is the external sd card)
dev_mount usbdrive /mnt/usbdrive auto /devices/platform/tegra-ehci.0/usb2 (this is the host where you can connect a mouse, etc.)
this what apears in your vold.fstab
so, the line for the internal storage is missing
on my tablet it looks like this
dev_mount sdcard /mnt/sdcard 20 /devices/platform/msm_sdcc.2/mmc_host (internal storage)
dev_mount sdcard1 /mnt/external_sd auto /devices/platform/msm_sdcc.4/mmc_host (external sd)
dev_mount udisk /mnt/udisk auto /devices/platform/msm_hsusb_host.0/usb1 (host for mouse, keyboards, etc)
This is the "mount" in adb shell
C:\Android\android-sdk\platform-tools>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
sh-3.2# su
su
sh-3.2# mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p12 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,d
ata=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p14 /persist ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=
1,data=ordered 0 0
/dev/block/mmcblk0p15 /cache ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,
data=ordered 0 0
/dev/block/mmcblk0p17 /content ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=
1,data=ordered 0 0
/dev/block/vold/179:97 /mnt/external_sd vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:20 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,
uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharse
t=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:20 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
sh-3.2#
I agree, this vold is different from what I have delt with in my limited experience. Here is a screen shot of mount on terminal emulator. Does this give you the info that you requested.
well, in the mount the internal storage it appears, is strange that it does not appear in the vold.fstab
i think the internal storage is triggered by the boot.img, or a .rc from the /etc
you could have a look on a nexus tablet, or acer iconia110 to see how is defined there the internal storage in vold.fstab. (since all are having tegra 3, you should have a corect image)
globula_neagra said:
well, in the mount the internal storage it appears, is strange that it does not appear in the vold.fstab
i think the internal storage is triggered by the boot.img, or a .rc from the /etc
you could have a look on a nexus tablet, or acer iconia110 to see how is defined there the internal storage in vold.fstab. (since all are having tegra 3, you should have a corect image)
Click to expand...
Click to collapse
That's a good thought as Nabi2 is very close to the nexus 7 . Will try and run those down. Thanks
I have just spent the last 2 hours attempting to mod the Vold file in like 4-5 different ways and nothing worked I took the moded Vold file off my LG Esteem Smart phone which has a moded Vold file that makes my extsdcard the Internal Memory and studied it to find there is only like 2 sets of 2 words and numbers that are switched from one line of code to another and THATS IT!! The rest of the code is letter for letter number for number the same!... So I tried applying the same technique to my Nabi 2's Vold file and no matter what it just makes the extsdcard (sdcard2) appear not there anymore and has the following message in the storage status tab.. "Insert an SD card for mounting" Someone's gotta tackle this!!
It was suggested that I/we as clarkiss run an su file with script manager and alter the vold. We did this and still force close when openning settings/storage. Used original vold and ran script, when opened settings/storage, I see my micro sdcard listed as internal storage and sdcard2. Es File explorer sees micro sdcard as sdcard and sdcard2, nothing sees the internal storage but any programs or games still install to the unseen internal storage.
Anyone have any idea on this? I have included the sdcard_switch.su that we ran with script manager, in hope that with the vold posted above someone might have an idea to help us. There are quite a few folks looking for this and will be more as they by these for christmas.
Thanks.
I figured I would post the original Vold.fstab to see if anyone has any ideas or suggestions... If you need me to post anymore files let me know and I will quickly get posted!! The below code is the entire contents of the Vold.fstab... I also have included a link to download (Hosted by my Box account) the Vold.fstab file at the bottom of this post after the code as well incase anyone wanted to help us play with it :silly: Help with this on any level is more then welcome!!
Contents of Vold.fstab file (Code)
## Vold 2.0 fstab for kai
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard2 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2
dev_mount usbdrive /mnt/usbdrive auto /devices/platform/tegra-ehci.0/usb2
https://www.box.com/s/2az7hod00g9fbenn3j14
If anyone has a vold.fstab from a nexus tablet, or acer iconia110 tablet that they could share. I would like to see them to compare with the nabi 2.
as i said, on you guys, the vold does not trigger the internal storage (have a look here on this lines )
/dev/block/vold/179:97 /mnt/external_sd vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow _utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:20 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,
uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utim e=0020,codepage=cp437,iocharse
As you can see this line: /dev/block/vold/179:20 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime, is the internal storage, on your vold, this line is missing
therefore you should start and search when the internal storage is mounted
the line that defines the internal storage is
dev/fuse mnt/sdcard
you should look maybe in the boot.img ?
it should look like this
dev_fuse sdcard /mnt/sdcard fuse
---------- Post added at 02:02 PM ---------- Previous post was at 01:58 PM ----------
this is the vold from HTC one x, tegra version.
## Vold 2.0 fstab for endeavor
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
#dev_mount sdcard /mnt/sdcard auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
dev_mount sdcard /mnt/sdcard 14 /devices/platform/sdhci-tegra.3/mmc_host/mmc0
As you can see the internal storage is trigered by the vold.
globula_neagra said:
as i said, on you guys, the vold does not trigger the internal storage you should look maybe in the boot.img ?
Click to expand...
Click to collapse
Sounds good...How do I look in the boot.img? Is there a program or something of that sort to use? Could you give me a quick guide on the steps to take to look in the boot.img?
globula_neagra said:
as i said, on you guys,
it should look
As you can see the internal storage is trigered by the vold.
Click to expand...
Click to collapse
I also don't know where to start. Sorry to be so lost but really don't know what to do from here. Any help pointing us to what we need to do would be great. We are learning and follow direction. I have looked for the info but no luck.
We are noob's but trying. Lol
Located the boot.img
I think I located the boot.img... After reading and jumping from link to link forum to forum I came across "bootanimation.zip" in /system/media. Im going to unpack it and study it via HowTo: Unpack/Edit/Repack Boot Images website
---------- Post added at 07:23 PM ---------- Previous post was at 07:17 PM ----------
Clarkiss said:
I think I located the boot.img... After reading and jumping from link to link forum to forum I came across "bootanimation.zip" in /system/media. Im going to unpack it and study it via HowTo: Unpack/Edit/Repack Boot Images website
Click to expand...
Click to collapse
Scratch that lol its just the god damn boot animation in the beganning damn it!!!!!:crying:
Clarkiss said:
I think I located the boot.img... After reading and jumping from link to link forum to forum I came across "bootanimation.zip" in /system/media. Im going to unpack it and study it via HowTo: Unpack/Edit/Repack Boot Images website
---------- Post added at 07:23 PM ---------- Previous post was at 07:17 PM ----------
Scratch that lol its just the god damn boot animation in the beganning damn it!!!!!:crying:
Click to expand...
Click to collapse
You know, jmztaylor has img files at
http://androidfiles.org/uploads/?dir=Nabi2
I just don't know how to unpack it?
ALD3 said:
You know, jmztaylor has img files at
http://androidfiles.org/uploads/?dir=Nabi2
I just don't know how to unpack it?
Click to expand...
Click to collapse
Ok im starting to get deeper and deeper into this lol I have unpacked the ROM we are running on which of course is from jmz with Android Kitchen/Cygwin and I am looking at Working Folder Information in the Kitchen and I see something I kinda dont like... Of course there is like 10-15 lines of information like Android OS version: 4.0.4 and ROM Name: JmzStockNabi and so on but this is what is bothering me... One of the lines reads as follows.. Apps2SD <Apps to EXT> enabled: NO .... I wonder what would happen if that were changed? anyone have any suggestions?
stripped Nabi 2 ROM
After extracting the BOOT.img and opening the "BOOT- EXTRACTED" folder it created I found another folder in that folder called "boot.img-ramdisk" and inside it was the following:
[folder called] data
[folder called] dev
[folder called] proc
[folder called] sbin
[folder called] sys
[folder called] system
[PROP file called] default.prop
[file called] init
[RC file called] init.goldfish.rc
[RC file called] init.mt799.rc
[RC file called] init.nv_dev_board.usb.rc
[RC file called] init.rc
[RC file called] init.tf.rc
[RC file called] ueventd.goldfish.rc
[RC file called] ueventd.mt799.rc
[RC file called] ueventd.rc
I started studying all the files and the one that looked most interesting to me and what im trying to do is the "init.mt799.rc" file!:laugh: It seemed to reference quite often the sdcard, sdcard2, and external storage so that got me a little happy haha! Seems like I might be starting to get to the bottom of this riddle :fingers-crossed: So I copied and pasted the entire contents of the "init.mt799.rc" file code below to see what you guys think! And if you guys want me to post/attach any one of those other files let me know which and I will immediately
"init.mt799.rc" file contents
#Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
import init.nv_dev_board.usb.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
# for backwards compatibility
export EXTERNAL_STORAGE /mnt/sdcard
export EXTERNAL_STORAGE2 /mnt/sdcard2
mkdir /mnt/sdcard 0000 system system
symlink /mnt/sdcard /sdcard
mkdir /forever 0644 system system
mkdir /sct 0644 system system
mkdir /mnt/sdcard2 0000 system system
# create directory for mounting usb drives
mkdir /mnt/usbdrive 0666 system system
symlink /mnt/usbdrive /usbdrive
on fs
# Mount system to allow checkpoint and set NVSI symlink
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP /system rw
# Create NVSI filter symlink
symlink /data/data/com.nvidia.NvCPLSvc/files/com.nvidia.nvsiutilv1.xml /system/etc/permissions/com.nvidia.nvsiutilv1.xml
# Remount system read-only
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP /system wait ro remount
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
setprop ro.crypto.umount_sd false
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA /data wait noatime nosuid nodev journal_async_commit,data=writeback,nodelalloc,errors=panic
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC /cache wait noatime nosuid nodev journal_async_commit,data=writeback,nodelalloc,errors=panic
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDD /forever wait noatime nosuid nodev journal_async_commit,data=writeback,nodelalloc,
#mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/SCT /sct wait noatime nosuid nodev journal_async_commit,data=writeback,nodelalloc
on post-fs-data
mkdir /data/addon_res 0770 system system
mkdir /sct 0644 system system
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/nvcam 0700 media camera
chown dhcp dhcp /data/misc/dhcp
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi/hostapd.conf
mkdir /data/misc/wminput 0776 system system
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
chown system system /forever
mkdir /forever/misc 0774 system system
mkdir /forever/misc/dmt 0777 system system
chown system system /sys/class/accelemeter/dmard06/enable_acc
chown system system /sys/class/accelemeter/dmard06/delay_acc
on boot
#reboot_flag
chmod 0666 /dev/block/platform/sdhci-tegra.3/by-name/UDE
# bluetooth
# bluetooth MAC address programming
chown bluetooth bluetooth ro.bt.bdaddr_path
chown bluetooth bluetooth /system/etc/bluetooth
#setprop ro.bt.bdaddr_path "/system/etc/bluetooth/bdaddr"
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
# bluetooth
# bluetooth MAC address programming
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
# NFC
#setprop ro.nfc.port "I2C"
# backlight
chown system system /sys/class/backlight/pwm-backlight/brightness
# didim
chown system system /sys/class/graphics/fb0/device/smartdimmer/enable
chown system system /sys/class/graphics/fb0/device/smartdimmer/aggressiveness
# power
chown system system /sys/kernel/tegra_cap/core_cap_level
chown system system /sys/kernel/tegra_cap/core_cap_state
chown system system /sys/module/cpu_tegra/parameters/cpu_user_cap
# Power management settings
write /sys/module/cpu_tegra3/parameters/no_lp 0
#write /sys/module/tegra3_emc/parameters/emc_enable 0
#write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor conservative
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor conservative
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor conservative
write /sys/devices/system/cpu/cpufreq/conservative/up_threshold 95
write /sys/devices/system/cpu/cpufreq/conservative/down_threshold 75
write /sys/devices/system/cpu/cpufreq/conservative/freq_step 3
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2
write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80
write /sys/module/cpu_tegra3/parameters/auto_hotplug 1
#write /sys/module/cpuidle_t3/parameters/lp2_0_in_idle 0
write /sys/module/cpuidle/parameters/lp2_in_idle 1
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/max_boost
# Default Read Ahead value for sdcards
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
write /sys/block/mmcblk1/queue/read_ahead_kb 2048
# Wiimote connect status
write /data/misc/wminput/connected 0
chmod 0666 /data/misc/wminput/connected
# GPS init
#write /sys/class/gpio/export 162
#write /sys/class/gpio/gpio162/value 0
#write /sys/class/gpio/gpio162/direction out
#chown root system /sys/class/gpio/gpio162/value
#chmod 0664 /sys/class/gpio/gpio162/value
#write /sys/class/gpio/export 163
#write /sys/class/gpio/gpio163/direction out
#write /sys/class/gpio/gpio163/value 1
#chown root system /sys/class/gpio/gpio163/value
#chmod 0664 /sys/class/gpio/gpio163/value
# Load WiFi driver
insmod /system/lib/modules/bcmdhd.ko
# BB mapping symbolic name to the logging ttyACM port
symlink /dev/ttyACM2 /dev/log_modem
on property:ro.debuggable=1
# EMC debug interface
chmod 666 /sys/kernel/debug/tegra_emc/eack_state
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin -dd
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
#TI-ST
service uim /system/bin/uim-sysfs
class core
user root
group root
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -f/system/etc/dhcpcd/dhcpcd.conf
class main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# create virtual SD card at /mnt/sdcard, based on the /data/media directory
# deamon will drop to user/group system/media_rw after initializing
# underlying files in /data/media wil be created with user and group media_rw (1023)
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
# bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys
service bugreport /system/bin/dumpstate -d -v -o /data/storage/bugreports/bugreport
class main
disabled
oneshot
keycodes 115 114
#BCM
service hciattach /system/bin/brcm_patchram_plus --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \
--baudrate 3000000 --patchramdir /etc/firmware --enable_lpm --tosleep=5000 --create_bdaddr /dev/ttyHS2
user bluetooth
group bluetooth net_bt_admin
disabled
# Mount usb drives as /usbdrive. Generally usb drives are formatted with FAT
# filesystem, so we support FAT as of now.
on device-added-/sys/block/sda
mount vfat /dev/block/sda /mnt/usbdrive
on device-removed-/sys/block/sda
umount /mnt/usbdrive
# Prepare TF service
import init.tf.rc
# Enable NvCpuD, and set it to never poll config again
on boot
setprop nvcpud.enabled true
setprop nvcpud.config_refresh_ms -1
service nvcpud /system/bin/nvcpud
class main
user root
group root
#Raydium touch setting
#service rm_ts_service /system/bin/rm_ts_server
# class main
#Synaptics touch, allow low power mode
#on boot
# write /sys/devices/sensor00/fn01/nosleep 0
# create filesystems if necessary
service setup_fs /system/bin/setup_fs \
/dev/block/platform/sdhci-tegra.3/by-name/UDA \
/dev/block/platform/sdhci-tegra.3/by-name/CAC \
/dev/block/platform/sdhci-tegra.3/by-name/UDD
class core
user root
group root
oneshot
service pm_service_check /system/bin/pm_service check
class core
user root
group root
oneshot
service pm_service_clear /system/bin/pm_service clear
user root
group root
disabled
oneshot
on property:sys.kh.addon.mount=true
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDB /data/addon_res wait rw ,data=writeback,nodelalloc
chown system system /data/addon_res
setprop sys.kh.addon.mount_state true
i will have a look on this for you.
you will need dxixda kitchen to unpack the system.img and boot/recovery.img
if someone can tell which is exactly the boot.img and the system.img from here http://androidfiles.org/uploads/?dir=Nabi2
http://androidfiles.org/uploads/?dir=Nabi2/stockimages
what mmblock is the system and boot.
---------- Post added at 12:27 PM ---------- Previous post was at 12:09 PM ----------
till now i noticed the fallowing values
# Default Read Ahead value for sdcards
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
write /sys/block/mmcblk1/queue/read_ahead_kb 2048
# for backwards compatibility
export EXTERNAL_STORAGE /mnt/sdcard
export EXTERNAL_STORAGE2 /mnt/sdcard2
mkdir /mnt/sdcard 0000 system system
symlink /mnt/sdcard /sdcard
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
globula_neagra said:
i will have a look on this for you.
you will need dxixda kitchen to unpack the system.img and boot/recovery.img
if someone can tell which is exactly the boot.img and the system.img from here http://androidfiles.org/uploads/?dir=Nabi2
Click to expand...
Click to collapse
The boot.img (and the system.img i think) is in the jmzrootpackage.zip. Because anyone trying to do what we are would have that boot.img flashed or at least thats the one I have because I used that files contents to gain root access and it has a new boot.img that it flashed to my Nabi 2...

[Q] vold mounts storage with incorrect permissions

I'm working on a CM port and currently facing issues with vold. For some weird reason, vold isn't mounting storage devices as it should. Here is my current vold.fstab file:
Code:
dev_mount flash /storage/sdcard0 auto /devices/platform/mtd/mtd8/media nonremovable
dev_mount sdcard /storage/sdcard1 auto /devices/platform/AMLOGIC_CARD/card_host/memorycard0
Using adb I can confirm that everything is mounted correctly and also I can browse the files. Using applications (even MediaScanner) fails with permission errors. This is how I'm creating the storage folders, for user/permissions reference:
Code:
# Create mountpoints
mkdir /mnt 0775 root system
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0550 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
mkdir /storage/usbdisk0 0000 system system
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/external_sdcard
I have also noticed that the system reports different owner/group/permissions through adb and Terminal Emulator. Here are the outputs:
adb:
Code:
[email protected]:/ # ls -la /storage/
d---rwxr-x system sdcard_rw 1970-01-01 02:00 sdcard0
d---rwxr-x system sdcard_rw 1970-01-01 02:00 sdcard1
d--------- system system 2013-09-05 02:29 usbdisk0
Terminal Emulator:
Code:
ls -la /storage/
d--------- system system 2013-09-05 02:29 sdcard0
d--------- system system 2013-09-05 02:29 sdcard1
d--------- system system 2013-09-05 02:29 usbdisk0
Why does this happen? I'm suspecting storage_list.xml, but I checked mine and seems correct. Also, it doesn't define permissions, so I excluded that.
I'm out of ideas. What else should I check? How can I further debug this? Logcat doesn't show anything useful, everything seems fine with vold.
giannoug said:
I'm out of ideas. What else should I check? How can I further debug this? Logcat doesn't show anything useful, everything seems fine with vold.
Click to expand...
Click to collapse
Have you tried extracting the stock vold.fstab from your devices stock boot.img file to use as a reference point? You can then modify that if need be.
Sent from my SCH-I535 using xda premium
shimp208 said:
Have you tried extracting the stock vold.fstab from your devices stock boot.img file to use as a reference point? You can then modify that if need be.
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
Yes I did! Stock files are 4.1 though, so I made the appropriate changes (/mnt -> /storage) for example. It's really weird, because apps and adb show different permissions. Should I check anything in the Android framework?
giannoug said:
Yes I did! Stock files are 4.1 though, so I made the appropriate changes (/mnt -> /storage) for example. It's really weird, because apps and adb show different permissions. Should I check anything in the Android framework?
Click to expand...
Click to collapse
What I would recommend doing is setting the same permissions adb shows and seeing if that fixes any problems.
Sent from my SCH-I535 using xda premium
shimp208 said:
What I would recommend doing is setting the same permissions adb shows and seeing if that fixes any problems.
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
I created an init.d script that chowns storage0 and storage1 to system:sdcard_rw. Same results, but I can see from Terminal Emulator the new values. I also added a chmod to change those folder permissions to 775, but again, no luck.
From the Terminal Emulator, even if I become root, I still can't see sdcard0/1 contents. From adb, I can! Really weird... That's why I'm suspecting the framework and not vold. By the way, here is the output of mount, just in case you spot something wrong.
Code:
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/system /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/data /data ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/cache /cache ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
/dev/block/vold/253:1 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/250:32 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/250:32 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Maybe those fmask/dmask values?
Thanks!
you need an updated /init binary because starting with 4.2 and its (useless) multiuser thing mount mechanisms have changed. You can use this for example.
Christian Troy said:
you need an updated /init binary because starting with 4.2 and its (useless) multiuser thing mount mechanisms have changed. You can use this for example.
Click to expand...
Click to collapse
Thanks for the binary, unfortunately it still doesn't work. I also tried with the Elf II init binary from your repo and the device's stock binary. All binaries show the same error, no difference at all. What else can I try?
Storage is the only thing left to fix and I'm really stuck. No errors, no starting point
Did some further testing with the new init, this is what I'm getting now:
Code:
W/dalvikvm( 2523): Failed to mount /storage as MS_SLAVE: Invalid argument
giannoug said:
I'm working on a CM port and currently facing issues with vold. For some weird reason, vold isn't mounting storage devices as it should. Here is my current vold.fstab file:
Code:
dev_mount flash /storage/sdcard0 auto /devices/platform/mtd/mtd8/media nonremovable
dev_mount sdcard /storage/sdcard1 auto /devices/platform/AMLOGIC_CARD/card_host/memorycard0
Using adb I can confirm that everything is mounted correctly and also I can browse the files. Using applications (even MediaScanner) fails with permission errors. This is how I'm creating the storage folders, for user/permissions reference:
Code:
# Create mountpoints
mkdir /mnt 0775 root system
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0550 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
mkdir /storage/usbdisk0 0000 system system
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/external_sdcard
I have also noticed that the system reports different owner/group/permissions through adb and Terminal Emulator. Here are the outputs:
adb:
Code:
[email protected]:/ # ls -la /storage/
d---rwxr-x system sdcard_rw 1970-01-01 02:00 sdcard0
d---rwxr-x system sdcard_rw 1970-01-01 02:00 sdcard1
d--------- system system 2013-09-05 02:29 usbdisk0
Terminal Emulator:
Code:
ls -la /storage/
d--------- system system 2013-09-05 02:29 sdcard0
d--------- system system 2013-09-05 02:29 sdcard1
d--------- system system 2013-09-05 02:29 usbdisk0
Why does this happen? I'm suspecting storage_list.xml, but I checked mine and seems correct. Also, it doesn't define permissions, so I excluded that.
I'm out of ideas. What else should I check? How can I further debug this? Logcat doesn't show anything useful, everything seems fine with vold.
Click to expand...
Click to collapse
Im having a few issues also. It seems to be rooted only 4.1.2 and later... Has specifically been vzw. I have my phone running a ported multicarrier on sgs3 and it's based on vzw. I'm running a d2att kernel though. I had to assign umask=0755 with busybox in a .sh in /system/xbin and remount sdcard0. It does work but I'd like a solution... not a patch lol. I've made several attempts to fix this, but with initramfs jamming errors at us and carriers crippling the roms to barely functional... I don't know to do but continue with a patch. Reply if you need the script, but you look as qualified as I am to write a fast one up. The weird thing is what happens trying to view a pic and it has no permissions. Smanager fixes it with another .sh script, scripts are powerful but it's not fixed... patched only. Good luck.
i'm in a middle of a nightmare with sdcard implementation in android, i'm compiling a cm10.2 android 4.3.1 based. as for the google guides for the sdcard i have used a fstab.xxxx and a storage_list.xml. i don't get it working, i can browse the sdcard(s) using adb but they never show as available on settings and on all apps. there is something obscure to me due the ridicolous documentation about the whole thing.
Vold mount the sdcards and it only mount them at the path written in the fstab, directories must be created on the init.hardware.rc and indeed the vold mount the volumes, but, it mount on storage/sdcard0 (assuming this is the path) and mouth them with own permissions so system.sdcard_rw 0075
guides says to use a fuse_sdcard service to remap the mounted sdcards with right permissions for the system so a "service sdcard /system/bin/sdcard source_path dest_path 1023 1023" is needed, where 1023 is the right user/group but i need to use as the dest_path the same path i used on storage_list.xml and as source_path the path vold has created, but how the src and dst can be the same?
what i tried so far:
using a different path on storage_list.xml= the sdcards are not mounted at all
using a different path on fstab.xxxx= vold don't mount the sdcards
using no sdcard service= vold mount the cards and they are working but they cannot be used on android,just with adb
i never ran so much troubles compiling kitkat, maybe android 4.3.1 has some obscure problems?
edit- post edited, maybe can help someone.
i got the problem solved, it was a init executable which was in my build tree by mistake (wrong device.mk)
once i used the init compiled i got the sdcard working.
shutt1e said:
i'm in a middle of a nightmare with sdcard implementation in android, i'm compiling a cm10.2 android 4.3.1 based. as for the google guides for the sdcard i have used a fstab.xxxx and a storage_list.xml. i don't get it working, i can browse the sdcard(s) using adb but they never show as available on settings and on all apps. there is something obscure to me due the ridicolous documentation about the whole thing.
Vold mount the sdcards and it only mount them at the path written in the fstab, directories must be created on the init.hardware.rc and indeed the vold mount the volumes, but, it mount on storage/sdcard0 (assuming this is the path) and mouth them with own permissions so system.sdcard_rw 0075
guides says to use a fuse_sdcard service to remap the mounted sdcards with right permissions for the system so a "service sdcard /system/bin/sdcard source_path dest_path 1023 1023" is needed, where 1023 is the right user/group but i need to use as the dest_path the same path i used on storage_list.xml and as source_path the path vold has created, but how the src and dst can be the same?
what i tried so far:
using a different path on storage_list.xml= the sdcards are not mounted at all
using a different path on fstab.xxxx= vold don't mount the sdcards
using no sdcard service= vold mount the cards and they are working but they cannot be used on android,just with adb
i never ran so much troubles compiling kitkat, maybe android 4.3.1 has some obscure problems?
edit- post edited, maybe can help someone.
i got the problem solved, it was a init executable which was in my build tree by mistake (wrong device.mk)
once i used the init compiled i got the sdcard working.
Click to expand...
Click to collapse
Have you tried mounting with umask=0 ? It should mount them correctly in default properties... Or umask=0000 as android and RH can be distinct at the worst times and then I'm unaware of where I might have goofed I'm not positive I'm understanding the question either. If your issue with your fstab or is it with the actual boot process getting prop errors? I'm a bit confused, but if its the actual boot, my suggestion may be of assistance. If its in creating an fstab, well the command I gave you will actually be referencing the fstab to assign properties in boot and that will use your defaults in fstab. I forget where it actually retrieves it from though after the fact. Lol anyway, perhaps of help. You could also get the info from proc/mounts, but with emulated storages that's tricky. I can't recall if 10.2 was the emulated or not tho.
Sent from my SAMSUNG-SGH-I337 using Tapatalk

mount: can't find /system in /proc/mounts

Good day,
The situation at hand:
- Samsung SM-G900F
- CM 14.1 (or what ever the last official CM Build was)
- rooted ("#" in ABD SHELL is shown)
- non-functional display (no input it seems and black. glorious spider-app)
- phone is booting normally (TWRP recovery + download mode included)
- ADB only works in recovery
So, as the phone is still working fine (apart from keeping everything for itself) I'd figure I could use programs like "MyPhoneExplorer", DDMS, or anything to use it while I'm waiting to get a new one.
Only thing that keeps me from doing so - my phone is on "charging mode" when plugged in USB and normally booted.
In order to activate the "usb debugging" (and set it as default) I tried to pull the "build.props" from /system - however, ADB keeps telling that folder doesn't exist.
I thought at first, there'd be an problem with RO/RW settings but when trying to remount /system I'm getting this:
Code:
~ # ←[6nmount -o w,remount /system
mount -o w,remount /system
mount: can't find /system in /proc/mounts
When checking with ADBFileExplorer, the folder "system" is there but completely empty.
Running #mount results in
Code:
~ # ←[6nmount
mount
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p26 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p26 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p24 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
I assume (or rather: I fear), I'd have to enable "system" for mounting in the TWRP screen to be able to temper with my build.prop.
Maybe someone can shed a light and show me, what I got to do to access /system and build.prop?
(Apart from getting a new display.)
Greetings
I believe you need to call "/sys" instead of "/system" so it can be found in /proc/mounts where the mount requirement are stored
Pan0ptics said:
I believe you need to call "/sys" instead of "/system" so it can be found in /proc/mounts where the mount requirement are stored
Click to expand...
Click to collapse
help!
my audio daemon services are not running in latest nitrogen pie rom.it was running before on other pie rom on redmi 3s
some bug reports generated .
i did all possible simple solution like factory reset or complete clean flash of stock rom or tried other older rom like rr oreo rom but no luck .
and i mounted system partition as rw it resets to ro after every reboot.
maybe strace is not running properly it is mentioned in bug report

Symbolic link (symlink) with rooted Android 10

Hi. Everyone knows that FB app saves its downloaded images in DCIM folder. At the same time, Google Photo doesn't allow to select subfolders elegible to media auto-backup. So my idea is to create a symbolic link between that Facebook subfolder and another one on different location, and so properly save photos and videos on a different folder.
There's any way to do it? I found different procedures on different site but nothing seems to work (btw, i don't know is a procedure fault or an android 10 fault), naturally using Magisk root permissions.
peppe1996 said:
Hi. Everyone knows that FB app saves its downloaded images in DCIM folder. At the same time, Google Photo doesn't allow to select subfolders elegible to media auto-backup. So my idea is to create a symbolic link between that Facebook subfolder and another one on different location, and so properly save photos and videos on a different folder.
There's any way to do it? I found different procedures on different site but nothing seems to work (btw, i don't know is a procedure fault or an android 10 fault), naturally using Magisk root permissions.
Click to expand...
Click to collapse
When you download a photo from within the Facebook app, it is stored in DCIM/Facebook. When you launch the Gallery app, the image shows up right under "Photos". Also in the gallery app if you click on the "COLLECTIONS" tab, it shows up there under "Camera".
FYI: Creating a symlink basically doesn't require Android is got rooted, unless you want to create symlinks in Android's /system partition.
I think it's really easy to create symlinks on Android.
Example:
Code:
adb devices
adb shell "mkdir -p /data/DCIM-Facebook 2>/dev/null"
adb shell "cp -a /DCIM/Facebook /data/DCIM-Facebook"
adb shell "rm -rf /DCIM/Facebook"
adb shell "ln -sf /data/DCIM-Facebook /DCIM/Facebook"
adb shell "ls -l /DCIM/Facebook"
jwoegerbauer said:
When you download a photo from within the Facebook app, it is stored in DCIM/Facebook. When you launch the Gallery app, the image shows up right under "Photos". Also in the gallery app if you click on the "COLLECTIONS" tab, it shows up there under "Camera".
FYI: Creating a symlink basically doesn't require Android is got rooted, unless you want to create symlinks in Android's /system partition.
I think it's really easy to create symlinks on Android.
Example:
Code:
adb devices
adb shell "mkdir -p /data/DCIM-Facebook 2>/dev/null"
adb shell "cp -a /DCIM/Facebook /data/DCIM-Facebook"
adb shell "rm -rf /DCIM/Facebook"
adb shell "ln -sf /data/DCIM-Facebook /DCIM/Facebook"
adb shell "ls -l /DCIM/Facebook"
Click to expand...
Click to collapse
Thanks for the answer man. I tried your procedure and this is what happened https://ibb.co/py7mkfK
This is the classic error that i had with other procedures.
@peppe1996
My fault was to NOT tell you that symlinks only are possible on partitions that support it, means their filesystem is either ext2 or ext3 or ext4 or yaffs2.
Internal sdcard /storage/emulated/0 where folder DCIM resides has filesystem /dev/fuse. Hence my script example was totally wrong.
Sorry for this.
jwoegerbauer said:
@peppe1996
My fault was to NOT tell you that symlinks only are possible on partitions that support it, means their filesystem is either ext2 or ext3 or ext4 or yaffs2.
Internal sdcard /storage/emulated/0 where folder DCIM resides has filesystem /dev/fuse. Hence my script example was totally wrong.
Sorry for this.
Click to expand...
Click to collapse
NP man. So can I do nothing about?
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
jwoegerbauer said:
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
Click to expand...
Click to collapse
Thanks mate for tips, but i think this is not i need for my scope. If I'll have the same file tree in both path, Facebook images must remain in the original folder and Google Photo will upload them. If i can preserve some file to be binded, I could try to insert a .nomedia file in DCIM/Facebook. So, DCIM/Facebook will be hidden to Google Photo and i can continue to see Facebook downloaded images in Pictures folder (on the contrary, also .nomedia will be copied and also Pictures/Facebook will be not visible on Google Photo).
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
Click to expand...
Click to collapse
Hello, i just bring this here up again because i have a similar problem.
I tryed your command and it passed without errors. But without the wished effect.
Code:
:/ # mount -o bind /storage/231A-1B1B/DCIM /storage/emulated/0/DCIM
This is the output of "mount"
Code:
:/ # mount <
rootfs on / type rootfs (ro,seclabel,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=891960k,nr_inodes=163101,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
none on /dev/memcg type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
none on /dev/cpuctl type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
none on /dev/bfqio type cgroup (rw,relatime,bfqio)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/dev/block/vold/public:179,65 on /mnt/media_rw/9FE1-FB0F type exfat (rw,dirsync,nosuid,nodev,noexec,noatime,fs=exfat,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,namecase=0,symlink=0,bps=512,errors=remount-ro)
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/dev/block/mmcblk0p23 on /system type ext4 (ro,seclabel,relatime,discard)
none on /acct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
none on /config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/block/mmcblk0p24 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
/dev/block/mmcblk0p25 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
tmpfs on /sbin type tmpfs (rw,seclabel,relatime,size=891960k,nr_inodes=163101,mode=755)
/sbin/.magisk/block/cache on /sbin/.magisk/mirror/cache type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,discard)
/sbin/.magisk/block/data on /sbin/.magisk/mirror/data type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/modules type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
tmpfs on /storage/self type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/dev/block/vold/public:179,97 on /mnt/media_rw/231A-1B1B type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)
/mnt/media_rw/231A-1B1B on /mnt/runtime/default/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6)
/mnt/media_rw/231A-1B1B on /mnt/runtime/read/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /mnt/runtime/write/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /storage/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /storage/emulated/0/DCIM type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
The last line appears after i try to mount the folder. Does anybody k ow what goes wrong here?
Marco

Categories

Resources