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

Unable to detect boot image amlogic s905x #22

Closed
jfath opened this issue Dec 8, 2016 · 2 comments
Closed

Unable to detect boot image amlogic s905x #22

jfath opened this issue Dec 8, 2016 · 2 comments

Comments

@jfath
Copy link

jfath commented Dec 8, 2016

I was getting an error when attempting to flash Magisk v9 to my cheap amlogic s905x android TV box.

Looking at the install script, there is no by-name directory for the partitions, so that search will fail, but the section that looks at fstab.recovery seems like it should have worked. When booted into recovery, /etc/fstab.recovery has an entry that reads: /boot emmc /dev/block/boot. From the shell, I ran grep -E '\b/boot\b' /etc/fstab.recovery | grep -oE '/dev/[a-zA-Z0-9_./-]*' and it returned /dev/block/boot.

Here is the relevant code from update-binary:

Code:
find_boot_image() {
if [ -z "$BOOTIMAGE" ]; then
for PARTITION in kern-a KERN-A android_boot ANDROID_BOOT kernel KERNEL boot BOOT lnx LNX; do
BOOTIMAGE=readlink /dev/block/by-name/$PARTITION || readlink /dev/block/platform/*/by-name/$PARTITION || readlink /dev/block/platform/*/*/by-name/$PARTITION
if [ ! -z "$BOOTIMAGE" ]; then break; fi
done
fi
if [ -z "$BOOTIMAGE" ]; then
FSTAB="/etc/recovery.fstab"
[ ! -f "$FSTAB" ] && FSTAB="/etc/recovery.fstab.bak"
[ -f "$FSTAB" ] BOOTIMAGE=grep -E '\b/boot\b' "$FSTAB" | grep -oE '/dev/[a-zA-Z0-9_./-]*'
fi
}

I didn't debug further, but my only guess is that somehow $FSTAB isn't getting set correctly? I know the grep returns the correct string when I hard code fstab.recovery and run it in a recovery shell.

In the end, I inserted BOOTIMAGE="/dev/block/boot" into the update-binary file and the modified .zip installed without a problem. I have a working Magisk installation.

@jfath
Copy link
Author

jfath commented Dec 13, 2016

A little more information...
Apparently v8 installs OK on these AMlogic s905x boxes. There is a recovery.fstab file, but no recovery.fstab.bak. I mis-typed fstab.recovery in the original report when I meant recovery.fstab.

@topjohnwu
Copy link
Owner

It's a typo in the scripts, the latest commits have it fixed, thanks for the report!

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