Manually, we can run:
adb shell su chmod 666 /dev/graphics/fb0 export CLASSPATH=/data/local/device.jar export LD_LIBRARY_PATH=/data/local exec app_process /system/bin com.device.client.Main /data/local/device.conf &
However, we need to be able to run that from a bash script on the computer compiling the program.
I have tried:
adb shell "su && chmod 666 /dev/graphics/fb0 && export CLASSPATH=/data/local/device.jar && export LD_LIBRARY_PATH=/data/local && exec app_process /system/bin com.device.client.Main /data/local/device.conf &"
But since we are entering the su shell, this does not work.
Can you please suggest a solution?