How to take backup the installed application's .apk file in device or emulator which we're using by programmatically. Thanks in Advance.
Eventually, the Android OS is a Linux OS.
If you have root access to your device, you can copy the protected files and do whatever you want with them.
The APK files are located in the /data folder.
I am sure this kind of programming not possible (May be possible for rooted phone), because just consider if this is possible then paid application's Apk can easily available in market in free of charge, so if this is the case then what does it mean to develop paid android application?
Even though, it is possible then i am really interested to learn this programming snippets.
Related
Is it possible to install two instances of the same app on a rooted Android device?
I know, that the Android system distinguishes apps based on their package name.
It is possible to decompile apps with tools like apktool, change the Manifest file and recompile / sign them. However, for more sophisticated applications (e.g., if they have multiple apk files packed in a apkx file) or complex dependencies this not always works.
I do not want to work with third party applications like Dual Space, Titanium Backup and so on.
How would you approach this?
A few options:
Use lucky patcher's "clone" function in the tools menu (shouldn't be hard to find)
Copy the app apk out of system memory and edit it manually (good luck, text file "readers" read it fine, editors do not)
Use an apk editor to change the package name (I have a copy of one if necessary)
I am new to programming my own apps, since I used to work on old programs on the pc. Is there a file like the .exe in my old programs? Little backround information: I need to execute the app on a phone without a physical connection and without the typical appstores. In my imagination I can store something like the release file online and my users can download it?
Thanks for teaching me.
Hello and welcome to the community! On Android, the file you are looking for is called an APK, you can take that file and install it on other devices easily. For iOS it's a bit more complicated and you can't share the IPA files and install them as for android, you are confined to using a physical device or sending it over using testflight, which is provided by Apple for testers.
You can find those APK files inside your project's folder in the following path:
build/app/outputs/flutter-apk
I want to protect my application from being copied by users from device to another device. I know that wont be possible because once the apk is installed any third party application may be able to copy or extract the apk. I mostly care about the private data of the application rather than the apk itself. So, my questions are :
1- Can I protect the apk from being copied to another device by the user ?
2- If user copied an application from device to another (e.g. via third party app or by bluetooth) will he/she be able to copy the private data as well ? If yes, can I protect that ?
Thanks in advance.
To answer briefly, AFAIK, No.
Regarding the single questions:
if device is rooted it's really easy to access the /data/app/ dir and copy your apk, even on the device itself.
For un-rooted devices you need to issue some adb commands. For reference, look here:
https://stackoverflow.com/a/11013175/1865860
https://stackoverflow.com/a/17135554/1865860
How to get a list of installed android applications and pick one to run
the same applies to /data/data/com.example.app/ for the private app's data. Just different folder and possibly many files to copy.
Basically the difference it's not in having root or not, but in the ease of realization.
you can use google licence in your app even if its copied from rooted device it wont work until its downloaded from playstore
second /data/data/<packagename>/ can be copied from rooted device
Can users with a rooted device view files in the assets folder of my app?
I ask because I intend to place files there that can be accessed from the application, however they should not be viewable in any other way.
I am developing on Froyo 2.2
Yep, sure can. Assets is just another directory on the filesystem of the device. Permissions are enforced on those based on the underlying Linux permissions model, so anyone with access to root on the device can access anything on it.
There is an in-depth discussion of how the assets of applications are isolated/protected, as well as a discuss about how root can access them and how you can protect against this, in Application Security for the Android Platform (disclaimer: I'm the author of this book). Basically, if you're concerned about root having access to files within your application, you're going to want to encrypt them so even if root can get to them, they will not be readable. This approach has a lot of its own implementation problems, all centered on how you manage the keys used to encrypt/decrypt the files. While there are things you can do to make it much more difficult for someone with root to get as your application's files, you cannot make this impossible as root users have full control over the device and everything on it.
Its not possible to prevent anyone getting to your assets.
I am building an Android app in which client is selling some mp3 files. Now my question is, when I copy these files in the resources folder, will they will be exposed when someone will explore the file system?
The reason why I am asking this question because I have seen application on Android market which can let you explore the android file system (you can also do this by attaching your device to your PC) and you can check what's in inside the application directory.
So if this is possible, how I can make sure my resources are secure?
Thanks.
Now my question is, when I copy these files in the resources folder, will they will be exposed when someone will explore the file system?
Yes.
So if this is possible, how I can make sure my resources are secure?
You can't.
What you're asking for would only be possible on a trusted computing (a.k.a. treacherous computing) platform, which Android is not.