Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:01:45+00:00 2026-06-13T03:01:45+00:00

Can we clear or delete data of one application from another application in android.

  • 0

Can we clear or delete data of one application from another application in android. If it is not possible simply could you please suggest any tricky way to do this like to go to the folder in internal memory and delete that folder programatically.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:01:46+00:00Added an answer on June 13, 2026 at 3:01 am

    Simple answer,

    Android is designed that this should not be possible.

    But when using root access you can actually delete folders from other applications.

    I believe if two applications having a different package, but with the same signature, actually can have access to each others private folders. Or i’m not sure, i believe you could add some kind of declaration to you manifest file allowing other (friend) apps to have access to your private folder. But i’m not sure i should search for it.

    Edit after search:

    Apps having the same android:sharedUserId and android:sharedUserLabel and signature have access to each others private files.

    http://developer.android.com/guide/topics/manifest/manifest-element.html#uid

    Two Android applications with the same user ID

    Edit 2:

    There are some private methods in the android API, witch can be used to clear app data i think. I’m not sure but if you reflect those methods with the right permissions in you manifest file it could be possible to clear app data, but i’m not 100% sure.

    Some small example code:

    Method clearApplicationUserData = getReflectedMethod("clearApplicationUserData", String.class, IPackageDataObserver.class);
    

    And the method i use the get it reflected…

    private Method getReflectedMethod(String methodname, Class<?>... args) {
        Method temp = null;
        try {
            temp = pm.getClass().getMethod(methodname, args);
        } catch (SecurityException e) {
    
            return null;
        } catch (NoSuchMethodException e) {
    
            return null;
        }
        return temp;
    }
    

    The IPackageDataObserver class should be copied from the original android source, and added as new class in the source folder of your project under the package android.content.pm.

    When you want to clear user data i think you should invoke the method like this:

    public void clearApplicationUserData(String packageName) {
        if (clearApplicationUserData != null) {
            try {
                clearApplicationUserData.invoke(pm, packageName, data_helper);
            } catch (IllegalArgumentException e) {
    
            } catch (IllegalAccessException e) {
    
            } catch (InvocationTargetException e) {
    
            }
        }
    }
    

    The data_helper is any class extending the IPackageDataObserver.Stub class.

    You can find a lot of questions about reflecting methods and stuff here on stackoverflow.

    I have no idea if this works but this is the only way i can think of.

    Rolf

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I retrieve one activity arraylist into another activity and store,update and clear?
I can't seem to find it anywhere... How do I delete/destroy/reset/empty/clear a user's session
I have a Foreign Key from one model into another model in a differente
I know you can clear options by doing the following: dropDownList.options.length = 0; Is
Hoping someone can clear this up for me. Let's say I have 2 globals:
Can I clear browser cache of the page when I'm leaving it. // Clear
How can I clear all textboxes / uncheck checkboxes in my asp.net page without
How can I clear or refresh the page in the browser using javascript? I
Hoping that someone can help clear up this very annoying situation I find myself
My question is how can i clear the editText field after i have saved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.