[Q] CWM script on /data/data folder - Galaxy S II Q&A, Help & Troubleshooting

Do you guys know of any problems that I may encounter if I use a CWM script to change some settings that are stored in the /data/data folder? I have created a script that copies over some XML files to the shared_prefs folders belonging to the jkay and system settings apps. Do these programs store an MD5 hash of these files like many of the games do?

Related

ok some help understnading apk files

please help this windows guy/android noob figure this out. ok i'm thinking an apk file is equivalent to an msi file.
i download an app from the android store...
it downloads as apk file to /data/app...
ok so is that the final home for the apk file or does this extract and "install" files and folder in other locations on the internal memory or sdcard?
does the app run from this location? when uninstalled, is it removed entirely or are there orphan files that can be left behind? where is the data associated with that app saved? same folder /data/app/?
when titantium backs up an app, does it just copy the apk files from /data/app?
thanks
mark
http://en.wikipedia.org/wiki/APK_(file_format)
thanks, i already saw your link. doesn't really address my questions though. and yeah i do google questions prior to posting.
markkal123 said:
please help this windows guy/android noob figure this out. ok i'm thinking an apk file is equivalent to an msi file.
i download an app from the android store...
it downloads as apk file to /data/app...
ok so is that the final home for the apk file or does this extract and "install" files and folder in other locations on the internal memory or sdcard?
does the app run from this location? when uninstalled, is it removed entirely or are there orphan files that can be left behind? where is the data associated with that app saved? same folder /data/app/?
when titantium backs up an app, does it just copy the apk files from /data/app?
thanks
mark
Click to expand...
Click to collapse
I was in a hurry when I posted the link and that was the best I could do at the time.
apk is more like a java jar file (in fact you can sign your apk with jarsigner in java) or self extracting zip. Don't quote me on it, but you need both the files in /data/app and /data/data to run the application. Some gets left inside the container, and files that get modified a lot are extracted to /data/data (along with data that personalizes the app for you, such as settings and profiles).
The xml manifest file in the apk tells it what permissions to ask for and what systems it can run on and such. If you get this http://code.google.com/p/android-apktool/ you can reverse the apk so you can make sense of the files inside of it.
Titanium backup takes both the app and the data and stores them on the sdcard (unless you only tell it to backup the app, then it only takes from /data/app). The files located under /data/app are the entire application itself though and that will run if you give it to someone else as if you downloaded it from the market.
thanks for the great response.

What is the purpose of folder /data/local?

Hi all!
I was browsing the /data folder, looking for what the hell does eat up all my 420Mb on the Xperia Arc S partition.
I found that the folder /data/local contains copies of some *.apk files that also exists on /system/app with the exact same size!
Anyone know the purpose of this folder and if I can safely delete the apks inside it safely, without affecting their usage?
It is occupying 60Mb of space,,
Thanks!
/system/app - contains system apps
/data/app - contains user apps
/data/local - ? On my device, the /data/local folder is empty, save for 2 folders: download and tmp
Backup, erase. Don't like it? Restore.
post-mortem said:
/system/app - contains system apps
/data/app - contains user apps
/data/local - ? On my device, the /data/local folder is empty, save for 2 folders: download and tmp
Backup, erase. Don't like it? Restore.
Click to expand...
Click to collapse
Thanks for the suggestion.
I have done this and so far no harm has come to the apps that were on /data/local.
If anything unusual happens I will restore with cwm.
I just got 60 Mb back on /data partition!

[Q] how to/should i add folders to backup scripts in addon.d

i want to save some custom apps that i have moved to system when i install CM updates. so i want to add them to a script in addon.d
these app folders seem to have the apk and an empty lib folder. adding the apk seems easy, but how exactly do i tell the script to also backup the 'lib' folder and restore it?
thanks.

Extracting a calendar file from TWRP backup

Before my old device died on me (Motorola), I did a TWRP and TB backup but I forgot to backup the devices internal calendar (using Business Calendar 2). When I restored everything to the new device (Sony) using TB, it didn't restore the calendar entries.
Is there anything I can do to get them back?
*I can't use the TWRP backup in Titanium as it is 8GB and I don't have the space on the internal memory and I can't find a way to point it to an external source.
*I have tried renaming the data.f2fs.win000 file to a ZIP in Windows, going to 'data\data\com.android.providers.calendar\databases\' and copying the calendar.db and calendar.db-journal file to the same place of the new device (backing up then deleting what was there first) but that just caused all calendar apps to FC after restarting.
*I have compared the calendar.db file from the TWRP backup to the original one on the Sony in Notepad and it shows the entries I am missing, so I know I am close, I just can't restore them to the new device.
Is it possible to convert DB to a ICS file or am I looking in completely the wrong place on the backup?
I can't extract the whole 'data\data\com.android.providers.calendar\databases\' folder in Windows, because it moans about the filename length as I thought maybe copying the whole folder instead of the two above files to the new device would solve it.
Any help would be appreciated.
If you copy the db files in then using a file manager change the ownership and group to match the parent directory and also set permissions rw,r,r do you still get a fc?
DestructoS said:
If you copy the db files in then using a file manager change the ownership and group to match the parent directory and also set permissions rw,r,r do you still get a fc?
Click to expand...
Click to collapse
All the folders in the com.android.providers.calendar on the new device are set to 0771, both files in the database folder that I copied across were already 0644. The owner and the group are both set to root, not sure if that is correct or it needs to be set to app_28 which is Calendar Storage.
You will need to change the owner and group to app_28 or the calendar can't write to them. Edit: of course that is if app_28 is your calendar id, check the parent folders to see. Edit 2: As far as I remember folders should also be 775 within data/data.
DestructoS said:
You will need to change the owner and group to app_28 or the calendar can't write to them. Edit: of course that is if app_28 is your calendar id, check the parent folders to see. Edit 2: As far as I remember folders should also be 775 within data/data.
Click to expand...
Click to collapse
Thanks, all sorted!

Odex file compilation - Android N/7

I'm playing around with installing apps to the system partition before first boot, using a generic installer zip(by Andybones). All I'm doing is taking the apps from /data/app and renaming their directories to something more readable, then installing them to /system/app using the installer zip and setting permissions. I've noticed that some ROMs include odex files in their system partitions, to save time on first boot.
I assume I can just transfer the odex files over with the apk's, but I remember reading that the reason apps install so much faster in Android N is that the apps are no longer fully compiled during the install, but instead do that in the background over time.
Does anyone know if this refers to the odex files? I just don't want to copy over a bunch of odex files if they're incomplete. Any help or advice would be greatly appreciated! =D

Categories

Resources