As I just learned, Android reserves the right to kill a background application's process at any moment in order to recycle RAM. The application is still running and can be resumed nevertheless, but all of my static variables are gone (see this article).
I'd like to simulate my app's behavior in this scenario. What's the easiest way to do this? There certainly must be an easier and more predictable way than writing some additional apps that allocate lots of memory.
Found two similar questions Simulate killing of activity in emulator and Simulate low battery & low memory in Android.
Solutions from those questions:
adb shell
and then kill
the process with PID
from ps