大型连续剧之拯救变砖黑莓KEY2之第九集—-离成功不远了?

前景提要,之前利用KEY2LE工程机创建了rawprogram0.xmlpartition.xml,刷入之后发现systemvendor分区没有创建成功。

  这两天我先寻找各种出问题的地方,比如之前用python校验生成rawprogram0.xml的时候发现num_partition_sectors在生成start_sector运算时,小于8时需要用8来计算,还有其他一些小问题。再就是对partition.xml进行校验,写了个python函数如下:

def rebuild_partition(filepath, size_dict):
    tree = ET.parse(filepath)
    root = tree.getroot()
    for node in root:
        if node.tag == 'physical_partition':
            for child in node:
                label = child.get('label')
                if label and len(label) > 0:
                    # if label.endswith('_a') or label.endswith('_b'):
                    #     label = label.replace('_a', '').replace('_b', '')
                    size_in_kb = size_dict[label]
                    child.set('size_in_kb', size_in_kb)
                else:
                    print(child.tag, child.attrib)

    tree.write('./files/partition.xml', encoding='utf-8', xml_declaration=True)

最后就是patch0.xml的生成,虽然我觉得已经没有什么问题了,再次刷机之后vendorsystem分区也出现了,但是仍然无法启动系统,跳至bootloader界面,看样子是启动内核步骤就挂了,还没有到启动init进程,再找找原因,如果不行再使用Evolve X来辅助抢救。

2 response to "大型连续剧之拯救变砖黑莓KEY2之第九集—-离成功不远了?"

    By: eboy998 Posted: 2021年12月5日

    我觉得你看看这个对https://blog.csdn.net/jeephao/article/details/117428789你修复KEY2以及了解各文件的作用有帮助

      By: cocozq Posted: 2021年12月6日

      谢谢提供,感觉暂时救不回来了,firehose是找得其他固件的,也不知道能不能用,有太多不了解的东西了

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

 桂ICP备15001694号-3