title: Access denied finding property "ro.serialno"
body: <p>I've been trying to create a json format to display it on the android app so I can use it on my ewallet project but I've been getting error Access denied finding property &quot;ro.serialno&quot; or &quot; org.json.JSONException: End of input at character &quot;</p>
  <p>I think the main reason of the connection is the error of Access denied, also before the Run debugging I've been seein a lots of denied permissions.</p>
  <p>This is my code on the login for the e-wallet:</p>
  <pre><code>package RAMS.e_wallet;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.EditText;
  import android.widget.Toast;
  
  import com.android.volley.AuthFailureError;
  import com.android.volley.Request;
  import com.android.volley.RequestQueue;
  import com.android.volley.Response;
  import com.android.volley.VolleyError;
  import com.android.volley.toolbox.StringRequest;
  import com.android.volley.toolbox.Volley;
  
  import org.jetbrains.annotations.NotNull;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import java.util.HashMap;
  import java.util.Map;
  
  public class Login extends AppCompatActivity {
  private static EditText etNumber, etPassword;
  private static String phone = null;
  private static final String password = null;
  private static final String URL = &quot;http://192.168.1.218/login1/login/login.php&quot;;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_login);
      etNumber = findViewById(R.id.username);
      etPassword = findViewById(R.id.password);
  }
  public void backToMenu (View v){
      phone = etNumber.getText().toString().trim();
      if(!phone.equals(&quot;&quot;)){
          StringRequest stringRequest = new StringRequest(Request.Method.POST, URL, new Response.Listener&lt;String&gt;() {
              @Override
              public void onResponse(String response) {
  
  
                  try {
                      JSONObject jsonObject = new JSONObject(response);
                      Toast.makeText(Login.this, jsonObject.getString(&quot;success&quot;),Toast.LENGTH_LONG).show();
  
                  }
  
                  catch (JSONException e){
                      e.printStackTrace();
                      Toast.makeText(Login.this, &quot;e&quot;+e.toString(), Toast.LENGTH_LONG).show();
                  }
  
              }
          },
                  new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(Login.this, &quot;err&quot;+error.toString(),Toast.LENGTH_LONG).show();
              }
          }){
              @NotNull
              @Override
              public Map&lt;String, String&gt; getParams() throws AuthFailureError {
                  Map&lt;String, String&gt; data = new HashMap&lt;&gt;();
                  data.put(&quot;phone_number&quot;, phone);
                  return data;
              }
          };
          RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
          requestQueue.add(stringRequest);
      }
  
  
      else {
          Toast.makeText(this, &quot;Fields cannot be empty!&quot;, Toast.LENGTH_SHORT).show();
  
      }
  }
  
  
  
  public void switchRegister (View view){
      Intent intent = new Intent(this, Register.class);
      startActivity(intent);
      finish();
      }
  
  }
  </code></pre>
  <p>here's my dependencies on the gradle</p>
  <pre><code>dependencies {
  
  implementation 'androidx.appcompat:appcompat:1.2.0'
  implementation 'com.google.android.material:material:1.2.1'
  implementation 'androidx.constraintlayout:constraintlayout:2.0.3'
  implementation 'androidx.annotation:annotation:1.1.0'
  implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
  implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
  testImplementation 'junit:junit:4.+'
  androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  implementation 'androidx.cardview:cardview:1.0.0'
  implementation 'androidx.recyclerview:recyclerview:1.1.0'
  implementation 'com.squareup.picasso:picasso:2.71828'
  implementation 'com.android.volley:volley:1.1.0'
  implementation 'com.squareup.okhttp3:okhttp:4.9.0'
  testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.0'
  
  }
  </code></pre>
  <p>my PHP code for the login</p>
  <pre><code>    &lt;?php
  
      class Reply{
  
     function procced(){
  
         if(isset($_POST['phone']))
         {
         require_once &quot;conn.php&quot;;
         require_once &quot;validate.php&quot;;
         $phone = var_dump($_POST['phone']);
         $sql = &quot;select * from users where phone_number= '$phone'&quot;;
         $result = $conn-&gt;query($sql);
  
  
           if($result-&gt;num_rows &gt; 0)
             {
              session_start();
              $data=[&quot;response&quot;=&gt;&quot;success&quot;];
              return json_encode($data);
             }
         
           else{
             $data=[&quot;response&quot;=&gt;&quot;error&quot;];
             return json_encode($data);
           }
       }
  
       $data=[&quot;response&quot;=&gt;&quot;error&quot;];
             return json_encode($data);
      }
    }
  
  ?&gt;
  </code></pre>
  <p>and the Json format that i've been trying :</p>
  <pre><code>package com.example.json;
  
  import androidx.appcompat.app.AppCompatActivity;
  import android.app.DownloadManager;
  import android.os.Bundle;
  import android.widget.TextView;
  import org.jetbrains.annotations.NotNull;
  import java.io.IOException;
  import okhttp3.Call;
  import okhttp3.Callback;
  import okhttp3.OkHttpClient;
  import okhttp3.Request;
  import okhttp3.Response;
  
  public class MainActivity extends AppCompatActivity {
  private TextView mTextview;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      mTextview = findViewById(R.id.textviewresult);
      OkHttpClient client = new OkHttpClient();
      String url = &quot;http://192.168.1.218/jsonlogin/json.php&quot;;
  
      Request request = new Request.Builder()
              .url(url)
              .build();
  
  
      client.newCall(request).enqueue(new Callback() {
          @Override
          public void onFailure(@NotNull Call call, @NotNull IOException e) {
              e.printStackTrace();
          }
  
          @Override
          public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
                  if(response.isSuccessful()){
                      String myResponse = response.body().toString();
  
                      MainActivity.this.runOnUiThread(new Runnable() {
                          @Override
                          public void run() {
                              mTextview.setText(myResponse);
                          }
                      });
  
                  }
          }
      });
    }
  }
  </code></pre>
  <p>the json code is in a different activity because i'm trying to display numerous data for a textview</p>
  <p>also, all of the codes have the internet permission on their manifests</p>