1

I tried to remove it using Runtime.getRuntime().exec("ps clear com.android.chrome"); but it will return java.io.IOException: Cannot run program "su": error=13, Permission denied after I tried it with rooted phone but it also getting same error. after that I use File handling to remove /data/data/com.android.chrome but it also getting same error

Android version is 7.0

is it possible to do?

1 Answer 1

2

First You need to root your Android device properly

after that

follow this instruction below

add this to the dependency in build.gradle (app)

`implementation 'eu.chainfire:libsuperuser:1.0.0.+'`

then

call this method form Shell in your action method

Shell.run("su",new String[]{"pm clear com.android.chrome"},true);

or

Shell.SU.run("pm clear com.android.chrome"); 

it will properly working latest android version too

I'll guarantee to you it will work from android 6.0 to latest

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.