I'm not sure how to arrange tests without using unittest module, sorry. I think it's easier to just figure out how to install unittest module.
Ideally what needs to be done is to provide a patch which is consistent with existing code base conventions (mostly meaning being PEP8 compliant - so your patch needs some adjustments) and which passes (reasonably) all unit tests.
Now, if we want to push this forward I would recommend to at least move this discussion on the bug tracker, rewrite the patch by following PEP8 conventions (no tabs, 4 spaces, etc.) and provide the results of a test suite run.
Quick instructions on how to setup a working Python env on Android would be a big plus (at least for me).
An initial and quick review about the patch.
- customize_compiler() function in setup.py looks kind of hackish. If there's no other way to achieve the same goal it's supposed to serve then a comment explaining what it does and/or where you took it from is necessary. Also it should be executed on Android only.
- _psutil_linux.h contains a lot of new code which should be executed on Android *only*. After applying your patch I couldn't compile psutil on Linux. Ideally, all the new stuff you added should be moved into a separate file(s) wherever possible (ideally psutil/_psutil_android.c and/or psutil/_psutil_android.h).