Android Program doesnot show any output
<p>Why does the following program does not respond at all? I have been struck in this from past 2 days...can anyone please help?</p>

<pre><code>package com.iiitb.nikhil.testApp;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class TestAppActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);        
        try {
            Process process = Runtime.getRuntime().exec("/system/bin/su");
            DataOutputStream os = new DataOutputStream(process.getOutputStream());
            DataInputStream is = new DataInputStream(process.getInputStream());
            os.writeBytes("/system/bin/ls -l /data \n");
            String s = null;


            //tv.setText(is.readLine());

            byte[] buffer = new byte[100];
            int numread=0;
            while(is.read(buffer)&gt;0)
            {
                    tv.setText("hi");
            }


//          tv.setText(is.readLine()+"hi");
//          Log.i("Test",is.readLine());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        setContentView(tv);

    }
}
</code></pre>

<p>Output of LogCat</p>

<pre><code>09-20 00:56:13.164: INFO/ActivityManager(176): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.iiitb.nikhil.testApp/.TestAppActivity }
09-20 00:56:13.164: INFO/Launcher(251): onPause()
09-20 00:56:13.234: INFO/ActivityManager(176): Start proc com.iiitb.nikhil.testApp for activity com.iiitb.nikhil.testApp/.TestAppActivity: pid=4006 uid=10083 gids={}
09-20 00:56:13.314: INFO/Launcher(251): onWindowFocusChanged(false)
09-20 00:56:13.564: WARN/PowerManagerService(176): Timer 0x7-&gt;0x3|0x0
09-20 00:56:13.564: INFO/PowerManagerService(176): Ulight 7-&gt;3|0
09-20 00:56:21.647: WARN/PowerManagerService(176): Timer 0x3-&gt;0x3|0x0
09-20 00:56:23.180: WARN/ActivityManager(176): Launch timeout has expired, giving up wake lock!
09-20 00:56:23.321: WARN/ActivityManager(176): Activity idle timeout for HistoryRecord{4a5846e8 com.iiitb.nikhil.testApp/.TestAppActivity}
09-20 00:56:38.647: WARN/PowerManagerService(176): Timer 0x3-&gt;0x1|0x0
</code></pre>
