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

Proper Support for A-Only SAR #1674

Closed
DrDeke opened this issue Jul 6, 2019 · 9 comments

Comments

@DrDeke
Copy link

commented Jul 6, 2019

Greetings,

First, I want to apologize in case it was inappropriate to create this as a new issue instead of a comment to the similar-sounding issue #1547. Since my stock ROM version and fastboot command outputs are different than #1547, I thought it might help avoid confusion to make this a separate issue.

I tried creating a patched boot.img for my Moto G7 Play (XT1952-4, stock ROM version CHANNEL_PPY29.105-116_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC) with Magisk Manager and, like @ctonton had happen in #1547, after flashing the patched boot.img and rebooting, Magisk Manager still says that Magisk is not installed.

I then downloaded canary-builds/app-debug.apk and used it to patch my boot.img again. After flashing the magisk_patched.img that the canary build produced and rebooting again, the canary build of Magisk Manager still says that Magisk is not installed.

I am attaching the following files to this comment:

  • The magisk_install_log generated by the canary-debug manager
  • The console output of fastboot from flashing that image onto the phone (fastboot-flash.txt)
  • The original/stock boot.img (zipped)
  • The patched magisk_patched.img generated by the canary-debug manager (zipped)

Like @ctonton, I noticed that the patched image is approximately 17 MB in size while the original image is 32 MB in size. I am not sure whether that is a problem, but it seems like it could be indicative of one.

Please let me know if there is anything else I should try, or any additional information I can provide that might be helpful.

magisk_install_log_2019-07-06T182425Z.log
magisk_patched.zip
boot.zip
fastboot_flash.txt

@martyfender

This comment has been minimized.

Copy link

commented Jul 11, 2019

Do you have: allow apps from unknown sources enabled in Android settings, security?

@DrDeke

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

Do you have: allow apps from unknown sources enabled in Android settings, security?

This is Android 9 (Pie) so, as far as I can tell, there is no global "allow apps from unknown sources" option under Settings -> Security.

Under Settings -> Apps & notifications -> Special app access, there is a per-app permission of "Install unknown apps". Previously I had not enabled this for Magisk Manager, so just now I enabled it, updated Magisk Manager to the latest version, and used it to again patch my boot.img.

The new magisk_patched.img file that was created has the same md5sum as my previous magisk_patched.img. I flashed this image onto the phone anyway with "fastboot flash boot magisk_patched.img" and received the same fastboot output as before. I then booted the phone and ran Magisk Manager but, as before, it still says that Magisk is not installed.

I looked at the magisk_install_log that was generated by Manager when patching the boot.img and its contents were substantially the same as before (although I am attaching them for the sake of thoroughness).

magisk_install_log_2019-07-11T11:49:46Z.log

@topjohnwu

This comment has been minimized.

Copy link
Owner

commented Jul 14, 2019

I bet it is 99% due to A only system-as-root. Will keep this issue open until a streamlined way to deal with it is discovered

@JarlPenguin

This comment has been minimized.

Copy link

commented Jul 20, 2019

Can confirm for Xiaomi Redmi 6A's new Pie update which includes SaR support

@topjohnwu topjohnwu changed the title Patched Image Installation Failure on Moto G7 Play Proper Support for A-Only SAR Aug 12, 2019

@13-beta2

This comment has been minimized.

Copy link

commented Aug 14, 2019

I bet it is 99% due to A only system-as-root. Will keep this issue open until a streamlined way to deal with it is discovered

If you check boot image attached by @DrDeke you'll see the same kernel layout as I described at #1714
And that issue was hastily closed with label 'wontfix'

@SyberHexen

This comment has been minimized.

Copy link

commented Aug 26, 2019

I'm confused why this device is considered 'A-only SaR'
We have magisk issues on g7 (river) and (ocean) which are A/B SaR

Channel also appears to be an A/B device. The firmware's info.txt says "AB Update Enabled: True" and there are system and oem images that flash to slot _b

@JarlPenguin

This comment has been minimized.

Copy link

commented Aug 30, 2019

Channel also appears to be an A/B device. The firmware's info.txt says "AB Update Enabled: True" and there are system and oem images that flash to slot _b

https://github.com/AndroidDumps/motorola_channel_dump/blob/user-9-PPYS29.105-57-4-d6c0f-release-keys/system/system/build.prop#L69 also confirms this

Seems more like an issue with zImage as @13-beta2 said, which will not be fixed

@JarlPenguin

This comment has been minimized.

Copy link

commented Sep 1, 2019

Further confirming that this is an issue with zImage/32-bit systems is that Magisk works fine on the Redmi Note 7, which is an A-only system-as-root device running an arm64 ROM, as opposed to all of the devices listed here so far

@SyberHexen

This comment has been minimized.

Copy link

commented Sep 1, 2019

Further confirming that this is an issue with zImage/32-bit systems is that Magisk works fine on the Redmi Note 7, which is an A-only system-as-root device running an arm64 ROM, as opposed to all of the devices listed here so far

See the Motorola G7 (river) is 64bit a/b device

Magisk is working with only the stock boot.img on my device
magisk_install_log_stock.log
stock_boot.img.zip

After rebuilding the stock kernel stand-alone or inline the device bootloops with magisk installed
magisk_install_log_lineage.log
custom_boot.img.zip
Console
https://del.dog/usanokuton
RAMOOPS
https://del.dog/inopenebed.pl

I believe its also zimage generation related so maybe there should be a patch/hack or some sort of documentation for generating magisk compatible zimage

@topjohnwu topjohnwu closed this in 86481c7 Sep 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.