Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing shortcut for AndroidTV #1

Open
Schaka opened this issue Aug 24, 2024 · 5 comments
Open

Missing shortcut for AndroidTV #1

Schaka opened this issue Aug 24, 2024 · 5 comments

Comments

@Schaka
Copy link

Schaka commented Aug 24, 2024

Since the app is missing one and I lost the source, you can just install this on your Android box and it WILL start HybridELEC Rebooter if installed too.

Feel free to add it to the repo with a little note.
Rebooter_ATV.zip

@7Ji
Copy link
Collaborator

7Ji commented Aug 26, 2024

Thanks, would add this to README.

Actually I'd prefer to (re)write the rebooter and open-source it here and add the shortcut. But sadly that would not be top priority.

@Schaka
Copy link
Author

Schaka commented Aug 26, 2024

Yeah, I figured. If you can tell me roughly what it requires, I may give it a shot.

I'm fairly confident in my Java/Kotlin skills, but the last time I touched Android at all was 2014, so it's been a while.

Edit: If I can find the time, I may try to decompile and see what I can restore.

@7Ji
Copy link
Collaborator

7Ji commented Aug 26, 2024

That app is not complicated. It just packs statically compiled 32-bit fw_setenv built against Debian Wheezy armhf, extracts it to exetutable place, su to run it with root permission, set bootcmd to something like restoring the envs to default then executing boot script from a certain partition (5 for CE, 6 for EE IIRC), then reboot. As the bootcmd itself would restore the envs to default next boots would go into Android, unlike official CE/EE booting logic. But if I'm rewriting this I would not carry fw_setenv and pass args anymore, I'd rather write a dedicated .c for the job.

A bonus point, whatever systems you deploy alongside Android, be it CE, EE, or CE+EE, you can always boot into the first system using their official booting logic. That is, if you booted an external CE/EE once and your booting envs are updated by them, the SD->USB->eMMC CE/EE->Android booting flow goes just like if you've installed the first system using ceemmc. In that case Android can only be entered through their GUI option. Using HE Rebooter to boot to eMMC CE/EE once and the box would be fixed back to Android booting flow.

Another bonus point, there could be no Android system at all. You can really just flash an image with only essential parts (for <S905X4 pretty much only bootloader and DTBs are needed, for >=S905X4 more box-specific AB partitions are needed). Some external helper is needed to deploy CE/EE official booting flow in this case once before eMMC CE/EE is bootable (e.g. insert CE/EE SD card and make sure they boot into system, after that their booting flow would be persistent). I don't provide hepacker building options for this case as there's no easy guess for which partitions to keep, and such image would be abused easily by box resellers, especially for EmuELEC.

@7Ji
Copy link
Collaborator

7Ji commented Aug 29, 2024

FYI I've started to write hybrid_android_helper, a single binary to encapsule all root operations. The future rewrite of Rebooter should only need to extract it and run it with simple arguments.

@Schaka
Copy link
Author

Schaka commented Aug 29, 2024

Thanks. I haven't had a chance to look into it yet. I'll try over the weekend if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants