Question to the experts on Android

Who can collect a new version of the utility shut down and restart in Android ? Need to change the algorithm of this utility. After selecting the desired item in the menu, the utility should call the script with a specific name. Need 4 menu.

  1. Restart (calls the script “reboot.sh” with a set of commands to reload)
  2. Shutdown (executes the script “poweroff.sh” with a set of poweroff commands)
  3. Rebooting LibreElec (calls the script “rebootfromlibreelec”, which should set a variable in u-boot “bls = libreelec” and reboot)
  4. Rebooting in Linux (calls the script “rebootfromlinux”, which should set a variable in u-boot “bls = linux” and reboot).

I need this for inclusion in a new version of the firmware MultiOS 3in1 (Android+Libreelec+Linux). LE Linux and I’ve already added the necessary elements, but I’m not good at Android so I need help with the Assembly of the desired utility for Android.

You can refer to this Patch
Have a try. :smiley:

1 Like

Oops … This is a patch for the source code, to build a new version of Android ? I have not tried to build completely from source Android. :blush:

Terry, you can build the binary “/bin/power” ? If I understand correctly, he’s responsible for the shutdown menu. I can replace the firmware and to collect a new image (/dev/system/bin).

Yes, it is a patch for the source code and only for reference.

I don’t understand what you mean. what’s the binary “/bin/power” ? What can I do for you?

Hi, Balbes150:
From the patch Terry provided, for multi OS, can be done like this:

If in Android OS

  • Menu Power off: Shutdown
  • Menu Reboot: reboot to Android again by run command reboot
  • Menu Reboot to LE: reboot to LE OS by run command reboot le
  • Menu Reboot to Linux: reboot to Linux OS by run command reboot linux

If in Linux OS

  • Menu Power off: Shutdown
  • Menu Reboot: reboot to Linux OS again by run command reboot
  • Menu Reboot to LE: reboot to LE OS by run command reboot le
  • Menu Reboot to Android: reboot to Android OS by run command reboot android

If in LE OS: same with Linux OS

I think in the Android system, is a binary file that runs when you press the off button on the remote control. On the screen opens a menu with options to shutdown, reboot and reboot into Ubuntu. I assumed that this binary file /dev/system/bin/power (or some other ?). If you collect new variant of the file (with applied patch) and send me this new variant of the file with (power), I can put in my version MultiOS_3in1.

For LE and Linux I already did those options. In shutdown menu LE is already running in GUI mode. In Linux I soon plan to collect a special graphical utility for these modes and fan control. By the way, I put together a new version of u-boot for MultiOS_3in1, which allows you to update the firmware DualOS kernel (used in Linux Mate) to version 4.9.40. I checked, everything works.