"Wait for 30 seconds before proceeding"
#1  Renate 01-31-2023, 10:06 AM
You've probably not noticed this and if you did it probably didn't make a dent in your life.
If your bootloader is unlocked then every time your device reboots (including powering up from fully off) it will wait for 30 seconds.
The idea is to display a warning that your device is unlocked.
Unfortunately (or fortunately) there is no warning implemented so it's rather pointless.
I've wasted years of time waiting for this 30 seconds as I've switched between edl, fastboot, recovery, system.

So, I wrote a patch for abl (the Android bootloader) that skips this delay.
It's only a teensy mod but of course it requires unpacking/packing/rehashing.
I have it running on my Poke3 just fine. It's a dandy improvement (for me).
If you'd like the same for your device, just pull and give me a copy of your abl.

#2  denisuu 01-31-2023, 02:19 PM
That's awesome! So it actually cuts 30 seconds of the boottime?

#3  Renate 01-31-2023, 02:31 PM
Yes, it kills the dead time.
Still, if you're a normal user and never reboot (just sleep) you'll hardly notice the difference.

Edit: I've got creating the patch down to 100% automatic procedure now.

#4  mergen3107 02-01-2023, 09:52 PM
But does this mean that if you got stuck in a “bootloop” like in a neighboring thread with removed system apps, you have no chance to talk via adb during boot? So edl will be the only option left

#5  Renate 02-02-2023, 06:31 AM
Quote mergen3107
You have no chance to talk via adb during boot?
The earliest you ever get ADB is after Linux has started and the init daemon has started ADB.
This is about 10 seconds before you see your home screen.
With some systems ADB has to wait until the Android subsystem sets the USB configuration.

Here's a short rundown of booting:
Run Primary BootLoader (PBL) from ROM
Run Secondary BootLoader (xbl) from flash
Run Android Bootloader (abl) from flash
If want to do fastboot -> Do fastboot (inside abl)
If want to do recovery -> Load recovery
Load boot image, but don't start it
If device is unlocked Print "Wait for 30 seconds before proceeding" Sleep 30 seconds (doing absolutely nothing)
Start boot image
Start init daemon
Start adbd
Start zygote (Android subsystem)
Start home application (Launcher)
So, in those 30 seconds, there is no ADB running, no EDL, it's not even listening for key presses.

#6  mergen3107 02-02-2023, 09:49 AM
Ok! I might give it a try
Where do I find the abl?

#7  Renate 02-02-2023, 10:13 AM
Do you have an EDL loader for this?
I just want to make sure that you have EDL available in worst case.

You can:
C:\>adb shell
# dd if=/dev/block/by-name/abl of=/sdcard/abl
# ^D
C:\>adb pull sdcard/abl
This is presuming that you're not A/B, i.e. abl_a, abl_b

#8  mergen3107 02-02-2023, 01:08 PM
Yes, I do have EDL and I can access it without command line. That was my step 1 even before achieving root.

Thanks! I’ll PM you when I find it this evening.

#9  mergen3107 02-03-2023, 09:33 PM
Thank you Renate!

Customized loader by you works OK!

However, I haven’t seen the 30 sec improvement, maybe only 10-15 sec. Total boot time after restart is 40 sec. What are your timings before and after the patch?

#10  Renate 02-04-2023, 06:33 AM
I went back and checked the timings.
There really should be exactly a 30 second difference and there is.
I ran this from adb reboot with a chained desktop timer:
adb reboot & wndctrl timer /kspace Onyx logo boot animation starting Android Launcher ready --------- -------------- ---------------- --------------
abl 5 15 25 30
ablmod 5 45 55 60

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register