Data/data and permissions accross roms - General Questions and Answers

Hy !
I suffer from instability with almost each rom i tried.
So i'm arrived to think about saving my data (data/data), especially for account login and games progressions
I tried to put them on sd, and sometimes really succeeded in using them accros different roms.
However it was needed to change permission according the cp copy was done under root login. I succeeded and took into account that permissions for lib were differents for system access.
However, in the new android (2.3 in cyanogen 7), the boot process mismatches the libs (linked instead of the lib directory):
/mismatched_uid/settings_10...
even if permissions were corresponding to the packages.list.
Can somebody help me please to understand why it's mismatching?
Thanks a lot

I'm dealing with the same thing right now. I did a nandroid restore, and I've got these mismatched_id symlinks all over the place. SUCKS!
EDIT: Found this: http://niftybits.wordpress.com/2011/08/18/troubleshooting-nandroid-backuprestore/

Well a symlink is just a file pointer, just repoint them with terminal command ln -s target nickname
First just search for what it is pointing to and search where it has moved then just point them to the new place, you could automate with a small script, find missing symlink search for target if found replace. Does require a small knowledge of scripting though.
Sent from my Nexus S using Tapatalk

Related

new scripts

Please emal me at if you have a problem.
Thank you alritewhadeva with chmod
Cp the files to /system/bin.
Then chmod 755 (filenames)
Cleartmp
Clears all files in a chosen directory in a certain amount of days. You can chose the directory and the amount days.
Rename
You can rename all files or selected files.
Rmemptydir
Remove empty directories
Search
Search for files and folders
Grepcat
Is like a combination of egrep and cat.
My version of appstosd
There will be a folder in your sdcard called apps(MK47) and it has all your app from the market(free and also paid). This is good for when you wipe your Dream.
here is the scripts.
Might want to update your OP with the attachment and bold the commands so its easier to read Nice work
mohsinkhan47 said:
Please emal me at [email protected] if you have a problem.
Thank you alritewhadeva with chmod
Cp the files to /system/bin.
Then chmod 755 (filenames)
Cleartmp
Clears all files in a chosen directory in a certain amount of days. You can chose the directory and the amount days.
Rename
You can rename all files or selected files.
Rmemptydir
Remove empty directories
Search
Search for files and folders
Grepcat
Is like a combination of egrep and cat.
Click to expand...
Click to collapse
this can come in handy for the hero roms if u use the facebook feature quite often under the people app. i know i tend to show people certain pics of me or friends and it just eats up internal memory. all i do is clear the cache but if i can use this script to do so it'd save me that lil bit of hassle i have to go thru myself, appreciate the script, just curious tho... anyone know where to find where the albums cache is stored? i kno how to brose thru folders but i much rather have somebody that KNOWS rather than me THINKING i know... lol thanks in advance.
Thanks for the scripts. Can you repost the appstosd? The one you posted was empty.
cx92001 said:
Thanks for the scripts. Can you repost the appstosd? The one you posted was empty.
Click to expand...
Click to collapse
I won't be on a computer until Saturday so gtalk to me at
[email protected] invte me and I will give u the app2sd
I can't reach the clutch..
Hi,
I've been looking for a shell search tool for my SE Xperia X10 Android 1.6 phone to search the file system, and this has been the only resource I have found thus far. I have managed to download and copy the scripts to my Android device, but I am unsure on how to execute the .asc scripts on the Android shell.
I was unable to adb push the file to \system\bin. I pushed the file to \data but even mounting the system volume as RW I am unable to mv the scripts to the \system\bin folder.
adb shell
$ su
# mount -o remount,rw /dev/mtdblock3 /system
# mv /data/searh.asc /system/bin
mv /data/searh.asc /system/bin
failed on '/data/searh.asc' - Cross-device link
I tried running the chmod 755 search.asc command anyway, and execute it using ./search.asc, but receive the message:
basename: not found
getopt: not found
[: not found
shift: can't shift that many
Edit: I have now tried this in recovery mode and mounting the /system folder with RW permissions, still no joy.
Could someone please clarify what is required to get these scripts to operate?
I have only dabbled in linux so I am most likely missing something fundamentally obvious here.
Temp-n00b-usr
I managed to find a work around.
I was attempting to locate the Creatouch.apk which was not in /system/app or /data/app. It was infact in /data/app-private. I have manged to pull the .apk for a backup and removed this from the phone now.
I just used the file explorer in Droid Screencast to locate the file by browsing the system.
It would still be handy to be able to search the file system from a PC environment however.

Question about adding stock apps back

I have read and still don't understand how to add back apps like Sprint TV. I have them all saved on my computer I just do not know the commands to get them back into the phone. Do the apps I want to ad back need to be in a certain dir on my computer first. If someone could explain or either point me to a thread that explains this I would really appriciate it.
Seems I found an easy way to add sprints, htc's apps back into the phone once removed. I saved all of them on my computer and used HTC Sync to install the app back. I removed Nscar as a test using root manager, rebooted and it was gone, then opened up HTC synch and added it back. Not sure how to get the odex files back in but it works with apk files.
AFter testing it om HTCfootprints it would not install this. Installed Nscar with no problems.
I am also trying to figure out how to add sprint tv back onto my Hero. I see that people are saying to use adb push, but I can't seem to get it to work. I just rooted with the new fresh rom and everything is great, I just want to add back sprint tv. Any help would be appreciated, thanks
Im a total noob, but I got it the apps back on this way:
Go to the directory where the ADK Tools directory is. Then the following commands:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
chmod 777 /system
chmod 777 /system/app
exit
exit
Then I copied the .apk files that I wanted to push to the tools directory
I am in.
Then did this:
adb push Sprint_TV.apk /system/app
I found it is case sensitive, so make sure you type the filename exactly.
I rebooted my phone and the apps (such as Sprint TV) were back.
I hope this helps, like I said, I spent an hour trying to figure it out, but this worked for me.
I would not recommend doing a chmod 777 on your system or app directory. Not that anything bad will necessarily happen, but it's generally not a good idea to mess with system file permissions when you don't have to.
Your procedure would work fine without those commands at all, in fact. You don't even need to enter the shell; just adb remount and then adb push.
those instructions worked perfectly. Thanks a ton.
I tried this with HtcFootprints. I removed the widget as well. When I added all 4 back in I can see the widget for footprints, but the footprint icon does not show up in the apps section.
Another thing of intrest. When I added Nscar back using HTC Sync, it now shows up as a third party app. It is no longer a system app and I can uninstall it like a market app.
Ok scratch that I did the Footprints again and the Icon is now there Thanks a Ton
I was able to push HtcTwitter.apk and .odex. i cannot get the widget to show up in the add HTC widgets menu. Any ideas?
Well, after trying my hand at update/rom modding with some success... I'm willing to take a shot at making update.zip files to easily flash individual stock apps back onto your phone. That's if there's any interest.
obelisk79 said:
Well, after trying my hand at update/rom modding with some success... I'm willing to take a shot at making update.zip files to easily flash individual stock apps back onto your phone. That's if there's any interest.
Click to expand...
Click to collapse
That would be great and very helpful to many
Easy Peasy App Install
I just copied the files to my SD card. I then browsed to the SD card folder using Linda File Manager and "clicked" the file. It asked me if I wanted to use Linda File Manager or Package Installer. I selected Package Installer and it proceeded to installed the package for me. Not need to get into the console or use any commands.
VOILA!

Cannot delete files or folders within /data/data/

Setup: CROMI 3.4.7 with Data2SD
I am having issues deleting folders and files within the /data/data/ portion of my file structure. I have tried with both th File Manager HD and ES File Explorer but I keep getting messages saying that I am unable to delete those folders and files.
The reason I am trying to delete this is because I was unable to install certain apps, and continually got an error message during installation that said:
Unknown error code during application install: "-24"
From searching forums, I found that the issue is that previous installations (I guess I forgot to do a factory reset before reflashing a ROM) left certain system folders and files for certain applications, which prevented a fresh installation from taking place. Other users have resolved this issue by deleting the relevant files in the /data/data/ section of their tablet.
I have circumvented the issue by renaming those folders (which for some reason works), but still cannot delete those renamed folders. I've tried messing with the permissions, but still no luck.
Any ideas?
Possibly an ownership problem?
Boot into recovery, plug in the USB cable, go into adb shell. Make sure that /data is mounted. Then do something like:
cd /data/data
chown -R media_rw.media_rw *
Might wanna backup first...
danger-rat said:
cd /data/data
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
Don't do that if you want any apps to work afterwards.
Eeeeek, good catch!
I was thinking data/media.
You could do this just for the specific folders you want to delete, but not all...

[DEAD][Script][4.4.2] How to make all apps read External SD Card

This fix Requires ROOT and Busybox installed to /system/xbin
Context: I have been looking for a way to make an app that hides files to read/write files on my external SDcard, The way I found was to edit the platform.xml file to add that missing line as guided here: LINK this is just one of the many articles saying the same thing. which helped some apps work, but not the one i was looking for.
Reason: the point of this script is to make it so you do not have to set permission to the "media_rw" folder after every reboot manually.
Steps:
1) Follow and complete guide linked above, or any other similar guide, if you have not done so already.
*NOTE* some custom ROMs have already implemented this fix
2) After reboot use an app that allows you to make scripts (Ex. Rom Toolbox) this guide will use Rom Toolbox app
- create new script, name it whatever you want. I named it "sdcard permission"
- input this line and save:
Code:
chmod 777 /mnt/media_rw
*NOTE* you do not need to put it as 777 but it is what worked for me as it gave full read/write/execute permissions
3) Set script to run at boot
4) Run script manually then check app to see if it worked
-Alternatively go check /mnt/media_rw to see if it has the new permissions
Now you should be able to access the external SD card after every boot.
NOTE: you may need to redo the guide in the first step after switching ROMs as the new ROM may not have the fix implemented.
Reserved just in case
Buddyjohn said:
This fix Requires ROOT and Busybox installed to /system/xbin
Context: I have been looking for a way to make an app that hides files to read/write files on my external SDcard, The way I found was to edit the platform.xml file to add that missing line as guided here: LINK this is just one of the many articles saying the same thing. which helped some apps work, but not the one i was looking for.
Reason: the point of this script is to make it so you do not have to set permission to the "media_rw" folder after every reboot manually.
Steps:
1) Follow and complete guide linked above, or any other similar guide, if you have not done so already.
*NOTE* some custom ROMs have already implemented this fix
2) After reboot use an app that allows you to make scripts (Ex. Rom Toolbox) this guide will use Rom Toolbox app
- create new script, name it whatever you want. I named it "sdcard permission"
- input this line and save:
Code:
chmod 777 /mnt/media_rw
*NOTE* you do not need to put it as 777 but it is what worked for me as it gave full read/write/execute permissions
3) Set script to run at boot
4) Run script manually then check app to see if it worked
-Alternatively go check /mnt/media_rw to see if it has the new permissions
Now you should be able to access the external SD card after every boot.
NOTE: you may need to redo the guide in the first step after switching ROMs as the new ROM may not have the fix implemented.
Click to expand...
Click to collapse
I have a Samsung Galaxy S3 and been trying all kind of things to get to media_rw folder to keep its read writable and nothing worked so far. I did everything in you post to see if it would help/work but script not working. I can only keep permissions if I set manually set permission using root browser and then it working until I reboot the phone and I tried adding the script using ROM Toolbox pro but its not even changing the media_rw permission when run it.
This my first time using the script tool but to me seems to be setup properly. If needed I will get some screenshots of the script windows to show how I set it up. I am just posting this now to see if anyone can help or wants to ask some questions.
I know how permissions work in Windows and getting up to speed with Android. I been trying to make the media_rw folder r/w to be able to able to path it to my Titanium Backup folder on my external SD.
This looks similar to setting boot bat files in Windows so I know it should work but no go so far.
Heres the screenshots of my script that failed to run and the output file hoping to get some advice why script did not work.
Is this thread dead? Should I seek answers elsewhere?
techmanc said:
Is this thread dead? Should I seek answers elsewhere?
Click to expand...
Click to collapse
yes this thread is dead, lots of apps are updating compatibility finally, also there are some xposed modules that essentially does what i did on here. so this is dead.
Buddyjohn said:
yes this thread is dead, lots of apps are updating compatibility finally, also there are some xposed modules that essentially does what i did on here. so this is dead.
Click to expand...
Click to collapse
can yuo point me to some threads that are still working cause I still not been able to get RW access to media_rw folder.
techmanc said:
can yuo point me to some threads that are still working cause I still not been able to get RW access to media_rw folder.
Click to expand...
Click to collapse
try these three xposed modules, i recommend enabling one at a time to see which works, reboot after enabling one.
http://forum.xda-developers.com/xposed/modules/app-handleexternalstorage-t2693521
http://forum.xda-developers.com/xposed/modules/kitkat-sd-card-access-t2790992
http://forum.xda-developers.com/xposed/modules/xposed-disablesignaturecheck-t2789267
also i just realized why it was failing on yours. make sure you have busybox installed to system/xbin
that will make the script work. or atleast should.
Buddyjohn said:
also i just realized why it was failing on yours. make sure you have busybox installed to system/xbin
that will make the script work. or atleast should.
Click to expand...
Click to collapse
Looked s Busybox says installed to /system/bin heres the screenshot do I click install to move or use smart install. Never did much with app just know it was needed for rooting.
techmanc said:
Looked s Busybox says installed to /system/bin heres the screenshot do I click install to move or use smart install. Never did much with app just know it was needed for rooting.
Click to expand...
Click to collapse
Install it to /xbin
Buddyjohn said:
Install it to /xbin
Click to expand...
Click to collapse
What the difference between installing to /xbin vs /system/bin might I ask?
techmanc said:
What the difference between installing to /xbin vs /system/bin might I ask?
Click to expand...
Click to collapse
Honestly I am not to sure, I just assumed xbin was the right one as a lot of older mods and roms required busybox on xbin. so i tried it and it worked.

[Help] Changes to /system won't stick, even after mounting as rw

I've posted about this on StackExchange here (http://android.stackexchange.com/q/157846/126804) but it seems no one can/bothers to answer it. More details are available in the link.
I'm currently trying to convert some user apps into system apps. I've successfully moved the apps into /system/app by making a NAND image and mounting it on Linux, but it throws an error when I try to launch those apps (ClassNotFoundException, something about missing dex). I've already set the permissions the same as the other apps inside /system/app.
Another thing that I've noticed is that I can make any change to /system (copying files, editing, renaming, etc.), but everything gets wiped after a reboot. The same happens with another partition named /custpack (this is what the OEM uses to fill the phone with boatware). I've also tried to place the apps there, but same thing.
How can I debug this?

Categories

Resources