mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 4988|reply: 22
打印 prevThread nextThread

认证问题

[copyURL]

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
jumpTo
owner
poston 2019-5-22 18:10 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
现遇到如下情况:
1,使用wifi 进行认证后 再使用电信4g卡的情况下 需要重新认证,经发现仅wifi情况下获取的imei和电信卡获取的imei(其实获取的是meid)是不一样的,
就导致同一台设备在使用wifi  和电信卡的时候需要认证两次。
电信卡认证日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"99000843131692","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}


设备id 23131692   图传认证id  38101

wifi认证日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"ky62otrHVz8VCLe29kWqn7fU1URkTtQws/asOVr0BND9qmsBYXPjogKHm4YFClv6C894giiEraRC+8g4qo0skgGz+JUx8V86b0/Aql56HhJ3FFASydooE77e84Ohnx6E9S8kgVI2KwXexvc+f10n1Zd6fX7Nh4StMO3YjbMQS8jipPrhD2lhiKQlxpBaxI9dlXkFke80KCnCTj0dqDqmWA6BDDmCEVzCo4KGP45M14wvvV2IA/WylbUbTmJXxCba","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}


设备id  图传认证id  38101

从上诉日志可以看出  两次得到的szDeviceID 是不一样的 4g电信卡的szDeviceID 是 99000843131692  wifi 的szDeviceID  是 990008431316921

2,发现上述问题后,我们对认证的代码进行了优化,wifi和4g电信卡的情况下都上传的是imei号码
电信4g卡认证的日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 400, "szAuthType":"auth.type.trial"}


获取认证id的时候提示认证失败

wifi认证的日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}


可以获取到认证id

从上诉的两份log可以看出 电信4g  和wifi  认证时 上传的 szDeviceID 都是  990008431316921  (整个认证上传的参数都是一样的)
但是返回的结果不一样 ,电信4g卡的返回结果中szAuthType 是 auth.type.trial  而 wifi认证返回的结果szAuthType 是 auth.type.imei

总结上面论述的结论是,wifi 和电信4g卡的认证存在差异,当上传的认证参数不一样时,同一台设备需要认证两次;
当优化后上传相同的认证参数时返回的结果不同,导致4g卡情况下无法认证,无法使用图传。










reply

使用道具 report

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
sofa
 Owner| poston 2019-5-24 10:17 | authorOnly
请问这个问题有在关注吗?要怎么解决?
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
bench
poston 2019-5-24 18:57 | authorOnly
Aiwinn post on2019-5-24 10:17
请问这个问题有在关注吗?要怎么解决?

下个星期给你更新下库
reply agree Against

使用道具 report

10

主题

531

帖子

2491

积分

admin

Rank: 9Rank: 9Rank: 9

积分
2491
ground
poston 2019-5-25 08:40 | authorOnly
也同时给他们更新为新的认证机制 吧。
aiwinn是我们的算法伙伴,互为依存,对他们我们可以更加的开放。
reply agree Against

使用道具 report

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
5#
 Owner| poston 2019-5-27 17:14 | authorOnly
admin post on2019-5-25 08:40
也同时给他们更新为新的认证机制 吧。
aiwinn是我们的算法伙伴,互为依存,对他们我们可以更加的开放。

反射获取imei号的代码  
  /**
     * 获取imei号码
     *
     * @param context 上下文
     * @param slotID  卡槽id  0 1
     * @return imei号
     */
    private String getImei(Context context, int slotID) {
        String imei = "";
        TelephonyManager telephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        try {
            Class<?> telephonyClass = Class.forName(telephony.getClass().getName());
            Class<?>[] parameter = new Class[1];
            parameter[0] = int.class;
            Method getSimID = telephonyClass.getMethod("getImei", parameter);
            Object[] obParameter = new Object[1];
            obParameter[0] = slotID;
            Object ob_phone = getSimID.invoke(telephony, obParameter);
            if (ob_phone != null) {
                imei = ob_phone.toString();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return imei;
    }
reply agree Against

使用道具 report

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
6#
 Owner| poston 2019-5-28 11:54 | authorOnly
Aiwinn post on2019-5-27 17:14
反射获取imei号的代码  
  /**
     * 获取imei号码

电信4g
[ BillTool ] {"stEntity":{"iAPILevel":25,"iDensityDpi":240,"iHeightPixels":960,"iWidthPixels":640,"szAndroidID":"d0cdf09baac05b28","szBoard":"msm8953","szBrand":"DSJ-HECH1A1","szBuildTime":"1557973942000","szDeviceID":"861263030015070","szFingerPrint":"Android/msm8953_64_c350/msm8953_64_c350:7.1.2/N2G47H/server05161032:user/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"DSJ-HECH1A1","szRadio":".TA.2.3.c1-00361-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
[ BillTool ] auth---->{"iAuthStatus": 400, "szAuthType":"auth.type.trial"}

wifi
[ BillTool ] {"stEntity":{"iAPILevel":25,"iDensityDpi":240,"iHeightPixels":960,"iWidthPixels":640,"szAndroidID":"d0cdf09baac05b28","szBoard":"msm8953","szBrand":"DSJ-HECH1A1","szBuildTime":"1557973942000","szDeviceID":"861263030015070","szFingerPrint":"Android/msm8953_64_c350/msm8953_64_c350:7.1.2/N2G47H/server05161032:user/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"DSJ-HECH1A1","szRadio":".TA.2.3.c1-00361-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
[ BillTool ] auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}

新的libbill.so  目前还是出现电信卡和wifi 包装的参数一样  返回的结果不一样的问题
reply agree Against

使用道具 report

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
7#
 Owner| poston 2019-5-29 15:19 | authorOnly
admin post on2019-5-25 08:40
也同时给他们更新为新的认证机制 吧。
aiwinn是我们的算法伙伴,互为依存,对他们我们可以更加的开放。

请问现在还有在帮我们看imei号的问题吗
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
8#
poston 2019-5-30 11:21 | authorOnly
Aiwinn post on2019-5-29 15:19
请问现在还有在帮我们看imei号的问题吗

下午会更新SDK包给你
reply agree Against

使用道具 report

73

主题

319

帖子

1121

积分

vipMem

Rank: 6Rank: 6

积分
1121
9#
 Owner| poston 2019-5-30 16:42 | authorOnly
xuwei post on2019-5-30 11:21
下午会更新SDK包给你

请问新的SDK包  和旧的SDK包在认证这部分的修改主要是哪一块,因为我们对旧的SDK修改也比较多,直接替换的话工作量太大了 , 可以给出这一部分的修改意见吗?
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
10#
poston 2019-5-30 16:58 | authorOnly
Aiwinn post on2019-5-30 16:42
请问新的SDK包  和旧的SDK包在认证这部分的修改主要是哪一块,因为我们对旧的SDK修改也比较多,直接替换 ...

认证接口改了,依赖的jar包和NDK库改了,NDK库改成了armeabi-v7a,可以先替换libs和jnilibs的所有库文件,对比修改下新的gradle文件,然后如果有问题,再根据新工程的代码调整
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-23 16:11 , Processed in 0.060549 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList