Common user most of time doesn't care about RAM of his android device, about processes that running on background etc.
User who know what is RAM install apps to clear it. But we are not common users and wont install apps to kill. We gonna kill them ourselves.

You must be root, have busybox and terminal emu installed.

You can use am force-stop <package name>.
or am kill <package name>.

am kill only kills "processes that are safe to kill": i.e. a process with no running services or activities.

We can use adb shell kill to kill the process. but first you need to find the process id.

1)
adb shell kill $(adb shell ps | grep YOUR.PACKAGE.NAME | awk '{ print $2 }')

pc $ adb -d shell
android $ su
android # ps
android # kill <process id from ps output>

2)
adb shell am force-stop com.my.app.package

3)
adb stop com.my.app.package

4)
adb -d install -r MyApp.apk ; adb -d shell am start -a android.intent.action.MAIN -n com.MyCompany.MyApp/.MyActivity

5)
That way, you can issue this adb command to stop your activity:

adb shell am broadcast -a com.example.TestActivity.STOP

Коментувати

Вміст цього поля є приватним і не буде доступний широкому загалу.
  • Не дозволено жодних HTML теґів.
CAPTCHA
                                   .oooo.        o8o   .ooooo.    ooooo      ooo 
.dP""Y88b `"' 888' `Y88. `888b. `8'
oooo ooo ooo. .oo. .oo. ]8P' oooo 888 888 8 `88b. 8
`88. .8' `888P"Y88bP"Y88b <88b. `888 `Vbood888 8 `88b. 8
`88..8' 888 888 888 `88b. 888 888' 8 `88b.8
`888' 888 888 888 o. .88P 888 .88P' 8 `888
.8' o888o o888o o888o `8bd88P' 888 .oP' o8o `8
.o..P' 888
`Y8P' .o. 88P
`Y888P
Уведіть код, зображений у стилі Ascii-Арт.
Мета цього запитання — довести, що ви є реальним відвідувачем і запобігти автоматизованим розсиланням спаму.