openstf / STFService.apk

Monitor and perform various actions on your Android device. Not meant for actual user devices.
Other
242 stars 207 forks source link

Updated serial number to work on 8.0 #21

Closed putthidaSR closed 6 years ago

thinkhy commented 6 years ago

Wondering why you submit this PR? Which device/ROM do you find the problem of serial number on? I attempted latest version of STFService.apk on some 8.0/8.1 devices, currently I haven't hit the problem yet.

putthidaSR commented 6 years ago

@thinkhy I'm not sure if it's device specific issue. I'll try to test again on other 8.0 devices, but so far, I only tested on Pixel XL 8.0 and it failed to retrieve serial number.

sorccu commented 6 years ago

I've seen many devices that don't allow you to read the serial number - I don't have access to these devices anymore, though, so it's difficult to say. Pretty sure they were Xperia devices though.

What STF does is that it passes the serial number to the service when the IdentityActivity is displayed, since STF is guaranteed to know it already.

sorccu commented 6 years ago

I'm assuming devices that don't let you access the serial do it for privacy reasons.

thinkhy commented 6 years ago

@sorccu @putthidaSR You're right, Google set the limitation since Android 8.0, but I notice some manufactures like HuaWei and XiaoMi have changed the policy and permit the access of serial number in their customized ROMs.