I have a strange Chinese tablet similar to Onda 812. Here is the problem:
[email protected]:/ $ id userid
uid=10087(u0_a87) gid=10087(u0_a87) groups=1015(sdcard_rw),1028(sdcard_r),3003(inet)
[email protected]:/mnt $ ls -al
drwxr-xr-x root system 2013-11-12 00:23 asec
d---rwxr-x system media_rw 2013-11-12 00:14 extsd
drwxr-xr-x root system 2013-11-12 00:23 obb
d---rwxr-x system sdcard_rw 1970-01-01 03:00 sdcard
drwx------ root root 2013-11-12 00:23 secure
d--------- system system 2013-11-12 00:23 usbhost1
extsd got mounted with system user and media_rw group. But android user does not belong to that group so there is only read-only access to the card.
Setting access rights directly to /mnt/extsd does not work. The best solution I have found so far is format card as NTFS and use Paragon NTFS to mount. It does not survive reboot and is ugly.
Any more elegant ways to fix this problem?
SOLVED: Editing plaftorm.xml as per here was the clue.
Related
This thing has been a thorn in modding my phone ever since I rooted it - root has no read access to sdcard0 at all.
Whenever the external sdcard is mounted, root can only access sdcard1 after adding media_rw group to android.permission.WRITE_EXTERNAL_STORAGE, which works OK most of the times but there are some apps that rely on working with an external sdcard and root together unfortunately. Whenever the external sdcard is unmounted, same things happen with it - no access as root whatsoever. (user has full access)
Something of particular interest is the output of ls -l:
Code:
[email protected]_M3:/storage $ ls -l
drwxrwx--x root sdcard_r 1970-01-01 01:00 sdcard0
drwxrwx--x root sdcard_r 2015-08-10 02:48 sdcard1
[email protected]_M3:/storage $ su
[email protected]_M3:/storage # ls -l
drwx------ root root 2015-08-10 02:47 sdcard0
drwxrwx--x root sdcard_r 2015-08-10 02:48 sdcard1
[email protected]_M3:/storage #
and I don't really know where to begin to fix it. The stock ROM is doomed from the start with this it seems...
For the record; I'm using SuperSU and I have tried formatting my (2GB) sdcard to FAT32 and it didn't work.
Just restore the file tonoriginal data and use an app to do this.
Foldermount will work best.
Try this with thd help of this app ypu can read both sd cards at same time and keep game heavy data on sdcard as well
Sent from my SM-G355H using XDA Free mobile app
lolwhat file are you even talking about? Nothing has been touched there and that output of ls -l shows the permissions aren't as they're supposed to be for root.
FolderMount isn't exactly the thing I'm looking for. I need to fix permissions for root's access to the sdcard0 folder, plain and simple. For instance - I can't install Viper4Android because of this (though oddly I did manage to do it earlier, some black magic I did and don't remember lol). It wouldn't bother me if the sdcard folder in the ramdisk wasn't linked to the sdcard0 folder or if the permissions weren't tampered with and they were it seems.
I feel like as if I would have an easier time porting Cyanogenmod to my device than figuring this out...
HI, I have just picked up a Venue 10 5050. It comes with Lollipop but of course like all Venue's is missing support for NTFS file system. I have Rooted, and installed the ntfs-3g found here:
HTML:
http://forum.xda-developers.com/android/development/exfat-ntfs-fuse-drivers-easy-build-t3126413
It installs fine, and I am able to mount my portable NTFS drive using the USB port as root from adb shell.
Code:
ntfs-3g -o umask=0 /dev/block/sda1 /storage/usbcard1
Of course the problem is Applications can not see the device. I believe it is because the storage mount point looks like so:
Code:
[email protected]:/ # ls -al /storage
ls -al /storage
d---r-x--- root sdcard_r 2015-09-02 14:13 emulated
lrwxrwxrwx root root 2015-09-02 14:11 sdcard0 -> /storage/emulated/legacy
drwxrwx--x root sdcard_r 1969-12-31 18:00 sdcard1
drwxrwxrwx root root 2015-08-26 06:31 usbcard1
Note the group owner for /mnt/usbcard1 is root and needs to be sdcard_r to be viewable by applications.
Anyone have an idea on how this can be fixed?
Domenic
small update, I ran the /etc/install-recovery-2.sh which mounted the drive on /mnt/media_rw/sdcard1 which I can view with an ls -al which displays:
drwxrwxrwx media_rw media_rw 2015-08-26 06:31 sdcard1
which root can view, but again non of the applications can view the data? I am certain it is some type of lollipop type issue?
Domenic
So I have installed stickmount from the Playstore. It auto mounts the NTFS drive when I plug it in.
Domenic
Hi,
I have a rooted Medion Livetab S10346 running KitKat and have a problem using an ext4-partition on a micro-sd card.
I created a mountpoint as /storage/ext4 (with uid u0_100 and gid sdcard_r) and as root I can mount the partition like this:
Code:
#mount -t ext4 /dev/block/mmcblk1p2 /storage/ext4
And I can use it as root without problems. Here is how the mount-point and the content look like:
Code:
#ls -ld /storage/ext4
drwxr-xr-x u0_a100 u0_a100 2015-09-09 00:24 ext4
#ls -l /storage/ext4
-rw-r--r-- u0_a100 u0_a100 6 2015-09-06 00:24 bubba.txt
drw------- u0_a100 u0_a100 2015-09-06 00:23 lost+found
As you can see everything is owned by u0_a100 which is the usual non-root user-account on my device.
What I want to achieve is to use the ext4 partition from the non-root account, but this is where I run into problems:
Code:
>ls -ld /storage/ext4
drwxrwxrwx u0_a100 sdcard_r 2015-09-06 00:51 ext4
>ls -l /storage/ext4
(nothing)
So the mount is not visible from the non-root account, all I see is the mount-point.
What am I missing?
As I mentioned in another thread, I am struggling to get my whatsapp chats from my phone, which I am afraid has something corrupted.
I made many attempts to fix whatsapp backups before resetting completely my phone (which of course is rooted) and installing a clean CyanogenMod, but without success. Anyway, the final summary is the following:
If I try to run the backup from whatsapp, I get a message saying "message backup impossible" (in Italian, so I cannot really tell which would be the English message)
In /data/data/com.whatsapp/files/Logs/whatsapp.log I get a message like the following: "java.io.FileNotFoundException: /storage/emulated/0/WhatsApp/.Shared/6y+pX-uxTsEsmXkUyvruzeZYE53m3KqVBYmnWWvvbjM=.tmp: open failed: EACCES (Permission denied)"
So I checked what was the userid associated to whatsapp:
Code:
# grep com.whatsapp /data/system/packages.list
com.whatsapp 10221 0 /data/data/com.whatsapp default 3002,3003,1028,1015,1023
Userid 10221 should be associated with username u0_a221, and this appears to be actually the case:
Code:
# ls -l /data/data/ | grep com.whatsapp
drwxr-x--x u0_a221 u0_a221 2016-01-04 18:05 com.whatsapp
So I su'ed to this user and tried to get into the Whatsapp backup directory, without success:
Code:
# su u0_a221
[email protected]:/ $ ls /storage/emulated/0/Android
/storage/emulated/0/Android: Permission denied
[email protected]:/ $ ls /storage
opendir failed, Permission denied
All the directories in the path are owned by root.sdcard_r, as I think they should:
Code:
[email protected]:/ # ls -l / | grep storage
lrwxrwxrwx root root 2014-01-01 11:09 sdcard -> /storage/emulated/legacy
drwxr-x--x root sdcard_r 2014-01-01 11:09 storage
[email protected]:/ # ls -l /storage | grep emulated
d---r-x--- root sdcard_r 2016-01-04 18:06 emulated
lrwxrwxrwx root root 2014-01-01 11:09 sdcard0 -> /storage/emulated/legacy
[email protected]:/ # ls -l /storage/emulated
drwxrwx--x root sdcard_r 2015-12-20 00:33 0
drwxrwx--x root sdcard_r 2015-12-20 00:33 legacy
[email protected]:/ # ls -l /storage/emulated/0 | grep Android
drwxrwx--x root sdcard_r 2015-01-25 22:48 Android
My conclusion, therefore, is that the user u0_a221 does not belong to the group sdcard_r; but I don't know how to check this. I know that Android does not have /etc/passwd and /etc/group, and I read that it stores this information in a database, but I wasn't able to find out exactly which database, and I am not sure that I can modify it. So... where do I find this data, and can I modify it?
I've create a directory /storage/sdcard2 and mounted it as follows:
mkdir sdcard2
chmod 771 /storage/sdcard2
chgrp 1015 /storage/sdcard2
So it has looks like:
drwxrwx--x 3 root sdcard_rw 60 Feb 12 20:17 sdcard2
Now the external storage looks like:
drwxrwx--x 19 root sdcard_rw 32768 Dec 31 1969 DE52-F3E6
So they match exactly, but for some reason while most apps (non-root) can see and view /storage/DE52-F3E6 nothing but root apps can see /storage/sdcard2 (if I su* others can see it in a console but not access it). In Android (CM12) 5.1, this worked fine, in (CM13) 6.0.1 I'm going crazy. I thought it might be namespace separation in Super SU, but that does not appear to be the case it is as if there is another block that only allows root to see non-standard directories (or files) since creating a file in /storage has the exact same issue.
How do I fix this as it makes using 6.0.1 useless as I can not manually mount my secondary partition on the SD Sard and get access to the data on it (except as root).
su - u_10034
127|[email protected]:/storage # su - u0_a334
[email protected]:/storage $ ls -al
drwxr-xr-x 6 root root 140 Feb 12 20:06 .
drwxr-xr-x 28 root root 0 Feb 12 19:59 ..
drwxrwx--x 19 root sdcard_rw 32768 Dec 31 1969 DE52-F3E6
drwx--x--x 5 root sdcard_rw 4096 Dec 31 2014 emulated
drwxrwx--x 3 root sdcard_rw 60 Feb 12 20:17 sdcard2
drwxr-xr-x 2 root root 60 Aug 2 2015 self
[email protected]:/storage $
At a minimum I want to at be able to access the sdcard2 directory same as I can access DE52-F3E6 the permissions match, but the SE (ls -n) setting differ, but I can not find what setting I need to use there to allow the same access as DE52-F3E6 since DE52-F3E6 is a device and sdcard2 is a directory.
Thanks,
ERIC