[Q] Dynamic symlinking/mounting (Multi user roms) - General Questions and Answers

Hello,
On "old" roms we can use directory bind app to easily mount external storage's folder and make the apps think they are internal (move game's data somwhere else)
Directory bind is unsupported since some time, means it won't handle multi user from latest version of Android, is there anything we can do to dynamicly mount/symlink a folder depending on current user, or at least make it work for main(or all) users ? (it can be with an app, or with a script, if possible a script running on it own, by the system, and not an app that will afterward run the script)
Regards

Related

Backing up apps / data (plus archiving/restore idea)

Ok, even though I have market and browser cache being saved to my sdcard, I still occasionally run into space issues due to the small /data partition. Prior to removing apps, I decided to back up my apps and data.
I have backed up my data partition using:
busybox tar -cvf /sdcard/data_backup_20081206.tar /data
After saving a copy to my computer via USB, I did MD5 checksum checks to make sure no corruption during the copy. I still need to do tests to see if I ever have corruption based on the thread in this forum.
* Anyone else making backups using other methods (rsync, etc.)?
--------------------------------------
This got me thinking to some other phone OS's that don't really run apps from SDCARDS, but rather store them and copy them to the phone prior to running them.
I would think that we could (with root access) write an app that moves files from the /data folders to a /sdcard/dataarchive folder, when you wanted to archive an app you don't use much and wanted to save space. Then the Archiver app could restore the files when you eventually wanted to run the app.
* Is there an easy way to see what files are used by each app? Someone mentioned a manifest file at one point.
For example, it looks like neocore is at minimum using:
/data/dalvik-cache/[email protected]@[email protected]
/data/app/com.qualcomm.qx.neocore.apk
/data/data/com.qualcomm.qx.neocore
* Is there a thread someone could point me to that better explains the whole APK packaging and storage of applications and their data?
** Is the structure usually just as above, except just replacing com.qualcomm.qx.neocore with the proper app name?
** When do things get saved to app-private?
O' great community... thanks for your help.
-oldsk00lz
i was looking for a way to synch my /Music and my /Pictures so I came across this blog. im mounting the g1's sdcard on a linux machine in this scenario
http://philnelson.name/tag/rsync/
heres my script that i use. hope this helps a little.
Code:
#!/bin/bash
echo "Syncing /Music /media/FC30-3DA9/Music for updates to /media/E0E4-AA14................................................................."
rsync -rvv /media/FC30-3DA9/Music /media/E0E4-AA14
echo "Syncing /Music /media/E0E4-AA14 for updates to /media/FC30-3DA9/Music................................................................."
rsync -rvv /media/E0E4-AA14/Music /media/FC30-3DA
echo "Syncing /Music /media/E0E4-AA14 for updates to /media/FC30-3DA9/Music................................................................."
rsync -rvv /media/E0E4-AA14/dcim /media/FC30-3DA9/Pictures/g1Cam

How to add script onto android phone

Hi every one, i want to need support
I want to add script on my phone, and how to run this script?
thanks
run script to android
I put the script in EMMC and load SManager or scripter of rom toolbox lite
It depends on what the script does, and when you want it to execute. 1st, the script must be marked with executable permissions, or it will be treated as a text file. If you want it to run once on startup, put it in the init.d folder (your ROM must support this). If you want it to run manually, you can put it anywhere, and execute it manually through a file manager; there are also apps to make this easier. If you want it to run automatically based on certain events, you can use an app like Tasker or Locale to run the script whenever certain pre-set requirements are met.

[Tutorial] Install problematic APKs in /system (or /preload)

You may have tried to move some APKs to /system/app/ and end up with continuous crashes, usually resulting in abandoning your plan to save some otherwise wasted space (or preventing to accidentally uninstall all keyboards...)
This is often said to be a permissions issue, yet that's not enough for some packages: those with external libraries.
Copy the APK to /system/app/, then `chmod 644` it as usual.
You can also install to /preload and symlink to system
On your computer (easier but not required), open the APK (as a renamed ZIP).
Go to ./lib/{architecture}/, where on the Ace2 this is lib/armeabi-v7a.
Extract all the (.so) files here and put them in /system/lib.
There's no step 5!
Ryccardo said:
You may have tried to move some APKs to /system/app/ and end up with continuous crashes, usually resulting in abandoning your plan to save some otherwise wasted space (or preventing to accidentally uninstall all keyboards...)
This is often said to be a permissions issue, yet that's not enough for some packages: those with external libraries.
Copy the APK to /system/app/, then `chmod 644` it as usual.
You can also install to /preload and symlink to system
On your computer (easier but not required), open the APK (as a renamed ZIP).
Go to ./lib/{architecture}/, where on the Ace2 this is lib/armeabi-v7a.
Extract all the (.so) files here and put them in /system/lib.
There's no step 5!
Click to expand...
Click to collapse
Thank you very much :good:
All of the above is still true if you want to package apps in CWM format, but people who just are tight on /data (and don't want to repartition) can just use the convert to system app in Link2SD, which now actually works on apps with libraries

[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?

Mount binding SD card folder works for moving WhatsApp media

¿Why do people use xposed or foldermount? It is pretty easy to accomplish a binding mount.
BTW, I tried foldermount and it failed because it didn't fix permissions
And link2SD didn't even try moving the WhatsApp media
Here we go: (commands run from adb, could use terminal):
First, move your WhatsApp content to the sd card. (I moved /data/media/0/WhatsApp/* to /data/sdext2/WhatsApp/)
Now fix permissions (and ownership)
Code:
chown -R root:root /data/sdext2/WhatsApp
chmod -Rv 777 /data/sdext2WhatsApp
Now, mount the sdcard folder into the internal memory folder
Code:
mount -o bind /data/sdext2/WhatsApp /data/media/0/WhatsApp
Considering
/data/sdext2 is a mounted external sdcard. This means that the folder is accessible. Makes sense since you just created /data/sdext2/WhatsApp to move the WhatsApp media into there.
/data/media/0/WhatsApp is the WhatsApp folder It is the original location of the WhatsApp media and MUST EXIST check its permissions, too, btw, just in case. Always try the real location ignore /storage/emulated/0/WhatsApp or any other symlink or emulated
Now restart whatsapp and test. Working means you can access your downloaded pictures and you can download new ones. Either that or, In which way is it not working?
If it works ok, make the code line which mounts the folder to be run on startup. I pasted it in my /system/etc/init.d folder because my rom supports it. If you are following this guide, you probably know how to make code run on startup.
It is so easy, why are people installing apps or frameworks for something SO FREAKIN' EASY!?
BTW, whatsapp couldn't use symlink. That's why I had to use a foldermount.
tested on: lollipop 5.0, samsung i9500, halcyon rom and kernel
pppppp said:
¿Why do people use xposed or foldermount? It is pretty easy to accomplish a binding mount.
tested on: lollipop 5.0, samsung i9500, halcyon rom and kernel
Click to expand...
Click to collapse
Did you by any chance get to test with pie? Or are you still on ancient lollipop?

Categories

Resources