Technical question regarding LE<->CE switch

Hi
I absolutely do not want to bring up the fight between the two app, my question is technical, and it is about the boot loader of the two distribution.
Apparently LE requires an armbian style multi-boot that requires some activation.
I do not know more, because, sadly, there is this “attitude” on LE forum, which is not, how to polite say it, “customer oriented”.
I wanted to help with the mainline progress, but I do not want to stick a box with LE without having the chance to switch to CE again.
A while back, around end of last year, it was enough to boot in android and redo the “reboot update” to boot in CE and LE and back and forth.
Now in the LE forum, there is written that coming from CE, requires a full android firmware restore to boot in LE…
Does anyone know more on this?
Bye!

Maybe depends on the box. With SBC boards there cannot be any problem…

Absolute nonsense.

All that is required is holding the reset button on your device to switch between CE and LE, this forces your device to read aml_autoscript and the first line of this resets u-boot variables back to their default allowing you to boot whatever distro you want.

Since some boxes don’t have “Reset” switch, could that be a problem ? Should other methods to install CE work without problem ?

Essentially yes unless the user has done installtointernal and has no reset button then in that case the user would be required to reinstall Android.

The amount of boxes without a reset button though is minimal.

There are three methods:

  1. long press the reset button (or power button)
  2. Reboot to … (from playstore)
  3. use ota with a dummy zip
    Last year I’ve tried because I had two cards, with different OS’s and all methods worked well.
    Now I don’t know what could have changed but I think it still works.

So actually it is as it was last year.
Reboot in android and redo ota/reboot update/toothpick method.
Is it so hard to say/write it in LE forum?
I really cannot understand …
However, thanks for the information

It would be good if you posted back your experience of this and how it compared with what you previously understood.
No doubt there are others with the same dillema.

The reason for why they are so strict regarding this is that they support install to eMMC. If you for instance have installed CE to eMMC and later want to install AltLinux, ArchLinux, Armbian, LE, Manjaro etc. to eMMC, you will likely have issues. One should think that burning Android back to eMMC and example toggle “full erase” would solve this, but unfortunately sometimes it doesn’t and the only solution is to wipe eMMC completely before a new installation.

If you plan to example use Android/LE/Armbian/etc on your eMMC and boot CE from a SD card or USB whenever you want, this shouldn’t be an issue. Regardless, let us know when you have tested this further :+1:

My experience is as follows:
I have a x96 max (s95x2) and I had CE installed on a sd. I wanted to try LE with kodi 19 alpha and it started. I put CE in the sd again and it also started. The problem is now I can’t start the tvbox with the remote. So to recover the start-up again with the remote control, do you have to put the stock or is there any other solution?

That is strange, unfortunately I cannot tell you why this could have happened. Have you tried to boot back in android and redo the “ota/reboot update/toothpick” to boot in CE?

You could try to use remote.conf file for you remote. It possible will fix your issue

@miankel please do not hijack threads, this thread is about switching between CE and LE.

There is plenty of threads regarding the issue of not being able to wake from standby which is not related to the topic of this thread.

So basically the autoscript is being loaded by the vendor uboot when triggering recovery mode and the env from the autoscript is merged with the original env?

And then when booting, the vendor uboot boots CE uboot and this then loads the kernel and the kernel loads busybox?

@quta you got it almost exactly right except CE does not bundle a custom uboot except for C2/N2/LePotato.

When you press the reset button during bootup then recovery mode is initiated and during that process the bootloader searches external media for aml_autoscript.

In aml_autoscript we first tell the bootloader to reset the enviroment partition back to its defaults and then to load our kernel and dtb and to always attempt to load them from external media first everytime the device boots, this is then saved to the environment partition that uboot reads on every boot up.

It sounds more complicated than it actually is but needless to say aml_autoscript is only read and its contents executed when that button is pressed.

You only have to do this once each time you switch to whatever OS you choose to run and if your running CE from external media then you most certainly do not have to reinstall Android and lose all your data.

@adamg

A pity that it cannot initiate this process even in a hard reboot (Removal of the plug from the electricity) if my device does not have a reset button and or android.

This is just 1 of the reasons that we advise users against using installtointernal.

I believe there is a way to force aml_autoscript to be re-read on reboot but I can’t remember it from the top of my head, @Portisch may have the answer.

When booted in CE fw_setenv upgrade_step 3 in a SSH connection and reboot. On the next boot the aml_autoscript will get executed. I don’t know if the command is included at LE/Android.

Or u run the aml_autoscript directly:

dd if=aml_autoscript bs=72 skip=1 status=none | while read line; do cmd=$(echo $line | sed -n "s|^setenv (.*\)|fw_setenv -c $SYSTEM_ROOT/etc/fw_env.config \1|gp") [ -n "$cmd" ] && eval $cmd done

Untested, I don’t know if this works on SSH connection.

Edit:
I also never tested it but I guess when in Android and execute reboot update will also re-read the aml_autoscript file from SD/USB.

And u are sure your box does not have a reset button? Sometimes the button is hidden in the audio jack. Use a wooden toothpick and try it.

Thank you for the information, I’ll try those commands via the SSH connection in the LE in installtointernal. I have Scishion V88PRO and nowhere I could find the reset button or in the audio jack.
Installed the I LE into the installtointernal a long time ago when it was LE 8, now I know that it was vain and silly. :frowning:
But it is interesting that LE me to the SD card it goes to install, will boot me without a problem.

It seems that a toothpick in the AV when booting should reset.

Shoog