mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05: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
|
BOOTSIGNED=false
|
||||||
|
|
||||||
get_outfd() {
|
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
|
# We will have to manually find out OUTFD
|
||||||
for FD in `ls /proc/self/fd`; do
|
for FD in `ls /proc/$$/fd`; do
|
||||||
if readlink /proc/self/fd/$FD | grep -q pipe; then
|
if readlink /proc/$$/fd/$FD | grep -q pipe; then
|
||||||
if ps | grep -v grep | grep -q " 3 $FD "; then
|
if ps | grep -v grep | grep -q " 3 $FD "; then
|
||||||
OUTFD=$FD
|
OUTFD=$FD
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user