android - Coping the database from one data/data into its data/data



  • I'm making an application for the slice. We need to compile a database of nastrogenes from /data/data/com.android.providers.settings/databases/settings.db into their data (data/com.albatros.nck.hacker/databases/

     try
        {
            java.lang.Process su = Runtime.getRuntime().exec("su");
            java.lang.Process busybox = Runtime.getRuntime().exec("busybox");
            java.lang.Process make_folder = Runtime.getRuntime().exec("mkdir /data/data/ru.albatros.nck.hacker/databases");
            java.lang.Process hack_copy_db = Runtime.getRuntime().exec("cp data/data/com.android.providers.settings/databases/settings.db data/data/ru.albatros.nck.hacker/databases/");
    
    }
    catch (IOException e)
    

    {}

    That's it
    In the launch, there is a window to confirm the root right, a database folder is being created in data/data/ru.albatross.nck.hacker but it does not have a database. Why? The Terminal team works great. What's wrong?



  • All your commances are carried out at different sessions and do not affect each other.

    Do it.

    try
        {
            java.lang.Process make_folder = Runtime.getRuntime().exec("su 0 mkdir -p /data/data/ru.albatros.nck.hacker/databases");
            java.lang.Process hack_copy_db = Runtime.getRuntime().exec("su 0 cp /data/data/com.android.providers.settings/databases/settings.db /data/data/ru.albatros.nck.hacker/databases/");
    
    }
    catch (IOException e)
    

    {}




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2