Fixed localization caps + added tests

seems to me like all this reboot logic and waitForBoot etc should just be part of ADB