mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Fix get_outfd in embedded mode
This commit is contained in:
parent
7ed2c077de
commit
c3b473e4bc
@ -23,10 +23,10 @@ BOOTSIGNER="/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp \$APK com.top
|
||||
BOOTSIGNED=false
|
||||
|
||||
get_outfd() {
|
||||
if [ -z $OUTFD ] || readlink /proc/self/fd/$OUTFD | grep -q /tmp; then
|
||||
if [ -z $OUTFD ] || readlink /proc/$$/fd/$OUTFD | grep -q /tmp; then
|
||||
# We will have to manually find out OUTFD
|
||||
for FD in `ls /proc/self/fd`; do
|
||||
if readlink /proc/self/fd/$FD | grep -q pipe; then
|
||||
for FD in `ls /proc/$$/fd`; do
|
||||
if readlink /proc/$$/fd/$FD | grep -q pipe; then
|
||||
if ps | grep -v grep | grep -q " 3 $FD "; then
|
||||
OUTFD=$FD
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user