Closed PsychoGame closed 3 years ago
This doesn't actually solve the problem to be honest. This just inverts the situation. What should be done in this case is read the value of the persistent usb setting on the misc partition, and set the variable "current_usb_mode" accordingly. As the flag on the misc partition resembles the state of the usb mode on modem bootup.
The correct way of handling this is by checking the misc partition to check if the adb flag is set. I already added the function to do it but haven't wired it to openqti's initialization yet: https://github.com/Biktorgj/meta-qcom/blob/faa1b6f8a29ed520fe0b838ae33bd3156cc4d001/recipes-modem/openqti/files/src/atfwd.c#L75
With that, we can set the correct flag at boot and don't assume it is one way or another
Let's see how this works:
https://github.com/Biktorgj/meta-qcom/commit/5ae3866cafa42a84892ac5520d6143e4faf8be87
That's indeed the most easy and proper solution. It solves the problem both ways. Currently I'm back at home, so have a proper build machine available as well. I'll try to build a release again with this patch included and report back. I'll leave the relevant issue open for as long as there is no new official build yet, so others can find the current workaround for now.
If you want to give it a quick run, you can use a test build I posted for another issue, fully up to date with the repo:
https://github.com/Biktorgj/pinephone_modem_sdk/files/6872792/mobian_test3.tar.gz
It apparently works good for me :)
Will test your uploaded test build. Currently setting up build machine anyway. I'm experimenting with the realtime linux kernel patchset. Modem applications can benefit a lot from realtime running kernels
Closing this PR. Issue has been fixed with mobian_test3
Now we disable ADB persistently at standard boottime, this variable is not tracking correctly anymore. This patch sets it to the correct value at initial boot.