V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
StonyGround
V2EX  ›  Android

编译 aosp 并且刷入 pixel 后无限重启,各位有什么排查问题妙招

  •  
  •   StonyGround · 2022-11-07 23:30:11 +08:00 · 4480 次点击
    这是一个创建于 507 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前也编译过 aosp ,并且刷到 pixel 备用机上,但是驱动有问题,没有声音。

    所以昨天就重新编译了一下,结果现在刷进去,就无限重启了。

    排除了硬件的问题,因为从 google 下载的刷机包,刷进去是正常使用的。

    所以,请教下各位有什么排查问题的好办法呢?

    不能发图片,将就贴一点刷机的代码


    Checking 'product' OKAY [ 0.046s]

    Setting current slot to 'a' OKAY [ 0.092s]

    Sending 'boot_a' (30897 KB) OKAY [ 0.832s]

    Writing 'boot_a' OKAY [ 0.268s]

    Sending sparse 'system_a' 1/2 (524284 KB) OKAY [ 13.095s]

    Writing 'system_a' OKAY [ 3.412s]

    Sending sparse 'system_a' 2/2 (524184 KB) OKAY [ 13.006s]

    Writing 'system_a' OKAY [ 3.538s]

    Sending 'system_b' (65728 KB) OKAY [ 1.654s]

    Writing 'system_b' OKAY [ 0.589s]

    Sending 'vendor_a' (241236 KB) OKAY [ 6.002s]

    Writing 'vendor_a' OKAY [ 1.644s]

    Erasing 'userdata' OKAY [ 2.053s]

    mke2fs 1.44.4 (18-Aug-2018)

    Creating filesystem with 6509568 4k blocks and 1630208 inodes

    Filesystem UUID: 83ab1f9b-75d3-42b9-8089-4819c789455a

    Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000

    Allocating group tables: done

    Writing inode tables: done

    Creating journal (32768 blocks): done

    Writing superblocks and filesystem accounting information: done

    Sending 'userdata' (4412 KB) OKAY [ 0.186s]

    Writing 'userdata' OKAY [ 0.115s]

    Rebooting OKAY [ 0.044s]

    Finished. Total time: 48.982s

    6 条回复    2022-12-20 15:13:33 +08:00
    jeesk
        1
    jeesk  
       2022-11-07 23:44:06 +08:00
    自己拿到刷机包的代码 print 打印关键部位
    calloc
        2
    calloc  
       2022-11-08 09:41:38 +08:00 via iPhone
    尝试关闭 dm-verity
    654656413245
        3
    654656413245  
       2022-11-08 12:48:27 +08:00
    logcat
    dmesg
    StonyGround
        4
    StonyGround  
    OP
       2022-11-22 11:36:39 +08:00
    更新
    ------------------
    今天终于有时间把内核编译了一下,官方新出了一个内核编译的方法,详见 https://source.android.com/docs/setup/build/building-kernels?hl=zh-cn
    下个阶段准备打日志了
    StonyGround
        5
    StonyGround  
    OP
       2022-11-23 11:16:04 +08:00

    ------------------------------------------------------
    拿到了 dmesg 日志,和正常的开机日志( https://github.com/pytorch/cpuinfo/blob/master/test/dmesg/pixel.log )对比了一下,暂时发现两处异常:
    1. [2.085510] SELinux: Permission xxxx in class xxxxx not defined in policy.
    大概有 50 行都是这种错误,不知道是不是因为 userdebug 的原因
    2.[ 2.192804] init: Couldn't load property file 'xxxxxx': open() failed: No such file or directory: No such file or directory
    紧接着 SELinux 执行完,就是 init 报错,手机上也是找不到这些文件
    StonyGround
        6
    StonyGround  
    OP
       2022-12-20 15:13:33 +08:00
    破案了,家人们,用 ubuntu18 编译后刷完正常开机
    不要用 22 !不要用 22 !不要用 22 !
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4971 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 01:13 · PVG 09:13 · LAX 18:13 · JFK 21:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.