2
Use cmd notification:
cmd notification post [flags] <tag> <text>
If you are root notification will not be displayed:
su -lp 2000 -c "cmd notification post -S bigtext -t 'Title' 'Tag' 'Multiline text'"
1
Shutdown as a command requires root
The simple answer is you can't perform a shell command from within an app for shutdown an Android system unless your device is rooted.
For performing the shutdown command on Android special permissions are required. When triggering a shutdown via UI the command is internally forwarded to a component that has the ...
1
First on Android each app has an own user-id/account, hence u0_a312is the user of the app that runs the ssh server. Regular Linux user accounts like myuser don't exist on Android.
Based on the path /storage/6632-6330/ I would assume that you are trying to access the external sd-card.
On a non-rooted device write access to ext-sd is not possible on Android ...
1
Don't ever copy files out of /sdcard/, for this task you should leave the files where they are. In order to copy files using SimpleSSHD, simply connect and copy: assuming you've left the default port of 2222 you can do this,
SCP File Transfer
host=192.168.1.228
scp -r "scp://root@${host}:2222//sdcard/DCIM/OpenCamera" .
RSYNC over SSH File Transfer
...
1
For me with an Android 4 device reboot doesn’t have a -p option, but there’s an alternative:
su -c "am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN"
This is what’s used by Android as well, see AndroidManifest.xml.
If you want to perform a more graceful shutdown broadcast ACTION_SHUTDOWN first, e.g.:
su -c "am broadcast android.intent.action....
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
ssh × 169terminal × 14
root-access × 13
linux × 11
networking × 11
adb × 10
wi-fi × 10
shell × 10
remote-control × 10
remote-access × 9
command-line × 8
cyanogenmod × 7
file-transfer × 7
rsync × 6
security × 5
vpn × 5
dns × 5
external-sd × 4
proxy × 4
applications × 3
sync × 3
4.2-jelly-bean × 3
permissions × 3
wifi-hotspot × 3
file-permissions × 3