How to update the list of installed apps?

0

Hello everyone

I suggest my problem: I need to be able to update or refresh the installed apps of the system, since my application allows the user to install apps but in a root way moving the corresponding files ( the files that I move are the dex, the apk and the data, where the lib and the cache are included) to the / data, but the current problem is how to update the list of apps so that it creates or shows the launch icon of the application, I know that when the device is restarted all this is shown, but my project needs the ability to do these but without having to restart the device.

About my code these topics I do not know and in my research I did not find information regarding what I want. For that reason I do not currently have a code.

If you have any ideas I will be happy to hear it.

Code with which I move the files

        String[] command = {"su", "-c", "mv", "Ruta Al fichero", "Ruta a mover};

        try {
            Process proc = Runtime.getRuntime().exec(command);
            Toast.makeText(this, "Si", Toast.LENGTH_LONG).show();
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

This code the function that it has is to be able to move the files from one place to another by means of root commands, this code is the same one that I use to move the files to the / data.

    
asked by Abraham.P 04.03.2017 в 14:31
source

0 answers