Help getting CIFS modules to load with insmod on a G920F - Galaxy S6 Q&A, Help & Troubleshooting

Hi all,
I've followed the threads at https://forum.xda-developers.com/showthread.php?t=2003836 and https://forum.xda-developers.com/showthread.php?t=2502559 to the best of my ability but can't seem to get this to work for the life of me! I'm stuck on the part where insmod is used to load the md4.ko and cifs.ko modules. I get "insmod: failed to load /system/lib/modules/<module name>: Permission denied" errors in either case.
I have ensured that I am properly rooted, BusyBox 1.26.2 is installed to /system/bin and /system is mounted as read-write. All relevant files/directories have 777 permissions and I am running these commands as root. So what else could be the problem??
I've tried this from both Terminal Emulator on the phone itself, and also from an adb shell on my PC. Can't use adb localhost on the phone as it doesn't seem to be installed (I get "sush: adb: not found" when trying to run "adb").
Curiously, running the insmod command and having it fail seems to remount /system as read-only again (prompt changes from "zeroflte:/ #" to "1|zeroflte:/ #", which it was before the first remount). Could this have anything to do with the issue?
MTIA as I've been tearing my hair out for the best part of a day trying to figure out what the %$#& I'm doing wrong!

Kernel modules needs to be compiled for the specified kernel that you are currently using on your phone. If the insmod detects that the module is not compiled for the kernel that the device currently running on, it wont allow to load them. But in that case, if I remember correctly, a different error should be shown instead of "Permission denied" error (at least it was like that on kernel 2.6.xx, may it had been changed on 3.xx).
Or with a very low chance, maybe the SELinux prevents the insmodding the modules.

forumber2 said:
Kernel modules needs to be compiled for the specified kernel that you are currently using on your phone.
Click to expand...
Click to collapse
OK, how would I go about rebuilding the kernel myself? I have TWRP installed and know how to flash the resulting image, but have no idea where to even start with kernel modification and haven't been able to find much on the subject for my specific device.
forumber2 said:
But in that case, if I remember correctly, a different error should be shown instead of "Permission denied" error (at least it was like that on kernel 2.6.xx, maybe it has been changed on 3.xx).
Click to expand...
Click to collapse
Does that mean that even if I could bypass the permission denied error, I would be likely to get other errors? If so, should I simply give up on trying to get those modules to work?
forumber2 said:
Or with a very low chance, maybe the SELinux prevents the insmodding the modules.
Click to expand...
Click to collapse
I have tried "setenforce 0" and "setenforce Permissive" just in case those commands might help, but neither one did (getenforce returned "Enforcing" after running either command as root).

Related

CIFS Manager on CM 7

Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
5. If there is problem mount it in rw mode, use option "rw,noperm" (thanks, rajeevvp)
The share is successfully mounted.
Thanks!
redhonker said:
Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
The share is successfully mounted.
The only issue I have is that it can't seem to mount a share in read-write mode even though it's shared with write permission. Does anyone know how to fix it?
Thanks!
Click to expand...
Click to collapse
After pushing the cifs module to the tablet you need to add an chmod and then you also need a insmod line every time you want to use it (at least after following a reboot).
Go back and read the instructions on droid basement. He has the details of the steps following loading the cifs.ko.
Good luck.
Sent from my ADR6300 using Tapatalk
CIFS manager already loads the module fine. Are you saying in order to mount in rw mode, it needs permission on cifs.ko file?
redhonker said:
CIFS manager already loads the module fine. Are you saying in order to mount in rw mode, it needs permission on cifs.ko file?
Click to expand...
Click to collapse
No, you don't.
CIFS Manager should have an option to do a read-write mount.
Otherwise, you can try changing the mounting back into read-write mode:
Code:
$ su
# /system/xbin/mount -w -o remount /CIFS/PATH
Replace, /CIFS/PATH with the directory you provided to CIFS Manager.
Also, understand my cautions, as mentioned in the other thread, about mixing and matching kernels and kernel modules. I would suggest that you also install the kernel that goes with the module file you downloaded--ie. get the one in the same blog post.
Appreciate your advice on not mixing kernel and modules. I could not tell which exact build CM 7 uses so I had to pick one. When I get more experienced with Android, I may start changing kernels.
Doesn't CIFS uses rw mount by default? If not, what's the option? rw? I've tried that as well.
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Thanks!
redhonker said:
Appreciate your advice on not mixing kernel and modules. I could not tell which exact build CM 7 uses so I had to pick one. When I get more experienced with Android, I may start changing kernels.
Doesn't CIFS uses rw mount by default? If not, what's the option? rw? I've tried that as well.
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Thanks!
Click to expand...
Click to collapse
Cm7 includes pershoots kernel. The gb one.
Sent from my ADR6300 using Tapatalk
not to confuse issue with whatop is having but I wonder if anyone has run into a problem with cifs in which it doesn't include all of the folders from your windows shares.
redhonker said:
Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
The share is successfully mounted.
The only issue I have is that it can't seem to mount a share in read-write mode even though it's shared with write permission. Does anyone know how to fix it?
Thanks!
Click to expand...
Click to collapse
OP,
See modified instructions from your first post. This should get you up and running.
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules/2.6.32.39-cyanogenmod/
From ADB or terminal emulator (enable SU and do not need the adb part)
adb remount
adb shell chmod 644 /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
adb shell insmod /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
3. Install CIFS Manger
4. Run CIFS Manager, add the share
I wanted to help you with this earlier but been sidetracked. I hope this helps
redhonker said:
Doesn't CIFS uses rw mount by default? If not, what's the option? rw?
Click to expand...
Click to collapse
Yes, by default it should be mounted read-write. If, for some reason, it gets mounted read-only, you can use the remount command I gave earlier to make the mount read-write again.
But, there could be other reasons for you not being able to write to the share directory. Permission and UID/GID mismatches could be one reason. Try adding the "noperm" flag to tell Linux not to check permissions locally ie. do the permission checking only on Windows:
Code:
/system/xbin/mount -t cifs //SERVER-IP-ADDRESS/SHARENAME /some/path -o rw,noperm,domain=DOMAIN,username=USER.NAME,password=PASSWORD
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Click to expand...
Click to collapse
Which system file? If you mean /etc/fstab, then that file does not exist on Android.
CIFS Manager (I haven't used it) should have an option to let you store the password securely. On normal Unix systems, the mount command accepts a "credentials=/some/file.txt" option which can be used in place of the "domain=XXX,username=YYY" options when mounting. Unfortunately, the mount command on the gTablet does not understand that option--I checked: you have to do it the old-fashioned way. You can't even skip the "password=" bit. On Unix, if you skip that, the mount command will prompt you for the password.
The solution, if you don't use CIFS Manager, is to place all the commands--the insmod and the mount--into a shell-script and give it 700 permissions. That way only the owner can see what's inside it and you can run the script after the wireless has come up.
noperm does the trick. Will update first post.
Oozura said:
From ADB or terminal emulator (enable SU and do not need the adb part)
adb remount
adb shell chmod 644 /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
adb shell insmod /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
[/B]
Click to expand...
Click to collapse
Could you explain the exact process for doing this from a terminal emulator. My main hold up is the /system directory being read only, so I can't copy the module (CIFS.KO in this case) to that directory.
h3llphyre said:
Could you explain the exact process for doing this from a terminal emulator. My main hold up is the /system directory being read only, so I can't copy the module (CIFS.KO in this case) to that directory.
Click to expand...
Click to collapse
You don't need to put cifs.ko into /system. If CIFS Manager asks for the path to a cifs.ko file, then you can put the file anywhere you want.
I have a new problem. There seems to be a limit on the file size. I have a 3 GB file shows up as 28 KB. Does anyone have success with large file? Thanks
I tried your instruction... there are two problems...(my rom is also cm7.0.3)
1. I can't put the cifs.ko into /system/lib/modules~ it seems that it is forbid to copy some files into system folder...
2. so I tried to put the cifs.ko in the /mnt/cifs.ko, and made the related setting in cifs manager(path to cifs.ko), then i mounted, but it showed that:"no route to host"
but i am sure that my ip and password is correct... so is there anyone know how to solve this problem?
I used Root Explorer. I am sure there are other means to put it under /system. I am not sure if that's necessary
savage0 said:
I tried your instruction... there are two problems...(my rom is also cm7.0.3)
1. I can't put the cifs.ko into /system/lib/modules~ it seems that it is forbid to copy some files into system folder...
2. so I tried to put the cifs.ko in the /mnt/cifs.ko, and made the related setting in cifs manager(path to cifs.ko), then i mounted, but it showed that:"no route to host"
but i am sure that my ip and password is correct... so is there anyone know how to solve this problem?
Click to expand...
Click to collapse
I literally just went through this today. Download Terminal Emulator (free on the market).
PS: Don't type the '#' sign below.
#su
#/system/xbin/mount -w -o remount /system
#cp /SDCARD/cifs.ko /system/lib/modules/2.6.32.41-cyanogenmod/
#/system/xbin/mount -r -o remount /system
Then, just add the path /system/lib/modules/2.6.32.41-cyanogenmod/ into CIFS Manager. Should be all set.
redhonker said:
I have a new problem. There seems to be a limit on the file size. I have a 3 GB file shows up as 28 KB. Does anyone have success with large file? Thanks
Click to expand...
Click to collapse
File size limits depend on the underlying filesystem.
I tried the following command on an external NTFS formatted USB HDD connected to a Linux desktop mounted on the gTablet at /mnt/usbdisk via CIFS, and had no problems.
Code:
# ls -l /mnt/usbdisk/rvp/bak/hda3.img
-rw-rw-rw- 1 root root 8011422720 Apr 17 2010 /mnt/usbdisk/rvp/bak/hda3.img
# dd if=/mnt/usbdisk/rvp/bak/hda3.img of=/dev/null bs=1M skip=7500
140+1 records in
140+1 records out
147102720 bytes (140.3MB) copied, 150.135761 seconds, 956.8KB/s
The command skips the initial 7.5 GB of a 8,011,422,720 byte file and reads the rest (~140 MB).
rob_z11 said:
not to confuse issue with whatop is having but I wonder if anyone has run into a problem with cifs in which it doesn't include all of the folders from your windows shares.
Click to expand...
Click to collapse
I had the same issue, but I found the guide on abettergeek which helped me fix it. Turns out the problem is that the mount point created by Cifs Manager doesn't have execute permissions.
I don't have enough seniority to post the link, but it's a recent post on abettergeek.com. If someone with enough seniority wants to paste it, some others may find it extremely helpful.
archmcd said:
I had the same issue, but I found the guide on abettergeek which helped me fix it. Turns out the problem is that the mount point created by Cifs Manager doesn't have execute permissions.
I don't have enough seniority to post the link, but it's a recent post on abettergeek.com. If someone with enough seniority wants to paste it, some others may find it extremely helpful.
Click to expand...
Click to collapse
The link I believe you are refering to is here: http://blog.abettergeek.com/hardwar...n-cyanogenmod-7-0-3-on-the-viewsonic-gtablet/
I have the same issue. I haven't tried this fix yet, but I will give it a go.
ByteWrencher
Pls, where I can put "rw,noperm" in cifs manager? I tried in module path as:
/system/lib/modules/slow-work.ko:/system/lib/modules/cifs.ko rw,noperm
And:
/system/lib/modules/slow-work.ko:/system/lib/modules/cifs.ko:rw,noperm
But still don't working as rw.
Ty.

[Q] [OUYA] SuperUser Access Help

Hi everyone, I'm trying to Install busybox,SuperUser and SU Binaries on my OUYA ...
I Have:
-ADB set up and working(wired)
-Downloded and unzipped the needed files
-Placed unzipped files in /android-sdk/platform-tools
Then i run the following commands to make sure my console is connected:
-adb kill-server
-echo 0x2836
-adb start-server
-adb devices
After 'adb devices' I see a number(My console #), which signifies my connected console...
Then i run the following commands to put SU in the proper place:
-adb shell
-su
-mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
-exit
-exit
-adb push su /sdcard/su<-----here is where i get an error (cannot stat 'su': No Such Files Or Directory :crying What am i doing wrong here/ i don't get it!...Can anyone please help me?
cronikman84 said:
Hi everyone, I'm trying to Install busybox,SuperUser and SU Binaries on my OUYA ...
I Have:
-ADB set up and working(wired)
-Downloded and unzipped the needed files
-Placed unzipped files in /android-sdk/platform-tools
Then i run the following commands to make sure my console is connected:
-adb kill-server
-echo 0x2836
-adb start-server
-adb devices
After 'adb devices' I see a number(My console #), which signifies my connected console...
Then i run the following commands to put SU in the proper place:
-adb shell
-su
-mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
-exit
-exit
-adb push su /sdcard/su<-----here is where i get an error (cannot stat 'su': No Such Files Or Directory :crying What am i doing wrong here/ i don't get it!...Can anyone please help me?
Click to expand...
Click to collapse
:good:never mind i figured it out...but when i go to Run SuperUser on the OUYA (Make > Software > SuperUser) and allow it to update, it gives me an error saying---->there was an error installing superuser. please send a log of the error to the developer. what now?
cronikman84 said:
:good:never mind i figured it out...but when i go to Run SuperUser on the OUYA (Make > Software > SuperUser) and allow it to update, it gives me an error saying---->there was an error installing superuser. please send a log of the error to the developer. what now?
Click to expand...
Click to collapse
Never mind LMAO...i got it :victory:
cronikman84 said:
Never mind LMAO...i got it :victory:
Click to expand...
Click to collapse
How'd you get it?! I'm stuck here too, thanks!
thanamesjames said:
How'd you get it?! I'm stuck here too, thanks!
Click to expand...
Click to collapse
Are you stuck at the error saying---->"there was an error installing superuser" still? cause if you are i think i can help you..., just on your ouya head over to MANAGE-SYSTEM-ADVANCED and scroll down to apps and delete the BUSYBOX FREE and SUPERUSER APPS...after that's done just repeat the commands again and reboot the system, then go click on MAKE>SOFTWARE>SUPERUSER and allow it to UPDATE but not from recovery and if that doesn't work let me know and ill tell you what to do next...BUT if your stuck at "adb push su /sdcard/su cannot stat 'su': No Such Files Or Directory" error then i can also help you...let me know, it's very simple, less than a minute
cronikman84 said:
Are you stuck at the error saying---->"there was an error installing superuser" still? cause if you are i think i can help you..., just on your ouya head over to MANAGE-SYSTEM-ADVANCED and scroll down to apps and delete the BUSYBOX FREE and SUPERUSER APPS...after that's done just repeat the commands again and reboot the system, then go click on MAKE>SOFTWARE>SUPERUSER and allow it to UPDATE but not from recovery and if that doesn't work let me know and ill tell you what to do next...BUT if your stuck at "adb push su /sdcard/su cannot stat 'su': No Such Files Or Directory" error then i can also help you...let me know, it's very simple, less than a minute
Click to expand...
Click to collapse
Hi,
I'm at the point where I've installed 'superuser' apk via adb. I've rebooted the console, gone to MAKE>SOFTWARE>SUPERUSER but when I click on 'install', I just get the error message: "There was an error installing Superuser. Please send a log to the error to the developer" but there are no logs.
Any ideas?
diazamet said:
Hi,
I'm at the point where I've installed 'superuser' apk via adb. I've rebooted the console, gone to MAKE>SOFTWARE>SUPERUSER but when I click on 'install', I just get the error message: "There was an error installing Superuser. Please send a log to the error to the developer" but there are no logs.
Any ideas?
Click to expand...
Click to collapse
yes, the best way to do it is with this tool OUYA toolbox and you can find it over here-----> http://forum.xda-developers.com/showthread.php?t=2350900 follow the instructions plug in your OUYA to your pc and download the test version of the tool, open it, click on install superuser and install it, then istall busybox and install it...then go to make- software-superuser and Update but not from recovery, then plug you OUYA back on to the pc and run the ouya toolbox program again and root(if you want to), you will be all set with SuperUser apk and busybox apk and root working perfect with no errors...
cronikman84 said:
yes, the best way to do it is with this tool OUYA toolbox and you can find it over here-----> http://forum.xda-developers.com/showthread.php?t=2350900 follow the instructions plug in your OUYA to your pc and download the test version of the tool, open it, click on install superuser and install it, then istall busybox and install it...then go to make- software-superuser and Update but not from recovery, then plug you OUYA back on to the pc and run the ouya toolbox program again and root(if you want to), you will be all set with SuperUser apk and busybox apk and root working perfect with no errors...
Click to expand...
Click to collapse
I think I might have found the issue. I think I forgot to copy the 'su' executable from /sdcard to /system/xbin. I've copied the correct 'su' executable to /system/xbin now. I'll have to test it later, I'm connected remotely at the moment so I can only do the shell stuff, I can't run Superuser.
What is the difference between the nativesu and the su copied from the attachment on this thread. There is a significant difference in size. Is the native su crippled in someway?
diazamet said:
I think I might have found the issue. I think I forgot to copy the 'su' executable from /sdcard to /system/xbin. I've copied the correct 'su' executable to /system/xbin now. I'll have to test it later, I'm connected remotely at the moment so I can only do the shell stuff, I can't run Superuser.
What is the difference between the nativesu and the su copied from the attachment on this thread. There is a significant difference in size. Is the native su crippled in someway?
Click to expand...
Click to collapse
:good: i hope you found the issue...i was having the same issue as you "There was an error installing Superuser. Please send a log to the error to the developer" and no matter what i tried it wouldn't work, so i just downloaded the OUYA toolbox test version and it took me less then 1 minutes to have superuser apk and busybox apk running and rooted, i didn't know you were connected remotely, i had mines connected straight up with the usb cable and it makes it easier for me..."What is the difference between the nativesu and the su copied from the attachment on this thread. There is a significant difference in size. Is the native su crippled in someway?" <----yes, i'm 90% sure that the native SU is crippled in some type of way, and i've heard other people confirm this.
cronikman84 said:
:good: i hope you found the issue...i was having the same issue as you "There was an error installing Superuser. Please send a log to the error to the developer" and no matter what i tried it wouldn't work, so i just downloaded the OUYA toolbox test version and it took me less then 1 minutes to have superuser apk and busybox apk running and rooted, i didn't know you were connected remotely, i had mines connected straight up with the usb cable and it makes it easier for me..."What is the difference between the nativesu and the su copied from the attachment on this thread. There is a significant difference in size. Is the native su crippled in someway?" <----yes, i'm 90% sure that the native SU is crippled in some type of way, and i've heard other people confirm this.
Click to expand...
Click to collapse
Yep. That was the problem. I guess I thought I'd copied the correct version of 'su' across without checking properly.
diazamet said:
Yep. That was the problem. I guess I thought I'd copied the correct version of 'su' across without checking properly.
Click to expand...
Click to collapse
Sweet!!...glad you got it fixed... I knew that the native SU was crippled the first time i tried it...that's why i tried the OUYA toolbox cause i knew people had success with SU on that toolbox, so i gave it a try and SU was workin...tha's how i knew something was wrong with the native SU...

[Q] Has anyone successfully run Complete Linux Installer (or similar)

Hi everyone, I'm trying to get a full blown GNU distro of Linux running on my note pro but I've hit a snag. It seems like the device should support it, but every time I try to run a script that creates loopback devices, mounts directories, etc. I get permission errors even though I definitely have root.
Here's where it gets weird. Completel Linux installer fails when it tries to run this command:
Code:
mknod /dev/block/loop255 b 7 255
and it gives this error:
Code:
mknod: /dev/block/loop255: Operation not permitted
Despite what the error says, the script is being run as root. The app automatically opens the terminal and runs the command as root, but I also tried manually executing su and running the same script but the same error occurs.
As an experiment, I tried manually running just that one mknod commad and it works fine. In fact, if I manually execute every line in the bootscript.sh file it all seems to execute perfectly fine. But if I put the exact same mknod command into a .sh file and execute it like this:
Code:
> sh test.sh
Then it gives the same error. Interestingly, if I directly run mknod as a non-root user it does not give me the "Operation not permitted" error, instead it says "Permission denied". I tried some other apps like Debian Kit as well and they seem to give the same error.
Any ideas why it would matter whether I manually enter a command into the terminal or whether I execute the same command indirectly from a file? I tried other terminal apps as well and it made no difference.
Thanks.
Graeme H said:
Hi everyone, I'm trying to get a full blown GNU distro of Linux running on my note pro but I've hit a snag. It seems like the device should support it, but every time I try to run a script that creates loopback devices, mounts directories, etc. I get permission errors even though I definitely have root.
Here's where it gets weird. Completel Linux installer fails when it tries to run this command:
Code:
mknod /dev/block/loop255 b 7 255
and it gives this error:
Code:
mknod: /dev/block/loop255: Operation not permitted
Despite what the error says, the script is being run as root. The app automatically opens the terminal and runs the command as root, but I also tried manually executing su and running the same script but the same error occurs.
As an experiment, I tried manually running just that one mknod commad and it works fine. In fact, if I manually execute every line in the bootscript.sh file it all seems to execute perfectly fine. But if I put the exact same mknod command into a .sh file and execute it like this:
Code:
> sh test.sh
Then it gives the same error. Interestingly, if I directly run mknod as a non-root user it does not give me the "Operation not permitted" error, instead it says "Permission denied". I tried some other apps like Debian Kit as well and they seem to give the same error.
Any ideas why it would matter whether I manually enter a command into the terminal or whether I execute the same command indirectly from a file? I tried other terminal apps as well and it made no difference.
Thanks.
Click to expand...
Click to collapse
try source the script ,eg: . test.sh, this works but i don't know why.
Good idea pheyx! That's a great workaround which basically solves my problem for now... or at least sends me on to the next problem
Thanks for you help.
Graeme H said:
Good idea pheyx! That's a great workaround which basically solves my problem for now... or at least sends me on to the next problem
Thanks for you help.
Click to expand...
Click to collapse
I think I've found the reason. It's due to selinux. The selinux is set to enforced on android from 4.4. I flashed a kernel that sets selinux to permissive and it resolved the issue. Now the complete linux installer ran perfectly without modifying the scripts.
pheyx said:
I think I've found the reason. It's due to selinux. The selinux is set to enforced on android from 4.4. I flashed a kernel that sets selinux to permissive and it resolved the issue. Now the complete linux installer ran perfectly without modifying the scripts.
Click to expand...
Click to collapse
how well is Linux running on it for you?
Sent from my SM-P900 using XDA Premium HD app
Yeah, how well is it running?
I guess it's out of the question both due to speed (Complete Linux Installer uses laggy VNC remote desktop) and hardware (I guess the stylus won't work pressure-sensitive-ish due to VNC), but I'd love to run MyPaint on NotePRO.
Duly.noted said:
how well is Linux running on it for you?
Sent from my SM-P900 using XDA Premium HD app
Click to expand...
Click to collapse
Redsandro said:
Yeah, how well is it running?
I guess it's out of the question both due to speed (Complete Linux Installer uses laggy VNC remote desktop) and hardware (I guess the stylus won't work pressure-sensitive-ish due to VNC), but I'd love to run MyPaint on NotePRO.
Click to expand...
Click to collapse
X Window performance is bad if using VNC, is better when using xsdl x server. Also can use fbdev(or fbturbo) native x server(and the cons is in either case must shutdown android stack),but I have no success using these two linux native x server

permission denied writing to LUN/file error as root?

Hope I am putting this in the correct section, but I am looking for some technical help.
I am running the latest global stable rom (8.2.2.0), have the bootloader unlocked and it is rooted.
What I am trying to do is write to the file:
/sys/class/android_usb/android0/f_mass_storage/lun/file
but when I try to echo into the file, I get error 1. Running that through toybox or busybox gives a better error of permission denied. I changed the permissions to 777 on the file (to open it up completely) and same thing. I tried changing the owner of the file to root:root and that was successful, but still couldn't write to that file.
My goal is to re-enable mass storage via a shell script, but writing to that file is part of the process. Any thoughts as I am currently stumped. My best guess is that I need to modify the file /init.usb.rc but that requires making a custom kernel and ROM which is currently beyond my abilities.
So, quick update on this... was reading online that I'd need to remove the immutable flag on the file but it seems that file doesn't support chattr or lsattr.
The whole folder path doesn't support lsattr or chattr. Tried from recovery and same thing.
Still thinking about this but I am getting more and more stumped. Any developers or linux experts have any thoughts?
lsattr and chattr both throw the error "not a typewriter". Was thinking that maybe my busybox is out of date... going to try updating it and see if that helps.
Update 2 - updating busybox changed the "not a typewriter" error to an invalid ioctl error.
So, from what I can tell, this basically means that lsattr and chattr don't work on the sysfs file system type. And since the file doesn't allow you to add anything to it, mass storage on this phone (with the global stable ROM) is not possible.

Questions for disable verity

Hello,
I have rooted my pixel 3 by using Magisk,
my version is still Android pie,
it has successfully rooted but then when I type "adb root" it returns adbd cannot run as root in production builds,
I found out it might because I need to disable the verity, but when I type adb disable-verity it shows "verity cannot be disabled/enabled - USER build",
I have tried to follow the steps from https://android.stackexchange.com/q...dm-verity-on-android-with-user-build-type-rom but I don't quite understand how to do it,
I was wondering if anyone have more specific steps that will be able to disable the verity.
Thanks!
Skylar514 said:
Hello,
I have rooted my pixel 3 by using Magisk,
my version is still Android pie,
it has successfully rooted but then when I type "adb root" it returns adbd cannot run as root in production builds,
I found out it might because I need to disable the verity, but when I type adb disable-verity it shows "verity cannot be disabled/enabled - USER build",
I have tried to follow the steps from https://android.stackexchange.com/q...dm-verity-on-android-with-user-build-type-rom but I don't quite understand how to do it,
I was wondering if anyone have more specific steps that will be able to disable the verity.
Thanks!
Click to expand...
Click to collapse
In magisk advanced settings untick preserve adb verity and reinstall.
wangdaning said:
In magisk advanced settings untick preserve adb verity and reinstall.
Click to expand...
Click to collapse
Hello,
Thank you for your respond.
I have done that and it still doesnt let me disable the verity.
Is there any other way I can disable the verity?
Thanks!
Skylar514 said:
Hello,
Thank you for your respond.
I have done that and it still doesnt let me disable the verity.
Is there any other way I can disable the verity?
Thanks!
Click to expand...
Click to collapse
Use proton kernel!
pheco said:
Use proton kernel!
Click to expand...
Click to collapse
Hello,
I just installed the proton kernel,
and I checked my kernel version it is "Linux version 4.9.191-Proton-v19-g225054cc ([email protected]) (GCC 9.1.0) #20 SMP PREEMPT Sun Sep 8 21:50:57 PDT 2019",
but when I tried adb dm-verity it still shows verity cannot be disabled/enabled - USER build.
I was wondering if you have any idea?
Thank you.
I think you might have to do it to both slots. If it is still enabled on one of them I think it still checks.
Hello,
I upgrade my phone to android 10, and I can't flash the proton kernel,
I have done it to both slots and its still unable to disable.
Any idea?
Thank you!
Skylar514 said:
Hello,
I upgrade my phone to android 10, and I can't flash the proton kernel,
I have done it to both slots and its still unable to disable.
Any idea?
Thank you!
Click to expand...
Click to collapse
As far as I know you cannot do it in 10. I have never updated and tried, but that is what I have heard. There is no way to modify system except systemlessly with magisk modules. What exactly are you trying to do, might help get more suggestions if you tell us.
wangdaning said:
As far as I know you cannot do it in 10. I have never updated and tried, but that is what I have heard. There is no way to modify system except systemlessly with magisk modules. What exactly are you trying to do, might help get more suggestions if you tell us.
Click to expand...
Click to collapse
I am trying to run python script on the phone, so I have found this website https://medium.com/swlh/python-on-android-root-4aa56f22070a
and I was trying to follow the step to install python on the phone, but I am stuck at the adb remount command step.
It shows that I need to type adb root, but when I typed adb root it shows "adbd cannot run as root in production builds",
and I have try mount -o rw,remount /system, it gave me error "mount: '/system' not in /proc/mounts".
I checked mount and for some reason it shows system_root instead of system for "/sbin/.magisk/block/system_root on /sbin/.magisk/mirror/system_root type ext4 (ro,seclabel,relatime,block_validity,delalloc,barrier,user_xattr)", so I did some research and found out that I need to disable the verity, but when I tried to disable it it gave me the error which is "verity cannot be disabled/enabled - USER build".
Skylar514 said:
I am trying to run python script on the phone, so I have found this website https://medium.com/swlh/python-on-android-root-4aa56f22070a
and I was trying to follow the step to install python on the phone, but I am stuck at the adb remount command step.
It shows that I need to type adb root, but when I typed adb root it shows "adbd cannot run as root in production builds",
and I have try mount -o rw,remount /system, it gave me error "mount: '/system' not in /proc/mounts".
I checked mount and for some reason it shows system_root instead of system for "/sbin/.magisk/block/system_root on /sbin/.magisk/mirror/system_root type ext4 (ro,seclabel,relatime,block_validity,delalloc,barrier,user_xattr)", so I did some research and found out that I need to disable the verity, but when I tried to disable it it gave me the error which is "verity cannot be disabled/enabled - USER build".
Click to expand...
Click to collapse
System partition is under /system_root on Pie. I wonder if you could create a magisk module to install the app systemlessly.
wangdaning said:
System partition is under /system_root on Pie. I wonder if you could create a magisk module to install the app systemlessly.
Click to expand...
Click to collapse
Hi,
So now I am trying to unpack the boot.img file that I downloaded from google firmware website in order to try the method that provided by https://android.stackexchange.com/q...dm-verity-on-android-with-user-build-type-rom.
But I was wondering instead of editing boot.img, should I just edit the magisk_patched.img?
Thanks!
Skylar514 said:
Hi,
So now I am trying to unpack the boot.img file that I downloaded from google firmware website in order to try the method that provided by https://android.stackexchange.com/q...dm-verity-on-android-with-user-build-type-rom.
But I was wondering instead of editing boot.img, should I just edit the magisk_patched.img?
Thanks!
Click to expand...
Click to collapse
You are going to need root so better to modify the magisk boot image.
wangdaning said:
You are going to need root so better to modify the magisk boot image.
Click to expand...
Click to collapse
Hello,
Thank you for your respond!
Do I need to modify boot.img as well?
Or just the magisk_patched.img?
Thank you!
I think there is a way to disable verity before installing the magisk boot img, but you would have to look at the magisk github information.
Sounds good!
Thanks for your advice!
Beside that I was wondering if you know that is there anyway we can access the battery data through abd command?
I know that we can gather cpu frequency info, but I am not sure if we can get the battery data as well.
Thanks in advance!
Maybe check this thread about battery
https://forum.xda-developers.com/pixel-3-xl/themes/looking-mod-to-make-battery-indicator-t3913080

Categories

Resources