[Q] apk file parsing - General Questions and Answers

Each and every android application is bundled as an apk file. When an apk file is installed different entites (files) of the application are stored in different parts of the system.
How can i find out where all the files of a particular application are stored inside the android file system? Is it the right way to parse apk file and find the places where all the parts of the app are stored?? Any ideas?

The apps .apk file should be in /data/app while the apps personal space with settings,configs etc. are in /data/data/packetname/
If it is preset to install to sdcard there is also /sdcard/Android/data
For files that get created on the /sdcard, there is no way of tracking/knowing what belongs to what app.

Related

Need some clarification regarding app folders (newbie)

Hi,
This is my first post so first I'd like to say hello to all of users
I'd like to understand more how apk files are installed on android file system. So there go my questions:
1. After installation (via market for example) apk files are stored somewhere in file system - data/app for example from what i've heard - are those apk only backed up installation packages or actual "executable" and program itself?
2. Where are stored application settings, user preferences etc?
3. Is process of uninstallation always means removing ALL leftover from each application or after some time system gets cluttered with those (I know it is not windows with registry leftovers etc but even in linux from what i know there could be some problems if app won't remove all dependant libraries and file when uninstalling)
Thanks in advance

[GUIDE] Merging updated system apps with old one, GET MORE FREE MEMORY!!

(Preface for noobs : /system and /data are two different partitions. Freeying up /system won't get you more intrenal memory, but /data does. Old apks rest in /system and updated versions placed in /data. You can replace the old apks using newer versions)
I heared Titanium Backup PRO does something like, but you can do this with any File Explorer with ROOT access. Its works 100% for Android Gingerbread 2.3.x , try on other versions.
### Do it on your own risk, I am not responsible for anything ###
1. Update the desired app to the latest version from Google Play Store
2. Open File Manager, Enable ROOT_ACCESS, remount /System as writable
3. Goto /system/app and backup the desired apk to sdcard
4. Goto /data/app and copy updated apk
5. Paste into /System/app
6. Note down the filename of old apk and delete the old apk
7. Rename the new apk into the old filename
8. You may encounter a FORCE CLOSE if the app was running in background
9. The updated apk in /data/app will be removed automatically
10.Restart your device, Done!
I replaced Playstore, Maps, Google Search ect..
Example: For PlayStore, updated apk will be com.android.vending-1.apk, and old apk is vending.apk
Hit thanks it it works, Thanks
thanks, nice guide! All is ok (PlayStore, Terminal Emulator), but if I merge last version of "Google Play Service", then Gmail or Maps shows the message "Unknown issue with Google Play services" when I open them... do you know how to solve? thanks in advance
p.s. configuration in signature
Better use Link2SD. It makes the integration of updates into system seamless. Rebooting the device is optional (restart only if you encounter errors).
thank you for your suggestion! I tried TitaniumBackup but it gives me the same error, then now I'm trying with Link2sd and it works well, BUT the new apk file is in system/app instead of system/priv-app, and its name is "com.google.android.gms-1.apk" instead of "PrebuiltGmsCore.apk"... can this create some problems in future?
EDIT: I tried moving to the priv-app folder and renaming the apk to be identical as before and it seems to work... for now...
It's the package name, it won't create any problems. There is no need to rename the app to match the old one. Default location when converting to system app is in /system/app. I don't know if you can change the location, but you can move it manually to /system/priv-app thru root explorer. Just restart the device afterwards to eliminate FC errors.

[Q] Simlink entire folder and giving permisions?

Hi
I want to include many applications in a rom I've created. The problem is that many of these apps wont work unless I extract the *.so files from inside the lib directory of the apk and copy those libraries to my rom (/system/lib) and give correct permissions (0-0-644).
Because these lib files are too big and taking large space from the system partition, I want to place them all in /data/data/lib directory and simlink this directory to /system/lib.
Can someone please provide the correct lines of code for the updeter-script to do that? How do I simlink entire directory? And how do I give correct permissions? Do I give permissions to the original directory (/data/data/lib) before simlinking, or do I give permissions to the virtual linked directory (/system/lib) after simlinking?
Thanks

[Completed] How to backup games with progress in apk file

Is it possible to save or extrack games with progress in apk file. I searched on web for such an app but couldn't find any.I have used helium backup app but it requires root access which makes it impossible to restore game with progress on non rooted device.So I was thinking of a way to make it more simple and universal , just like an app extractor.
More simple words:
(Extract game from rooted phone with progress and save it as apk file then install the apk file on non rooted phone and keep the same progress in game)
Thanks in advance.
Hello,
Welcome to XDA.
You can use ES file explorer to make a backup of the APK and then open your Android folder(or you may have a folder for the game that isn't in the Android folder) on internal sdcard and find the folder that is associated with the game and copy that folder, it contains your game data.
Then you take the APK backup and the copied folder containing the app data for that game and manually install the APK on the other device then move the copied folder to the Android folder(or if there was a folder for the game not in Android folder then place the copied folder in the same location it was in on the other device) and you should have what you want.

Android App use without installation

Hello
So far from my tinkering i have came to realize that after an android app gets installed the following directory under the root file system gets changed
/data/app : here the apk is stored
/data/app-lib : here the app's native binaries are extracted
/data/dalvik-cache : here the app's dex binary is extracted
/data/data : here the app's db & other files are created under a folder named by the app's package
i rooted my nexus 5
i then installed a simple app
checked the directories mentioned above and saw new contents
then i copied the particular app's contents from the mentioned directories and kept them in a separate folder inside the sdcard directory
i then uninstalled the app & checked the above directories. The files corresponding to the app were gone as per my guess
Then i have copied back the contents from my sdcard to the above directories to restore the app without a new installation
But Now the Android OS is not showing the APP along with the others , but WHY ? Does the OS creates a tree somewhere in the filesystem during the installation ? or If there is some thing else which i am missing which i can change so that the app reappears automatically without any new installation .
Thanks in advance
i have solved the problem .. after reset the app was automatically got by the OS , because the installd daemon starts with boot

Categories

Resources