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 9194023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:18:18+00:00 2026-06-17T21:18:18+00:00

I want to decrypt the encrypted apk file in private mode, I know it

  • 0

I want to decrypt the encrypted apk file in private mode, I know it is possible to decrypt it to a particular location.

Im using the following code to decrypt it to a sdcard.

FileInputStream fis = new FileInputStream("/sdcard/encrypted.apk");

FileOutputStream fos = new FileOutputStream("/sdcard/decrypted.apk");
SecretKeySpec sks = new SecretKeySpec("MyDifficultPassw".getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, sks);
CipherInputStream cis = new CipherInputStream(fis, cipher);
int b;
byte[] d = new byte[8];
while((b = cis.read(d)) != -1) {
    fos.write(d, 0, b);
}
fos.flush();
fos.close();
cis.close();

}

But is it possible to decrypt apk file in a private mode…?

  • 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-17T21:18:19+00:00Added an answer on June 17, 2026 at 9:18 pm

    It looks like you are mixing things up. MODE_PRIVATE or in detail Context.MODE_PRIVATE is used if you want to create a file in the app’s data directory.

    Using MODE_PRIVATE doesn’t make use of encryption at all, it simply sets the file access permissions so that only the app itself can access the file.

    On a lot of devices the /sdcard section is a separate partition or sd-card formatted with fat32 – which does not support permissions on file-level at all. Therefore MODE_PRIVATE will not work on the path.

    If you need a FileOutputStream in MODE_PRIVATE you can simply call:

    FileOutputStream fos = context.openFileOutput(filename, Context.MODE_PRIVATE);
    

    The context is the Context of your App. It will work at least in the app’s private data directory.

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

Sidebar

Related Questions

I want to Check whether a NSF file is Encrypted or not (using C#).
I've have a .txt file containing an NSString (encrypted using a private key) that
I encryptd a file using gpg , now I want to decrypt the file.
I use some code to encrypt & decrypt string in C# but i want
want to know why String behaves like value type while using ==. String s1
Is it possible to decrypt the EncryptByCert-encrypted data that is stored in a SQL
I want to decrpyt the encrypted message digest. i hav this code in my
I want to encrypt and decrypt a file containing usernames and passwords. Since this
I'm struggeling with code from this page: http://www.androidsnippets.com/encrypt-decrypt-between-android-and-php I want to send data from
I have a bunch of encrypted files that I want to decrypt (duh). I

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.