Linux chroot +++ No connectivity - Networking

Hi @all,
I'm experimenting with a Ubuntu chroot on my Moto G5 with LineageOS 14.1. I tried to use the same setup as on the HT6 from HomTom, where I used a partitioned SD card. First partition as Fat32 and second partition as Ext4. Now I recognised that the kernel can manage Ext4 as well as Fat32. Both of the partitions are mounted by default. So I tried to remount the Ext4 partition without the noexec, nosuid etc. options. It worked so far and I created the groups for the network access and added my user to this groups.
But still no permission to the socket...
I think the possible matter is the SELinux security policy. Is this a possible reason for no connectivity?
If yes, does anyone know how to solve this?
Or if someone knows the reason for my problem, could you please tell me?
Thanks in advance for your help!
PS: Here's the output of mount:
rootfs on / type rootfs (ro,seclabel,size=865040k,nr_inodes=114726)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=945880k,nr_inodes=117258,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=945880k,nr_inodes=117258,mode=755,gid=1000)
none on /config type configfs (rw,relatime)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p53 on /system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/dev/block/mmcblk0p54 on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,discard,user_xattr,inline_xattr,acl,inline_data,nobarrier,extent_cache,active_logs=6)
/dev/block/mmcblk0p52 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/mmcblk0p19 on /firmware type ext4 (ro,context=ubject_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier,data=ordered)
/dev/block/mmcblk0p29 on /fsg type ext4 (ro,context=ubject_r:fsg_file:s0,nosuid,nodev,relatime)
/dev/block/mmcblk0p22 on /dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p30 on /persist type ext4 (rw,context=ubject_rersist_file:s0,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=945880k,nr_inodes=117258,mode=755,gid=1000)
/dev/fuse on /mnt/runtime/default/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/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)
/dev/block/vold/public:179_65 on /mnt/media_rw/F840-4482 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /mnt/runtime/default/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/vold/public:179_66 on /mnt/media_rw/bc5464af-da29-422a-a8b0-778b375690ee type ext4 (rw,dirsync,context=ubject_r:sdcard_posix:s0,nosuid,nodev,noatime,data=ordered)
/dev/fuse on /mnt/runtime/default/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
Click to expand...
Click to collapse

Related

[Q] Shouldn't be a SYSTEM partition mounted as Read ONLY?

# mount
mount
rootfs on / type rootfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (rw,noatime,nodiratime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,noatime,nodiratime)
/dev/block/mtdblock4 on /mnt/cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,r
elatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,
iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noe
xec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=c
p437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
#
Guys this is on hyperdoid, Don't know about others but i have other backups of different roms as well will give it a shot.
Is it the reason why most of the chef's says you should shutdown instead of reboot to avoid data lose? :-s
All the partition are given RW access.
What to do? Please help
didn't anyone find it strange or its just me?
I don't find this strange.
I wouldn't worry about it. If it does bother you, remount them R/O?
skymera said:
I don't find this strange.
I wouldn't worry about it. If it does bother you, remount them R/O?
Click to expand...
Click to collapse
ok thank you for response.
Then why OEM ROM Builders always set system partition as RO?
Isn't it if you have sudden crash or phone fall down there is more chances that you will lose data or be left with corrupted partitions?
Regards
Nevermind Fixed it myself.
Now i am sure i won't be having any bad effect on my System partition as its read only during the phone operation (after booted up).
I will ask Tytung to add this in his kernel.
Regards.

SWAP on /dev/block/stl6 ???

I used swap on /dev/block/mmcbl0p2 but I flashed Merruk lernel 2.5 (overclocked) I found that /dev/block/stl6 is being used as swap instead of mmcblk0p2......
$ mount | grep j4fs
/dev/stl6 /mnt/.lfs j4fs rw,relatime 0 0
$ free
total used free shared buffers
Mem: 296216 290604 5612 0 21052
Swap: 153596 3488 150108
Total: 449812 294092 155720
$
Click to expand...
Click to collapse
flashed DDLK2 with ODIN but it's all the same.... IS IT NORMAL???
See Here from Galaxy Tab
/data/local/tmp/busybox mount -o
rw,remount /system > /data/local/tmp/
output 2>&1
export TEMPRANDOM=34850
export PS1=END:$TEMPRANDOM;cat /
data/local/tmp/output
mount: permission denied (are you root?)
END:34850export PS1=""
/data/local/tmp/busybox mount > /data/
local/tmp/output 2>&1
export TEMPRANDOM=76781
export PS1=END:$TEMPRANDOM;cat /
data/local/tmp/output
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs
(rw,relatime,mode=755)
devpts on /dev/pts type devpts
(rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup
(rw,relatime,cpuacct)
/dev/block/stl6 on /mnt/.lfs type j4fs
(rw,relatime)
tmpfs on /mnt/asec type tmpfs
(rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs
(rw,relatime,mode=755,gid=1000)
tmpfs on /app-cache type tmpfs
(rw,relatime,size=12288k)
none on /dev/cpuctl type cgroup
(rw,relatime,cpu)
/dev/block/stl9 on /system type rfs
(ro,relatime,vfat,log_off,check=no,gid/
uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p2 on /data type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p3 on /preinstall type
rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/stl10 on /dbdata type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p1 on /cache type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/vold/179:9 on /mnt/sdcard
type vfat
(rw,dirsync,nosuid,nodev,noexec,noatime,
nodiratime,uid=1000,gid=1015,fmask=
0002,dmask=0002,allow_
utime=0020,codepage=cp437,iocharset=
iso8859-1,shortname=mixed,utf8,errors=
remount-ro)
/dev/block/vold/179:9 on /mnt/secure/
asec type vfat
(rw,dirsync,nosuid,nodev,noexec,noatime,
nodiratime,uid=1000,gid=1015,fmask=
0002,dmask=0002,allow_
utime=0020,codepage=cp437,iocharset=
iso8859-1,shortname=mixed,utf8,errors=
remount-ro)
tmpfs on /mnt/sdcard/.android_secure
type tmpfs
(ro,relatime,size=0k,mode=000)
Click to expand...
Click to collapse

Wifi Tether on Google store Pixel (Verizon Sim and build)

Here is what worked for me:
(I am on a Pixel from the Google store using a Verizon sim on build NDE63X / bootloader unlocked / rooted / on EX kernel)
While the phone is turned on (NOT in download mode), open minimal ADB and push these commands:
1.) adb shell
2.) su
3.) mount -o rw,remount /system_root
4.) cd /system_root/system/
5.) settings put global tether_dun_required 0
6.) echo net.tethering.noprovisioning=true >> /system_root/system/build.prop
7.) adb reboot
Also note, adb reboot command did not reboot my phone, so I did it manually and it worked out fine.
...
This works!
thanks I can confirm this works!
Not working:
C:\Users\Jordan and Nichole\Desktop\Android\sdk\platform-tools>adb shell
marlin:/ $ su
marlin:/ # mount -o rw,remount/system_root
rootfs on / type rootfs (ro,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1900840k,nr_inodes=475210,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
none on /dev/stune type cgroup (rw,relatime,schedtune)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
none on /dev/cpuset type cgroup (rw,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=1900840k,nr_inodes=475210,mode=755,gid=1000)
/dev/fuse on /mnt/runtime/default/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)
none on /config type configfs (rw,relatime)
/dev/block/sda33 on /system_root type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sda31 on /vendor type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sda25 on /firmware/radio type vfat (ro,context=ubject_r:firmware_file:s0,noatime,uid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/sda35 on /data type ext4 (rw,seclabel,nosuid,nodev,relatime,noauto_da_alloc,data=ordered)
/dev/block/sda33 on /system type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sdd3 on /persist type ext4 (rw,seclabel,nosuid,nodev,relatime,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=1900840k,nr_inodes=475210,mode=755,gid=1000)
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/loop0 on /su type ext4 (rw,seclabel,noatime,data=ordered)
marlin:/ # cd/system_root/system/
sush: cd/system_root/system/: not found
127|marlin:/ # settings put global tether_dun_required 0
marlin:/ # echo net.tethering.noprovisioning=true>>
sush: syntax error: 'newline' unexpected
1|marlin:/ # adb reboot
Any suggestions?
kirschdog1 said:
marlin:/ # cd/system_root/system/
sush: cd/system_root/system/: not found
marlin:/ # echo net.tethering.noprovisioning=true>>
sush: syntax error: 'newline' unexpected
Click to expand...
Click to collapse
You didn't do those two commands right. There should be a space between "cd" and "/" in the first one, and you forgot the stuff after the ">>" in the second one.
When I enter su it says permission denied. Please help.

Let us talk about EFS FAILURE in Galaxy S7 Edge (G935f)

I have a phone here (G935f) which has a problem in mounting the /efs, and /system
I am trying to play with it and mount those errors with adb command, after installing the TWRP I tried to observe and check the phones log.
I hope I am not wrong in mounting the efs location /dev/block/platform/155a0000.ufs/by-name/EFS at /efs
Basically this is what I have with it (with ls command)
Code:
boot property_contexts
cache recovery
charger res
data root
default.prop sbin
dev sdcard
efs seapp_contexts
etc selinux_version
external_sd sepolicy
file_contexts service_contexts
file_contexts.bak sideload
fstab.samsungexynos8890 sys
init system
init.rc tmp
init.recovery.samsungexynos8890.rc twres
init.recovery.service.rc ueventd.rc
init.recovery.usb.rc ueventd.samsungexynos8890.
license usb-otg
oem vendor
proc
When I check the efs directory its empty.
Also the mount command shows me this:
Code:
rootfs on / type rootfs (rw,seclabel,size=1676116k,nr_inodes=419029)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/sda18 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/sda18 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/sda15 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
I tried to mount it with "mount ext4 -w -t blabla", but this model of phone really hard for me to understand its system.
I hope someone outthere is willing to play me with this.
Thanks.

Access A20 System Partition via ADB

Hi,
I have a galaxy A20 with a broken screen.
I managed to boot into recovery and adb detects the device which is rooted with magisk.
But when i try the "su" command after "adb shell", it returns:
Code:
/sbin/sh: su: not found
The mount command returns:
Code:
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1392352k,nr_inodes=348088,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1392352k,nr_inodes=348088)
none on /sys/kernel/config type configfs (rw,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p28 on /cache type ext4 (rw,seclabel,relatime,i_version)
/dev/block/mmcblk0p32 on /data type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
/dev/block/mmcblk0p32 on /sdcard type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
I have to access the system partiion in order to enable USB debug by editing default.prop and /system/build.prop.
My intention is to mirror and control the phone screen from my PC.
Can anyone give me a direction?
Thanks

Resources