magisk + ssh module: /system/bin/sh: Permission denied - Magisk

now where the *beep* did this come from... I'm logging into my phone with ssh (magisk rooted, magisk sshd module installed, ssh pubkeys installed in the right places - in short "it used to work fine"), but all I get now is this output:
[email protected]:~> ssh [email protected]
X11 forwarding request failed on channel 0
/system/bin/sh: Permission denied
Connection to s8 closed.
where what why the f*ck
any ideas?

Related

[Script] App/Data Backup

Hello all,
I have updated the script further to allow for arguments to be accepted as well as having the script placed in /system/bin. This works pretty much like Titanium Backup except that it's a script and uses a CLI. No pretty GUI . You can backup, restore, and fix app and data permissions from this script. 'fix_permissions' is embedded within this script and it will be install in the /system/bin folder if the startup script does not already find it. The script does not really work like an Apps2SD other than it backs up apps from /data/app and their appropriate data folders from /data/data.
This script can be very useful when switching between ROMs as your app and data can be reinstalled with the script's restore feature.
The script currently looks for APKs to backup from /data/app, /data/app-private, and /mnt/asec.
My first creation of this script was based upon a modified version of Firerat's Apps2SD script so naturally many thanks goes to him. Also the fix_permissions script comes from Koush and the Cyanogen Team.
No EXT partition required! Just download the file and run on an Android device.
STEPS:
1. Put the attached file on your SD card and run. It will install app_backup to /system/bin. From there you can type the following to start the program:
Code:
app_backup
Here's an example of backing up a couple apps with a data backup:
Code:
C:\Users\zlippard\Documents>adb shell
# app_backup
app_backup
Welcome to AppBackup 1.1
OPTIONS
--------------------------------
'b' to backup
'r' to restore
'f' to fix all app permissions
'd' to delete app_backup folder
'x' to reboot
'q' to quit: b
b
Creating app list to /dev/applist.txt...
Done!
[1] sd com.DefiantDev.RocketBunnies
[2] sd com.rovio.angrybirds
[3] sd com.rovio.angrybirdsseasons
[4] sd sts.pl
[5] app android.tether
[6] app com.alfray.timeriffic
[7] app com.androidemu.gbalite
[8] app com.aurorasoftworks.quadrant.ui.standard
[9] app com.batterypoweredgames.lightracer3dbasic
[10] app com.bfs.papertoss
[11] app com.chase.sig.android
[12] app com.chung.compasslevel
[13] app com.citrix.Receiver
[14] app com.facebook.katana
[15] app com.faziklogic.scripter
[16] app com.fede.launcher
[17] app com.forthegamer.android.scheduler
[18] app com.google.android.apps.chrometophone
[19] app com.google.android.apps.googlevoice
[20] app com.google.android.apps.maps
[21] app com.google.android.apps.unveil
[22] app com.google.android.carhome
[23] app com.google.android.gm
[24] app com.google.android.stardroid
[25] app com.google.android.street
[26] app com.google.android.voicesearch
[27] app com.google.android.youtube
[28] app com.google.zxing.client.android
[29] app com.gravitymobile.app.hornbill
[30] app com.icenta.sudoku.ui
[31] app com.intuit.instantreturn
[32] app com.intuit.instantreturn.filing.key
[33] app com.joelapenna.foursquared
[34] app com.koushikdutta.rommanager.license
[35] app com.metago.astro
[36] app com.mhuang.overclocking
[37] app com.mobitv.client.nfl2010
[38] app com.pandora.android
[39] app com.paypal.android.p2pmobile
[40] app com.shazam.android
[41] app com.sirma.mobile.bible.android
[42] app com.southwestairlines.mobile
[43] app com.sporadicsoftware.NetQFree
[44] app com.twitter.android
[45] app com.verizon.ams.companion
[46] app com.verizon.android.wifios
[47] app com.vzw.hss.myverizon
[48] app com.zebdor.android.poolCare
[49] app net.flixster.android
[50] app net.rbgrn.lightracer
[51] app org.connectbot
[52] app org.coolcode.emuroms
[53] app ru.orangesoftware.areminder
Enter app #'s to backup or 'a' for all and press [ENTER].
Or 0 to exit (ex: 1 5 15): 1 3 4
1 3 4
Copy data? ('y' or 'n') y
y
1 of 3] - Backing up com.DefiantDev.RocketBunnies...Done!
2 of 3] - Backing up com.rovio.angrybirdsseasons...Done!
3 of 3] - Backing up sts.pl...Done!
OPTIONS
--------------------------------
'b' to backup
'r' to restore
'f' to fix all app permissions
'd' to delete app_backup folder
'x' to reboot
'q' to quit: q
q
Goodbye!
#
When starting the script, you will be brought to the main menu screen where you can choose to either backup, restore, fix permissions, delete /sdcard/app_backup (this is the storage folder), reboot or quit. The rest is pretty self explanatory...
So far I have tested this script on the DROID and DROID Incredible. The DROID was running Bugless Beast 2.2 and the Inc I've tried ran CM6 and CM7.
UPDATES:
1.4
Added "busybox " before each command call within the app_backup script to make sure busybox commands are being called.
1.3
Fixed issue with backup apps not showing up. Thanks to welcomb for notifying me.
Fixed mounting issue for ro/rw in /system
1.2
Fixed backup feature for phones that use Apps2SD. Thanks to welcomb.
Fixed deletion feature of apps and data.
1.1
Arguments: use -b to auto-run a full backup. -r will auto-run a full restore of all apps in android_app_backup
Apps and data are now stored in /sdcard/android_app_backup.
app_backup script is now automatically installed to /system/bin/app_backup when running the new script. The new script is more of an installer.
Let me know of any bugs!
Much of the credit goes to Firerat for creating the initial apps2sdext script. This is what gave me the idea to continue on with an app backup script. Here's Firerat's latest version of apps2sdext in case you want to see it or don't have an incredible: http://forum.cyanogenmod.com/topic/...mount-issues-i-hope/page__p__24386#entry24386
As the usual goes, I'm not responsible for any mishaps that may occur while using this script or bricked phones, data loss, blah blah blah... So, USE AT YOUR OWN RISK.
The script is attached below. Have fun! Please post any findings, bugs, questions, comments, or updates you would like to see here. Feel free to make any modifications to this script.
NOTE TO SAMSUNG RELAY 4G USERS:
A friend of mine has this phone and was getting the following error when running the .sh script:
Code:
can't create temporary file /sqlite_stmt_journals/mksh.<random>
To remedy this, I remounted the root directory / as read-write,created the folder /sqlite_stmt_journals, ran the .sh script, and afterwards remounted to read-only.
anyone tried this? lots of success of nexus one
For future use...
zebdor44 said:
Hello all,
I have modified my script to be more of an app & data backup utility. This works pretty much like Titanium Backup except that it's a script and uses a CLI. No pretty GUI . You can backup, restore, and fix app and data permissions from this script. 'fix_permissions' is embedded within this script and it will be install in the /system/bin folder if the app_backup.sh script does not already find it. Since this is a complete revision, I have set the version back to 1.0. The script does not really work like an Apps2SD other than it backs up apps from /data/app and their appropriate data folders from /data/data.
This script can be very useful when switching between ROMs as your app and data can be reinstalled with the script's restore feature.
The script currently looks for APKs to backup from /data/app, /data/app-private, and /mnt/asec.
<...>
Click to expand...
Click to collapse
This is SO much easier than Titanium, and I am trying to figure out how to automate backup / restore. My end goal:
Run a Nandroid
Run this script (in Backup mode)
Wipe userdata
Install Rom
Install extras (kernel, Gapps, etc)
Restore apps.
Anyone want this?
If people are interested, I may take a look into this.
Woooow, nice work man =]
I was gonna write something really simple, but you beat me to it! Thanks!
EDIT: ooppps, didn't mean that your script was simple! I meant that you beat me to an app backup script, and yours would blow mine out of the water xD
I'm a bit busy right now (haha, but not too busy to post... ), but does anyone know if this supports restoring apps only? I feel like it probably does, but can anyone confirm?
Again, this looks awesome!
Thanks guys for the comments!! Good to hear you like it
alanthemanofchicago said:
This is SO much easier than Titanium, and I am trying to figure out how to automate backup / restore. My end goal...
Click to expand...
Click to collapse
Let me try making an update.zip that'll run the script. Then you could run the update.zip in recovery mode like CWM or AmonRa.
gmichaelow said:
Woooow, nice work man =]...but does anyone know if this supports restoring apps only? I feel like it probably does, but can anyone confirm?
Click to expand...
Click to collapse
The script will restore apps and their data folders. Basically what it does is it reinstalls the app that you selected to restore and then overwrites the appropriate /data/data folder for that app with the backup.
Automating backups and restores
So it seems it may not be that easy to create an update.zip that will work properly. The script will need to mount /system, /data and /datadata to access the apks and data folders while in recovery. That's not difficult to do but apps on the sdcard under /mnt/asec may prove to be a little more difficult. I made a working update.zip that would run 'app_backup -b' to automate the process but there is no output of script so I have not posted that. The output would be kinda nice to see just so you know how far along the backup process is at.
I may need to dig deeper on the update.zip but for now check out the updates!
Thanks!
After finally getting the script into /system and running it, it doesn't work. I get the output:
Code:
[: not found
[: not found
[: not found
Ok nevermind!
Goodbye!
Using a rooted Samsung Galaxy 3. I'm still very new to custom ROMs, etc.
Hi
I get the following error when trying to backup on my Samsung Galaxy S :
data/system/packages.xml no such file or directory
Nothing to backup
What can i do?
Skele Drew said:
After finally getting the script into /system and running it, it doesn't work. I get the output:
Code:
[: not found
[: not found
[: not found
Ok nevermind!
Goodbye!
Using a rooted Samsung Galaxy 3. I'm still very new to custom ROMs, etc.
Click to expand...
Click to collapse
FadeFx said:
Hi
I get the following error when trying to backup on my Samsung Galaxy S :
data/system/packages.xml no such file or directory
Nothing to backup
What can i do?
Click to expand...
Click to collapse
Hmm... If you have Astro lookup /data/system and see if the packages.xml file exists. Better yet, if you have a terminal emulator or ADB do a
Code:
ls /data/system | grep packages.xml
and see if anything comes up. The Galaxy series should have the same file system structure as any other Android phone... What Android OS are you running?
EDIT: It looks like the Galaxy series is using 2.2... Also if one of you could do a
Code:
su
cd /
find -name packages.xml
find -name packages.list
within a terminal emulator or ADB this should show where the packages files are located. It may take a bit of time to do the search since its looking for it from /.
./dbdata/system/packages.xml
find -name packages.list does search forever it seams...
Ok I might have to update the script to look in that directory for the packages.xml file. Stay tuned! Sorry for the delay in getting back. Been pretty busy.
EDIT: Download Busybox Installer from the market (the free one) and try installing the latest busybox for your samsung phone and then try running the script again. Does the script seem to act any better? I'm thinking the :not found] issue has to do with a bad busybox and the script not finding the right commands it needs to use. Let me know how that turns out.
Remember to nandroid backup before installing the busybox just in case
Busybox version is 1.19.0 but i didn't try the script yet. Will when i come home...
FadeFx said:
Busybox version is 1.19.0 but i didn't try the script yet. Will when i come home...
Click to expand...
Click to collapse
Just curious, any luck with the busybox upgrade?
I've updated the script to version 1.3. Welcomb noticed that there was an issue with bringing up the apps when requesting a backup although I'm not sure if that will fix the issue you had Fade...
Also mounting /system to copy the script over should be fixed .
I've added this to the OP already but for those with a Samsung Relay 4G phone:
A friend of mine has this phone and was getting the following error when running the .sh script:
Code:
can't create temporary file /sqlite_stmt_journals/mksh.<random>
To remedy this, I remounted the root directory / as read-write,created the folder /sqlite_stmt_journals, ran the .sh script, and afterwards remounted to read-only.
Is this still going?
I'm getting "There is nothing to backup" in CM11. I'm on the appropriae line fo the script but I can't figure out what's wrong.
So, this is the only script I found to backup and restore app data.
Needs some changes for newer android OS
Needs a check, as out of the box toybox is used, not busybox
Mount point needs something:
As
Code:
# busybox grep /system /proc/mounts | busybox awk '{print $1}'
/dev/block/bootdevice/by-name/system
/dev/block/bootdevice/by-name/system
It is doubled.
Removing $DEVICE seems to work. I removed $DEVICE from all mount commands:
From:
Code:
$MOUNT -o remount,rw $DEVICE /system
To:
Code:
$MOUNT -o remount,rw /system
backup needs a fix for app list
$EGREP "^< seems to cause issues. I removed ^ and it worked, meaning applist success.
I was able to backup data, but the apks were missing. Maybe because it used to be app.apk now it is base.apk?
restore does not work at the moment
As applist returns empty. Checked /dev/applist.txt and it was empty for some reason.
Also, fix_permissions file not in some devices, /dev/fix_permissions not found.
Some issues:
Code:
{system("busybox cat /data/system/packages.list | busybox grep $2")}
causes errors
Some errors when creating applist, but apps are displayed afterwards. So, might be same issue as above
Code:
Creating app list to /dev/applist.txt...
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
sh: /data/system/packages.list: can't execute: Permission denied
Done!
[1] app a...
[2] app a...
[3] app c...
...
[35] app o...
[36] app o...
[37] app o...
[38] app o...
[39] app o...
[40] app x...
Last thing is that the commands used to generate applist
Code:
$ECHO "Creating app list to /dev/applist.txt..."
$CAT /data/system/packages.xml | $EGREP "<package.*serId" | $GREP -v framework-res.apk | \
$GREP -v com.htc.resources.apk | $SED 's/<package name=\"//' | $SED 's/\" codePath="/ /' | \
$SED 's/\"//g' | $SED -e 's/\/data\/app-private\//private /' | $SED 's/\/data\/app\//app /' | \
$SED 's/\/system\/app\//system /' | $SED 's/\/mnt\/asec\//sd /' | \
$AWK '{if($2 !~ /system/) printf "%10s %s %s",$2,$1,$3"\n"}' | sort | \
$AWK '(++count) {printf "%5s %7s %s %s\n","["count"]",$1,$2,$3} \
{system("$CAT /data/system/packages.list | $GREP $2")}' | $SED 's/\/data\/data\///' | \
$AWK '{printf "%5s %7s %s %s %s\n",$1,$2,$3,$4,$8}' > $applist
causes some errors, even though apps are displayed at the end:
Code:
BusyBox v1.22.1 bionic (2017-04-22 22:10 +0300) multi-call binary.
Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
Search for PATTERN in FILEs (or stdin)
-H Add 'filename:' prefix
-h Do not add 'filename:' prefix
-n Add 'line_no:' prefix
-l Show only names of files that match
-L Show only names of files that don't match
-c Show only count of matching lines
-o Show only the matching part of line
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress open and read errors
-r Recurse
-i Ignore case
-w Match whole words only
-x Match whole lines only
-F PATTERN is a literal (not regexp)
-E PATTERN is an extended regexp
-m N Match up to N times per file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Same as '-A N -B N'
-e PTRN Pattern to match
-f FILE Read pattern from file
cat: write error: Broken pipe
BusyBox v1.22.1 bionic (2017-04-22 22:10 +0300) multi-call binary.
Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
Search for PATTERN in FILEs (or stdin)
-H Add 'filename:' prefix
-h Do not add 'filename:' prefix
-n Add 'line_no:' prefix
-l Show only names of files that match
-L Show only names of files that don't match
-c Show only count of matching lines
-o Show only the matching part of line
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress open and read errors
-r Recurse
-i Ignore case
-w Match whole words only
-x Match whole lines only
-F PATTERN is a literal (not regexp)
-E PATTERN is an extended regexp
-m N Match up to N times per file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Same as '-A N -B N'
-e PTRN Pattern to match
-f FILE Read pattern from file

[Q] OpenVPN on Droid3?

I want to setup OpenVPN on my device, but the installer is saying that it needs a TAP/TUN module. After doing some research it looks like it's tun.ko that I'm looking for, but I'm not that famaliar with the android devices (this is my first droid, had it for about a month now) and would like some help or recommendations
I'm actually running an Bell branded XT860.
tun/tap is built in D3 stock kernel, so you need no module tun.ko.
Which OpenVPN Installer did you try? The app from the market? It worked fine for me, only shortcoming is the openvpn binary seems to have a bug on D3, the built-in route and ifconfig commands do not work. But no big deal for me, since I use a start script anyway and add these commands to this script.
Can you elaborate how your using the startup scripts? I'm using OpenVPN on CM7 on another device and it works well. My D3 is getting shipped to me and I'd like to also get OpenVPN running on it.
Thanks
How detailled do you need it? I can show you what I did, but you need some Linux / OpenVPN skills to alter it for your needs. Unfortunately, I currently don't have the time to write a failsave HowTo. But if you have further questions, feel free to ask.
1. remount /system read-write
2. mkdir -p /system/scripts/openvpn and copy your OpenVPN configfiles there
3. Create script /system/scripts/ovpn.sh:
#! /system/bin/sh
openvpn --cd /system/scripts/openvpn --config openvpn.conf --daemon
sleep 1
ifconfig tun0 172.31.254.10 pointopoint 172.31.254.9
/system/sbin/route add -net 10.0.0.0/8 dev tun0
exit 0
4. Make a widget with app Script Manager
5. remount /system read-only
EDIT: What I missed to mention before: I had some MTU problemes. Configuring "mssfix 1200" solved it.
So let me get this right.
I have openvpn settings and the binary installed.
config files are in /sdcard/openvpn/
both the -> swissvpn.ovpn and ca.crt
openvpn binary is in /system/xbin/openvpn
I modified script in /system/scripts/openvpn to read
openvpn.conf to swissvpn.ovpn
--------------------------------------
#! /system/bin/sh
openvpn --cd /system/scripts/openvpn --config swissvpn.ovpn --daemon
sleep 1
ifconfig tun0 172.31.254.10 pointopoint 172.31.254.9
/system/sbin/route add -net 10.0.0.0/8 dev tun0
exit 0
-----------------------------------
saved to /system/scripts/ovpn.sh
Questions
1.) Do I need to point openvpn to the config files in /system/scripts/openvpn or /sdcard/openvpn for it to work?
2.)Will this finally fix the routing problem with the browser not tunneling properly?
3.)Do I need to issue "Load tun kernel module" in "openvpn settings" or is this already solved with the stock kernel?
Regarding your first question, yes you have to, and this isn't your only mistake. You cannot just adopt my ifconfig and route settings.
OK, how could we start? I fear you are using a server-pushed configuration and I further fear this will just not work with this "broken" openvpn binary.
Could you please post your swissvpn.ovpn?
And please do the following, on command line as root:
openvpn --cd /sdcard/openvpn --config swissvpn.ovpn
... and please post the output.
output
-----------------------------------------------
export PATH=/data/local/bin:$PATH
[email protected]_solana:/$ export PATH=/data/local/bin:$PATH
[email protected]_solana:/$ su
[email protected]_solana:/# openvpn --cd /sdcard/openvpn --config swissvpn.ovpn
Tue Oct 11 17:19:08 2011 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Feb 2 2010
Enter Auth Username:
------------------------------------------
also config file swissvpn.ovpn contents
------------------------------------------
dev tun
client
proto tcp-client
remote connect-openvpn.swissvpn.net 443
ca ca.crt
auth-user-pass
reneg-sec 86400
ns-cert-type server
-----------------------------------------
I messed up on my last post.
I meant the ovpn.sh script is in /system/scripts/
the 2 config files swissvpn.opvn and ca.crt are in /system/scripts/openvpn/
The openvpn binary is in /system/xbin/openvpn/ and was installed by 'OpenVPN Installer' from the Market. "OpenVPN Settings" is the app I'm using to configure all of this.
also if I execute your ovpn.sh in script manager as root it just outputs this
--------------------------------------------
http ://oi51.tinypic.com/2n21vdx. jpg
http ://oi52.tinypic.com/2vw8bbt. jpg
http ://oi54.tinypic.com/c7vck. jpg
http ://oi52.tinypic.com/15hh4au. jpg
--------------------------------------------
You are obviously prompted for a Username. What happens when you type your username (and then password, I guess).
RE:
Well what it says in a message
this is with your script in there
Take note that I had clicked SwissVPN.ovpn
The green checkbox had turn off and displayed this message.
http ://oi52.tinypic.com/2a7cwzl.jpg
OK, it seams my workaround doesn't work for you because your ifconfig and route parameters are pushed by the server. There is more investigation needed, either in a new build of the openvpn binary or another workaround. I'll have a closer look at it, but really cannot promise you a timeline.
I was having your same problem with "FATAL:Linux ifconfig failed:could not execute external program."
There is a fix in this thread http://forum.xda-developers.com/archive/index.php/t-1074492.html
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
this will create a correct link for ifconfig and route commands
Click to expand...
Click to collapse
I've got OpenVPN to connect successfully, yet no traffic routes through VPN.
This thread discusses the issue
http://forum.xda-developers.com/archive/index.php/t-1235954.html
Someone said
I can configure tun0 and the routing table manually and successfully pass traffic through the tunnel.
Click to expand...
Click to collapse
I don't understand the configuration he posted
vpnc work well with cisco vpn
download vpnc from market. works well with cisco vpn.

[Q][DEV] system() call fail when executing native app with su permission

Hi all,
I have run into very disturbing problem when developing a native app with NDK. When my program calls system(), popen() or other function of that kind the return value of system() call is 32512 (which is 127: "command not found"). popen() does not return error code but crashes when trying to read() (returns -1). I have tested this on basic commands such as ls, ps, etc. Tried to provide a full path to the binaries as well without success.
The issue appears only when executing binary with su (I have tried interactive su, su -c and many other variations- I run it via adb shell). When calling system() without su permission then commands are executed correctly. When programmatically reading files in /system/bin (when my program is run with su) I see all files and everything is accessible.
I have verified that su is installed correctly, I can do all kind of root-only stuff without any problem. My program when executed with su permission is able to enter protected areas of Android.
I have tried to switch context without any luck. There is no interesting logcat output that could point to any permission I could allow with supolicy.
This happens on Samsung S3 i9300, S4 i9505, S5 G900F, Note3 N9005...
Happens both on SELinux enforcing and permisive.
Code:
[email protected]:/ $ su -v
2.45:SUPERSU
[email protected]:/ # id
uid=0(root) gid=0(root) context=u:r:init:s0
Any help and clues are much appreciated.
Thanks,
Piotr.
Turns out that the reason is that fork() is prohibited when executable is not located under /system. When placed binary on /system/bin everything works fine.

Supersu is still unable to access permissions after authorization

Please excuse my poor English
After HUAWEI mate10 brushes into supersu2.82 SR5,
Open supersu prompt without obtaining root permission
But use
ADB shell
$su
Stuck in here, does not appear #
If you uninstall supersu, then execute it
ADB shell
$su
#
There will be root
I'm sorry, I don't have permission to publish pictures
bbs.xxroot.com/data/download/1.jpg
bbs.xxroot.com/data/download/2.jpg
bbs.xxroot.com/data/download/3.jpg
Sorry, I can only send pictures to other forums, the above is the web site!
@Chainfire
@Chainfire
@Chainfire

tcpdump/ethtool on rooted S10

I am trying to run ethtool on a rooted Galaxy S10 but I get the following error:
Code:
beyond1:/ # ethtool -k wlan0
Cannot get driver information: Permission denied
I am already root. Do I need to enable some more permissions?
I believe this is why tcpdump is also not working:
Code:
beyond1:/ # tcpdump
tcpdump: wlan0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied

Categories

Resources