Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Sep 4, 2023
1 parent 5cb75d9 commit 9b1a975
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/device-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ find_serialno()

get_android_id()
{
adb shell 'settings get secure android_id 2> /dev/null' | LC_ALL=C tr -d '[:cntrl:]'
local _val
_val="$(adb shell 'settings get secure android_id 2> /dev/null' | LC_ALL=C tr -d '[:cntrl:]')" && test -n "${_val?}" && printf '%016x' "0x${_val:?}"
}

get_gsf_id()
Expand Down Expand Up @@ -641,7 +642,7 @@ main()
show_msg ''

ANDROID_ID="$(get_android_id)"
validate_and_display_info 'Android ID' "${ANDROID_ID?}" 15 16
validate_and_display_info 'Android ID' "${ANDROID_ID?}" 16

show_msg ''
show_msg ''
Expand Down

0 comments on commit 9b1a975

Please sign in to comment.