FORUMS
Remove All Ads from XDA

[MODS][SCRIPTS] Zackptg5's Misc Projects

3,546 posts
Thanks Meter: 5,477
 
By Zackptg5, Senior Member on 20th December 2018, 02:59 PM
Post Reply Email Thread
5th June 2019, 04:39 PM |#81  
Recognized Contributor
Thanks Meter: 2,882
 
More
Quote:
Originally Posted by Zackptg5

Hmm, clear works fine for me in bash

Not here. See image. Also coreutils (or any symlinks to it) gives a bad system call if not running as root. Works fine if you're root. Not a huge deal since I almost always am root in a terminal.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190605-113140.jpg
Views:	154
Size:	57.3 KB
ID:	4771909  
 
 
5th June 2019, 04:42 PM |#82  
OP Senior Member
Thanks Meter: 5,477
 
More
Quote:
Originally Posted by jcmm11

Not here. See image. Also coreutils (or any symlinks to it) gives a bad system call if not running as root. Works fine if you're root. Not a huge deal since I almost always am root in a terminal.

I've seen this happen before but only on some roms. I don't know the cause but switching roms may solve the problem
5th June 2019, 05:52 PM |#83  
Recognized Contributor
Thanks Meter: 2,882
 
More
Quote:
Originally Posted by Zackptg5

I've seen this happen before but only on some roms. I don't know the cause but switching roms may solve the problem

I'm on stock Pie. Pixel 3 XL.
5th June 2019, 07:22 PM |#84  
OP Senior Member
Thanks Meter: 5,477
 
More
Quote:
Originally Posted by jcmm11

I'm on stock Pie. Pixel 3 XL.

Hmm. Can you send me a full logcat after trying to run it as root and not as root and try after setting selinux to permissive?

Then replace the coreutils binary with this one and see what happens?
I removed sort and timeout which are the 2 binaries that have causes this in the past
Attached Files
File Type: zip coreutils.zip - [Click for QR Code] (798.4 KB, 12 views)
5th June 2019, 09:12 PM |#85  
micgeb's Avatar
Senior Member
Thanks Meter: 45
 
More
Quote:
Originally Posted by jcmm11

That would be "ps ax", not -ax. That's bsd style. x isn't an option in POSIX or Unix formats. See the man page.

Yes really. What exactly are you trying to get ps to show you?

For example if you're just trying to get ps to show you all the processes try "ps -A" or "ps -e"

It's now working. Ty.
With a mac ps ax is working.
5th June 2019, 09:44 PM |#86  
Recognized Contributor
Thanks Meter: 2,882
 
More
Quote:
Originally Posted by micgeb

It's now working. Ty.
With a mac ps ax is working.

That's because a mac is based on BSD. BSD and 'nix are very similar but not quite identical. If this was a 'real' Linux distribution there's a good chance that ax (and possibly even -ax, with a warning) would have worked.

@Zackptg5 I'll get you those logcats in a little while.
The Following User Says Thank You to jcmm11 For This Useful Post: [ View ] Gift jcmm11 Ad-Free
6th June 2019, 02:03 AM |#87  
Recognized Contributor
Thanks Meter: 2,882
 
More
Quote:
Originally Posted by Zackptg5

Hmm. Can you send me a full logcat after trying to run it as root and not as root and try after setting selinux to permissive?

Then replace the coreutils binary with this one and see what happens?
I removed sort and timeout which are the 2 binaries that have causes this in the past

Logs attached. New coreutils works - no more bad system call. Want anything else just ask.
6th June 2019, 02:23 AM |#88  
OP Senior Member
Thanks Meter: 5,477
 
More
Quote:
Originally Posted by jcmm11

Logs attached. New coreutils works - no more bad system call. Want anything else just ask.

Dang, I thought coreutils 8.31 fixed this issue, guess not for all roms. And just like before, the logs show nothing :/

Both sort and timeout binaries have this problem but the rest of the coreutils are fine. I'll look into it once my exams are over. Thanks!
The Following User Says Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
6th June 2019, 02:44 PM |#89  
OP Senior Member
Thanks Meter: 5,477
 
More
Quote:
Originally Posted by micgeb

Updatedb don't work

Think I have the paths worked out. There's a couple in here that you can change to whatever you want - I made it sdcard/coreutils
It's just a shell script so you can open it with a text editor and compare, I included the original one and the one I changed so you can see what I changed. Let me know if there's a better place to store locatedb. I chose sdcard because it didn't need root permissions to store it there
Attached Files
File Type: zip updatedb.zip - [Click for QR Code] (8.1 KB, 12 views)
9th June 2019, 06:05 AM |#90  
micgeb's Avatar
Senior Member
Thanks Meter: 45
 
More
Quote:
Originally Posted by Zackptg5

Think I have the paths worked out. There's a couple in here that you can change to whatever you want - I made it sdcard/coreutils
It's just a shell script so you can open it with a text editor and compare, I included the original one and the one I changed so you can see what I changed. Let me know if there's a better place to store locatedb. I chose sdcard because it didn't need root permissions to store it there

I have added this 3 lines but now I get arg errors.

frcode="/system/xbin/frcode"
bigram="/system/xbin/bigram"
code="/system/xbin/code"

find does not support the parameters in the script. We need another version of find.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190609-070335.jpg
Views:	64
Size:	100.1 KB
ID:	4773861  
9th June 2019, 06:57 AM |#91  
Recognized Contributor
Thanks Meter: 2,882
 
More
Quote:
Originally Posted by micgeb

I have added this 3 lines but now I get arg errors.

frcode="/system/xbin/frcode"
bigram="/system/xbin/bigram"
code="/system/xbin/code"

find does not support the parameters in the script. We need another version of find.

I haven't tried running this yet but just took a (very) quick look into the script. Saw this code:
Code:
# The directory containing find.
if test -n "$BINDIR" ; then
    : BINDIR already set, do nothing
else
    : ${BINDIR=/system/bin}
fi

# The names of the utilities to run to build the database.
: ${find:=${BINDIR}/find}
: ${frcode:=${LIBEXECDIR}/frcode}
: ${bigram:=${LIBEXECDIR}/bigram}
: ${code:=${LIBEXECDIR}/code}
It looks like GNU Utils installs to xbin for you. So you need to also add
find="/system/xbin/find"

the GNU version of find does support fstype (at least according to it's help). Toybox version doesn't (at least it's not referenced in help).
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes