2

Seem my hook is work(sometime first run is failed but again run is seem no any library problem), Seem lack socket support in initramfs?my system is debian 9.Seem normal debian system provide socket support by man systemd.socekt.5. if I use init=/bin/bash to boot normal debian system,seem I get same problem.

I want take image file from non-rooted android phone to memory and boot from that image file.

initramfs initramfs my hook:

#!/bin/sh
PREREQ=""
prereqs()
{
     echo "$PREREQ"
}

case $1 in
prereqs)
     prereqs
     exit 0
     ;;
esac

. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line

copy_exec /usr/bin/adb /sbin
for x in $(dpkg -L android-libadb android-libbase android-libcutils libgcc1 libc6 libstdc++6 gcc-6-base |grep -e '^/lib/' -e '^/usr/lib/'); do
    copy_exec "${x}" "${x}"
done

cp -a "/lib/udev/rules.d/51-android.rules" "${DESTDIR}/lib/udev/rules.d/51-android.rules"
exit 0
illiterate
  • 953
  • 7
  • 22

0 Answers0