Because assignment is not an expression in Kotlin, you can't do multiple assignments that way. But there are other ways. The most obvious is simply:
isValidId = deviceId.length > 0 && deviceId.length <= 16
allGood = isValidId
A more idiomatic (if longer) way is:
(deviceId.length > 0 && deviceId.length <= 16).let {
allGood = it
isValidId = it
}
(By the way, you can simplify the condition to deviceId.length in 1..16.)
There are a couple of reasons why Kotlin doesn't allow this. The main one is that it's incompatible with the syntax for calling a function with named parameters: fn(paramName = value). But it also avoids any confusion between = and == (which could otherwise cause hard-to-spot bugs). See also here.