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?
Related
Hello XDA-Developers!
I want to install Back Track 5 ARM in my AllWinner A10 based tablet, I followed the lesson for Galaxy and I downloaded the boot script for Galaxy and the bt5.img(3.25G). I changed some of the codes to launch BT5 in external sdcard and suit my ROM,then launched it, only to find some errors. Well, the source code of the boot script(modified by myself to suit my device) like this:
perm=$(id|busybox cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p1 /system
export kit=/mnt/extsd/BT5
export bin=/system/bin
export mnt=/mnt
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
busybox mount -o loop,noatime -t extsd $kit/bt5.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $/etc/hosts
busybox chroot $/bin/bash
echo "Shutting down BackTrack ARM For Xoom"
umount $/dev/pts
umount $/proc
umount $/sys
umount $mnt
when I launch the script(bootbtV) in Terminal Emulator, only to find some errors like this:
[email protected]:/ $ su
[email protected]:/ # cd mnt/extsd/BT5
[email protected]:/mnt/extsd/BT5 # sh bootbtV
Loop device exists
mount: mounting /dev/loop8 on /mnt failed: No such device
mount: mounting /dev/pts on /mnt/dev/pts failed: No such file or directory
mount: mounting /proc on /mnt/proc failed: No such file or directory
mount: mounting /sys on /mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
bootbtV[23]: can't create $/etc/resolv.conf: No such file or directory
bootbtV[24]: can't create $/etc/hosts: No such file or directory
chroot: can't change root directory to $/bin/bash: No such file or directory
Shutting down BackTrack ARM For Xoom
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
1|[email protected]:/mnt/extsd/BT5 #
Well, In my opinion, according to the errors "No such file or directory", I think it is the difference between my device and Galaxy that causes the errors. In my device, the file structure is different from what the boot script means, such is the file structure of my device's root directory:
drwxr-xr-x root root 2013-01-16 11:22 acct
drwxrwx--- system cache 2013-01-16 09:51 cache
dr-x------ root root 2013-01-16 11:22 config
lrwxrwxrwx root root 2013-01-16 11:22 d -> /sys/kernel/debug
drwxrwx--x system system 2013-01-13 17:14 data
-rw-r--r-- root root 116 1970-01-01 08:00 default.prop
drwxr-xr-x root root 2013-01-16 11:27 dev
lrwxrwxrwx root root 2013-01-16 11:22 etc -> /system/etc
-rwxr-x--- root root 105268 1970-01-01 08:00 init
-rwxr-x--- root root 2344 1970-01-01 08:00 init.goldfish.rc
-rwxr-x--- root root 19030 1970-01-01 08:00 init.rc
-rwxr-x--- root root 2644 1970-01-01 08:00 init.sun4i.rc
-rwxr-x--- root root 2230 1970-01-01 08:00 init.sun4i.usb.rc
-rwxr-x--- root root 1637 1970-01-01 08:00 init.trace.rc
-rwxr-x--- root root 3915 1970-01-01 08:00 init.usb.rc
-rwxr-x--- root root 1536000 1970-01-01 08:00 initlogo.rle
drwxrwxr-x root system 2013-01-16 11:22 mnt
-rw-r--r-- root root 782728 1970-01-01 08:00 nand.ko
dr-xr-xr-x root root 1970-01-01 08:00 proc
drwx------ root root 2012-10-11 13:57 root
drwxr-x--- root root 1970-01-01 08:00 sbin
lrwxrwxrwx root root 2013-01-16 11:22 sdcard -> /mnt/sdcard
drwxr-xr-x root root 2013-01-16 11:22 sys
drwxr-xr-x root root 2013-01-13 17:59 system
-rw-r--r-- root root 272 1970-01-01 08:00 ueventd.goldfish.rc
-rw-r--r-- root root 3879 1970-01-01 08:00 ueventd.rc
-rw-r--r-- root root 1313 1970-01-01 08:00 ueventd.sun4i.rc
lrwxrwxrwx root root 2013-01-16 11:22 vendor -> /system/vendor
I think, the only way to launch BT5 in my device successfully is to modify the boot script so that it can suit my device, especially the file structure. But I am a green hand in Linux, I don't know what does some of the codes mean, if you are good at Linux script, would you please give me some advice?
Thank you very much!
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.
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
dmarkey said:
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
Click to expand...
Click to collapse
No ideas?
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?