79744657

Date: 2025-08-24 03:10:07
Score: 1
Natty:
Report link

Fixed it.

@KamilCuk was correct about the issue and the general solution in their answer here, but their specific implementation didn't work for me as it created other errors (see my reply to KamilCuk's answer if curious)

As KamilCuk correctly IDed, the adb command was accepting input continuously as a stream and was just eating the whole file as a single input while it was being looped through line by line.

The answer I got to work was to set the -n flag in the adb shell command which is "Don't read from stdin" in the man page. So the fix was going from the default streaming version of:

adb shell pm uninstall --user 0 "$CURRENT_LINE"  

to the "Don't read from stdin" version of:

adb shell -n pm uninstall --user 0 "$CURRENT_LINE"
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @KamilCuk
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: natS