In most of the Android devices, yes, it can void your handset warranty. Except you are using Oneplus or Xiaomi brand smartphone because they exclusively provide the privilege to root devices. Although you can retain the warranty by just unrooting the device.