救活神器——刷机工程线
使用普通数据线简单改造即可:
1. 将数据线外皮剥开
2. 将绿线(D+)和黑线(地线)的外皮剥开
3. 将剥开的绿线和地线短接即可。
用改造好的工程线连接手机和电脑,
然后长按开机键8秒以上,让手机重启。
手机在重启过程中运行SBL时会检测到D+和地线短接,
然后让手机进入EDL模式(强制下载模式、9008模式),
然后用正常的数据线连接手机和电脑,再用QFIL刷机即可。
代码支持:
1. BOOT.BF.3.3/boot_images/core/boot/secboot3/hw/msm8952/sbl1/sbl1_config.c
boot_log_message(“USB D+ check, Start”);
boot_log_start_timer();
/* Check whether USB D+ line is grounded. If it is, then enter
PBL Download mode */
if(boot_usb_al_check_for_pbl_dload(0))
{
boot_dload_transition_pbl_forced_dload();
}
boot_log_stop_timer(“USB D+ check, Delta”);
2. 继续调用
BOOT.BF.3.3/boot_images/core/boot/secboot3/src/boot_extern_hsusb_interface.c
/*===========================================================================
** Function : boot_usb_al_check_for_pbl_dload
** ==========================================================================
*/
/*!
* @brief This function checks if the USB D+ line is grounded.
* @param core_id – [IN] USB core ID to initialize
* @return boolean – returns whether we should enter PBL EDL mode.
*/
boolean boot_usb_al_check_for_pbl_dload(uint32 core_id)
{
return qhsusb_al_check_for_pbl_dload(core_id);
}
3. 继续调用
BOOT.BF.3.3/boot_images/core/wiredconnectivity/qhusb/src/al/qhsusb_al_bulk.c
boolean qhsusb_al_check_for_pbl_dload(uint32 core_id)
{
#ifdef FEATURE_RUMI_BOOT
qhsusb_log_message(“usb:: not going for edl mode, pre-si mode”);
return FALSE;
#else
qhsusb_boot_log_message(“USB: qhsusb_al_check_for_pbl_dload”);
if(qhsusb_dci_check_for_pbl_dload(core_id))
{
qhsusb_log_message(“usb:: going for EDL”);
return TRUE;
}
return FALSE;
#endif
4. 最终调用
BOOT.BF.3.3/boot_images/core/wiredconnectivity/qhsusb/src/dci/qhsusb_dci_8976.c
//=============================================================================
/**
* @function qhsusb_dci_check_for_pbl_dload
*
* @brief Checks whether the device should be put into EDL mode or not
*
*
* @param core_id
*
* @return boolean TRUE: if D+ is connected to GND
* FALSE: if D+ is not connected to ground
* FALSE: if VBus is absent
* FALSE: if charger type is other than SDP/CDP
*
* @ref ChipIdea spec “CI13612a HighSpeed USB OnTheGo Controller Core”:
* Chapter 3.6.16 PORTSCx , PHY type selection.
* Chapter 3.6.12 ULPI VIEWPORT , control the PHY from the USB Core.
*
*/
//============================================================================
boolean qhsusb_dci_check_for_pbl_dload(uint32 core_id)
{
#ifdef FEATURE_FORCED_EDL_MODE_DISABLE
//for Emulation and simulation this feature needs to be
//disabled
qhsusb_log(QHSUSB_PBL_DLOAD_FEATURE_DISABLED_LOG, 0, 0);
(void)dci_enable_external_vbus_config;
(void)qhsusb_is_charger_type_sdp_or_cdp;
//Check whether USB cable is connected during boot up
return FALSE;
#else
… …
}
关闭此功能的方法:
找个合适的地方定义FEATURE_FORCED_EDL_MODE_DISABLE即可。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/37720.html