[Q]: no space on /system, add TexLive binaries to /system/bin before flashing? - Xoom Q&A, Help & Troubleshooting

Hello TeamEOS and modders!
thank you very much for your great work in the Xoom MOD! Its just amazing and i'm using it for several months now.
Recently I wanted to install an Android Port of TexLive (see code.google.com texlive-for-android/) on my Xoom. the problem occurs that a lot of TeX Binaries have to be copied to the /system/bin folder. Flashing your ROM leaves about 1MB free space on /system, even deleting unnecessary apps and bootanimation frees not enough space. The package uses about 80MB. The only solution would be to resize the /system partition, something I read is not possible.
Can I at least copy the files in the ROM image before flashing and would this allow the /system partition to resize automatically?
Thanks in advance!

Related

data2sd

Hi All,
Here is my first contribution to the community, hope it is useful!
I've rezzed up a construct to produce a new /data on sd. It makes use of a second partition formatted ext2 or ext3 mounted to /system/sd with /system/sd/data then mounted over /data.
I've included a lengthy readme file which should explain things in greater detail.
Read the readme first to get a list of dirs & files this construct adds to the /data, then copy the files as explained and off you go!
currently my /data "volume" is 2GB and all is lovely!
Things to note:
I'm rom JF1.51 ADP1 CRB43, the sdcard is 8gb class6
The sd /data contains several scripts of my own design which if not needed can be deleted. I include my modified bootdeb.sh script as it mounts to /data/local/mnt/debian vs /data/local/mnt (that is a script I modified for my own needs which you may find useful)
Feel free to adjust any of the scripts according to your needs. Just note that if I update the construct, that your changes may be undone if you use it, so back them up in that scenario.
Also, I include my mount.ak.sh script which make use of a loopfs to accomplish the roughly the same thing, but in a single partition environment (intended as proof of concept).
**There is NO booting into recovery and wiping of the phone for this mod!**
Thanks to JesusFreak for the roms and saurik for the Debian info!
Cheers!
Wow! Nice, Going to try it out. Thanks
is that mean after running data2sd the phone's completely running on sd? and so much faster?
Hi,
To followup on xnycen's question, why would we do this? Is the benefit only in providing more space, or is there also a performance increase (or decrease)?
hate to see the sdcard fail with this change
well...
Yes, after the install you are running complete on sd,
but because of the method used, if you reboot, and take out the sdcard before the boot starts, you will be running as you were before the data2sd aka normal; put the sdcard back in, reboot and you are in data2sd mode again.
This effectively gives you two android run modes: "normal" and data2sd. If the SDCore can not be located the Android will boot in normal mode. You can of course try to keep them sync'd, but if you do the data2sd from a clean slate you can effectively have a "safemode" and if you have an issue with some app, go into this "safemode" and do some investigations or adjustments as the SDCore will mount if you put the sdcard in after the system is in "safemode" but the apps and such will not be loaded until you reboot.
The size expansion is the primary benefit of the construct. As far as speed goes, I haven't checked to see if there are any speed gains in moving /data to the sd... Can someone who's interested check that out and let us know?
Darkstrumn said:
Yes, after the install you are running complete on sd,
but because of the method used, if you reboot, and take out the sdcard before the boot starts, you will be running as you were before the data2sd aka normal; put the sdcard back in, reboot and you are in data2sd mode again.
This effectively gives you two android run modes: "normal" and data2sd. If the SDCore can not be located the Android will boot in normal mode. You can of course try to keep them sync'd, but if you do the data2sd from a clean slate you can effectively have a "safemode" and if you have an issue with some app, go into this "safemode" and do some investigations or adjustments as the SDCore will mount if you put the sdcard in after the system is in "safemode" but the apps and such will not be loaded until you reboot.
The size expansion is the primary benefit of the construct. As far as speed goes, I haven't checked to see if there are any speed gains in moving /data to the sd... Can someone who's interested check that out and let us know?
Click to expand...
Click to collapse
Speed is all I'm interested in If it speeds the device up, why not?
Anyone have anything to report about the speed? I am very interested in this
wow having this "dual boot" seems like an incredible idea... can anyone report on this?
can someone please give a more noob friendly instructions? from what I understand as of now is:
1) boot into recovery and wipe the phone (I'm assuming we can keep whatever ROM we had before)
2) place data2sd.img in root of SDcard (fat32)
3) and this is where I get lost... how exactly do I move the sh file to that location? how do I chmod it? how do I run it? what are the adb commands? thanks!
Hmmnm I thought we weren't doing this because of inheriant security risks?
Not to mention what happens when you mount your fat32 partition....are the apps no longer (as well as your data) available?
NO booting into recovery and wiping of the phone!
Hold up people!
**There is NO booting into recovery and wiping of the phone!**
My bad for not being clear on the wipe instructions!
1) (optional) If you are to wipe it (your choice it is not required), then press menu->settings->SD card & phone storage->scroll to bottom of screen and select "Factory data reset". This will wipe the /data partition only removing all apps and settings. BACKUP YOUR /data dir to sd, First or you will need to down load all your apps again to include paid apps!!
2) place data2sd.img in root of SDcard (fat32)
3) terminal in or adb shell in.
4) cp /sdcard/data2sd.sh to /data/local/bin - to copy the script to your user-space
5) chmod 0750 /data/local/bin/data2sd.sh - to make it executable
6) /data/local/bin/data2sd.sh or data2sd.sh may work to run the script
7) once the install is done it should tell you to reboot. If you had the ddms debugger running, you can observer the log as it is working.
8) done. It may boot a little longer if you clean-slate installed and then restored your apps by copying them back into /data/app and /data/app-private which has the affect of reinstalling everything, and thus the boot will take a while if you have alot of apps like I do. Again you can observe this as the Android boots if you have the debugger running.
thanks a lot man, will give this a shot in a few hours! not at my comp right now
security risks and (u)mounting /sdcard
TheDudeOfLife said:
Hmmnm I thought we weren't doing this because of inheriant security risks?
Not to mention what happens when you mount your fat32 partition....are the apps no longer (as well as your data) available?
Click to expand...
Click to collapse
Not sure why there would be any security issues, the Android is already rooted. If someone can steal the sdcard, they can steal the entire Android, and if the sdcard is left lying about, then yes it can be strolen then too.
The construction of the SDCore assumes all the original permissions, so nothing has access to things it shouldn't save the scripts that use the cache as a backup mount point, but it is given the same permissions as /data, so no worries.
With this construct in place, you can't physically remove the sdcard without first powering off the Android, or rebooting it and removing the sdcard first thing. But while the system is operational, you can mount the sdcard to usb and umount it from usb without issue as long as any mounts to the sdcard are released (loopfs, etc) prior to trying. vold will give 10 tries to umount /sdcard to include attempting to kill the processes with file locks on /sdcard when it tries to umount the volume to attach it to usb.
A a matter of fact, if you observe via teh ddms debugger during boot, the vold service is busy checking the sdcard and mounting it well after the system has already mounted the sdcp2 and begun initializing apps from the sd /data.
So, as long as "sdcard partition2" (sdcp2) remains mounted and all, you can mount the sdcard to the connected Host and back and still have access to your apps and data all you want. I reckon this is how the app2sd and dalvik2sd constructs also perform.
The only thing to really note is that the first partition must be vfat (fat32) and the second either ext2 or ext3 (currently as they support file permissions). vold only cares about the first partition which it expects to be a vfat volume. So as long as p1 is vfat and p2 is posix compliant, we're golden!
The only real question I don't have a good answer for is the speed gains question. My card is a 8GB class6 and things seem fairly responsive. I don't know how much different it would be with a class 4 or 2, or the real speed difference with the built in storage. Honestly it feels a little more responsive, but I haven't really done things that make it feel sluggish.
Oh, I saw the .img and assumed you just mounted the .img from fat32. My bad for not reading all the instructions.
Any problems with apps crashing? I have had a lot of quirky issues in the past with merging the entire partition.
Thanks for the response. I like what you've done here. I'll have to try it out for sure.
TheDudeOfLife said:
Oh, I saw the .img and assumed you just mounted the .img from fat32. My bad for not reading all the instructions.
Any problems with apps crashing? I have had a lot of quirky issues in the past with merging the entire partition.
Thanks for the response. I like what you've done here. I'll have to try it out for sure.
Click to expand...
Click to collapse
No worries; the .img file can be thought of as an install cdrom it is only used the one time during install.
As far as apps crashing, no problems!
During my experimentation building the construct, permission mangling happens if apps are moved out of /data/app, /data/app-private but /data/data and maybe /data/dalvik-cache are not cleaned up prior to copying apps back into their respective app dirs.
What happens is the app dirs are monitored. if you move an apk into the dirs android will install the app. Likewise if you delete an app from those dirs PackageManager will uninstall the app. If /data/data already has the dir for the app, it will use it. if the /data/system/packages.xml and /data/data don't have the same id assigned to that app, you get a permissions\\id conflict; the PackageManager will not manipulate the dir if the id's don't match.
The app /data/local/bin/archiveApps.sh, /data/local/bin/softWIPE.sh and /data/local/bin/restoreApps.sh scripts allow one to backup thier apps to the new /data/app-archive and /data/app-private-archive dirs, clean out /data/data/ /data/dalvik-cache, and restore the apps to their app dirs. As the apps are copied into their dirs, the PackageManager will update /data/system/packages.xml proper and rebuild /data/data and the dalvikVM will build the /dalvik-cahce proper.
Someone made a seemingly nice script (I've not used it yet) called fix_permissions.sh that will parse the /data/system/packages.xml and update the ownership id of the apps /data/data sub dir proper and thus is more scalpel like in operation, but that process doesn't make a backup of the apps; so using both may be the most effective replacing the softWIPE.sh part of the process with the fix_permissions.sh instead.
The only time you should run into issues is if say you have 10 apps installed in teh SDCore /data and 6 in Android /data and then attempt to sync them (because the 6 are different than the 10) by copying\\merging Android /data with SDCore /data the SDCore /data/data /data/dalvik-cache and /data/system/packages.xml will now be mangled.
/data/system/packages.xml will now no longer know about the 10 apps that were installed prior, and on boot PackageManager will "install" them, but /data/data will have dirs inside with now different id's from what was newly assigned them in /data/system/packages.xml, and the 10 apps will now not work correctly but the 6 will as dirs with matching id's were created when they were "installed" new.
To fix, either the softWIPE.sh process outlined above, or the fix_permissions.sh process also mentioned above.
So did anyone try this at all?
Can this be done after doing the apps2sd by marcusmaximus? I tried it but when trying to chmod 0750 /data/local/bin/data2sd.sh it said "No such file or directory" so i tried mkdir /data/local/bin and got "File Exists" so i proceeded with copying data2sd.sh to /data/local/bin again which went without showing any errors and when trying to chmod 0750 /data/local/bin/data2sd.sh again i got the same error so i tried to ls /data/local/bin and just got # what am i doing wrong?
looks interesting! might try this during the weekends ill give an update if i encounter any issues or not
interesting. I'll be looking into this!

[Q] Resize internal partitions

Hi,
This has been asked many times before with no real solution that applies to different devices.
I'm running out of space on my /system partition and can't install any more apps even though I don't have that many installed.
I want a way to re-size the Android partitions manually to whatever size I want. Or just delete all current partitions and create new ones.
How do I do that? Is there any GUI partitioning tools similar to the ones available for Windows?
I don't want to move files from /system to another partition. I want to change the partition size.
My current /system partition:
For what reason are you moving apps to /system? You can't install them there, you have to push/move them there, installs go to /data. So keep them in /data, where they're installed by default. You have tons of space available there.
Partition table (start addresses and sizes) is hard-coded in bootloader, and can be redefined in kernel boot parameters (in this case recovery needs to be recompiled with the same parameters too, otherwise it won't write to the same partitions the kernel will read from). You're welcome to hack any of those. As you could probably understand from this paragraph, I wouldn't expect having GUI tools for that.
Thanks for the reply.
I'm not trying to move apps to /system. I thought apps are installed there by default because every time I try to install a new app it gives me an error message saying that there is not enough space on /system.
Now I know that apps are not installed in /system.
I just need more space in /system so I can install new apps without any errors.
What can I do to get more space on /system partition? Can I replace the bootloader?
I don't have any Android programming experience. I probably need something that is available out there to do the job.
In stock form, you shouldn't even have write permissions to /system. Nothing should be ever written there, and it can be 99.99999% utilized - there shouldn't be any free space left for anything, it shouldn't normally be used.
If you're getting that error when trying to install an app - you need to check what's reporting the error. It's not a "real" error, it means there's something wrong with your phone.
Try wiping cache partition from recovery...does this make any difference?
Jack is correct.
Swyped from my DesireS
refer to this
if this may help you http://forum.xda-developers.com/showthread.php?t=1959691
:highfive:
mayank88288 said:
refer to this
if this may help you http://forum.xda-developers.com/showthread.php?t=1959691
:highfive:
Click to expand...
Click to collapse
Way to bump a year old thread :thumbup:
“I'm bad and I'm going to hell, and I don't care. I'd rather be in hell than anywhere where you are. ”*―*William Faulkner

Put system apps on internal app partition

Hi !
I've made a search but I've found nothing about that. Maybe I don't use the good term...
I'm currently trying to build a ROM for a tablet device (kyros mid 8127) but this model have a really limited system partition of 180mb. It's really small considering porting serious ROM or even just install gapps in system apps...
On the other hand, the app storage partition is far enough for me with its 700mb approximatly.
First, I though to change the mtd partitions. But this is to scary for me as there is no pre-made solution for this model and I don't want to brick my device ^^
So, I'm wondering if it's possible to store system apps on app partition instead of system partition ?
Don't know if this is really possible, but do you guys think I could extract the /system/app folder somewhere on internal app storage partition during ROM installation and symlink the /system/app folder to this place ?
data/app
Swyped on my blade
Yes, data/app is a solution for secondary apps. But I need to move all system apps to free space for framework etc... I've read that all system app can't be moved to data/app cause they'll not work properly from there.
So I'm wondering if we can trick the system just by symlinking system/app to an other location.

[Q] Link2SD problem on Pranjal's Rom v4.2

Hey! I have been following the forum pretty well for months now and I love it that there's so much of progress. I am a big fan of Pranjal's Rom and am currently running v4.2 which has Link2SD as a sys app (which btw is a sexy app )
Ok so here's the problem :| When I tried to update a couple of apps I found that my internal storage is almost full This was surprising to me coz i autolink all my apps using Link2SD. I don't even have that much files. So I formatted my second partition, made it ext 4 and again installed a couple of apps.
Here's the thing. The apps seem to be linking to the second partition, but annoyingly enough they are also taking space in my internal storage. Can someone help? I really need space :|
 @pranjal18
madmanmatt616 said:
Hey! I have been following the forum pretty well for months now and I love it that there's so much of progress. I am a big fan of Pranjal's Rom and am currently running v4.2 which has Link2SD as a sys app (which btw is a sexy app )
Ok so here's the problem :| When I tried to update a couple of apps I found that my internal storage is almost full This was surprising to me coz i autolink all my apps using Link2SD. I don't even have that much files. So I formatted my second partition, made it ext 4 and again installed a couple of apps.
Here's the thing. The apps seem to be linking to the second partition, but annoyingly enough they are also taking space in my internal storage. Can someone help? I really need space :|
@pranjal18
Click to expand...
Click to collapse
that's normall.....extend ur ext-sd partition....ow....and try hd2sd by @hillbeast ....it'll move ur dalvik-cache and more of apps tobur ext-sd than link2sd ....or...use kyrillos13's app2sdv2 script ....it does the same
Sent fom my S-II running >>SlimBean build 6.2 WEEKLY<< powered with >>DorimanX kernel 9.31<<
madmanmatt616 said:
Hey! I have been following the forum pretty well for months now and I love it that there's so much of progress. I am a big fan of Pranjal's Rom and am currently running v4.2 which has Link2SD as a sys app (which btw is a sexy app )
Ok so here's the problem :| When I tried to update a couple of apps I found that my internal storage is almost full This was surprising to me coz i autolink all my apps using Link2SD. I don't even have that much files. So I formatted my second partition, made it ext 4 and again installed a couple of apps.
Here's the thing. The apps seem to be linking to the second partition, but annoyingly enough they are also taking space in my internal storage. Can someone help? I really need space :|
@pranjal18
Click to expand...
Click to collapse
thanks @madmanmatt616
since you've formatted your partition, i would suggest you to reflash the whole rom again and run the script in terminal emulator (mentioned in read me file)
your problem had a very easy solution
in link2sd press menu>>more
here you have a few options...touch all the options below "recreate mount scripts"...and , "link dalvik-cache files" and "clean up teh dalvik cache" will give you more internal space!!
the problem could be that the data of the apps are collected in /data/data/"appfolder"
you can figure out with Titanium, which apps are using most space: menu-> overview of app storage use. then u can outsource the folder to sd-ext and make a symlink in /data/data to the outsourced folder.
mankokoma said:
the problem could be that the data of the apps are collected in /data/data/"appfolder"
you can figure out with Titanium, which apps are using most space: menu-> overview of app storage use. then u can outsource the folder to sd-ext and make a symlink in /data/data to the outsourced folder.
Click to expand...
Click to collapse
Can you tell me exactly how to outsource to sd-ext? Just a copy paste would do? Then you suggested a symlink. I do understand why you told this, thing is I am clueless on how to link only one. As far as I could understand, link2sd creates such links from /data/app to the sd-ext. How do I create a link for /data/data/"appfolder" ?
I hope what I said makes sense . Thank you
sorry, so short on time...
MAKE A BACKUP FIRST, JUST IN CASE!
- copy & paste the whole folder to sd-ext with terminal emulator or adb shell:
cp -Rp /data/data/nameoffolder /sd-ext/nameoffolder
- delete the folder in /data/data:
rm -rf /data/data/nameoffolder
symlink:
ln -s /sd-ext/nameoffolder /data/data/nameoffolder

What is /data/app and why is app file there?

I have some app in /data/app folder and only there? Some apps are simply not there. Why is this? Can I move the /data/app folder? I want to free some disk space.
Phpdna said:
I have some app in /data/app folder and only there? Some apps are simply not there. Why is this? Can I move the /data/app folder? I want to free some disk space.
Click to expand...
Click to collapse
Some apks are in /data/app and some are in /system/app.
Remove the ones that are unecessary to free up disk space and remove the respective dex file the dalvik-cache for the app.
Edit: Be careful to not remove required applications packages as you might cause instability or boot-loops among other issues. (A.K.A I'm not responsible for any of your problems)
No, you cannot move the folder.
However you could try https://play.google.com/store/apps/details?id=com.buak.Link2SD or My favorite: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
O.k. I know that I also tried mount2sd but it left my mobile unusuable. It doesn't explain why there is this /data/app folder. Some apks isn't there. For example downloaded apks sometimes install in /data/app and sometimes not. Can I move the apks from /data/app to system/app? Can it work? Is it possible it has to do with the search path? When I add /data/app to the search path can it work?
Phpdna said:
O.k. I know that I also tried mount2sd but it left my mobile unusuable. It doesn't explain why there is this /data/app folder. Some apks isn't there. For example downloaded apks sometimes install in /data/app and sometimes not. Can I move the apks from /data/app to system/app? Can it work? Is it possible it has to do with the search path? When I add /data/app to the search path can it work?
Click to expand...
Click to collapse
Depending on your phone its partitioning might allow you to free space on your data partition by copying apps from data to system (depending on if they have separate partitions in your phones memory). One drawback is that you will be unable to remove the apps using normal app management. It also might be the case that updates are not installed for those 'system' apps or the updates are installed in the data folder again. For samsung the /system/ partition is mounted read only so for those i'm quite positive that updates will not be placed in the system partition.
The 'easiest' solution to your storageproblem is using some kind of link2sd or mount2sd (the latter including a separate partition on your SD). Be careful choosing the right script because many are old and outdated and might fail. Also you will be unable to switch sd-cards because you cannot easily unmount the app partition and if you remove the sd without unmounting it you have a big risk of damaging the filesystem (been there done that :crying
My best experience back when i had to use a mount2sd script was with this app: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
In the app description you find a quite clear list of requirements for your phone to use the app effective.
P.S. for the mount2sd app it is my recommendation to move it to /system/app because if it is in /data/app and your data is moved to your SD and for some reason the startup (init.d) script fails you will be unable to use Mount2SD because it was not loaded from sd. Moving it to system/app ensures you that it is available even if the startup script failed.
Qaatloz said:
Depending on your phone its partitioning might allow you to free space on your data partition by copying apps from data to system (depending on if they have separate partitions in your phones memory). One drawback is that you will be unable to remove the apps using normal app management. It also might be the case that updates are not installed for those 'system' apps or the updates are installed in the data folder again. For samsung the /system/ partition is mounted read only so for those i'm quite positive that updates will not be placed in the system partition.
The 'easiest' solution to your storageproblem is using some kind of link2sd or mount2sd (the latter including a separate partition on your SD). Be careful choosing the right script because many are old and outdated and might fail. Also you will be unable to switch sd-cards because you cannot easily unmount the app partition and if you remove the sd without unmounting it you have a big risk of damaging the filesystem (been there done that :crying
My best experience back when i had to use a mount2sd script was with this app: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
In the app description you find a quite clear list of requirements for your phone to use the app effective.
P.S. for the mount2sd app it is my recommendation to move it to /system/app because if it is in /data/app and your data is moved to your SD and for some reason the startup (init.d) script fails you will be unable to use Mount2SD because it was not loaded from sd. Moving it to system/app ensures you that it is available even if the startup script failed.
Click to expand...
Click to collapse
I'm not going to try the app from spazdog again it left my mobile unusable and the uninstall was not easy. So,the apk can moved to system/app? Good to know, I find a solution to my problem because I moved the apk's to my sdcard. BTW. the problem was that moved apks are not in /data/app!!! Only the other apk's are in /data/app.... I wonder if I'm the only one? My next question is why is some apk's not moveable? It could help a lot of people to free disk space but some apks can't be move (with normal effort). Thanks for reading.

Categories

Resources