[Q] permission issue and mount question - Nexus 5 Q&A, Help & Troubleshooting

Hi @all
first of all some details about my phone:
I use a Google Nexus 5 with Android 5.0.1 (LRX22C) and root access.
my first question is:
When i use chmod on any file or folder in /sdcard or /storage/emulated/legacy the command itself runs perfectly well. No errors or somthing, but the permissions are not changed.
Does anybody know why? And what do i have to do to change the permissions?
second question:
On my phone, the path /sdcard points to /storage/emulated/legacy.
What kind of link/mount/bind thing is that, and where is it established?
(I could not find it in /fstab.hammerhead, for example. Is there a kind of a second fstab or something?)
i hope you can help me
Sorontik
PS: If you need more details, feel free to ask

Related

[Q] How to copy a /data file from unrooted Nexus S [I9020XXKD1]?

Hi there,
Is there a way to temporary root my Nexus S [I9020XXKD1] or alternatively a non-root way to access /data so that I can copy a file in and out? Essentially I want to be able to backup and restore some game saves
Most posts I've read basically have folks saying "Just root it", which is good advice to most but isn't right for me - I really don't want to have to wipe my phone and I'd also like to be able to dip my toe into rooting before taking a full leap. That, and aside from needing this one file in /data my phone works exactly as I'd like it to
I only need "su" access for a brief moment to copy off a file to and from /data. I set up the android sdk but ADB didn't work because of the protection of "production builds".
VISIONary seemed like the right kind of thing, but I don't believe it works for the Nexus S or recent firmware, so while temp rooting would be nice so would any solution that allows me to backup and restore some files in /data.
At the moment I am wondering if writing an apk of my own that copies/replaces this one file is the way to go - but that seems perversely long way around!
So any help/suggestions most appreciated
There is no temporary root for the Nexus S. You're either rooted, or you're not. However, if, perchance, you are on Android 2.3.2 or earlier, you might be able to root without wiping.
Without root, you cannot see the files in /data, but you can read/write the files directly if they have the proper permissions and you know the exact path/filenames. After poking around a bit, it seems that read & write permissions vary among apps. Most apps have full permissions reserved for the parent app. Some allow other apps/user to read some files, and read+write others. (The permissions being app-specific, if it can't be done by command line, I doubt it could be done by creating an app, either.)
So, what is the game? Perhaps I can do some exploring.
If you have the old bootloader (2.3.2 i think) you can boot a recovery without flashing. From you computer use "adb boot recovery.img" and boot clockwork recovery. From there you can mount and access the filysystems.
Sent from my Nexus S using XDA App
Maximilian Mary said:
There is no temporary root for the Nexus S. You're either rooted, or you're not. However, if, perchance, you are on Android 2.3.2 or earlier, you might be able to root without wiping.
Without root, you cannot see the files in /data, but you can read/write the files directly if they have the proper permissions and you know the exact path/filenames. After poking around a bit, it seems that read & write permissions vary among apps. Most apps have full permissions reserved for the parent app. Some allow other apps/user to read some files, and read+write others. (The permissions being app-specific, if it can't be done by command line, I doubt it could be done by creating an app, either.)
So, what is the game? Perhaps I can do some exploring.
Click to expand...
Click to collapse
Thanks I figured as much. The game is Dungeon Hunter 2 and essentially I am trying to implement a simple fix to make my save game work again (the fix is here: http://forum.xda-developers.com/showthread.php?t=1042675 a few posts down) but it requires root. So I do know the exact paths and filename.
Thank you for your helpful answer
Ok, I'm not having any luck here, and it's pissing me off. FYI, I don't have that game, so I'm testing it with Angry Birds. I can read and copy the file just fine, but I can't modify it without using root. The data file itself has read/write access, but the containing folder (files/) is read-only, so I can't overwrite the file after I've modified it. Since the file itself has r/w access, I wonder if it would work to modify the file directly, instead of using an outside program to modify it then overwriting it. (I'm a bit ignorant of the finer points of linux permissions.) This would require an app that would allow you to open and modify a file by typing the full path & filename, instead of just browsing the directory tree. You could also try < adb pull /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame dh2_000.savegame > (using the correct path, if that's not it). Then see if < adb push dh2_000.savegame /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame > works. The fact that you can copy the file out is promising, anyway. So even if you had to root, you could backup the file before rooting wipes everything, then fix it & back it up after you had root.
Btw, what version of Android are you on?
Edit: I think I'm getting somewhere. While you can't modify the file itself, you can modify the file contents. So something like this might work: < adb shell >
< more /sdcard/dh2_000.savegame > /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame >
So the next step is to get some help from someone who has the game and is rooted as to the exact path to the savegame file. Once we have that, I think we're golden. (Or, let me know if adb pull works with the path I guessed at.)
wow! Thank you for your help
In answer to your questions: my Nexus s is running 2.3.4 and you are correct about the file path (many other kind xda users died to bring us those paths ) is /data/data/com.gameloft.android.TB with the filename being dh2_000.savegame
I don't want to drive you to distraction! If I could back it up I probably would go ahead then and root the phone given how complexplaying with a non-rooted phone is!
I will try the adb pull method and let you know how I get on.
Thank you again for your help and for showing me why I probably do want to root!

[Q] CIFS-Manager succesful mount but empty directory

I've got one cifs mount that works and one that shows an empty folder.
both mounts are from (seperate) ubuntu servers with near identical smb.conf files. there are no sym links in the shares. does the file system on the mount point have any effect? one is ext3 and the other is ext4
the strange thing is that when in the android terminal I can see the contents of the 'empty' mount but in the file managers i've tried (astro, adoa, ES)I just get an empty directory and instead of seeing dr- for the permissions it just show d--.
this is on an asus transformer running optimus 1.5
any help would be greatly appreciated.
never mind, file manager HD does the job, doesn't bother mounting, just points directly to the smb share.
highly recomend using file manager HD if anyone else is having my problems, it's fantastic.
only annoying thing was that I couldn't add shortcuts to smb:// root addresses, so I created symlinks within the shares.
I know, you dont need a solution anymore, but someone else might need it. I had the same problem and it was a rights issue. I changed the owner:group to root:root and and changed access rights to 0555. I dont know it is now working, because no other clients need these changes.
searchforglory said:
I know, you dont need a solution anymore, but someone else might need it. I had the same problem and it was a rights issue. I changed the owner:group to root:root and and changed access rights to 0555. I dont know it is now working, because no other clients need these changes.
Click to expand...
Click to collapse
Can you elaborate on this? When you say you changed the owner:group to root:root, is that for the directory on the server that is being shared? What about files and child directories? Also, by 0555, do you mean r-xr-x-r-x permissions on the samba share folder on the server? Which samba user did you use to access the share?
I have multiple mounts, and while cifs manager says they all mount successfully, some of them show up as empty directories, and I can not figure out why as I have made sure that the permissions on the server are the same.

[Q] 30 fps

sorry for this post but i dont have the required 10 posts to post in the devolpment thread already on this subject.
I tried the 30fps fix by copying the 4 .so files over but i am still getting 15fps. I am running the latest S7 rom. I dont know what i am doing wrong. I paste them into system/lib and it says that the action was complete. i try to take a vid before and after a reboot and they are still just 15fps. any suggestions.
I've noticed that the multi select function on root explorer and maybe other file managers doesn't work if you are over writing files, might not work for any copy/paste function. I would rename the old files *.so.bak then copy the new ones one by one. after that reboot and see if the changes stuck. if not make sure you are actually rooted. could have a bad su binary causing havoc or something. if you have root ant it is working then to make 100% sure you are mounted rw go into a terminal emulator or adb shell and type
su
(phone should ask for super user permissions or give a toast or notification that su was granted)
mount -o remount,rw /dev/block/stl9 /system
if you don't get any error about illegal operations or permission denied then you should be able to copy the files with 99% certainty. of you have any trouble be sure to include details.
Thanks for the response. I do have full root access. I double checked. I also keep getting a su binarry update warning from Superuser. I update it but everytime i restart the phone it tells me i have to update again. My next mission is to figure out why it keeps reverting back.
I did what you said and replaced the files one at a time. and renamed the originals instead of putting copyies in another location and trying to overwrite the orginals. thank you for your help. I am now recording at 30fps after a reboot.
update to the newwest entropy DD kernel. the older kernels rooted the phone but the trouble with that is if you update the binary the kernel overwrites it on next boot. this is on way the binary can get corrupted.
Renaming the original to .bak also allows you to compare the permissions of the posted file to the original permissions. In some cases, I noticed made a different.

[Q] [Explanation] Why/when CM boot process extract libs from apk

Hello,
I'm using a Samsung GT-i9000 phone with limited size yaffs2 partition (mounting point : /datadata). On this speed memory partition are placed apps data files; so whith lots of them we've got a "low memory" warning while the 2Go ext4 /data parition as lots of free space.
I used a script developped in Samsung Vibrant forum to solve this (same problem) : Workaround for small /datadata partition, reported here in XDA : [SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script.
I modified it to prevent some lag problems (explanation of what I've done in the thread linked) but it doesn't satisfied me as is.
So I'm starting a new developpement script (cleaner way of doing imho) : moving read only static files (ie : lib subdirectory) from /data/data (pointing to /datadata yaffs2 partition) to /data/local/staticdatadata/appdir/lib and making the corresponding softlink from /datadata/appdir/lib.
If script is used when running everything works fine but I've got a problem : when (re-)booting the phone it seems libs are extracted from apk files and copied to /datadata/appdir/lib (while softlink exists so it is erased).
Is someone could explain why (and when) this occurs please ? Is there a way to prevent this ?
PS : I search and read all (I hope) rc scripts and the only thing I found is a script (on /sbin) about encrypted /datadata (and doesn't seem relevant for my problem).
Anyone could help me please ?
An other question : I've seen that /sbin is not the same in recovery than in Android.
I want to modify my /sbin/setupdatadata.sh (the one used in booting process) but when editing it in recovery changes are removed at boot.
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
EDIT : find -name "setupdatadata" doesn't help ...
Wendigogo said:
Anyone could help me please ?
Click to expand...
Click to collapse
+1000
Which part of boot procedure extract and copy apk's lib in /datadata (think there's a test or something like that somewhere) ?
Wendigogo said:
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
Click to expand...
Click to collapse
I was right; it's part of initrd so I have to compile my own kernel for that ... not a versatile solution.
If not in good section, thanks to point it.

can't remount /system as rw

I think I'm starting to go slightly insane here.
Can't for the life of me mount /system as rw, it's only ro.
Ways I've tried:
- using mount command in terminal emulator
- using rw remount button in total commander
- using adb shell to do the same thhing as terminal emulator
i have supersu and all of the above were granted superuser but still no luck
here's relevant part of console output, but it doesn't do anything.
Code:
D:\Downloads\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount
mount
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
[email protected]:/ # mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
the directory stays read-only.
the whole reason i'm trying to do this is so i can stick in a boot animation (link) into system/media ...is there an easier way? i've tried 3 different file explorers with super but they all fail because it's not rw.....
and adb cant push to it either because it's rw.......
mount -o rw,remount /dev/block/mmcblk0p25 /system
Or put it in /data/local
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
rootSU said:
mount -o rw,remount /dev/block/mmcblk0p25 /system
Or put it in /data/local
Click to expand...
Click to collapse
well after trying some more (the terminal command still didnt want to do anything) i managed to get antek explorer to mount it as rw and was able to copy in the new bootanimation.zip
except that now it's unreadable file-
as in, if i try to open the zip in /system/media it just says cannot read file, if i copy it back out to a different folder it opens fine again.
and the boot animation itself, well, it just plays a tiny one with the word 'android' across it, which i guess is the default if it cant find one.
putting the file into /data/local doesn't change anything (doesnt overwrite the nexus one, doesnt overwrite the little word android)
since i'm new to all this stuff i can think probably i missing something simple, but do i have to somehow initialise new bootanimation or something? its the right file in the right place, dont know why it dont work.......
edit: here's an imgur album showing this stuff, maybe you can spot something there? http://imgur.com/a/l9sXa
edit2: just to test, i installed https://play.google.com/store/apps/details?id=com.klpu.android.bootanimation and it did indeed change the animation. so it's just a problem with doing it manually. unfortunately that app doesn't let you load in a custom one, only the preinstalled ones, so it's not much use to me overall...
DryEagle said:
well after trying some more (the terminal command still didnt want to do anything) i managed to get antek explorer to mount it as rw and was able to copy in the new bootanimation.zip
except that now it's unreadable file-
as in, if i try to open the zip in /system/media it just says cannot read file, if i copy it back out to a different folder it opens fine again.
and the boot animation itself, well, it just plays a tiny one with the word 'android' across it, which i guess is the default if it cant find one.
putting the file into /data/local doesn't change anything (doesnt overwrite the nexus one, doesnt overwrite the little word android)
since i'm new to all this stuff i can think probably i missing something simple, but do i have to somehow initialise new bootanimation or something? its the right file in the right place, dont know why it dont work.......
edit: here's an imgur album showing this stuff, maybe you can spot something there? http://imgur.com/a/l9sXa
edit2: just to test, i installed https://play.google.com/store/apps/details?id=com.klpu.android.bootanimation and it did indeed change the animation. so it's just a problem with doing it manually. unfortunately that app doesn't let you load in a custom one, only the preinstalled ones, so it's not much use to me overall...
Click to expand...
Click to collapse
hint, look at the bootanimation.zip file permissions once you moved it to /system/media
rootSU said:
hint, look at the bootanimation.zip file permissions once you moved it to /system/media
Click to expand...
Click to collapse
thank you!! this solved it!
No worries
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit

Categories

Resources