Update findType to optimize package selection.

Signed-off-by: AndroWiiid <androwiiid@gmail.com>