Kill Apps after they've started

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
seven__
Posts: 12
Joined: 15 Jan 2017 11:38
Location: Hamburg

Kill Apps after they've started

Post by seven__ » 11 Aug 2017 21:11

Hi,
i have an ANDROID TV. On this TV is an app wich is called UpgradeServiceApp.
This app causes a pop up from time to time wich tells me that there is an Android update and that i should install it.

What i want is that if the UpgradeServiceApp gets started,
Automagic should kill this app.

How would you do that?

*I dont have root
*Im on Android 5
*If you have an Android TV dont install Android 6 -.-

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Kill Apps after they've started

Post by bogdyro » 12 Aug 2017 07:52

With the help of accessibility can't you detect the window when it opens and push a button to close it?
Or kill the app when it runs in the background. That works without root

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

Re: Kill Apps after they've started

Post by Desmanto » 12 Aug 2017 13:52

It will be cat and mouse situation. Probably will slow down your Android TV.

I know my answer below will be out of topic. But since you ask in automagic forum, I think you maybe so desperate finding solution in other places, until you need to ask here.

If you really wanna disable the UpgradeServiceApp, you can partially uninstall it. No root is needed, but adb and PC is a must. Follow the instruction at xda.

First, you have to find the package name of the UpgradeServiceApp. You can use automagic actiton launch app, and find it, choose it. Copy the package name. Enable USB debugging of your android TV and connect it to PC. Use adb and type

Code: Select all

pm uninstall -k --user 0 <name of package>
where <name of package>, replace it with the name you found using launch app.

After uninstall, this app will never be activated again. There is no way to reinstall it anymore, until you do factory reset. So the risk is just up to factory reset only. No root/modification is made to the system. You can read more at the xda link for more information. We use this at our forum, to uninstall the built-in malware which can't be uninstalled/disabled normally without root.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
seven__
Posts: 12
Joined: 15 Jan 2017 11:38
Location: Hamburg

Re: Kill Apps after they've started

Post by seven__ » 13 Aug 2017 07:54

Thanks for your replies guys.
Im connected via ADB now (over LAN, not USB) and when i enter the command pm uninstall -k --user 0 org.droidtv.tv.upg the ADB
console tells me that there is no pm command :S

EDIT:
Ok, it worked now.
The correct/full command was adb shell pm uninstall -k --user 0 org.droidtv.tv.upg

Thank you!

EDIT:
One more question!
The TV has a function wich annoys me badly. I have a home button on my remote. When i press him i get to the apps menue.
But when i was watching TV the channel is still running in the background of the app menue (that slows the navigation in the apps menue down).
I believe that this "feature" is not good.

What package could cause that the channel is displayed in the background?

package:org.droidtv.factthreed
package:com.google.android.apps.mediashell
package:com.google.android.katniss
package:com.android.providers.telephony
package:org.droidtv.facebookshare
package:org.droidtv.settings
package:org.droidtv.DummyWakeUpActivity
package:org.droidtv.devicesetup
package:com.android.providers.calendar
package:com.android.tv.settings
package:org.droidtv.factory
package:com.android.providers.media
package:com.ghisler.tcplugins.drive
package:org.droidtv.nettvadvert
package:com.teamviewer.quicksupport.addon.tpvision2k16_v2
package:com.google.android.onetimeinitializer
package:com.mxtech.videoplayer.pro
package:com.android.wallpapercropper
package:org.droidtv.demome
package:org.droidtv.tvcontentprovider
package:org.droidtv.tunerservice
package:com.android.documentsui
package:com.android.externalstorage
package:com.android.htmlviewer
package:com.ghisler.android.TotalCommander
package:com.android.mms.service
package:org.droidtv.leanbackcustomizer
package:com.android.providers.downloads
package:com.android.providers.tv
package:com.google.android.pano.packageinstaller
package:org.droidtv.twittershare
package:org.droidtv.zapster
package:org.droidtv.tv.upg
package:com.google.android.tungsten.setupwraith
package:org.droidtv.nettvbrowser
package:org.droidtv.contentexplorer
package:org.droidtv.tv.permissions
package:com.mxtech.ffmpeg.v7_neon
package:com.android.inputmethod.pinyin
package:com.android.defcontainer
package:org.droidtv.ui.strings
package:com.android.providers.downloads.ui
package:com.android.vending
package:com.android.pacprocessor
package:org.droidtv.weatherwidget
package:org.droidtv.alhuewizard
package:com.android.certinstaller
package:android
package:com.android.camera2
package:com.google.android.tv.remote
package:com.google.android.speech.pumpkin
package:com.android.backupconfirm
package:org.droidtv.nettvrecommender
package:com.ghisler.tcplugins.LAN
package:com.google.android.tv
package:org.droidtv.ci
package:org.droidtv.nettvapps
package:org.droidtv.teletext
package:com.google.android.gsf.notouch
package:com.android.providers.settings
package:com.android.sharedstoragebackup
package:com.google.android.music
package:org.droidtv.nettv.market
package:org.droidtv.factorymonitor
package:com.android.printspooler
package:org.droidtv.dlna
package:org.droidtv.mheg
package:com.android.dreams.basic
package:com.android.inputdevices
package:org.droidtv.GlobalKey
package:com.android.musicfx
package:com.theolivetree.ftpserverprotv
package:com.ttxapps.wifiadb
package:com.google.android.webview
package:com.android.onetimeinitializer
package:com.android.server.telecom
package:com.google.android.syncadapters.contacts
package:com.android.keychain
package:com.google.android.gms
package:com.google.android.gsf
package:com.google.android.sss
package:com.google.android.tts
package:tv.twitch.android.app
package:com.google.android.partnersetup
package:org.droidtv.nettvregistration
package:com.android.packageinstaller
package:com.google.android.videos
package:com.android.proxyhandler
package:com.android.inputmethod.latin
package:com.google.android.feedback
package:com.google.android.syncadapters.calendar
package:com.android.managedprovisioning
package:org.droidtv.factimageview
package:org.droidtv.networkwizard
package:com.android.smspush
package:org.droidtv.dms
package:org.droidtv.eum
package:org.droidtv.icp
package:org.droidtv.oad
package:org.droidtv.xtv
package:org.droidtv.menudataapp
package:org.droidtv.nettv_launcherapp
package:org.droidtv.componentService
package:org.droidtv.ui.tvwidget2k15
package:com.teamviewer.quicksupport.market
package:com.google.android.leanbacklauncher
package:com.google.android.backuptransport
package:org.droidtv.ambihuecommon
package:jp.co.omronsoft.openwnn
package:com.android.settings
package:org.droidtv.dropboxprovider
package:net.selfip.unet.developer_options
package:org.droidtv.usagelogger
package:com.android.calculator2
package:za.co.henry.hsu.adbwirelessbyhenry
package:com.google.android.sss.authbridge
package:com.mediatek.wificert
package:com.google.android.tv.voiceinput
package:com.google.android.youtube.tv
package:ch.gridvision.ppam.androidautomagic
package:com.android.vpndialogs
package:com.google.android.tv.frameworkpackagestubs
package:com.android.phone
package:com.android.shell
package:com.android.providers.userdictionary
package:org.droidtv.sticker
package:org.droidtv.common.accesshiddenapi
package:org.droidtv.wifidisplay
package:com.android.location.fused
package:com.android.systemui
package:org.droidtv.hdmiService
package:com.android.exchange
package:org.droidtv.scartService
package:com.google.android.play.games
package:org.droidtv.tvserver
package:com.netflix.ninja
package:org.droidtv.epgdata
package:com.android.bluetooth
package:com.mediatek.bluetoothSupplement
package:org.droidtv.philipstvdrawer
package:com.android.providers.contacts
package:com.android.captiveportallogin
package:org.droidtv.factoryurc

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

Re: Kill Apps after they've started

Post by Desmanto » 13 Aug 2017 10:07

Sorry i miss the adb shell. :) I mostly use the command directly from my phone using terminal emulator. Your next question now related to automagic already, no more OOT. :D

When you launch the TV channel, is there a shortcut to it? If the launcher support it, you can drag it to app info dan check the app name (and sometimes package name). Or if the shortcut name is "TV Channel", use automagic action : Launch App, and search for it. You can see the package name of the TV channel.

The other way to do it is using Trigger : UI Event.
Event Type : Window opened
Package Name : *
Text - Matched glob : *

Then in the action, put Notification on Screen
Text : {app_name} {package_name}

Enable the flow, and open the TV channel, you should see the name of the app and package name. You wait for a few seconds before opening new app/window, as the toast message can stacked up quickly. Disable the flow when you are done.

After you have found it, don't uninstall it. As you need it to watch, right? Just use kill app with the trigger app task ended. So every time it goes to background, it will be killed immediately.

PS : I use this flow to detect rogue app which sometimes can appear immediately in front of other app. For example, if you suddenly get a full screen ads from nowhere, you can use this and log (or write to file) the app name/package name to trace which app cause the annoying ads. Now, I use widget with stacked up 3 lines, so the message won't overlap. But I still haven't finished it yet.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
seven__
Posts: 12
Joined: 15 Jan 2017 11:38
Location: Hamburg

Re: Kill Apps after they've started

Post by seven__ » 18 Aug 2017 07:21

Thank you my friend!
Ive just tried it but it didnt work. But no problem. You have helped me a lot! -and it is sad that if i ask in the philips support forum i rarely get any useful help.

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

Re: Kill Apps after they've started

Post by Desmanto » 18 Aug 2017 12:15

Which part didn't work? I have finished my flow already and in the testing phase before I share it. You can try also to disable background app using the developer option.
Enable developer option by tapping the kernel version 7 times in about phone (sometimes need to tap software version). Back and in the developer option which appear, enable "Don't keep activities".
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply