logd, the init.recovery.logd.rc, and other related files were included by default if your device configs specified TARGET_USES_LOGD := true which would be the case for any device that has a full ROM tree instead of a minimal TWRP tree. Change-Id: Ia1e55703631f0f22beab2f4d4479599b88539e1a
20 lines
527 B
Bash
Executable File
20 lines
527 B
Bash
Executable File
#!/bin/bash
|
|
|
|
process_file()
|
|
{
|
|
src=$1
|
|
dst=$1-1 #/$(basename $2)
|
|
cp -f -p $src $dst
|
|
|
|
sed "s|/system/bin/linker64\x0|/sbin/linker64\x0\x0\x0\x0\x0\x0\x0|g" $dst | sed "s|/system/bin/linker\x0|/sbin/linker\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/bin/sh\x0|/sbin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst-mod
|
|
#sed "s|/sbin/linker\x0|/system/bin/linker\x0\x0\x0\x0\x0\x0\x0|g" $dst | sed "s|/sbin/sh\x0|/system/bin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst-mod
|
|
rm $dst
|
|
}
|
|
|
|
|
|
dest=$1
|
|
for ARG in $*
|
|
do
|
|
process_file $dest $ARG
|
|
done
|