juzim / tuiapis

A library/repository for using APIs in the t-ui launcher for Android
MIT License
3 stars 1 forks source link

Alternative for phone without 'awk' tools by default #1

Open privateca opened 7 years ago

privateca commented 7 years ago

Just testing out this script but not working on the phone without 'awk' command. It seems here that not every phone comes with busybox's 'awk' command by default unless to root it and install the extras busybox command. In this case, there's 'curl' command. It's a great idea if you can offer the alternative for that case.

juzim commented 7 years ago

I didn't know that awk was installed by busybox and I'll try to make it work without root.

Can you please elaborate what you mean with using curl instead? Curl is already used to download the json result, awk only makes it parsable in bash.

Another solution would be to use JSON.sh but apparently you need to be able to change file permissions when you want to call a bash script from inside another, which again requires root.

privateca commented 7 years ago

For 'curl', I mean here, that there is a possibility that certain phones doesn't have it installed by default too.