'error: device not found' while connected to device through adb shell Trying to deodex my Samsung Galaxy S4 (SC-04E).

My device shows up upon adb devices, and I am able to successfully connect and su with adb shell. In shell:

C:\Users\username&gt;adb devices
List of devices attached
905859f9        device
C:\Users\username&gt;adb shell
shell@SC-04E: $ adb pull /system/app app/
error: device not found
shell@SC-04E: $ su
root@SC-04E:/# adb pull /system/app app/
error: device not found


I have no idea why I am getting this message. USB debugging enabled and confirmed, MTP on, unknown sources on (off tested as well), and latest adb USB driver installed (also tried reinstalling/updating). I have also tried rebooting my computer and device several times, and tried different USB ports (3.0, 2.0, etc). 

Google searches only show me solutions for people who lacked the obvious settings (USB debugging) or their device not showing up at all upon adb devices. A device clearly is found, as it is connected to a device.
You must run adb on your host PC instead of your device. The adb is a host program that operates on another device. To pull data from your phone, make sure you run adb like this:  

C:\Windows\system32>adb pull something yourPC  

If you run adb shell then you're entering your phone, where you are actually running /system/bin/adb instead of adb.exe on your Windows PC. Your phone is a client device, not the host device.
If you want to pull a file from a root-required place, you must first copy it to somewhere else before pulling it out. Like this  

C:\Windows\system32>adb shell
shell@SC-04E:/ $ su
root@SC-04E:/ # cp /path/to/somefile /sdcard/somefile
root@SC-04E:/ # exit
shell@SC-04E:/ $ exit
C:\Windows\system32>adb pull /sdcard/somefile D:\somefile  

For your question about why adb returns nothing, you can try this to find out.
Plug in another adb-enabled phone using an OTG cable on your primary phone (in your case, Galaxy S4) and get a terminal emulator. Type in adb devices and run on your primary phone you can see it like this.  

root@SC-04E:/ # adb devices
List of devices attached
12345678        device