starting sshelper in the background/without mainwindow via am

Post your questions and help other users.

Moderator: Martin

Post Reply
heliosone
Posts: 39
Joined: 26 Mar 2016 08:39

starting sshelper in the background/without mainwindow via am

Post by heliosone » 24 Apr 2019 06:28

Im trying to start this app hidden/background without the apperance of its main window.
It features a start@boot option,but I dont want it to be active all the time.
So I tried to figure out a way to start it manually without the main window.
broadcast BOOT_COMPLETED ,doesnt work :(
I tried "start service" and a few combinations what I found in its manifest file,but I dont think I used that properly,no expert in this area :(

help would be appreciated !
thanks in advance

PS: IM using 8.1 @miMAX3,latest automagic premium
Attachments
AndroidManifest.xml
(5.21 KiB) Downloaded 49 times

User avatar
Desmanto
Posts: 2076
Joined: 21 Jul 2017 17:50

Re: starting sshelper in the background/without mainwindow via am

Post by Desmanto » 24 Apr 2019 17:54

Most app doesn't exposed the start background activity to 3rd party app. If the app support broadcast receiver and can start background from there, you can try to use that. Of course, you most likely need to contact the dev for the detail. Such as MiXplorer, support broadcast receiver, where we can use it to copy file from certain location to another, including network folder.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

heliosone
Posts: 39
Joined: 26 Mar 2016 08:39

Re: starting sshelper in the background/without mainwindow via am

Post by heliosone » 25 Apr 2019 13:53

thanks for your help!
Sadly there is only a main activity available,and the only receiver is boot_completed,and it doesnt react if I send the boot_completed broadcast via am :(
And on top.. I cant reach the developer.
So Im stuck with the main window/1sec wait & gui(back) for an automated start !
It works but it isnt pretty.. and we all do love pretty things :)

User avatar
Desmanto
Posts: 2076
Joined: 21 Jul 2017 17:50

Re: starting sshelper in the background/without mainwindow via am

Post by Desmanto » 25 Apr 2019 17:48

Do you have root? AFAIK, to send boot complete broadcast will require at least adb shell privellege, or root at the phone. You can try to send the broadcast only to that specific apps, using adb shell

Code: Select all

adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -p com.example.package
If you have root, you can try action execute root command

Code: Select all

am broadcast -a android.intent.action.BOOT_COMPLETED -p com.example.package
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

heliosone
Posts: 39
Joined: 26 Mar 2016 08:39

Re: starting sshelper in the background/without mainwindow via am

Post by heliosone » 26 Apr 2019 14:25

Yeah sure I do have root / and I tried that,and when I check for running processes,I can see sshelper running,but its only in the process list,not actually running (there should be a notification / also the ssh login isnt possible).
I guess I will stick to the normalstart/hide window way for the time being
but thanks anyways !

Post Reply