How to retrieve the passwords of all accounts in Android?
<p>I would like to retrieve passwords of all accounts (Facebook, Dropbox, Gmail, etc) associated in my Android phone... I have tried the coding below, but not able to get the passwords...</p>

<pre><code>    AccountManager am = AccountManager.get(this);
    Account [] acc = am.getAccounts();
    if (acc.length &gt; 0){
        for (int i=0; i&lt;acc.length; i++){
            String password = am.getPassword(acc[i]);
            listedAcc += acc[i] + " Password:" + password.toString() + "\n\n";
        }
        accounts.setText(listedAcc.toString());
</code></pre>

<p>Can someone troubleshoot this for me... Thanks</p>
