0

I have a rooted MediaTek Infinix Hot 5 (X559C). It was Android 7.0 Nougat before. And I don't remember correctly, but I think adb root was working.

But after installing custom Android 8.1 Oreo XOS ROM and rooting with Magisk, the ADB shell works as root correctly. I can execute

C:\Users\user> ADB Shell
Infinix-X559C:/ $ su
Infinix-X559C:/ #

and it gives me # and no problem with that. But when I try adb push/pull, it gives me an error with permission denied. When I execute adb root, it gives me this output

adbd cannot run as root in production builds

I tried Adbd Insecure, but nothing changed. I also tried adb-root Magisk modules, but they run with arm64 and aarch64 only, and my phone is 32-bit armeabi-v7a, so they corrupt. Connection with PC makes my phone unreadable on PC until I remove them from Magisk Manager.

And I really want to know what production builds is and how to patch adb daemon.

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Savçı
  • 11
  • 2
  • Production build means certain build/compile flags when building the Android ROM that are designed to generate an image installed on a phone to be sold (instead of a debug build). In such builds adb daemon for example drops root permissions as part of the startup process so calls like adb root will not work. To my knowledge dropping permissions is done by Linux C commands like setuid. So if you want to patch adb you have to disassemble adb daemon binary find that call, overwrite it with nop or smgh. Like that and then write the patched adb daemon binary. – Robert Nov 24 '23 at 21:05
  • 1
  • 1
    Does this answer your question? Why does "adb root" do nothing? – Robert Dec 22 '23 at 12:49

0 Answers0