Extract codes to detect platform and root