Samsung TV (anynet+) control with Android Device using HDMI CEC
问题 I am using command line to control the TV like power on, power off, volume up and volume down from rooted Android Device. i am able to power on and power off using the following command. Process p; try { p = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(p.getOutputStream()); os.writeBytes("su" + "\n"); // power on command os.writeBytes("echo 0x40 0x04" > /sys/class/cec/cmd" + "\n"); os.writeBytes("exit\n"); os.flush(); } catch (IOException e) { e.printStackTrace(