wkz / phytool

Linux MDIO register access
GNU General Public License v2.0
143 stars 75 forks source link

phytool print not running on later versions of Android #7

Closed lagerholm closed 3 years ago

lagerholm commented 3 years ago

Since a few year back %n is not allowed in Android libc anymore due to security reasons: https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336

phytool print uses %n in print_phy.c::print_attr_name and it will thus not run on Android newer then 2018 ish (8 or 9).

This might not be a problem for Andriod on mobile devices since they rarely have a PHY. I encountered this problem on a custom device that the company I work for is developing where we have a radio module that runs Android and that has a PHY that I wanted to debug. This is a pretty common use case I think.

wkz commented 3 years ago

Fixed in #8

Thank you!

lagerholm commented 3 years ago

No problem! Just happy to help. Great tool by the way! Helped us a lot with our debugging.