记我在傻逼华为手机上遇到的坑

本文内容:介绍我用傻逼华为手机调试时遇到的种种奇葩蛋疼问题
我在前司的时候,兼容性问题遇到最多的就是华为了,不过当时并没把问题记录下来,这次又换了一台华为测试机,受不了这些破问题了,怒记下来供后人参考。

华为手机不显示 log

拨号页面输入*#*#2846579#*#*,选择「1.后台设置」,「3.LOG设置」,打开「AP日志」选项。即可。
注意1:如果勾选了还没显示,你可能需要重启手机。
注意2:也许重启多了该选项又会关闭需再次打开。

华为手机后台调试的密码是什么

如果你误以为那个「后台调试」才是显示 log 的话,恭喜你你被误导了。而这个破密码我搜了半天都没搜到!你们论坛是摆着好看的么!?那么多用户问结果没一个官方人员解决问题。

华为手机在页面有 EditText 时会闪退,报错java.lang.ref.SoftReference cannot be cast to android.view.inputmethod.InputConnection

解决办法是进入运行配置页面(运行按钮左边,点击那个 app,选「Edit Configurtions…」),选择「Profiling」选项卡,关闭「Enable advanced profiling(required for API level < 26 only)」选项。
这个功能是具体分析 App 性能的,很实用,有的人会以为这是 Android6.0 的问题,然而我自用的小米同样是6.0,并不存在这种问题。

Vivo 手机解析安装包错误

关闭「Instant Run」,MD 这些破手机怎么这么多蛋疼的问题。

华为手机 Profiler 进行性能分析会 Crash

暂时未找到解决办法,只能换测试机解决。

华为手机在插上数据线进行某些操作时可能会有 Native Crash:signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10;Cause: null pointer dereference

在进行某些 Native 相关接口调用的时候,我发现在部分手机上会莫名 Crash,日志:

Build fingerprint: ‘HUAWEI/SPN-AL00/HWSPN:10/HUAWEISPN-AL00/10.1.0.103C00:user/release-keys’
Revision: ‘0’
ABI: ‘arm64’
SYSVMTYPE: Maple
Timestamp: 2021-10-11 13:06:02+0800
pid: 12390, tid: 12409, name: HeapTaskDaemon >>> com.faceunity.app_ptag <<<
uid: 10489
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
Cause: null pointer dereference
x0 000000717c6ba800 x1 0000007170c4ca98 x2 0000000000000008 x3 0000000070e78bc8
x4 000000000000045c x5 0000000013301f7c x6 12cc6c1812cc7478 x7 0000000070ea1f28
x8 0000000000000000 x9 6f847258d66fd648 x10 0000000042c00000 x11 0000000000000008
x12 000000000000000b x13 000009e800000071 x14 0005da9013b5718d x15 000010f6a6bff4e2
x16 000000717c5f6e00 x17 00000071fffefb40 x18 0000007118e8a000 x19 0000007170c4ca98
x20 0000000070e78bc8 x21 0000000000000008 x22 00000000715f17d0 x23 00000000715eff70
x24 0000000000000028 x25 0000000000002990 x26 0000007170c4e020 x27 0000000000001860
x28 00000000715eff88 x29 0000007170c4ca80
sp 0000007170c4ca10 lr 000000717c23614c pc 000000717c236128

backtrace:
#00 pc 000000000022e128 /apex/com.android.runtime/lib64/libart.so (ZN3art6mirror6Object15VisitReferencesILb1ELNS_17VerifyObjectFlagsE0ELNS_17ReadBarrierOptionE1ENS_2gc9collector17ConcurrentCopying16RefFieldsVisitorILb1EEES9_EEvRKT2_RKT3+2828) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#01 pc 000000000021f4b8 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::ImmuneSpaceScanObjVisitor::Callback(art::mirror::Object*, void)+84) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#02 pc 000000000020d94c /apex/com.android.runtime/lib64/libart.so (art::gc::accounting::ModUnionTableReferenceCache::VisitObjects(void (
)(art::mirror::Object*, void), void)+292) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#03 pc 000000000021a1a0 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::CopyingPhase()+1236) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#04 pc 0000000000218088 /apex/com.android.runtime/lib64/libart.so (art::gc::collector::ConcurrentCopying::RunPhases()+1148) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#05 pc 000000000023670c /apex/com.android.runtime/lib64/libart.so (art::gc::collector::GarbageCollector::Run(art::gc::GcCause, bool)+288) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#06 pc 0000000000255780 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+3196) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#07 pc 0000000000267b2c /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGC(art::Thread*, art::gc::GcCause, bool)+124) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#08 pc 000000000026d6ec /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGCTask::Run(art::Thread)+36) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#09 pc 000000000029aa8c /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread
)+64) (BuildId: 131aed14b9b5b7a42c853116725a14a0)
#10 pc 00000000000686cc /system/framework/arm64/boot-core-libart.oat (art_jni_trampoline+124) (BuildId: 97caa9b4c9c51b6ba147185e3882292ce748f603)

本以为是低内存手机 GC 触发导致的 bug,排查无果后,抱着试一试的心态搜索对应关键字。看到有人提到

在偶然的情况下,发现应用并不会闪退,再三测试和验证后发现,如果连接着USB线,应用启动后就会出现闪退的情况;如果不连接着USB线,就不会发生闪退

——https://blog.csdn.net/u011374875/article/details/120128537

我心想这也太扯淡了吧,然后试了一下,好吧还真是。我也不知道该说啥好了,华为牛逼。

评论

  1. 6年前
    2018-5-14 15:48:32
    Sogou Explorer Sogou Explorer Windows 10 x64 Edition Windows 10 x64 Edition

    看得出博主怒气

  2. 5年前
    2019-1-08 11:08:46
    Firefox 44.0 Firefox 44.0 Windows 2000 Windows 2000

    Hy there, a be befittingability
    Upstanding click on the consistency answerable to the bronze knick-knacks to decrease

    https://drive.google.com/file/d/1vcsdcO6Zvb7JzRzorbI4musudeBRx3JF/preview

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇