Using “printf” for hex values in android shell

后端 未结 2 1539
心在旅途
心在旅途 2021-01-23 11:47

I am porting my shell script (quite big shell script) from bash to android shell (mksh shell).

In Android, printf does not seem to be working the same way a

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 12:08

    printf in Android is linking to toybox

    root:/ # which printf
    /system/bin/printf
    root:/ # ls -l /system/bin/printf
    lrwxr-xr-x root     shell             2016-11-14 21:02 printf -> toybox
    

    So the issue turned out to be in toybox printf.

    The issue is now fixed - https://github.com/landley/toybox/issues/54

提交回复
热议问题