Android开源,屏幕记录“SIGBUS”

时间:2016-01-31 09:20:27

标签: android android-source

  1. 使用Samsung Galaxy S6(@ v5.1.1)
  2. 我根据https://source.android.com/source/building.html(aosp_arm-eng)
  3. 编译了Android OS 5.1.1_r33
  4. 具体来说,我已经编译了“screenrecord”(而不是操作系统的其余部分)
  5. 我使用adb push(在真实设备上)将'screenrecord'复制到'/ data / local / tmp /'
  6. Lunching / data / local / tmp / screenrecord --verbose --bugreport /data/local/tmp/dump.mp4导致“致命信号7(SIGBUS),代码1,故障地址0xf4c08e3f in tid 3263(screenrecord) ”
  7. 这不会发生内置的'screenrecord',只有我手动编译的那个。
  8. 这个适用于Android 5.0 @ Galaxy S5,并且正在使用Android 6.0 @ Nexus 5 ,可能是什么问题? 什么可能导致崩溃?

    Logcat堆栈跟踪

    F/libc    ( 3263): Fatal signal 7 (SIGBUS), code 1, fault addr 0xf4c08e3f in tid 3263 (screenrecord_5_)
    
    I/DEBUG   ( 2965): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    
    I/DEBUG   ( 2965): Build fingerprint: 'samsung/zerofltexx/zeroflte:5.1.1/LMY47X/G920FXXU3COI9:user/release-keys'
    
    W/NativeCrashListener( 3566): Couldn't find ProcessRecord for pid 3263
    
    I/DEBUG   ( 2965): Revision: '11'
    
    E/DEBUG   ( 2965): AM write failure (32 / Broken pipe)
    
    I/DEBUG   ( 2965): ABI: 'arm'
    
    I/DEBUG   ( 2965): pid: 3263, tid: 3263, name: screenrecord_5_  >>> /data/local/tmp/screenrecord_5_1_1_r33 <<<
    
    I/DEBUG   ( 2965): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xf4c08e3f
    
    I/DEBUG   ( 2965):     r0 000001cc  r1 0000fffe  r2 000001f6  r3 00000001
    
    I/DEBUG   ( 2965):     r4 f4c08e17  r5 f4438000  r6 f4400000  r7 000001cd
    
    I/DEBUG   ( 2965):     r8 f4c08d40  r9 f76426a4  sl 00000001  fp 00000010
    
    I/DEBUG   ( 2965):     ip 0000ffff  sp ffa72048  lr f761b811  pc f760e254  cpsr 20030030
    
    I/DEBUG   ( 2965): 
    
    I/DEBUG   ( 2965): backtrace:
    
    I/DEBUG   ( 2965):     #00 pc 00042254  /system/lib/libc.so (je_arena_dalloc_bin_locked+399)
    
    I/DEBUG   ( 2965):     #01 pc 0004f80d  /system/lib/libc.so (je_tcache_bin_flush_small+240)
    
    I/DEBUG   ( 2965):     #02 pc 0004a06d  /system/lib/libc.so (ifree+448)
    
    I/DEBUG   ( 2965):     #03 pc 00012d57  /system/lib/libc.so (free+10)
    
    I/DEBUG   ( 2965):     #04 pc 0000cb2b  /system/lib/libstagefright_foundation.so (android::AMessage::clear()+24)
    
    I/DEBUG   ( 2965):     #05 pc 0000cb5b  /system/lib/libstagefright_foundation.so (android::AMessage::~AMessage()+18)
    
    I/DEBUG   ( 2965):     #06 pc 0000cb75  /system/lib/libstagefright_foundation.so (android::AMessage::~AMessage()+4)
    
    I/DEBUG   ( 2965):     #07 pc 0000ede5  /system/lib/libutils.so (android::RefBase::decStrong(void const*) const+40)
    
    I/DEBUG   ( 2965):     #08 pc 000056cd  /data/local/tmp/screenrecord_5_1_1_r33 (android::sp<android::AMessage>::~sp()+10)
    
    I/DEBUG   ( 2965):     #09 pc 000a74bd  /system/lib/libstagefright.so (android::MediaCodec::dequeueOutputBuffer(unsigned int*, unsigned int*, unsigned int*, long long*, unsigned int*, long long)+244)
    
    I/DEBUG   ( 2965):     #10 pc 00004d19  /data/local/tmp/screenrecord_5_1_1_r33
    
    I/DEBUG   ( 2965):     #11 pc 00012e9d  /system/lib/libc.so (__libc_init+44)
    
    I/DEBUG   ( 2965):     #12 pc 00005320  /data/local/tmp/screenrecord_5_1_1_r33
    

1 个答案:

答案 0 :(得分:0)

解决方案很简单

  1. 三星拥有基于Googles Android开源的
  2. 自己的Android Flavor
  3. 在为三星构建之前,应更新代码库以支持Samsung Flavor
  4. 代码库更新是通过下载三星代码@ http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=G920F
  5. 完成的
  6. 并将其添加到Googles Android代码库。
  7. 构建&amp;部署