PowerApp
PowerApp

Reputation: 33

How to reboot the app system without restarting the device?

I want to be able to restore all the app that are installed on the device, I have this need because my application fulfills the function of adding and removing data from the directories of the user applications that are /data/app /data/data and /data/dalvik-cache. For the reason that the system does not recognize that it is there if not until the device is restarted and I need to be able to run those added files, or update those deleted files so that they do not appear as existing.


Actually, I have no idea how to create a similar method and I do not know any class of android or java that allows what I want to achieve.

If you know anything, on this subject to help me clear the path that is obstructed by doubts. Please let me know. Thank you.

Upvotes: 0

Views: 835

Answers (1)

user7486817
user7486817

Reputation: 57

Maybe root access is required for this to work.

Runtime.getRuntime().exec("su & pm clear " + packagename);

You can also use array of commands(String[] cmds) and execute them using Runtime. Use adb shell or terminal emulater (prefered). Type "pm" and hit enter to learn more. Just don't use it for any wrong purpose

Upvotes: 1

Related Questions