Hello guys. I have an issue with "ls -l" command. It shows numeric uid and gid only instead of its name. My rom is Lite'ning v1.5.
Code:
drwxr-xr-x 3 [COLOR="Red"]0[/COLOR] [COLOR="Red"]0[/COLOR] 0 Jul 2 16:55 acct
drwxrwx--- 2 [COLOR="Red"]1000[/COLOR] [COLOR="Red"]3003[/COLOR] 40 Jul 2 16:55 app-cache
drwxrwx--- 4 [COLOR="Red"]1000[/COLOR] [COLOR="Red"]2001[/COLOR] 4096 Jul 2 16:55 cache
It doesn't happen with my stock rom though. I've been wondering how to solve this issue. Thanks.
Related
hello, I need some assistance regarding a strange characters when using ADB commands from MSDOS window.
In my tablet that is running Android ICS 4.0.4, and is rooted, I replaced most of the commands that TOOLBOX was assign to issue in /system/bin. I replaced them with BUSYBOX commands, and everything works fine from the standpoint of the tablet.
But somehow I started to get some weird characters when using the LS command in ADB shell from a PC. so it happened right away after the replacement.
So I did a listing of the root files and folders in the tablet form my PC with the command:
adb shell ls -la /
and this is what I got:
C:\Windows\system32>adb shell ls -la /
total 285
drwxr-xr-x 16 root root 0 Sep 12 11:59 ←[1;34m.←[0m
drwxr-xr-x 16 root root 0 Sep 12 11:59 ←[1;34m..←[0m
drwxr-xr-x 3 root root 0 Sep 12 11:59 ←[1;34macct←[0m
drwxrwx--- 4 system cache 4096 Sep 12 13:01 ←[1;34mcache←[0m
dr-x------ 2 root root 0 Sep 12 11:59 ←[1;34mconfig←[0m
lrwxrwxrwx 1 root root 17 Sep 12 11:59 ←[1;36md←[0m -> ←[1;34m/sys/kernel/debug←[0m
drwxrwx--x 25 system system 4096 Sep 6 23:22 ←[1;34mdata←[0m
-rw-r--r-- 1 root root 89 Dec 31 1969 ←[0;0mdefault.prop←[0m
drwxr-xr-x 12 root root 14240 Sep 12 12:09 ←[1;34mdev←[0m
lrwxrwxrwx 1 root root 11 Sep 12 11:59 ←[1;36metc←[0m -> ←[1;34m/system/etc←[0m
drwxrwxrwx 3 root root 16384 Dec 31 1969 ←[1;34mfirmware←[0m
-rwxr-x--- 1 root root 98736 Dec 31 1969 ←[1;32minit←[0m
-rwxr-x--- 1 root root 2344 Dec 31 1969 ←[1;32minit.goldfish.rc←[0m
-rwxr-x--- 1 root root 15813 Dec 31 1969 ←[1;32minit.qcom.rc←[0m
-rwxr-x--- 1 root root 11014 Dec 31 1969 ←[1;32minit.qcom.sh←[0m
-rwxr-x--- 1 root root 30858 Dec 31 1969 ←[1;32minit.qcom.usb.rc←[0m
-rwxr-x--- 1 root root 8786 Dec 31 1969 ←[1;32minit.qcom.usb.sh←[0m
-rwxr-x--- 1 root root 19420 Dec 31 1969 ←[1;32minit.rc←[0m
-rwxr-x--- 1 root root 3491 Dec 31 1969 ←[1;32minit.target.rc←[0m
-rwxr-x--- 1 root root 12760 Dec 31 1969 ←[1;32minitlogo.rle←[0m
drwxrwxr-x 6 root system 0 Sep 12 11:59 ←[1;34mmnt←[0m
drwxrwx--x 4 system system 1024 Jul 19 22:25 ←[1;34mpersist←[0m
dr-xr-xr-x 900 root root 0 Dec 31 1969 ←[1;34mproc←[0m
drwx------ 2 root root 0 Jun 27 05:47 ←[1;34mroot←[0m
drwxr-x--- 2 root root 0 Dec 31 1969 ←[1;34msbin←[0m
lrwxrwxrwx 1 root root 11 Sep 12 11:59 ←[1;36msdcard←[0m -> ←[1;34m/mnt/sdcard←[0m
drwxr-xr-x 12 root root 0 Sep 12 11:59 ←[1;34msys←[0m
drwxr-xr-x 14 root root 4096 Sep 6 23:20 ←[1;34msystem←[0m
drwxr-xr-x 5 root root 4096 Jul 19 22:25 ←[1;34mtombstones←[0m
-rw-r--r-- 1 root root 272 Dec 31 1969 ←[0;0mueventd.goldfish.rc←[0m
-rw-r--r-- 1 root root 8338 Dec 31 1969 ←[0;0mueventd.rc←[0m
lrwxrwxrwx 1 root root 14 Sep 12 11:59 ←[1;36mvendor←[0m -> ←[1;34m/system/vendor←[0m
But from the tablet when I issue the command ls -la / i get the normal listing but in shows in COLOR, so I''m guessing that <-[1;36m in ADB represents a color ([0,0m for white, [1;34m for dark blue, etc), but how do I go to show color listing in ADB shell in my PC ?
Before when TOOLBOX was handing the LS command there was not color in the listing, but now with BUSYBOX handling the LS command I get nice different colors for files/folders/scripts, etc.
Any way I can fix this from the standpoint of the Widows PC MSDOS window with ADB shell listing files with LS in also in color ???
much appreciated, regards.
UPDATE:
I found out that I can list with ADB shell without those strange characters (in other words with NO COLOR) with the following command:
adb shell ls -la --color=never /
but it would be nice not to have to type --color=never every time I want a listing and better find a way to list it with color from PC in MSDOS window.
you can use a utility like ansicon, which allows msdos command windows to interpret the colour codes. You could add this to windows startup if you want, or use some replacement command line utility that can automatically run an app on startup.
flshg said:
you can use a utility like ansicon, which allows msdos command windows to interpret the colour codes. You could add this to windows startup if you want, or use some replacement command line utility that can automatically run an app on startup.
Click to expand...
Click to collapse
thanks a bunch, it worked just great!
I've struggled to use my Prime for development. I was seeing complaints from the development environment when trying to deploy my debug application about the folder missing. Looking at the Android sources I saw that the deployment was targeting /data/local/tmp which for some reason had been symlinked to a read-only partition. Removing the symlink fixes my debug deployment, but now I've got another strange issue that I don't know how to resolve. When executing "adb shell", my prompt looks like the following:
Code:
uid=2000 gid=2000 groups=1003,1004,1007,1009,1011,1015,1028,3001,3002,3003,[email protected]:/system/etc $
It doesn't seem like uid -> name mappings are working for some reason. "ls -l" shows the same lack of uid -> name mappings:
Code:
-rw-r--r-- 1 0 0 1231 Sep 28 01:59 cpu1.sh
-rw-r--r-- 1 0 0 1218 Sep 28 01:59 cpu2.sh
-rw-r--r-- 1 0 0 1217 Sep 28 01:59 cpu3.sh
-rw-r--r-- 1 0 0 1227 Sep 28 01:59 cpu4.sh
-rw-r--r-- 1 0 0 1222 Sep 28 01:59 cpu5.sh
-r--r----- 1 1002 1002 935 Feb 21 2012 dbus.conf
Can anyone offer any hints on what might be going on and how I might fix this?
Thanks,
Craig
Hi,
I thought every file in the app directory (/data/data/packageName/ at my phone) belongs to the app. But then I saw, that e.g Angry Birds Space (/data/data/com.rovio.angrybirdsspace.ads/ on my phone) contains a file (/data/data/com.rovio.angrybirdsspace.ads/lib/libangrybirds.so) that belongs to the owner/group "system". Is that normal? Why doesn't this files belong to the app? Can files inside the app folder, except in lib directory belong to other owner/group than app_xxx?
Thanks Alex.
Code:
/data/data/com.rovio.angrybirdsspace.ads # ls -la
ls -la
drwxr-x--x 7 app_113 app_113 4096 Oct 8 21:07 .
drwxrwx--x 158 system system 12288 Oct 2 21:38 ..
drwxrwx--x 3 app_113 app_113 4096 Jul 1 22:11 cache
drwxrwx--x 2 app_113 app_113 4096 Oct 14 20:16 databases
drwxrwx--x 2 app_113 app_113 4096 Oct 14 20:17 files
drwxr-xr-x 2 system system 4096 Oct 8 21:07 lib
drwxrwx--x 2 app_113 app_113 4096 Jul 13 21:39 shared_prefs
Hello,
I can't delete some files on my device (Samsung Galaxy Note 2 LTE [t0lte]]) running CyanogenMod 10.1 using RootExplorer (or similar file manager).
So I tried with adb (in CM10.1, ClockworkMod & TeamWin recovery), but received error messages:
Code:
/data/media/0/DCIM/.thumbnails # rm 1375815201990.jpg
rm: can't remove '1375815201990.jpg': Operation not permitted
/data/media/0/DCIM/.thumbnails # chmod 777 1375815201990.jpg
chmod: 1375815201990.jpg: Operation not permitted
/data/media/0/DCIM/.thumbnails # chown root:root 1375815201990.jpg
chown: 1375815201990.jpg: Operation not permitted
I think there is something wrong with the permissions, here are the directory listings:
Code:
/data/data/com.amazon.venezia.wech/app_resources/configurationTwo/assets/css/amazon-phoenix/compositions # ls -lisah
202883 4 drwx------ 2 u0_a145 u0_a145 4.0K Aug 14 20:03 .
202882 4 drwx------ 3 u0_a145 u0_a145 4.0K Aug 8 03:43 ..
203719 24 ---S-wxr-t 1 u0_a1355 u0_a2315 1.8G Oct 11 2024 amazon-phoenix-xlarge-landscape-xhdpi.css
Code:
/data/lost+found # ls -lisah
10333 4 --wsrwSr-x 1 u22097_a u4253_a5 12.0K Jan 27 1988 #10333
10436 4 -r-------T 1 u22097_a u12935_a 254.5M May 14 1984 #10436
104567 8 ----r-Srwx 1 u37071_a u21823_a 36.0K Mar 5 1951 #104567
104571 36 d-w-rws--T 2 u18849_a u29364_a 36.0K Jan 10 1956 #104571
104687 8 ---S--x-w- 1 u38084_a u38537_a 28.0K Feb 16 1986 #104687
104696 8 --w--wsrwT 1 u8912_a4 u20250_a 36.0K Jun 12 1929 #104696
104832 36 d---r-sr-T 2 u8902_a5 u4062_a1 36.0K Sep 23 1929 #104832
...and_many_more...
Code:
/data/media/0/DCIM/.thumbnails # ls -lisah
243488 156 drwxrwxrwx 2 media_rw media_rw 152.0K Aug 15 11:29 .
97358 4 drwxrwxrwx 3 media_rw media_rw 4.0K Aug 16 08:32 ..
248825 32 -r---ws-wx 1 all_a153 u0_a2320 712.5M Aug 19 1994 1375815201990.jpg
BTW: /data/media/0 is the internal sd-card of my device.
How can I delete theses files?
all files gone, have to rebuild my phone
Stiegi said:
How can I delete theses files?
Click to expand...
Click to collapse
I didn't find a smart way (no "xattr", or "chflags", ... on android available) to clean the files off from my disk, so I rebuild my phone:
copied all files from /data/media/0/ to my linux,
wiped all local partitions (ecxept my external sdcard) in TWRP (but the bad files are still there)
found another menu in TWRP and formated the /data/... (now the unusable files & folders are gone. I think the /data-wipe in TWRP uses "rm -fR *" on /data.)
installed the latest CM10.1 + gapps,
booted the phone,
google restored my apps,
TitaniumBackup restored the appdata,
and finally I copied the files from my linux back to /data/media/0/
So after a day of extreme backup-/restore-/delete-/copy-ing I'm back on the track
First I'm on 7.1.1 LineageOS v20, I have my SD card formated using ext2 since I need 4+ GB files for TWRP backups. This works and I can create files and folder ..., however I've found that if I pull the SD card and on a computer set the permission to say 777 all is fine, but on the Phone, I can for instance create a directory using root-explorer, but can not set permission or copy files into it. If I create the folder on the computer I can copy files into it however. Next say I backup using Ti-backup to the external SDcard it works fine, but of I install a new ROm I can not access the previous backup files. I can not change the permissions on the file to 777 either from a terminal.
Really this is what upsets me, as root in a terminal I can not set permissions on a file as it does nothing, for instance on /storage/emulated/0 I have:
h918:/storage/emulated/0 # ls
drwxrwx--x 3 root sdcard_r 4096 Mar 14 19:35 .rr
-rw-rw---- 1 root sdcard_r 1369542927 Apr 1 22:28 01update.zip
-rw-rw---- 1 root sdcard_r 884357956 Apr 1 22:34 02update.zip
-rw-rw---- 1 root sdcard_r 1057588047 Apr 1 22:41 03update.zip
drwxrwx--x 2 root sdcard_r 4096 Mar 9 23:06 3DMarkAndroid
drwxrwx--x 2 root sdcard_r 4096 Mar 4 18:20 Alarms
....
as root I execute:
h918:/storage/emulated/0 # chmod 777 *.zip
h918:/storage/emulated/0 # chmod 777 *.zip
h918:/storage/emulated/0 # ls -al
drwxrwx--x 43 root sdcard_r 4096 Apr 1 22:35 .
drwx--x--x 4 root sdcard_r 4096 Jan 1 2016 ..
-rw-rw---- 1 root sdcard_r 2557 Apr 1 20:20 .bash_history
drwxrwx--x 3 root sdcard_r 4096 Mar 14 19:35 .rr
-rw-rw---- 1 root sdcard_r 1369542927 Apr 1 22:28 01update.zip
-rw-rw---- 1 root sdcard_r 884357956 Apr 1 22:34 02update.zip
-rw-rw---- 1 root sdcard_r 1057588047 Apr 1 22:41 03update.zip
drwxrwx--x 2 root sdcard_r 4096 Mar 9 23:06 3DMarkAndroid
drwxrwx--x 2 root sdcard_r 4096 Mar 4 18:20 Alarms
...
The permissions remain unchanged, why I'm root I should be able to change permissions.
looking at mount the options are:
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
The SD card looks similar:
/dev/fuse on /storage/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
Nothing here should block ROOT from change the permissions. I simply want as root or as any root application to be able to create a directory change file permission and access data written as another root app, all of which make it possible to use the phone and backup/restore safely.
I can only assume something is blocking me form using the device the way I want and operating on files, since pulling the card to a computer allows setting 777 and then it works as I want, what I want is to set the umask to 777 for everything, as for security that can be damned as I need to be able to backup and restore safely first, something I can not do now as Tibackup can not access it's own files on restore unless I first pull the card and set the permissions on a computer, which is unacceptable.
Files created on the phone have permissions 700 or something similar, even though on the phone they are listed as having more, this explains the issue as it is not for instance: -rw-rw---- but -rw-------, however root should still be able to access the file and can not, nor can root change the settings.
ERIC