I changed the script to run on Alpine (ash)
`#!/bin/ash
INTERVAL=0.05
WORK_PROFILE_NAME="Work profile"
echo "⏳ Watching for $WORK_PROFILE_NAME creation..."
while true; do
USERS=$(adb shell pm list users 2>/dev/null)
WORK_LINE=$(echo "$USERS" | grep -i "$WORK_PROFILE_NAME")
if [ -n "$WORK_LINE" ]; then
USER_ID=$(echo "$WORK_LINE" | sed -n 's/UserInfo{\([0-9]\+\):.*/\1/p')
if [ -n "$USER_ID" ]; then
echo "Installing"
adb shell pm install-existing --user $USER_ID com.android.vending &
adb shell pm install-existing --user $USER_ID com.google.android.gms &
adb shell pm install-existing --user $USER_ID com.microsoft.office.outlook &
adb shell pm install-existing --user $USER_ID com.microsoft.teams &
adb shell pm install-existing --user $USER_ID com.microsoft.office.excel &
adb shell pm install-existing --user $USER_ID com.microsoft.office.word &
adb shell pm install-existing --user $USER_ID com.microsoft.office.powerpoint &
adb shell pm install-existing --user $USER_ID com.microsoft.skydrive &
adb shell pm install-existing --user $USER_ID com.microsoft.teams &
adb shell pm install-existing --user $USER_ID com.microsoft.emmx &
adb shell pm install-existing --user $USER_ID com.azure.authenticator &
wait
echo "🎉 Injection complete. You can now return to your phone and continue provisioning."
exit 0
fi
fi
sleep "$INTERVAL"
done`
everything went ok but when getting to compliance it says my device has been compromised (device its rooted), we couldn't certify your device... c'mon... disable exploit compatibility and turn off USB debug and no go...