Dees-Troy / android_device_huawei_berkeley

For building TWRP for Honor View 10 ONLY
2 stars 14 forks source link

oeminfo_nvm 4x crash reboot bootloader #1

Open ghost opened 6 years ago

ghost commented 6 years ago

Hello I flashed the official build today and on my device BKL-L04, I have an issue with the device rebooting to the bootloader shortly after TWRP loads. Unfortunately, I am not in a position to simply fix this myself and submit a pull request.

As you may or may not know, if a service is defined as critical and fails to start 4 successive times, init will "reboot to bootloader". This is the case for my device. The service in question is "oeminfo_nvm" defined in the vendor partition @ /vendor/etc/init/init.recovery.huawei.rc. The reason it fails to start is that its "unable to setexecon "u:r:oeminfo_nvm:s0". Since this happens keeps happening the 4x init quota is reached and boom. Reboot bootloader. Here is the relevant dmesg entries.

<10>[ 23.383880s][pid:399,cpu5,init]init: cannot setexeccon('u:r:oeminfo_nvm:s0') for oeminfo_nvm: Invalid argument <11>[ 23.383880s][pid:1,cpu7,init]init: cannot find '/system/vendor/bin/aptouch_daemon', disabling 'aptouch': No such file or directory <14>[ 23.383911s][pid:1,cpu7,init]init: processing action (boot) from (/vendor/etc/init/init.recovery.huawei.rc:430) <14>[ 23.384063s][pid:1,cpu7,init]init: Service 'oeminfo_nvm' (pid 399) killed by signal 6 <14>[ 23.384063s][pid:1,cpu7,init]init: Sending signal 9 to service 'oeminfo_nvm' (pid 399) process group... Possible solutions (without modifying the recovery_vendor partition): 1. I was able to temporary issue the following commands to prevent rebooting to bootloader. I had to do it quickly. So, stopping the service before it crashes 4x is one way. Perhaps on fs just "stop oeminfo_nvm". `adb shell stop oeminfo_nvm.` 2. Patch init not to reboot for this failure? 3. Define and include the selinux context required for oeminfo_nvm to run?
joshchoo commented 6 years ago

Hi @Meticulus, I'm facing the same issue on the BKL-L04. Did you get around to building TWRP with the fix you linked? I would be delighted if you could make it available

ghost commented 6 years ago

I didnt "build" but I just unpacked the official TWRP, added line in my commit, and repacked it.

ghost commented 6 years ago

@joshuous I released it here : http://www.meticulus.co.vu/p/kirin970.html

joshchoo commented 6 years ago

@meticulus, this is fantastic thank you!