基因的力量有多么可怕 | 紫竹张先生

有这么一句话,叫人人生而平等,这句话用于人权方面是正确的,但是很多人把这句话错误的应用到了基因和天赋身上,认为大家真的是完全平等的。
但是实际上,基因的力量是非常可怕的,可怕到你目瞪口呆,虽然大家都是人类,基因几乎是完全一样的,但是有时候亿分之一的区别,就会导致能力的巨大差异。

继续阅读“基因的力量有多么可怕 | 紫竹张先生”

“有力度”的对外发声,底气在这里! | 顾子明

本文为近期文章的一个梳理,把如“弹性防御”、“先干为敬”、“美股下跌”等逻辑串联起来,作为一个阶段性的总结,

近期国内的政经领域,颇有点“中国特色”,我国政府“有力度”的对外发声的频率突然大幅提升。

继续阅读““有力度”的对外发声,底气在这里! | 顾子明”

[CTS] CTS Verifier 测试结果的迁移 | Sukha

有时候测试完大部分项目而由于测试机的硬件缺陷,无法通过某些项目,可以把测试结果进行迁移,备份恢复到另一台机器然后出报告。

adb backup -f com.android.cts.verifier.backup -apk com.android.cts.verifier     # backup on one device
adb restore com.android.cts.verifier.backup                              # restore to the same or any other device
 

旧版本到新版本升级也是支持的。

以8.1r7为例:

继续阅读“[CTS] CTS Verifier 测试结果的迁移 | Sukha”

[CTS] android.app.cts.SystemFeaturesTest#testSensorFeatures

android.app.cts.SystemFeaturesTest#testSensorFeatures fail
junit.framework.AssertionFailedError: PackageManager#hasSystemFeature(android.hardware.sensor.compass) returns true but SensorManager#getSensorList(2) shows sensors [] expected:<true> but was:<false>

解决方案

继续阅读“[CTS] android.app.cts.SystemFeaturesTest#testSensorFeatures”

[CTS] android.app.cts.SystemFeaturesTest#testCameraFeatures

run cts -m CtsAppTestCases -t android.app.cts.SystemFeaturesTest#testCameraFeatures --skip-preconditions  --precondition-arg skip-media-download 

android.app.cts.SystemFeaturesTest#testCameraFeatures    fail junit.framework.AssertionFailedError: PackageManager#hasSystemFeature should NOT return true for android.hardware.camera.level.full

解决方案

继续阅读“[CTS] android.app.cts.SystemFeaturesTest#testCameraFeatures”

[CTS] CtsBluetoothTestCases fail

android.bluetooth.cts.BluetoothLeScanTest#testBasicBleScan    fail junit.framework.AssertionFailedError: Scan results shouldn't be empty
android.bluetooth.cts.BluetoothLeScanTest#testOpportunisticScan    fail junit.framework.AssertionFailedError: Scan results shouldn't be empty    打开Location到High accuracy, Scanning/bt scanning
android.bluetooth.cts.BluetoothLeScanTest#testScanFilter    fail junit.framework.AssertionFailedError: Scan results shouldn't be empty
android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent fail junit.framework.AssertionFailedError: Scan results shouldn't be empty
android.bluetooth.cts.BluetoothLeScanTest#testStartScanPendingIntent_nullnull    fail junit.framework.AssertionFailedError: Scan results not received

解决方案

继续阅读“[CTS] CtsBluetoothTestCases fail”

[CTS] CtsVideoTestCases,CtsMediaTestCases | Sukhu

android.video.cts.VideoEncoderDecoderTest#testVp8Goog0Perf1280x0720    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.google.vp8.encoder video/x-vnd.on2.vp8 1280x720: [32.0, 32.0].

run cts -m CtsVideoTestCases -t android.video.cts.VideoEncoderDecoderTest#testVp8Goog0Perf1280x0720

CtsMediaTestCases

android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf0720x0480    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.google.h264.decoder video/avc 720x480: [142.0, 142.0].
android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf1280x0720    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.google.h264.decoder video/avc 1280x720: [52.0, 52.0].
android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf1920x1080    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.google.h264.decoder video/avc 1920x1080: [17.0, 17.0].
android.media.cts.VideoDecoderPerfTest#testH263Other0Perf0176x0144    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.qti.video.decoder.h263sw video/3gpp 176x144: [760.0, 760.0].
android.media.cts.VideoDecoderPerfTest#testH263Other0Perf0352x0288    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.qti.video.decoder.h263sw video/3gpp 352x288: [560.0, 560.0].
android.media.cts.VideoDecoderPerfTest#testMpeg4Other0Perf0480x0360    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.qti.video.decoder.mpeg4sw video/mp4v-es 480x360: [482.0, 482.0].
android.media.cts.VideoDecoderPerfTest#testVp9Goog0Perf1280x0720    fail    junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.google.vp9.decoder video/x-vnd.on2.vp9 1280x720: [63.0, 63.0].

run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf0720x0480
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf1280x0720
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testAvcGoog0Perf1920x1080
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testH263Other0Perf0176x0144
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testH263Other0Perf0352x0288
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testMpeg4Other0Perf0480x0360
run cts -m CtsMediaTestCases -t android.media.cts.VideoDecoderPerfTest#testVp9Goog0Perf1280x0720

解决方案

继续阅读“[CTS] CtsVideoTestCases,CtsMediaTestCases | Sukhu”

[CTS] CtsServicesHostTestCases | Sukhu

android.server.cts.ActivityManagerDisplayTests#testConsequentLaunchActivityFromSecondaryDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

android.server.cts.ActivityManagerDisplayTests#testConsequentLaunchActivityFromVirtualDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testConsequentLaunchActivityFromVirtualDisplayToTargetDisplay    fail    junit.framework.ComparisonFailure: Launched activity must be focused expected:<android.server.cts[.second/.Second]Activity> but was:<android.server.cts[/.Launching]Activity>
android.server.cts.ActivityManagerDisplayTests#testContentDestroyOnDisplayRemoved    fail    junit.framework.AssertionFailedError: Activity from removed display must be destroyed
android.server.cts.ActivityManagerDisplayTests#testDisplayResize    fail    junit.framework.AssertionFailedError: Activity=android.server.cts/.ResizeableActivity must be visible.
android.server.cts.ActivityManagerDisplayTests#testExternalDisplayActivityTurnPrimaryOff    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testExternalDisplayToggleState    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testImmediateLaunchOnNewDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchActivitiesAffectsVisibility    fail    junit.framework.AssertionFailedError: Activity=android.server.cts/.VirtualDisplayActivity must be visible.
android.server.cts.ActivityManagerDisplayTests#testLaunchActivityFromAppToSecondaryDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchActivityOnSecondaryDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchExternalDisplayActivityWhilePrimaryOff    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchNonResizeableActivityFromSecondaryDisplayNewTask    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchNonResizeableActivityFromSecondaryDisplaySameTask    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testLaunchWithoutPermissionOnVirtualDisplayByOwner    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<15> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testMoveNonResizeableActivityToSecondaryDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testMoveTaskBetweenDisplays    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<21> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testMoveToDisplayOnLaunch    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testNewTaskSameDisplay    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testPermissionLaunchFromAppOnSecondary    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<3> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testPermissionLaunchFromDifferentApp    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<6> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testPermissionLaunchFromOwner    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<5> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testPermissionLaunchFromShell    fail    junit.framework.AssertionFailedError: Focused stack must be on secondary display expected:<2> but was:<0>
android.server.cts.ActivityManagerDisplayTests#testPermissionLaunchMultiUidTask    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testRotationNotAffectingSecondaryScreen    fail    junit.framework.AssertionFailedError: Sizes must not change after rotation
android.server.cts.ActivityManagerDisplayTests#testStackFocusSwitchOnDisplayRemoved3    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testStackFocusSwitchOnTouchEvent    fail    junit.framework.ComparisonFailure: Focus must be switched back to primary display expected:<android.server.cts/.[VirtualDisplay]Activity> but was:<android.server.cts/.[Test]Activity>
android.server.cts.ActivityManagerDisplayTests#testStackFocusSwitchOnTouchEventAfterKeyguard    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
android.server.cts.ActivityManagerDisplayTests#testTaskMatchAcrossDisplays    fail    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

解决方案

继续阅读“[CTS] CtsServicesHostTestCases | Sukhu”

Android Verified Boot 2.0 | thanksgining

AVB2.0简要说明

AVB2.0(Android Verified Boot2.0)是google新设计的verified boot流程用于保护boot/recovery/system/vendor等一些受保护分区的完整性。MTK平台中dtbo不使用AVB2.0保护,build出来的dtbo是avb2.0签名方式,会在调用签名脚本时将dtbo改为正常签名方式(dtbo用于初始化lcm等,如果dtbo校验失败了,无法显示yellow/orange/red state),而其他的image(preloader,lk,logo,tee等)仍然是使用MTK的verify flow。在Android P版本,如果平台使用的kernel版本大于等于4.9的话,AVB2.0是必须要开启的。

继续阅读“Android Verified Boot 2.0 | thanksgining”

Android Verified Boot 2.0简要 | thanksgining

AVB2.0被用于启动引导,此用法添加一个“vbmeta.img”镜像。public key被编译到bootloader中用于校验vbmeta数据,vbmeta.img包含应由此public key验证的签名。

vbmeta.img包含用于验证的public key,但只有bootloader验证过vbmeta.img才会可信,就好比认证一样,包含可信public key和签名。

因此,我们在AVB中有两个重要key,一个验证vbmeta.img的OEM key,一个验证其他分区(boot/system/vendor)的verity key。当然可以使用OEM key作为verity key。

我们知道OEM key用于在bootloader阶段验证vbmeta.img。这还不够,我们必须验证其他分区,vbmeta.img包含的public key用于此目的。就像avb1.0中verity key一样,此public key用于验证system、vendor分区和boot分区。这里有些不同之处,avb1.0使用OEM key验证boot分区,使用verity key验证system/vendor分区,但avb2.0使用OEM key验证vbmeta.img,并使用其中包含的public key验证其他分区(system/vendor/boot等)。

继续阅读“Android Verified Boot 2.0简要 | thanksgining”

那些人,那些话(三) | 岱岱

国家强大时,力量就是外交,国家弱小时,外交就是力量。

题记


非要把外蒙古拿过来不可!

我不把你当作一个外交人员来谈话,我可以告诉你:条约是靠不住的!

再则,你还有一个错误,你说,中国没有力量侵略俄国,今天可以讲这话,但是只要你们中国能够统一,比任何国家的进步都要快。

——斯大林与蒋经国的谈话

背景:

1945年7月,二战结束在即,蒋经国受命随宋子文赴苏联谈判签订《中苏友好同盟条约》,中国想收回外蒙,但苏联坚决不让,蒋介石特地打电报给蒋经国,要儿子以私人身份去看斯大林,问他为什么苏联一定要让外蒙古独立的道理。

于是,有了上面这番对话。

继续阅读“那些人,那些话(三) | 岱岱”

[CTS 9.0]CtsNetTestCases模块android.net.cts.ConnectivityManagerTest#testOpenConnection fail

问题描述

 CtsNetTestCases模块android.net.cts.ConnectivityManagerTest#testOpenConnection测试fail
java.net.ConnectException: Failed to connect to google-ipv6test.appspot.com/69.171.237.16:80
解决方案

继续阅读“[CTS 9.0]CtsNetTestCases模块android.net.cts.ConnectivityManagerTest#testOpenConnection fail”

[CTS 5.1R28]测试android.graphics.cts.TypefaceTest -- testBadFont失败

问题描述


CTS5.1R28测试android.graphics.cts.TypefaceTest -- testBadFont失败

失败提示显示:
java.lang.RuntimeException: Font asset not found ft45987.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:190)

解决方案

继续阅读“[CTS 5.1R28]测试android.graphics.cts.TypefaceTest -- testBadFont失败”

[CTS]android.keystore.cts.KeyChainTest#testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported fail

问题描述

 android.keystore.cts.KeyChainTest#testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported fail
unit.framework.AssertionFailedError: RSA must be hardware-backed by a hardware-specific Keymaster HAL at junit.framework.Assert.fail(Assert.java:50) at junit.framework.Assert.assertTrue(Assert.java:20) at android.keystore.cts.KeyChainTest.testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported(KeyChainTest.java:76) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:115) at android.support.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:77) at junit.framework.TestResult.run(TestResult.java:118) at android.support.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:55) at junit.framework.TestCase.run(TestCase.java:124) at android.support.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:63) at 
解决方案

继续阅读“[CTS]android.keystore.cts.KeyChainTest#testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported fail”

[ cts-on-gsi] module:CtsDeqpTestCases中,dEQP-GLES3.functional.pbo.native#clears 等18项Fail

问题描述


[ cts-on-gsi] module:CtsDeqpTestCases中,dEQP-GLES3.functional.pbo.native#clears 等18项Fail

[Detail]
=== with config {glformat=rgba8888d24s8ms0,rotation=270,surfacetype=window,required=false} ===

解决方案

继续阅读“[ cts-on-gsi] module:CtsDeqpTestCases中,dEQP-GLES3.functional.pbo.native#clears 等18项Fail”

[cts-8.1-r7]CtsOsTestCases--android.os.cts.SecurityFeaturesTest#testPrctlDumpable

问题描述


[cts-8.1-r7]CtsOsTestCases--android.os.cts.SecurityFeaturesTest#testPrctlDumpable

08-08 15:59:40 I/0123456789ABCDEF: android.os.cts.SecurityFeaturesTest#testPrctlDumpable FAIL junit.framework.AssertionFailedError: expected:<0> but was:<2> at junit.framework.Assert.fail(Assert.java:50) at junit.framework.Assert.failNotEquals(Assert.java:287) at junit.framework.Assert.assertEquals(Assert.java:67) at junit.framework.Assert.assertEquals(Assert.java:199) at junit.framework.Assert.assertEquals(Assert.java:205) at android.os.cts.SecurityFeaturesTest.testPrctlDumpable(SecurityFeaturesTest.java:82)

解决方案

继续阅读“[cts-8.1-r7]CtsOsTestCases--android.os.cts.SecurityFeaturesTest#testPrctlDumpable”

怀孕就会被辞退,从经济的角度分析普通人应该怎么做|紫竹张先生

某单位出台了一个奇葩的规章制度,要求下属女教师们排队计划怀孕,如果有不按照计划表“故意插队”怀孕的,则要开除处理。

按计划表排队怀孕,排队生孩子无疑是非常荒谬的,也是违法的,但是这又是非常无奈的,今天用经济学的道理给大家详细的谈一谈里面的道理,并从经济的角度分析一下,普通人应该怎么办。

继续阅读“怀孕就会被辞退,从经济的角度分析普通人应该怎么做|紫竹张先生”