- Where Android apps store data?
- 3 Answers 3
- How to install user apps as Android system apps
- Warning
- Requirements
- Installing a System App with ES File Explorer
- Installing a System App via ADB
- Как и зачем устанавливать App Store на Андроид?
- Зачем нужно устанавливать App Store на Андроид?
- Особенности установки App Store на Андроид
- Как скачать App Store на Android?
- Where in the file system are applications installed?
- 4 Answers 4
Where Android apps store data?
Could you list all possible directories where Android apps may store data, providing description what kind of data are stored in each directory?
3 Answers 3
All apps (root or not) have a default data directory, which is /data/data/
. By default, the apps databases, settings, and all other data go here. This directory is «private» to the app – which means no other app and not even the user can access data in it (without root permissions).
If an app expects huge amounts of data to be stored, or for other reasons wants to «be nice to internal storage», there’s a corresponding directory on the SDCard ( Android/data/
Apart from that, all apps can store data anywhere on the SDCard, as there are no restrictions — and many apps do so. They can use directory names freely (and they again do), which is what often makes it hard to decide what all that «junk» on the card is intended for, and what of it can be deleted.
Though, as Tom pointed out, root-apps could store their data almost everywhere on your device, they usually follow the same rules as other apps.
You can find a general explanation of the Android directory hierarchy in my answer here. For your specific question I might add some more details on the /data/data/
(and corresponding SD-part):
- databases/ : here go the app’s databases
- lib/ : libraries and helpers for the app
- files/ : other related files
- shared_prefs/ : preferences and settings
- cache/ : well, caches
There might be several more directories in this place, or fewer — it all depends on the app. In its own «home directory» (and that’s what it basically is, spoken Linux-wise) they can place files where they want. Usually, these files and directories are only accessible by the app itself (and root, of course) — other than those stored on the SDCard, which are accessible by all apps.
Some major changes occurred to storage in Android 4.4 (see Android’s Storage Journey). So the following is generally true for Android 4.4+ and particularly 6+.
This is from my detailed answer to How disk space is used on Android device?. Apps’ files are saved (by system and app itself) to internal and external storage under different categories.
All of the above paths on internal and external storage (primary and secondary) are app’s private directories which are accessible to respective app without requesting any permission. Apps can also create other directories (not explicitly available through APIs) in their private storage. All of these directories belonging to an app are deleted when the app is uninstalled.
Additionally apps can put their data anywhere on primary external storage (including some standard directories and other apps’ private directories) if WRITE_EXTERNAL_STORAGE permission is granted ( getExternalStorageDirectory returns /storage/emulated/ ). For secondary external storage and removable storage SAF is used. See details in How to save files to external SD card?.
However in Android 10 writing directly to primary external shared storage is deprecated ( getExternalStorageDirectory and getExternalStoragePublicDirectory are no more available). Apps need to use one of Android’s built-in content providers; either MediaStore (for media files) or SAF (for any other type of files).
/data paths may get replaced with /mnt/expand/[UUID] when using Adoptable Storage. /storage/emulated gets replaced with /storage/[UUID] when using secondary external storage (like SD card).
For multiple users/profiles is different, device owner is always 0 . /data/user/0 is a symlink to /data/data for historical reasons. Secondary external storage is only available to device owner.
OBB directory is shared among users/profiles (up to Android 9) to save space. FUSE/ sdcardfs always exposes /storage/emulated/obb as /storage/emulated/ /Android/obb .
/data/user_de is the Device Encrypted storage on FBE devices which lets certain apps run on boot without asking for user credentials.
/data/misc/profiles are used by ART for profile-guided compilation of app code.
Description of each directory is somewhat evident from names, details can be seen in API documentation.
Caches are cleared by OS when running low on storage, keeping apps exceeding the allotted quota on top.
Apps’ private files directories in external storage aren’t automatically scanned by MediaScanner but media directories are.
Caches and no_backup directories are not backed up to cloud. See official documentation.
Источник
How to install user apps as Android system apps
Part of the benefits of having an Android device is being able to install an app on it. Installing is as simple as one, two, three; just search for your desired app on the Google Play Store and hit the Install button. Though installing apps is easy, they can be installed as either user apps or system apps.
User apps are installed in the typical way via the Google Play Store, Amazon Appstore, third-party markets, or sideloading. In contrast, system apps are apps pre-installed in the phone’s system partition with your ROM and typically, Android device users don’t have the access to the system partition. This means that, ordinarily, users cannot directly install apps to or uninstall from the system partition.
You can install user apps as system apps by using such apps as Titanium Backup, but you have to go for the paid version of the app to be able to enjoy such feature. However, there are other methods to install user apps as system apps without paying fees. Check out this guide for methods of installing ordinary user apps as system apps.
Warning
- The information in this guide is provided for instructional and educational purposes only. There is no guarantee that these instructions will work under your specific and unique circumstances.
- Use these instructions at your own risk. We shall not hold any responsibility or liability for whatever happens to you or your device arising from your use of the info in this guide.
- Read and understand the whole guide first before actually performing the instructions.
Requirements
- A rooted Android device. If you haven’t rooted your Android device yet, you can check out our list of the rooting methods we’ve covered.
- Enable USB debugging on your Android device. On most Android devices, you can find USB Debugging in Settings > Applications > Development.
- Backup all personal data on your phone to make sure you have a copy of your personal data (e.g., contacts, SMS, MMS, Internet settings, Wi-Fi passwords, and the like) in case the procedure in this guide erases such data.
-
- For backup tips, check our guides on how to sync your data to the cloud and how to create local backups of your mobile data.
- Maintain a battery charge of 70% or more to make sure that you have sufficient power for the entire procedure.
Installing a System App with ES File Explorer
For this method, you will need root access and the ES File Explorer app. You can download this app free from the Google Play Store.
- Configure ES File Explorer by doing the following steps:
- Launch ES File Explorer.
- Select Menu and choose Settings.
- Under Settings, enable the options for Up to root and Root Explorer. A message will appear, requiring you to confirm your action. You will also need to confirm Superuser access.
- Enable Mount File System.
- Go back to the app’s main menu.
- Get a copy of the APK (Android Package) of the app that you want to save as a system file by doing the following steps (skip to step 3 if you already have the app’s APK file):
- Install an app from the Google Play Store. For this guide, we will be using the app BioRhythms as an example.
- Launch ES File Explorer and navigate to /data/app.
- Locate the APK file that you want to install as a system app. If you don’t know the APK’s filename, simply go to the Google Play Store link of your chosen app. View the link and take note of the words after “?id=”. This will be your APK’s filename. For instance, the BioRhythms app link is https://play.google.com/store/apps/details?id=app.biorhythms. The BioRhythms’ APK is app.biorhythms-1.apk.
- Create a backup of the chosen APK by copying it to the phone’s SD Card.
- After creating a backup, long tap on the APK file and a menu will appear. Choose Cut. A blue arrow will appear at the bottom of the screen.
- Go back to the main menu and navigate to /system/app/.
- Drag the little arrow at the bottom of the screen. It will bring up the icon of the APK file.
- Tap the APK file and it will be transferred to /system/app/.
- Find the APK file in /system/app/. Press and hold it and a menu will appear.
- Select Properties on the menu. The dialog properties will show up.
- Tap Change and it will show the permissions dialog box.
- Check the boxes for the following permissions in the dialog box:
- User: Read and Write
- Group: Read
- Other: Read
- Select OK once the required settings have been made.
- Reboot your device.
You app is now saved as a system app.
Installing a System App via ADB
For this method, make sure that you have installed ADB (Android Debug Bridge) on your computer. You can get ADB by setting up the Android Software Development Kit (SDK) on your computer.
Источник
Как и зачем устанавливать App Store на Андроид?
Сейчас существует 2 крупных магазина приложений, для которых постоянно разрабатываются разные программы. Это App Store, а также Play Market. Оба магазина имеют свои преимущества, а также недостатки. Каждый магазин работает на определённой операционной системе, так App Store работает на iOS, а Play Market на Android. Но иногда у пользователей возникает потребность установить App Store на Андроид.
Зачем нужно устанавливать App Store на Андроид?
Такая потребность может возникать у тех людей, которые привыкли к дизайну магазина приложений Apple. Дело в том, что есть потребители, которые перешли с iOS на Android, но при том не могут привыкнуть к внешнему виду некоторых приложений. В таком случае можно прибегнуть к помощи специальных программ.
Также, если вы хотите быть в курсе обновлений магазина приложений Apple, можно также установить программу, позволяющую зайти в магазин Apple на Aндроид.
Особенности установки App Store на Андроид
Стоит отметить некоторые нюансы, с которыми пользователь столкнется при попытке установить App Store на Android.
- В первую очередь, вы не сможете скачивать программы, которые разработаны на iOS. Это попросту невозможно, что связано с отличиями систем. Дело в том, что iOS и Android полностью отличаются по своей структуре. Разработчикам, для разработки приложений на эти операционные системы, нужно создавать два разных приложения. И это для того, чтобы их разработка могла работать на обеих системах.
- Второй нюанс заключается в типе магазина приложений. Можно скачать его копию, которая полностью перенимает дизайн App Store, но при этом работает как обычный альтернативный магазин приложений. В таком случае программа будет автоматически искать в интернете APK файлы, скачивать их, и распаковывать.
- Также, вы можете скачать оригинальный магазин приложений на Aндроид. Однако, в такой ситуации вы не сможете скачивать никакие программы, поскольку они не совместимы с системой. Это нужно для того, чтобы мониторить изменения в Apple магазине.
Как скачать App Store на Android?
Для того, чтобы скачать такую программу, вам потребуется найти её в интернете. Дело в том, что подобные сервисы создаются очень часто. И в новых приложениях имеются некоторые модификации, и усовершенствования. Уже сейчас есть некоторые программы, которые по функционалу ничем не уступают Play Market.
Вы можете найти приложение на просторах интернета, или установить его напрямую через магазин Googole.
Источник
Where in the file system are applications installed?
I have installed a few Android applications both with the adb install MyApplication.apk command and via a webserver (like an alternative to Android Market).
But where in the Android file system on my phone is the MyApplication.apk file placed? Are applications installed with adb install not placed in the same directory as applications downloaded from the Market?
I found some applications on /system/app but I can’t recognize them as some downloaded from Android Market or the one I have installed with adb install .
Where on the system is applications that I have installed located?
My phone is not rooted, and I am running Nexus One with Android 2.2.1.
4 Answers 4
Where an app is stored very much depends on several criteria:
- System apps / pre-installed-bloatware-apps are stored in /system/app with privileged apps in /system/priv-app (which are mounted read-only to prevent any changes). You may also find system apps in /custpack/app ‘s subdirectories.
- normal apps in internal memory go to /data/app
- some apps (encrypted on internal storage?) go to /data/app-private
- Apps stored on external memory go to an encrypted container in /mnt/sdcard/.android_secure . As at runtime Android needs them to be decrypted, it will decrypt them and store a decrypted copy on tmpfs (so it’s gone on a reboot) in /mnt/asec
(you cannot simply look into /mnt/sdcard/.android_secure directly from the device; but if you use a card reader and attach the card to your PC, you will see the files there have the extension .asec instead of .apk — from which you will get the connection to the name /mnt/asec ). - the apps data are stored below /data/data/
(internal storage) or on external storage, if the developer sticks to the rules, below /mnt/sdcard/Android/data/
Источник