在 Android 14 上使用 adb 命令从设备获取 IMEI

问题描述 投票:0回答:1

我正在使用命令:

adb shell "service call iphonesubinfo 1 s16 com.android.shell | cut -c 52-66 | tr -d '.[:space:]'"
它在 Android 13 上运行良好,但现在它提供了部分损坏的 IMEI,其中 3 个数字作为 ' 符号 这不仅仅是这些是附加符号,我的意思是正好有 3 个数字作为符号 据我所知,所有带有 IMEI 的 Android 14 设备都会受到影响。

我尝试过使用命令

adb  shell service call phone 146 i32 0 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'
根据 dougstar 潜在的解决方案,但它也适用于 Android 13,而且它确实给了我一个错误。

//更新

即使我现在使用的原始命令显示错误的结果,这是因为它捕获了错误的列(感谢 micha pringle 解释) 对于 Android 14 设备,可以通过将 52-66 列更改为 50-64 列来修复此问题

但现在我想知道如何修复这个在 Android 13 之前工作的命令:dougstar 潜在的解决方案

android bash adb imei android-14
1个回答
0
投票

即使我现在使用的原始命令显示错误的结果,这是因为它捕获了错误的列(感谢 micha pringle 解释) 对于 Android 14 设备,可以通过将 52-66 列更改为 50-64 列来修复此问题

但现在我想知道如何修复这个在 Android 13 之前工作的命令:dougstar 潜在的解决方案

© www.soinside.com 2019 - 2024. All rights reserved.