EmuELEC 4.5 has been released. I am excited and look forward to running it on my Phicomm N1(S905D) box.
I flashed the img into a USB disk and tried to boot EmuELEC 4.5 from USB on my Phicomm N1(S905D) box. Unfortunately, however, I found it’s unable to boot, even if I replaced the files(dtb.img, aml_autoscript and others) with some patch packages downloaded from Internet, which work well on older EmuELEC versions like 4.3 but fail on 4.5.
So I am asking is there any way to boot EmuELEC 4.5 on Phicomm N1(S905D)?
No, that’s not true. Please check out the official NOTE:
IMPORTANT: S905 (GXBB, p201) for the moment is no longer supported. If you have one of those devices (s905 no letter after the 5) DO NOT UPDATE, stay in 4.3.
ninja is right, theoretically the only incompatible device in 4.4/4.5 would be S905(no letter).
shortly after release the developer posted: "Seeing how bad v4.4 and v4.5 have been for some older devices, I’ve decided to go back to the old 3.14 kernel for these devices (older devices means s905, s905x, s905 (any letter here) but NOT s905x2, s905x3, s922x/a311d)
However, there are things to keep in mind.
this is a VERY OLD kernel, so don’t expect new drivers or driver fixes, if it doesn’t work for your device, there’s nothing to do, unless you want to waste time porting a driver (which I won’t ).
Some emulators will be older versions for the same reason and won’t update (eg n64)
Most likely the ports also suffer and some don’t even work.
You still have the option to run “amlogic-ng” but they are not compatible (updates will not work between them)
If your device is running Android 9 (I think?) and above, you will probably need to downgrade.
Please don’t ask me to fix or update emulator related issues (eg game running slow, game x not working, etc.), drivers or anything kernel related with this “old Amlogic” version.
It took me a few days to finish it, but I don’t have time to test it properly anymore, so if anyone wants to help with the tests (and I mean really test, not just boot up, but also give feedback), let me know and I’ll send you a link. private. If all goes well, a new project called “Amlogic-old” will replace the old “Amlogic”."
once read this S905D should be compatible with 4.4&4.5 (new kernel)using dtb p230/231 variants,BUT a soc very close to s905,even if booting it might have some problems. i would stay on 4.3 and wait if new release for “amlogic old” is possible soon
exactly. just a recommendation based on my experience with 4.4/5 on s905w/x devices, not to say don’t try. your s905d should be compatible. you choose. but if you can’t even boot 4.5 maybe you should wait and stay on 4.3 for now
I flashed EmuELEC-Amlogic-ng.aarch64-4.5-Generic.img.gz into a USB disk and copied the files in your patches to the first partition, and successfully runned it.
Then I tried to switch between Android TV (installed in N1 box) and EmuELEC(installled in a USB disk). It works if I switch from EmuELEC to Android TV by running REBOOT FROM NAND , but it doesn’t work if switch back from Android TV to EmuELEC by running LibreELEC.
No, by clicking “REBOOT FROM NAND” you just set the u-boot env bootfromnand=1 and reboot
With that env, the if-condition in bootcmd if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; run bootfromemmc; fi; run storeboot will become true and skip to storeboot, without running any boot command for CoreELEC/EmuELEC. Nothing will really change in this case.
However, running “Reboot to LibreELEC” will actually trigger a command reboot switch_bootmode, in that case u-boot will run what’s stored in switch_bootmode instead of bootcmd, if it exists. On normal boxes this will fail since switch_bootmode does not exist, and u-boot will run bootcmd instead. But that command actually exists on N1, its content is switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else if test $ {reboot_mode} = cold_boot; then run try_auto_burn; else if test ${reboot_mode} = fastboot; then fastboot;fi;fi;fi;fi;. , and since reboot_mode=cold_boot, this will lead u-boot to running try_auto_burn, and since try_auto_burn=update 700 750, it will run usb burning then recovery mode. This leads to the recovery you see.
Personally I very dislike Phicomm N1 due to scalpers pushing its price to almost 200 CNY and it’s totally not worth it (bruh, you can get a BesTV R3300L for under 50CNY with better support) and there’s too many blind users just buy the box under the influence of KOLs and expect everything to work and then blame all incompatability issues on Team CoreELEC and Team EmuELEC. It even has a proprietary dtb format ampart can’t support ([Official/Progress] Phicomm devices' support is incomplete · Issue #2 · 7Ji/ampart · GitHub) so dual-boot mode and partitioned single-boot mode in future install to internal script for EmuELEC won’t support this box. This box is not in the official supported device list anyway so you shouldn’t expect CoreELEC/EmuELEC to run without any issue.
Disclaimer: I’m just an ordinary EmuELEC user like you, the above is my personal opinion
Running fw_setenv reboot_mode normal under CoreELEC/EmuELEC or setenv reboot_mode normal; saveenv under u-boot should be enough to avoid “Reboot to LibreELEC” resulting in recovery, but I don’t have a N1 to actually test it
IMPORTANT: S905 (GXBB, p201) for the moment is no longer supported. If you have one of those devices (s905 no letter after the 5) DO NOT UPDATE, stay in 4.3.
Phicomm N1 uses S905D, so this box is still supported by the latest version of EmuELEC. Acutally, I even played some games with N1 after burning EmuELEC 4.5 into it.
So the problem now is not about supporting, but dual-boot. Your analysis about the problem is very professional and impressive to me. The next question, how to switch between my Andorid TV and EmuELEC smoothly ? I mean a complete solution to the problem , not running some commands every time I boot it.
I have rich experience in programming, but know nothing about Android TV and EmuELEC. So please be my teacher, thanks!
BTW: I didn’t buy a N1 box due to the influence of KOLs. I just happen to get it from my friend. Actually, N1 box is a powerful hardware, and I want to explore its full potential.
Updating the reboot_mode to normal via any of the method I posted before should be enough to solve the problem permanently until it is flipped back to cold_boot. Firmware updates are already unavailable so I don’t think it would be reverted in this way. But I can’t dig into Phicomm’s firmware so I don’t know if there’s any mechanic that will reset reboot_mode.
A supported SoC doesn’t neccessarily mean a supported device. A device is natuarylly supported only if the OEM didn’t do heavy modification to Amlogic’s bootup mechanism. Unfortunately for users of Phicomm and Xiaomi devices, these OEMs just modded the firmware to a next fricking level.
For Phicomm, they don’t even support abootimg so you are not actually using an official EmuELEC/CoreELEC image if you can boot into the system at all. The kernel image, init ramdisk, startup script and dtb in the patch are all non-official stuffs even if they were created AS-IS.
For Xiaomi, they even modded the emmc reserved partition offset but did it in a half-ass way.
And then, both of them use proprietary non-standard dtb formats so they can’t be modified for ampart to work. (ampart is a partition tool I’ve been working on in the past 2 weeks, that will give you complete freedom on repartitioning the emmc on supposedly any Amlogic devices. The new installtion to internel script aminstall I’ve commited to EmuELEC dev branch utilizes it to achive high-efficiency emmc installation, either on-emmc dual-boot with Android or single-boot with no Android BS. If you really “want to explore its full potential”, could you invest some time to help decypting the proprietary dtb format found on Phicomm N1? I don’t have such a box so bringing ampart support to it is not something with high priority)
fw_setenv binary is only available under CoreELEC/EmuELEC/Armbian, you can’t do this with adb. You need to SSH to the box and run it (the fw_setenv one), or get uart connection and interrupt the u-boot to run it (the setenv then saveenv one)
Or maybe you can? If you have root, you can dump /dev/block/env, and then running fw_setenv in whatever Linux distro against the dumped image, then write the image back to /dev/block/env. You can surely do these via adb shell. Heck, maybe you can cross-compile a static linked fw_setenv and upload it to the box and run it under adb directly.
No official installation to emmc methods worked, work or will work on Phicomm N1, since your system partition layout is already different. You’re using a custom layout while the official bootup mechanism will only work with stock layout, since all official installation methods assume you have not modified any of the kernel.img, aml_autoscript, etc.
You can only try your luck with a script made for N1 specificly. Disadvantage of this method is that you have to keep the Android partition layout even it’s impossible to boot Android again. Many Andorid BS including cache, vendor, oem, etc partitions can’t be erased. Also you can’t have Android+EE side-by-side dual-boot (+CE is possible, the space in system partition is enough for CE kernel and system images).
ceemmc (maintained by Team CoreELEC, used in -ng CE and <=4.3 -ng EE) or ampart+aminstall (maintained by myself, used in dev branch of EE) can erase these Android nonsense in single-boot mode. But these are impossible to run on N1. Due to the un-modifiable on-emmc dtb, ceemmc would brick your Android installation while ampart won’t run.
In fact, since you claim yourself “have rich experience in programming”, why don’t you install by hand? The whole installation process is just several commands. It’s a lot easier than installing Arch Linux for x86 since you don’t need to care for partiton layouts and bootloader.