openandroidinstaller icon indicating copy to clipboard operation
openandroidinstaller copied to clipboard

Add support for LineageOS recovery (if possible)

Open MagicLike opened this issue 2 years ago • 7 comments
trafficstars

Is your feature request related to a problem? Please describe. Some devices supported by LineageOS have no TWRP support.

Describe the solution you'd like If it is possible add scripting for LineageOS recovery to OAI (related to the OrangeFox support #188 )

MagicLike avatar Jul 31 '23 19:07 MagicLike

Yes, this is in my head for some time (and actually the installer started with only LineageOS recovery). Thanks for adding it to the issues!

Yet, I haven't figured out how to do the scripting in the LOS recovery, I have to find some time to dig in the source code of the recovery. Of course, there might be the option to use the LOS recovery without scripting, and people pressing buttons on the device screen. I thought about a "simple lineage os" mode, where you just can install official lineage OS images with the official lineage os recovery. But I'm not sure about this way. What do you think?

tsterbak avatar Aug 04 '23 06:08 tsterbak

I add a quick look when I discovered OAI because I wanted t script with eOS recovery which is based on LOS recovery -> I could not find similar scripting support to TWRP but I might be wrong

freechelmi avatar Aug 04 '23 08:08 freechelmi

I start to take a look on it, here what I found :

  • Lineage recovery has some scripting commands.
  • We can use adb wait-for-sideload / adb wait-for-recovery (and a third one iirc)
  • We can use adb sideload <package>
  • We cannot use adb shell twrp <something>. And I didn't find equivalent.
  • But according to this, there are workarounds : https://android.stackexchange.com/questions/240997/lineageos-recovery-command-line-interface
  • Additionally, we can use fastboot commands to erase partitions.

This issue is similar to #73 .

ghost avatar Aug 04 '23 08:08 ghost

But according to this, there are workarounds : https://android.stackexchange.com/questions/240997/lineageos-recovery-command-line-interface Additionally, we can use fastboot commands to erase partitions.

These are both more dangerous than going through a recovery. Thats part of why they exist. You could also just write all required files to the right partitions directly from fastboot (like the google pixel scripts by google or the graphenos is installer is doing it). But for that you need to know way more about the devices and everything needs to work well or it breaks...

tsterbak avatar Aug 04 '23 08:08 tsterbak

Ok, so... not a good idea. So maybe we should create a step by step install process specifically for LOS recovery ? As far I know, it's the last solution we have.

ghost avatar Aug 04 '23 08:08 ghost

I believe it would be really useful to support each ROMs own recovery, if possible edit: nvm this is #73

RaptaG avatar Jun 07 '24 10:06 RaptaG

There are only a few different recoveries :

  • TWRP
  • OrangeFox
  • LineageOS recovery, and all recoveries that are just rebranded (like /e/OS, evolutionX, ...)
  • Some other stuff like Sky Hawk, Pitch Black, but I think they can be ignored for now, unless there are phones supported by these recoveries but not TWRP/OFox.

The main point with LineageOS recovery is that it does not support scripting, so user have to follow some steps manually (factory reset & sideload). But it shouldn't be hard to implement.

ghost avatar Jun 07 '24 15:06 ghost