[Q] mount /system/vendor as rw - Nexus S Q&A, Help & Troubleshooting

Upgraded to the lastest 3.1 and I wanted to remove some bloat as usual. /system/app seems to be mountedable as rw. However /system/vendor now does not seem to work. What am I missing? I had a look at it and it seems that /system/vendoris now system.system instead of root.root
What am i doing wrong?
Also another quick question, what is that function/applet/whatchcallits that allows your to tab autocomplete inshell?
Code:
$ export PATH=/data/local/bin:$PATH
$ su
# busybox mount -o rw,remount /system
# cd /system
# ls -al
drwxr-xr-x root root 2011-07-16 21:58 app
drwxr-xr-x root shell 2011-07-05 22:12 bin
-rw-r--r-- root root 1839 2008-08-01 20:00 build.prop
drwxr-xr-x root root 2011-07-07 00:34 etc
drwxr-xr-x root root 2011-07-05 22:12 fonts
drwxr-xr-x root root 2011-07-05 22:12 framework
drwxr-xr-x root root 2011-07-05 22:12 lib
drwxr-xr-x root root 1970-01-01 08:00 lost+found
drwxr-xr-x root root 2011-07-05 22:12 media
drwxr-xr-x root root 2011-07-05 22:12 usr
drwxr-xr-x system system 2011-07-13 09:33 vendor
drwxr-xr-x root shell 2011-07-07 00:34 xbin
# cd vendor
# ls
app
builtin_data.zip
fixwifi
flexrom.prop
lib
pm
# cd app
# ls
APKInstaller.apk
CheckerLaunch.apk
CiteReader-1.0.18.06150.apk
FixWifi.apk
GoldenClub_1.0.0.apk
KoboAcer.apk
# mv GoldenClub_1.0.0.apk GoldenClub_1.0.0.bak
failed on 'GoldenClub_1.0.0.apk' - Read-only file system
#

Related

Permissions issues copying to /system

I have a Sprint HTC Hero
It's running 1.5
I've rooted the phone
I'm having some issues copying anything into, specifically, /system/media/bootscreen
I've tried mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
So /system should be rw:
Code:
drwxr-xr-x root root 2009-09-21 07:30 system
However, whenever I try to copy anything into that folder while su'd, I get:
Code:
# pwd
pwd
/
# cp /sdcard/Spor.jpg /data/local/
cp /sdcard/Spor.jpg /data/local/
# cp /data/local/Spor.jpg /system/media/bootscreen/
cp /data/local/Spor.jpg /system/media/bootscreen/
cp: cannot create '/system/media/bootscreen/Spor.jpg': Permission denied
# cp /sdcard/Spor.jpg /system/media/bootscreen/
cp /sdcard/Spor.jpg /system/media/bootscreen/
cp: cannot create '/system/media/bootscreen/Spor.jpg': Permission denied
I'm guessing i'm missing something stupid, but i've been messing around for the last night and I can't seem to figure it out.
Does anyone have any opinions?
Many thanks!
Permissions
You may have a directory permissions problem further down the tree, what does "ls -la /system" say? And "ls -la /system/media"?
BTW, another way for mount rw is "adb remount" before entering the shell.
adb remount doesn't work for me for some reason:
Code:
C:\android-sdk-windows\tools>adb remount
remount failed: Operation not permitted
Here are my /, /system, and /system/media
Code:
# ls -la
ls -la
drwxrwxrwt root root 2009-12-01 17:30 sqlite_stmt_journals
drwxrwx--- system cache 2009-11-28 15:00 cache
drwxrwxrwx system system 1969-12-31 17:00 sdcard
lrwxrwxrwx root root 2009-12-01 09:45 etc -> /system/etc
[B]drwxr-xr-x root root 2009-09-21 07:30 system[/B]
drwxr-xr-x root root 1969-12-31 17:00 sys
drwxr-x--- root root 1969-12-31 17:00 sbin
dr-xr-xr-x root root 1969-12-31 17:00 proc
-rw-r--r-- root root 11336 1969-12-31 17:00 logo.rle
-rwxr-x--- root root 10296 1969-12-31 17:00 init.rc
-rwxr-x--- root root 2965 1969-12-31 17:00 init.heroc.rc
-rwxr-x--- root root 1677 1969-12-31 17:00 init.goldfish.rc
-rwxr-x--- root root 106804 1969-12-31 17:00 init
-rw-r--r-- root root 118 1969-12-31 17:00 default.prop
drwxrwx--x system system 2009-09-21 06:56 data
drwx------ root root 1969-12-31 17:00 root
drwxr-xr-x root root 2009-12-01 09:45 dev
#
Code:
# ls -la /system
ls -la /system
drwxr-xr-x root root 2009-09-21 07:30 etc
drwxr-xr-x root root 2009-09-21 07:33 app
drwxr-xr-x root shell 2009-09-21 07:30 bin
drwxrwxrwx root shell 2009-11-29 01:57 xbin
-rw-r--r-- root root 1970 2009-11-28 15:10 build.prop
drwxr-xr-x root root 2009-09-21 07:30 usr
drwxr-xr-x root root 2009-09-21 07:30 fonts
drwxr-xr-x root root 2009-09-21 07:30 customize
drwxr-xr-x root root 2009-09-21 07:32 framework
drwxr-xr-x root root 2009-09-21 07:30 lib
[B]drwxr-xr-x root root 2009-09-21 07:30 media[/B]
drwxr-xr-x root root 2009-11-28 15:08 lost+found
#
Code:
# ls -la /system/media
ls -la /system/media
drwxr-xr-x root root 2009-09-21 07:30 audio
[B]drwxr-xr-x root root 2009-09-21 07:30 bootscreen[/B]
#
Strange
That all looks good. It's possible you are not really root (and therefore owner of these files/directories). Once in the adb shell try running "su"...even though you have what looks like the root prompt...then the "mount ...." command you posted initially.
From there make sure that "/default.prop" says "ro.secure=0" not "ro.secure=1".
5tr4t4 said:
That all looks good. It's possible you are not really root (and therefore owner of these files/directories). Once in the adb shell try running "su"...even though you have what looks like the root prompt...then the "mount ...." command you posted initially.
From there make sure that "/default.prop" says "ro.secure=0" not "ro.secure=1".
Click to expand...
Click to collapse
Yeah, I do have root. That's no question. I figured a work around - not sure why remounting rw (755) isn't working, but I changed the /system/media/bootscreen folder to (777) which is rwx and now i'm able to copy to and from that folder without any issues.
I'm trying to think about the underlying issue, but right now i'm happy. If my solution sheds some additional light to why rw isn't working, please let me know.
Thanks for your ideas though. I appreciate it.

[GUIDE] How to recover after messing up with system/lib files

After reading this thread i got existed that finally Arabic is here but turned out its not interned for DHD and i messed up my lib files and now my phone don't boot
so i flashed CWM and flashed a new custom ROM because i had my S-off "thanks to the guys at #G2root channel in irc my phone is back to normal but i kept experimenting with it because i thought i might get it to work....well i didnt but learned some stuff in the processes i'm gonna share with you guys..
*********if your system/lib files are corrupted in any way and you have the stock files****************
1-Flash Clockwork MOD Recovery Image
2-go to CWM and then press the down button tell you go over the menu 3 times "this to make power button usable to select option"
3-go to storage and mount and mount USB storage
4-copy the stock files to your Sdcard
5-unmount from you cwm
6-mount system and mount sdcard from cwm
7- now in your pc run adb from CMD
8-type in "adb shell"
you should get ~#
9-type in "mount -o rw,remount -t ext3 /dev/block/mmcblk0p15 /system"
and then "cp /sdcard/TheFileYouWant.so /system/lib/" for example i did "cp /sdcard/libwebcore.so /system/lib/"
10-now type "ls -l /system/lib"
your file should be there
-rw-r--r-- root root 9568 2008-08-01 15:00 libwsp_jni.so
-rw-r--r-- root root 732520 2008-08-01 15:00 libstagefright.so
-rw-r--r-- root root 13736 2008-08-01 15:00 libdrm1_jni.so
-rw-r--r-- root root 771800 2008-08-01 15:00 libcrypto.so
----rwxr-x root root 5033648 2010-11-15 10:24 libwebcore.so
-rw-r--r-- root root 113068 2008-08-01 15:00 libLaputaLbProviderJni.so
-rw-r--r-- root root 13600 2008-08-01 15:00 libLaputaLogJni.so
-rw-r--r-- root root 149512 2008-08-01 15:00 libbinder.so
-rw-r--r-- root root 92368 2008-08-01 15:00 libext2fs.so
-rw-r--r-- root root 9260 2008-08-01 15:00 libaudioalsa.so
but it still wont boot because your file don't have permeations
"all system lib files need to be 644"
11-type in "chmod 644 /system/lib/libwebcore.so"
then type "ls -l /system/lib"
-rw-r--r-- root root 9568 2008-08-01 15:00 libwsp_jni.so
-rw-r--r-- root root 732520 2008-08-01 15:00 libstagefright.so
-rw-r--r-- root root 13736 2008-08-01 15:00 libdrm1_jni.so
-rw-r--r-- root root 771800 2008-08-01 15:00 libcrypto.so
-rw-r--r-- root root 5033648 2010-11-15 10:24 libwebcore.so
-rw-r--r-- root root 113068 2008-08-01 15:00 libLaputaLbProviderJni.so
-rw-r--r-- root root 13600 2008-08-01 15:00 libLaputaLogJni.so
-rw-r--r-- root root 149512 2008-08-01 15:00 libbinder.so
-rw-r--r-- root root 92368 2008-08-01 15:00 libext2fs.so
-rw-r--r-- root root 9260 2008-08-01 15:00 libaudioalsa.so
if your file is "-rw-r--r--" then your set just reboot from cwm and cross your fingers >.<
Thanks to <FatTire> and all of G2root channel for there help you guys are the best!

[Q] [Asus me301t] Symlinking removable devices to /mnt/sdcard

Hi to all!
I post my question here hoping it is the correct place.
I would like to create a link in the /mnt/sdcard directory of my tablet to the place where usb and sdcard are mounted (namely the /Removable directory).
I've tried to create the link using adb shell but with no result at the moment.
This is the situation on my Asus me301t tablet:
Code:
ls -all
drwxr-xr-x root system 2013-12-08 15:49 Removable
drwxr-xr-x root root 2013-12-08 15:49 acct
drwxrwx--- system cache 2013-12-08 16:54 cache
dr-x------ root root 2013-12-08 15:49 config
lrwxrwxrwx root root 2013-12-08 15:49 d -> /sys/kernel/debug
drwxrwx--x system system 2013-12-08 15:49 data
-rw-r--r-- root root 116 1970-01-01 01:00 default.prop
drwxr-xr-x root root 2013-12-08 15:49 dev
lrwxrwxrwx root root 2013-12-08 15:49 etc -> /system/etc
-rw-r----- root root 718 1970-01-01 01:00 fstab.cardhu
-rwxr-x--- root root 113524 1970-01-01 01:00 init
-rwxr-x--- root root 3012 1970-01-01 01:00 init.0b.rc
-rwxr-x--- root root 15918 1970-01-01 01:00 init.cardhu.rc
-rwxr-x--- root root 2487 1970-01-01 01:00 init.goldfish.rc
-rwxr-x--- root root 18247 1970-01-01 01:00 init.rc
-rwxr-x--- root root 244 1970-01-01 01:00 init.tf.rc
-rwxr-x--- root root 1795 1970-01-01 01:00 init.trace.rc
-rwxr-x--- root root 4150 1970-01-01 01:00 init.usb.rc
drwxrwxr-x root system 2013-12-08 15:49 mnt
dr-xr-xr-x root root 1970-01-01 01:00 proc
drwx------ root root 2013-04-19 08:42 root
drwxr-x--- root root 1970-01-01 01:00 sbin
lrwxrwxrwx root root 2013-12-08 15:49 sdcard -> /storage/emulated/legacy
d---r-x--- root sdcard_r 2013-12-08 15:49 storage
drwxr-xr-x root root 2013-12-08 15:49 sys
drwxr-xr-x root root 1970-01-01 01:00 system
-rw-r--r-- root root 2520 1970-01-01 01:00 ueventd.cardhu.rc
-rw-r--r-- root root 272 1970-01-01 01:00 ueventd.goldfish.rc
-rw-r--r-- root root 4024 1970-01-01 01:00 ueventd.rc
lrwxrwxrwx root root 2013-12-08 15:49 vendor -> /system/vendor
So /Removable is a directory.
The same is not true for the /mnt/sdcard
Code:
[email protected]:/mnt $ ls -all
drwxr-xr-x root system 2013-12-08 15:49 asec
drwxr-xr-x root system 2013-12-08 15:49 obb
lrwxrwxrwx root root 2013-12-08 15:49 sdcard -> /storage/emulated/legacy
drwx------ root root 2013-12-08 15:49 secure
drwx------ shell shell 2013-12-08 15:49 shell
Moreover also /storage/emulated/legacy is a link
Code:
[email protected]:/storage/emulated $ ls -all
lrwxrwxrwx root root 2013-12-08 15:49 legacy -> /mnt/shell/emulated/0
The /mnt/shell/emulated/0 is a real directory and these are the owner and permission of the directory which constitute that path:
Code:
[email protected]:/mnt/shell/emulated/0 $ cd ..
[email protected]:/mnt/shell/emulated $ ls -all
drwxrwxr-x root sdcard_rw 2013-12-08 16:17 0
drwxrwxr-x root sdcard_rw 2013-08-29 12:55 legacy
drwxrwxr-x root sdcard_rw 2013-08-29 12:54 obb
[email protected]:/mnt/shell/emulated $ cd ..
[email protected]:/mnt/shell $ ls -all
drwxrwxr-x root sdcard_rw 2013-08-29 12:55 emulated
[email protected]:/mnt/shell $ cd ..
[email protected]:/mnt $ ls -all
drwxr-xr-x root system 2013-12-08 15:49 asec
drwxr-xr-x root system 2013-12-08 15:49 obb
lrwxrwxrwx root root 2013-12-08 15:49 sdcard -> /storage/emulated/legacy
drwx------ root root 2013-12-08 15:49 secure
drwx------ shell shell 2013-12-08 15:49 shell
I've tried to create the link and I obtain the following error:
Code:
ln -s /Removable/ /mnt/shell/emulated/0/Removable
link failed Function not implemented
Is it possible to create such a link without being root?
Otherwise is it possible to get root access only temporarily so that to create such a link or whichever is required to obtain the same functionality (removable sdcard and usb should be visible under /mnt/sdcard).
Thank you for your help,
Xwang
UP, please.
Xwang
UP!
Can anybody help me, please?
Xwang

[Q] ln command dont work on a directory with write permissions

Hi there,
I'm working with a stock, non rooted, lollipop 5.0.2 for xt1032 Moto G ROM, I'm trying to create a symbolic link from "popcorn download" folder to "my downloads" folder, so other programs can take the movies for streaming or whatever (who cares why anyways) but even when a touch or rm command works fine, ln commands doesn't like to lend a hand.
bad boy LN, bad boy.
Here is an exerpt on what i did:
1|[email protected]_umts:/sdcard/Download $ pwd
/sdcard/Download
[email protected]_umts:/sdcard/Download $ ls -l /sdcard/time4popcorn/downloads
drwxrwx--- 3 root 1028 4096 Apr 25 02:29 3980d0dd-29a9-4711-9a83-7955661b1aef
drwxrwx--- 3 root 1028 4096 Apr 25 02:34 3f02c279-84bb-4d74-bb69-2a7959a23774
drwxrwx--- 2 root 1028 4096 Apr 25 02:31 50548bf9-6cf6-436b-9b80-179ec8fc8bca
drwxrwx--- 3 root 1028 4096 Apr 25 02:00 c20989ae-375b-46e0-aa6e-d373c0bf2659
[email protected]_umts:/sdcard/Download $ touch popcorn
[email protected]_umts:/sdcard/Download $ ls -l
-rw-rw---- 1 root 1028 457290 Apr 24 22:29 422.pdf
drwxrwx--- 2 root 1028 4096 Apr 19 04:17 BigBang Theory
drwxrwx--- 2 root 1028 4096 Apr 19 04:12 Super_Mario_Theme
-rw-rw---- 1 root 1028 0 Apr 25 18:00 popcorn
[email protected]_umts:/sdcard/Download $ rm popcorn
[email protected]_umts:/sdcard/Download $ ln -s /sdcard/time4popcorn/downloads popcorn
ln: popcorn: Operation not permitted
1|[email protected]_umts:/sdcard/Download $ whoami
app_135
[email protected]_umts:/sdcard/Download $ id
uid=10135(app_135) gid=10135(app_135) groups=1015(sdcard_rw),1028,3003(inet),9997,50135(app_40135)
[email protected]_umts:/sdcard/Download $
I hope you can trhow some light to me and help me out
.
Thanks in advance, and kind regards to everyone! :highfive:
Gnokix

Help with Root on Moto E6

Greetings All,
I have a confusion about root usage with Magisk that maybe someone can help me with.
I would like to change some files on the /system directory in the Moto E6.
Using TWRP would make this change trivial.
Alas, there does not appear to be a functional TWRP available for this device.
So I am using the next best thing, Magisk rooted.
Booting up with the Magisk patched recovery, I can adb shell from a Linux terminal,
and execute 'su' for root privileges.
Attempting to remount /system rw results in '/system not in /proc/mounts' message (which is true).
If I attempt to mount /dev/block/by-name/system, I get a 'device or resource busy' message.
I CAN remount '/', and the /system directory can then be modified.
However, when the system is booted normally, those changes do not show in the 'normal' /system directory.
I suspect that Magisk is creating it's own /system directory for the recovery boot.
Is there any way to access/update the REAL /system image on this phone?
Thanx
Richard Rosa
Here is another mystery:
Boot with Magisk recovery.
adb shell
su
mount -o rw,remount /oem
cd oem
touch junk_file
ls -a
(file created is there)
(wait 10 seconds)
ls -a
(the file has disappeared).
Can someone enlighten me as to why?
Thanx.
Richard Rosa
It happens on my XT2005-5, as well.
Once the file is gone, I could not make any other file, either.
Right after mounting:
surfna:/ # ls -altr /oem
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 9 root root 4096 2021-01-27 16:16 .
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
Creating a file (TTT):
surfna:/ # touch /oem/TTT
surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
-rw-r--r-- 1 root root 0 2021-05-30 03:58 TTT
drwxr-xr-x 9 root root 4096 2021-05-30 03:58 .
And it disappered:
surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 03:58 .
I did touch and then chmod 700, without error.
But no TTT. The time stamp of oem stayed unchanged.
surfna:/ # touch /oem/TTT
surfna:/ # chmod 700 /oem/TTT
surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 03:58 .
Same thing, but without delay. No effect.
surfna:/ # touch /oem/TTT; chmod 700 /oem/TTT
surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 03:58 .
Trying to create more files ==> I/O error.
surfna:/ # touch /oem/TTT2
touch: '/oem/TTT2': I/O error
1|surfna:/ # touch /oem/123
touch: '/oem/123': I/O error
Repeating same thing. This time, time stamp of oem changed!
surfna:/ # touch /oem/TTT23
touch: '/oem/TTT23': I/O error
1|surfna:/ # touch /oem/TTT23
surfna:/ # touch /oem/T12
touch: '/oem/T12': I/O error
1|surfna:/ # touch /oem/TDD
touch: '/oem/TDD': I/O error
1|surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 04:03 .
Using echo instead of touch to create a file.
Error for TDD, but no error for TTT, the original file, somehow.
But it doesn't show up is ls.
surfna:/ # echo 123 > /oem/TDD
/system/bin/sh: can't create /oem/TDD: I/O error
1|surfna:/ # echo 123 > /oem/TTT
surfna:/ # ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 04:03 .
But it shows up with full path.
surfna:/ # ls -altr /oem/TTT
-rwx------ 1 root root 4 2021-05-30 04:03 /oem/TTT
I rebooted (recoverly) and checked original mount parameters.
surfna:/ # mount |grep oem
/dev/block/dm-1 on /oem type ext4 (ro,context=ubject_remfs:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
Remounting as "rw" doesn't change other parameters.
surfna:/ # mount -o rw,remount /oem
surfna:/ # mount |grep oem
/dev/block/dm-1 on /oem type ext4 (rw,context=ubject_remfs:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
This time, the file didn't stay.
surfna:/ # touch /oem/TTT;chmod 700 /oem/TTT;ls -altr /oem/;mount |grep oem
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 04:40 .
/dev/block/dm-1 on /oem type ext4 (rw,context=ubject_remfs:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
But it's there when I used full path, again.
surfna:/ # touch /oem/TTT;chmod 700 /oem/TTT;ls -altr /oem/TTT ;mount |grep oem
-rwx------ 1 root root 0 2021-05-30 04:41 /oem/TTT
Writing to the file did not change the time stamp of oem, but touching it changed.
surfna:/ # touch /oem; ls -altr /oem/
total 52
drwxr-xr-x 21 root root 4096 2009-01-01 01:00 ..
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 usc
-rw-r--r-- 1 root root 272 2021-01-27 16:15 oem.prop
drwxr-xr-x 3 root root 4096 2021-01-27 16:15 comcast
drwxr-xr-x 6 root root 4096 2021-01-27 16:16 app
drwxr-xr-x 7 root root 4096 2021-01-27 16:16 overlay
drwxr-xr-x 12 root root 4096 2021-01-27 16:16 priv-app
drwxr-xr-x 7 root root 4096 2021-01-27 16:17 etc
drwx------ 2 root root 16384 2021-01-27 16:17 lost+found
drwxr-xr-x 9 root root 4096 2021-05-30 04:53 .
It's a block device (rw) and special block.
It's small. Too small to contain all directories.
surfna:/ # ls -al /dev/block/dm-1
brw------- 1 root root 252, 1 1970-01-27 08:20 /dev/block/dm-1
surfna:/ # file /dev/block/dm-1
/dev/block/dm-1: block special

Categories

Resources