Related
I searched the forums for quite a while but couldn't find an answer to this question, so here I go:
Is it possible to use the space freed up by deleting system apps (like Motonav) for installing own Apps (e.g. memory hogs like Swype or the Flash Player)?
Not 100% sure but I just downloaded titanium backup from the market backed up those unwanted apps then uninstalled. That should free up space for what you want be careful what you uninstall though.
Sent from my SGH-T959V using XDA App
Eiertschik said:
I searched the forums for quite a while but couldn't find an answer to this question, so here I go:
Is it possible to use the space freed up by deleting system apps (like Motonav) for installing own Apps (e.g. memory hogs like Swype or the Flash Player)?
Click to expand...
Click to collapse
THe partition where those system apps are installed is not the same partition where apps you download are installed, so, if you free some space there, it won't affect free space at all.
But, you can move applications from /data/app to /system/app (if you mount /system/app as read/write), just move them and reboot the phone, but, before moving, please make sure that there is enough free space on /system by typing on adb shell or a terminal emulator:
df /system
If there is enough space, just go ahead, move the apk to /system and save some space in /data, BUT, and there is always a BUT... Any updates to that application will occupy space in /data again, so, everytime the APP is updated, you should delete the old APK in /system, move the new apk from /data to /system and reboot.
I'm pretty sure that Titanium Backup has this kind of functionality built in, not sure if it is pro only or if it works in the free version, but, since it did not work well the first time I've tried, I just do it manually.
P.s.: It is highly recommended that, before moving thing in or out the /system folder, you do a full NANDROID BACKUP, so you can just revert back to working condition if something go wrong (i.e.: if you delete something essential, perhaps you won't be able to load Titanium Backup and restore that back).
Sure, I added a lot of apps in system/app partition
For example I added GoSMS and GoLauncher, deleting mms and adwlauncher.
I made it because they are the most-used apps so it's better running them from internal memory rather than ext2 partition, plus I can boot the phone without SD.
The only problem, as HinotoriBR said, is that when you update an app you should move it from data/app to system/app, delete the old app version (newly installed will have a different name) and reboot.
yosif yackson said:
Not 100% sure but I just downloaded titanium backup from the market backed up those unwanted apps then uninstalled. That should free up space for what you want be careful what you uninstall though.
Click to expand...
Click to collapse
You're right, that DOES free up space on /system partition, but it's not enough to use the free space for other apps
HinotoriBR said:
THe partition where those system apps are installed is not the same partition where apps you download are installed, so, if you free some space there, it won't affect free space at all.
But, you can move applications from /data/app to /system/app (if you mount /system/app as read/write), just move them and reboot the phone, but, before moving, please make sure that there is enough free space on /system by typing on adb shell or a terminal emulator:
df /system
If there is enough space, just go ahead, move the apk to /system and save some space in /data, BUT, and there is always a BUT... Any updates to that application will occupy space in /data again, so, everytime the APP is updated, you should delete the old APK in /system, move the new apk from /data to /system and reboot.
[...]
Click to expand...
Click to collapse
I installed Swype and moved com.swype.android.inputmethod-1.apk to /system/app using Root Explorer and it still worked without rebooting the phone.
Maybe because input methods are always active in the background so it didn't notice the moving?
I restarted anyway (because otherwise it doesn't update the free memory information in Settings) and et voila: more than 10MB extra space.
Now Swype is still listed in the "All Apps" tab of app management but with a mere 2MB.
I guess that's user settings, dalvik cache and other stuff - so I better not move it...
One last question:
How much free space should remain on /system partition?
Is it also used to cache stuff or can I fill it all the way to the top?
downloadman said:
Sure, I added a lot of apps in system/app partition
For example I added GoSMS and GoLauncher, deleting mms and adwlauncher.
I made it because they are the most-used apps so it's better running them from internal memory rather than ext2 partition, plus I can boot the phone without SD.
[...]
Click to expand...
Click to collapse
Since I'm not using an ext2 partition on my SD card it should make no difference if an app is in /system or /data when it comes to performance, shouldn't it?
THANKS TO EVERYONE
Eiertschik said:
Since I'm not using an ext2 partition on my SD card it should make no difference if an app is in /system or /data when it comes to performance, shouldn't it?
Click to expand...
Click to collapse
I suppose you're right. Or maybe SD speed is faster than internal memory, who knows... but surely reading internal memory uses less battery power than reading microsd.
An ext2 partition is really useful if you install a lot of apps.
As my SD card is only Class2 (was bundled with the phone) I doubt it would be faster than internal memory.
Up to now I was able to install all the apps I really needed without an ext2 partition - so I think the /system-trick will give me more space than I really need
But thanks anyway - I'll get back to it when I'm keen enough to use custom roms and ext partitions
Eiertschik said:
One last question:
How much free space should remain on /system partition?
Is it also used to cache stuff or can I fill it all the way to the top?
Click to expand...
Click to collapse
Since partition is mounted as read only usually, it means that partition is not used to cache or store any app data. All data and cache of /system applications goes to /data (which, as you observed, still has some space being used by the moved application). So, you should be able to fill /system (or get close to fill it) and have no issues.
If you don't use any modded rom, you can use Androidiani Open Recovery and use some space that is left for OTA transfers to store cache data (there is a specific partition with 100+ MB of free space used just for that, to store a firmware upgrade received OTA), it is known as "Memhack" and free up more space. As far as I know, many mods as CM7 already have this "Memhack" built-in.
HinotoriBR said:
Since partition is mounted as read only usually, it means that partition is not used to cache or store any app data.[...]
Click to expand...
Click to collapse
Maybe that was too obvious for me to figure out
HinotoriBR said:
[...]
If you don't use any modded rom, you can use Androidiani Open Recovery and use some space that is left for OTA transfers to store cache data (there is a specific partition with 100+ MB of free space used just for that, to store a firmware upgrade received OTA), it is known as "Memhack" and free up more space. As far as I know, many mods as CM7 already have this "Memhack" built-in.
Click to expand...
Click to collapse
I already use AOR to root my 2.2.1 stock ROM.
This memhack sounds very interesting... might consider it because I don't really expect any further Milestone update from Motorola.
Sounds more reliable than an ext2 partition on SD card - since I don't really trust my card...
If I do this Memhack and for whatever reason Moto will release an update - will I still be able to do it using a PC?
Eiertschik said:
Maybe that was too obvious for me to figure out
I already use AOR to root my 2.2.1 stock ROM.
This memhack sounds very interesting... might consider it because I don't really expect any further Milestone update from Motorola.
Sounds more reliable than an ext2 partition on SD card - since I don't really trust my card...
If I do this Memhack and for whatever reason Moto will release an update - will I still be able to do it using a PC?
Click to expand...
Click to collapse
The memhack will move the cache from the /data partition to that specific partition for OTA upgrades. So, as your cache grows larger, your /data (free internal memory) will not decrease. This saves internal memory space that would otherwise be used for cache (not sure if application data is moved there too).
As soon as you start hacking the stock rom, it is not recommended to try to update directly the phone, if Motorola ever releases a newer version, recommended steps:
- Titanium Backup all your Apps/Data
- Flash a stock SBF (2.0/2.1/2.2, doesn't matter) in your phone, wipe all data/cache
- Use Motorola Software Update to upgrade the software to the new revision
- Afterwards, as soon as update is done and phone boots, you can flash vulnerable recovery and then through Open Recovery or Androidiani Open Recovery hack the hell out of your phone again (ie.: root, memhack, overclock, etc)
- As soon as you get root, use Titanium Backup to restore your Apps/Data
Or, you could always wait for someone to release a Nandroid Backup of the new rom, as is usual in the Android Development section, and simply use that Nandroid Backup (alway Titanium Backup your apps/data b4), wipe everything after update, and then use Titanium Backup to restore your Apps/Data
HinotoriBR said:
P.s.: It is highly recommended that, before moving thing in or out the /system folder, you do a full NANDROID BACKUP, so you can just revert back to working condition if something go wrong (i.e.: if you delete something essential, perhaps you won't be able to load Titanium Backup and restore that back).
Click to expand...
Click to collapse
I wish I read that 5 minutes ago... lol !
skribzy said:
I wish I read that 5 minutes ago... lol !
Click to expand...
Click to collapse
Being a Motorola phone, you can always find the SBF related to your phone and use RSDLite to flash it. Milestone, to enter boot mode and then use RSDLite to send a SBF ( http://and-developers.com/sbf:milestone , if you are a Droid user, probably there is somewhere else to find it, if you are milestone user, try to use a version close to whatever you had), just power it down, hold dpad up, and with dpad up pressed you power the phone. You will see some writting about the boot loader, your phone is ready to be connected in our PC and you can flash it using RSD Lite.
HinotoriBR said:
Being a Motorola phone, you can always find the SBF related to your phone and use RSDLite to flash it. Milestone, to enter boot mode and then use RSDLite to send a SBF ( http://and-developers.com/sbf:milestone , if you are a Droid user, probably there is somewhere else to find it, if you are milestone user, try to use a version close to whatever you had), just power it down, hold dpad up, and with dpad up pressed you power the phone. You will see some writting about the boot loader, your phone is ready to be connected in our PC and you can flash it using RSD Lite.
Click to expand...
Click to collapse
Yea, cheers, it was a school boy error! I was thinking to myself must do a nandroid before I start tinkering and totally forgot! All back to normal and backed up now
I was seeing if I could swap out the stock dialer with dialer one in system/apps... Milestone didnt seem to like it at all! I assume apps like dialer one are dependant on the existance of core apps. I did manage to get rid of the 3D gallery and replace it with quickpic.
Theres loads in system/apps that I simply dont need like 'LiveWallpapersPicker.apk' which I assume I can just get rid of - I will give it a go and see what comes crashing down!
S
Hi there,
So my N1 is rooted and has SuperOSR rom installed. The native app2sd that comes with the rom failed to work, so I disabled it and went back to the method I was using on CM7, Link2sd. I need a method to move apps/cache/lib files to sd-ext, as the tiny internal storage on the N1 is insufficient to hold even a 10th of the apps (and their data) that I have installed. And Link2sd has, at least in the past, been the perfect option to do so.
At first, all seemed well after installing and setting up Link2sd. Mount scripts were created with no problems, apps/cache/lib files all moved over to sd-ext without a hitch. Everything was going really well. Until I rebooted. Then, all hell broke loose.
The problem is this - for some reason, the second partition (sd-ext) is not being mounted during boot time. I'm not sure why, as this is exactly what the Link2sd mount scripts are supposed to accomplish. A Link2sd "mount warning" notice confirmed this problem, saying that "since 2nd partition was not mounted during boot time, linked apps will be invisible to the system until quick reboot". Indeed, every app that I had linked was not visible to the system, and most widgets on my homescreen showed only the message "problem displaying widget".
Luckily, a way to temporarily fix this is by simply quick-rebooting the rom. This will get the linked apps to show up again. But the problem is, widgets are still dead, input method gets reset (goes back from Swiftkey to native Android keyboard), and SMS gets reset back to the standard android SMS app. Of course, all of this can be changed back, but it takes time and effort to load each individual widget and restore each individual input/sms setting. It's really not practical every time you have to reboot your phone that you have to:
1. Quick-reboot the rom
2. Change input method back to Swiftkey
3. Manually restore every widget on your home screens
4. Change sms app back to Go sms.
So, my question is, how do I avoid having to do all this? I've already tried the "re-create mount scripts" option on Link2sd, but it doesn't matter. Still have the same errors upon rebooting phone every time. I'm pretty sure this means that the Link2sd mount scripts are either not being created correctly, or are being deleted every time the phone reboots. How do I fix this? Trying to get in contact with the developer of the app (bakpinar) has proven unsuccessful.
Does anyone know of any other scripts that I can flash/install that will successfully and consistently mount the 2nd partition (sd-ext) during boot time? I'm fairly certain that this is all I need, as everything else with Link2sd has been working correctly. Thanks in advance for any advice!
Ok, so since I haven't gotten any responses on this, I'm going to attempt two methods that i THINK might remedy this issue. The first one is this:
Method 1:
1. Full wipe and reinstall of SuperOSR rom
2. Format sd-ext to ext3 filesystem (found out that rom's native app2sd program wouldn't work due to my sd-ext partition being FAT32)
3. Enable rom's native apps2sd option upon booting.
4. Reboot
5. Install Link2sd from market, enable dex/lib file linking ONLY (native apps2sd program only moves app files, not dex or lib). Going to be interesting to see what link2sd says about the mounting scripts...
6. Reboot, collect results.
The 2nd method I'm going to try is this.
1. Full wipe and reinstall of SuperOSR rom.
2. Flash DTAPPS
3. Boot into ROM
4. Download and install test applications
5. Collect results
I'm not sure if either of these methods will work, however I know the 2nd method worked for CM. I will update a bit later as to which method (if any) fixed the issue. Sorry for the double post.
I commented to the ROM cook nelo360 a while back that there are some strange sd-ext mounting issues. If you look at the dmesg as it boots, it does post some strange error messages. Essentially, ext3 mounts as ext2, and ext4 mounts as ext3. Despite it not mounting as the proper format type, it still works.
Since the ROM is pulled off of AOSP, as CM is too, sort of, much of the same apps2sd apps probably work decently well.
Definitely need an ext3 or ext4 partition. As I'm understanding your post, that did not happen initially, and is crucial to many apps2ext to work, including the built-in one.
Really? Ext4 as 3 and ext3 as 2? Well that would explain why Link2sd was having issues. Hmm.
What I ended up doing was fully wiping the phone, flashing the rom, and then immediately afterwards flashing DTAPPS. Using the GUI interface found on the market, I moved apps to sd-ext and cache to sd-ext as well. The result has been mixed. While there was noticeably more space initially to install apps (something like 190mb internal), that space has declined at almost as fast a rate as when I had no apps2ext of any sort installed at all. This makes me think that while DTAPPS successfully moved some of the initially installed apps over to the sd-ext, it hasn't been moving any new ones i've installed or their cache files. I tried re-moving apps/cache with the gui interface and by using the old-fashioned terminal emulator method, but had no success. Still looking at about 100mb free space on internal. Considering that I only have about 1/4 of the apps installed that I usually have installed on my phone at any given time (I use A LOT of apps), it's become apparent that soon I am going to run out of space again.
As I can't find any method to fix this, I'm afraid I'm going to have to call it quits with this ROM and try something else. Which is a real shame, because stability-wise this ROM beats Cyanogenmod and other ROMS I've tried hands down, while not sacrificing many features. I guess for a user who doesn't use a lot of apps or need a lot of space for them, this ROM would be ideal. Unfortunately, I'm not that type of user.
One problem I've found is that with any automatic apps2sd/ext system is the control of what is actually on the SD vs. internal memory is hard to work out.
With the built in apps2sd, which you seem to have trouble with, not every app was transferred to ext. I found that with the built in system, my internal memory kept dropping until it hit 25 mb or so. However, it never really dropped below that. Everything I kept installing probably went to the ext partition. I installed a lot of apps, and it wasn't an issue. (But you're right, it may not be as many as you want).
I didn't have a great way to check this though. Root explorer showed both the data/apps/ folder and the sdcard/ext folder linked together, so it just listed everything together. I'd have loved a way to actually manually transfer whatever apps were on internal memory to ext, but never found an easy way to do so, or even to confirm what was in which directory.
So even though it looks like the internal memory is steadily and quickly dropping, if you continue to install, and have the two directories appropriately linked (sorry, I don't know what the difference between all the different kinds of scripting apps2sd are), I don't think you'll run out of space as quickly as you think you will.
So, I had my Raider for about a month before rooting and installing the rumraider beta BUT...my internal SD is showing very little free space, and all I can think of is that I used to have a few gb of vids & pics in one of the folder hide apps, and they were stored on the internal SD. All that ever showed in any explorer app was an empty folder, even though that's supposedly where the files were hidden. Anyway, I deleted the folder manually, just to see if 3gb or so would magically free up.. but that didn't happen. There are also a bunch of no longer installed apps' data folders kicking around I'm quite sure.. so the questions are:
(a) what does the format internal SD card option do in the raider's system menu..and will it wipe out anything important to the function of my phone?
(b) is it safe and/or advisable to manually browse & delete unnecessary folders?
(c) if I've already used SD Maid and see no real noticeable difference in free space, are there any other apps which might do a better job?
..I have only a few dozen apps installed since flashing the rumraider rom, but the phones internal storage was pretty full beforehand.. I just assumed that the whole wipe process prior to (and during, if I read the progress right) the flash would clear all that data out. Its got 16gb internal storage in total.. partitioned, true.. but still.. i have almost nothing free. I find that odd.
'lil help? LOL!
bproulx said:
So, I had my Raider for about a month before rooting and installing the rumraider beta BUT...my internal SD is showing very little free space, and all I can think of is that I used to have a few gb of vids & pics in one of the folder hide apps, and they were stored on the internal SD. All that ever showed in any explorer app was an empty folder, even though that's supposedly where the files were hidden. Anyway, I deleted the folder manually, just to see if 3gb or so would magically free up.. but that didn't happen. There are also a bunch of no longer installed apps' data folders kicking around I'm quite sure.. so the questions are:
(a) what does the format internal SD card option do in the raider's system menu..and will it wipe out anything important to the function of my phone?
(b) is it safe and/or advisable to manually browse & delete unnecessary folders?
(c) if I've already used SD Maid and see no real noticeable difference in free space, are there any other apps which might do a better job?
..I have only a few dozen apps installed since flashing the rumraider rom, but the phones internal storage was pretty full beforehand.. I just assumed that the whole wipe process prior to (and during, if I read the progress right) the flash would clear all that data out. Its got 16gb internal storage in total.. partitioned, true.. but still.. i have almost nothing free. I find that odd.
'lil help? LOL!
Click to expand...
Click to collapse
+1 using holiraider
your internal sd is only 9.48gb(ish). on that, you can delete anything you want. whether any apps use any of the data in there is dependent on the apps you have installed. there is nothing there that is */required/* for your rom to function correctly
after backing up all your pictures/music/titanium backup files/clockworkmod backups/etc to your computer or all on an external card, you can safely format the internal sd. the system will recreate any files/folders it needs.
personally, i would just back EVERYTHING on the internal sd up to my computer, format the internal sd from the system menu, and if anything doesnt work properly after that, you always have the files handy.
I have a 32gb sd card so i backup the internal to sdcard2 into a ".No Media" folder. I hate duplicating images.. But this way i always have a back up with me since i like to flash roms while im at work (to impatient to wait till im home).
I just upgraded my HTC One (from stock rooted 4.1.2) by flashing to stock rooted 4.3. Unfortunately, I didn't realize the file system changed and that I needed to copy my SD card data (including of course titanium backups) to external storage and move it back after the upgrade.
I understand I can use Root Explorer to do the move, but is there a more robust and easier way to do this? Is there any way to access the data through the PC with something friendlier then adb (e.g.windows file explorer)? I did create a nandroid before I flashed. Should I just flash back, move the data, and reflash the update?
Why do you need to move it to external storage then back again? Don't you just move it within the phone? I know you want something friendlier than adb, but honestly one command you cut and paste into the shell window and it's done within seconds.
Or download a file Explorer in the phone and move them manually.
Sent from my HTC One using Tapatalk 4
Thank you both for your replies.
I went down the adb route. A little more complicated than I thought it would be. I had to, of course, update adb and along the way I got driver conflicts. Then I was left with deciding which folders needed to move, which should stay, and which were just old cruft.
It seems the directories legacy, obb, as well as hidden file .htc_layout_version should stay (as well as, of course, "0"). I kept .aid.bak as well, mostly because I have no cluse what that file is. Most everything else was cruft or "obvious" user files that got moved.
Al I have left in \data\media\ are the directories 0, clockworkmod, legacy, obb, and the file .htc_layout_version and .aid.bak. I hope I didn't screw anything up.
Seems my base configuration is using more space then before I migrated (roughly 11gb without the clockworkmod backups).
Taken from CM12 thread as this started to become off-topic. The issue I'm trying to address is how to stuff a huge Lollipop ROM directly into internal storage, without creating a virtual slot, to increase system performance and have overall cleaner solution. Original inspiration: @Mentor.37's custom Safestrap for unused partitions, which has way too small /data for me unfortunately. (explanation)
sd_shadow said:
Septfox said:
This in mind, is there any way to repartition the internal (stock) storage to decrease the size of /cache/ and create a larger /data/ partition, or is it not possible without modifying the bootloader?
Click to expand...
Click to collapse
Code for mounting the unused preinstall and webtop partitions to SD storage http://forum.xda-developers.com/showthread.php?p=59253593
Click to expand...
Click to collapse
This allows you to mount the partitions either as a new storage or to a specific directory only, in other words it does not merge the storages, just adds a mount point next to (or possibly if modified a bit on the top of) other storage. While this may be useful for taking some inherent load off /storage/sdcard0/ (i.e. mounting /dev/block/webtop to /storage/sdcard0/Downloads) for people not swapping their sdcards, it doesn't help in Septfox's intention of enlarging /data/.
I face the same problem as Septfox: I'd love to use the storage intended for running system for it, not virtually mounted storages created in the storage intended for storing media and support data. However, the outline of the storage is intended for way older and less robust system so even the /system/ is not quite enough (667 MB, which tightly fits CM12 with a small GApps package) and /data/ is also not enough for heavier use (3.22 GB). Therefore I would like to merge it with currently unused partitions: maybe join preinstall to system and webtop to data, making both big enough.
One alternative would be to mount the 1.4 GB webtop as /data/app, which currently makes about 2/5 of occupied space of my /data. Is this possible? At which point of system startup is the script in /system/etc/init.d executed (is it done by Safestrap or the ROM itself?), and at which point might the system first need to access /data/app that contains the APKs of user-installed apps? All the really needed stuff (compiled executables) is in the /data/dalvik-cache, right? Here I'm on a really thin ice, don't know much about Android's architecture, so sorry if this is a major bullsh*t - just throwing my idea in Technically what I'm talking about is such modification of the script:
Code:
#!/system/bin/sh
mount -o rw,remount /data # Not too sure about this
# - depending on whether /data is already rw or not.
# For that I would need to know when is the script
# executed. I'm almost sure this is not necessary
# though. In original script this was done to allow
# writing into /storage/.
mkdir /data/app
#mount -o ro,remount / - unnecessary, see above
#mount -t ext3 /dev/block/preinstall /storage/preinstall
# I don't see any use for small preinstall partition.
mount -t ext4 /dev/block/webtop /data/app
chmod 777 /data/app # not sure about this either,
# probably should be 771
Clean version:
Code:
#!/system/bin/sh
mount -o rw,remount /data # Unnecessary?
mkdir /data/app
mount -t ext4 /dev/block/webtop /data/app
chmod 777 /data/app # Possibly 771 instead.
Is that possible to run, or will it bootloop, what do you think?
Even better IMO would be to delete preinstall and webtop and shrink the Stock data down to maybe 200 MB so the original Stock system is still present, preventing the phone from bricking and accommodating Safestrap. The remaining space could be divided between Safe system (say 800 MB) and Safe data (over 4 GB). Are we able to do this somehow, maybe by customizing Safestrap a bit more? Or are partitions in /dev/block locked by bootloader? Also are all these and Internal storage located on the same physical chip, or are there two separate memories in the D4? Attached proposal of repartitioned layout Sizes taken from here and here.
Developers and experienced users, I would love to hear your opinion, mainly on whether repartitioning internal storage or at least mounting webtop to /data/app could work on D4. Thanks!
Addition to the original post:
I have a spare D4 with shattered screen and not working SIM slot that I bought for spare parts. Apart from GSM (or telephony altogether? I didn't try, as only option would be emergency call which I don't want to abuse, and we don't have CDMA networks here) it works fine though. I can try meddling with formatting/partitioning - it won't be too big deal if it gets bricked beyond possibility of SBF restore.
Replies so far, taken from the original CM12 thread:
sd_shadow said:
I don't think repartitioning is possible without high risk of hard bricking the device, and yes the locked bootloader does limit what can be done.
This is quite off topic, and you should start a new thread if you are going to continue.
Click to expand...
Click to collapse
Good call, started new thread
lucize said:
tried to change the type of preinstall partition and the device would boot into fastboot: (invalid cg hab (cg: ebr, status: 0x0056)
so a recovery is needed, I'll try a resize if I can compile the tools in safestrap. but I think it would not work
later edit: used fdisk to resize in safestrap and it broke again so it can't be done
Click to expand...
Click to collapse
Thanks for trying! What do you mean by changing type?
As I added here in the first post, I have a spare shattered but mostly working D4 I wouldn't be too sad to see bricked - I can try out more dangerous stuff if you point me in the right direction. I'd like to help testing different approaches to repartitioning if you have some potentially harmful ideas that you wouldn't try on your own phone.
Curious question aside: where is bootloader (and fastboot) stored? Is it sitting on some other small partition? Can we mount it to be read, or even to write there? What/where is that protection that keeps us from unlocking the bootloader?
Also, concerning mounting the free partitions to other system partitions: do you think it's possible to mount them as a folder in /data (whichever we use)? Does it matter what filesystem the partitions use? What part of boot-up runs the /system/etc/init.d/ scripts? Do you think attached proposals 2 or 3 are feasible? It would still have the stock system untouched for an emergency use and Safestrap storage, but its data would be shared with the safe system, with webtop mounted as /data/app or /data/data (1.4 GB should suffice I hope) which would leave us with nice 3.2 GB for the rest. Of course, preinstall's 600 MB for /system is hardly enough for CM12 with Pico version of PA GApps so the rest of used Google apps would inflate /data a bit - but still this is probably the best option we have now.
Actually, I find the stock /system/ to be adequate. Yea, it's a tight fit, but CM12+PA Micro Gapps slots in with 30-someodd megabytes to spare, and there shouldn't be any real need for additional space on top of that. Though, I suppose there could be trouble if CM starts including larger apps.
Init.d is done by the ROM itself, and has to be enabled at build time; CM12 actually has it shut off for whatever reason (Slimkat did as well, I would imagine CM11 also did). There's an app called "Universal Init.d" in the Store, but by the time it can get around to executing the scripts, it's obviously way too late to be screwing with vital partitions : \
Worth pointing out that Safestrap appears to have proper ADB access, you might be able to do something with partitions thataway. I don't know enough about partitions and mounting in Linux to take a jab at it. Woop, looks like that's already a no-go. Maybe the bootloader does a check or three to make sure the partitions are all in order, and throws a critical error if not.
If absolutely all else fails, there's still symlinking large apps into the newly-accessible partitions that can be done, either manually or with Link2SD/similar apps. It's a bit of a hassle, but an option nonetheless.
Well, stock /system is fine but I want to keep it untouched - mainly because I don't want to install CM12 as an update over stock JB, and also to keep myself from SBFing (at least in the long run) because of trivial issues. When this option is off the plate, the remaining partitions don't seem to offer enough space to run CM11 in a non-virtual slot (as Mentor.37 offers with his modified Safestrap with a "Safe" slot with 600M system and 1.4G for data).
Symlinking is an ugly solution - used it for a while, never liked it, mainly because symlinks broke once SD got unmounted or mounted as Mass Storage, with problems remounting afterwards.
Since we can modify the system freely, I'm sure that if necessary, we could make a neater solution than using an app to create symlinks after boot. Question how early in the boot process can we add some scripts (by flashing some zipped patch over the ROM) goes to more knowledgeable devs though...
first time I just used t option in fdisk to change partition type to whatever without changing size, the second time I resized some of them and every time after 1st reboot the M logo would appear for 1 second and from now on it would go straight into fastboot without M logo, so it seems that something in bootloader is verifying the layout or something and if is not good it would stop.
I don't think that it's possible to brick it for good, use rsd to recover
Regards
Thanks to @lucize for his trying, sadly it seems we can't repartition at all
@Mentor.37, is there a source to your customized SS 3.75 available? I'd like to try and mess around with it to put the Proposal 3 from my second post's attachment to work.
Could mounting and symlinking be done from Safestrap, or does the ROM do it itself? I have ideas of various cross-linking of folders on the partitions to kind of emulate repartitioning - but I'd have to try if it works and it would need to be done either before the system boot or shortly in the process. See attachment - that's a first draft I presume for this that the user keeps stock system only for keeping the phone bootable no matter what happens in other than stock slots, so stock data would be utilized only for root and safestrap, leaving most of its 3.2 GB free.
LuH said:
Thanks to @lucize for his trying, sadly it seems we can't repartition at all
@Mentor.37, is there a source to your customized SS 3.75 available? I'd like to try and mess around with it to put the Proposal 3 from my second post's attachment to work.
Could mounting and symlinking be done from Safestrap, or does the ROM do it itself? I have ideas of various cross-linking of folders on the partitions to kind of emulate repartitioning - but I'd have to try if it works and it would need to be done either before the system boot or shortly in the process. See attachment - that's a first draft I presume for this that the user keeps stock system only for keeping the phone bootable no matter what happens in other than stock slots, so stock data would be utilized only for root and safestrap, leaving most of its 3.2 GB free.
Click to expand...
Click to collapse
I believe that it's impossible because symlinking "works" after kernel is loaded and safetrap take place (is loaded) before a kernel is loaded....
If I'm not mistaken, symbolic linking is a filesystem thing, something like a shortcut only more complex (after all, it's completely transparent to anything accessing it). ADB probably has commands to make links, terminal emulators in Android definitely can. I think the problem you face is making sure the mountpoint, path, etc are exactly the same both in SS and Android.
Probably better to just do both the mounting and symlinking under Android, so you can be 100% sure that everything matches. We already know /cache/ is unused most of the time under LP, and can (probably) even be unmounted while booted if needbe; why not experiment with it, rather than going straight for the other more important partitions, until you're sure what you're thinking will work?
Edit: Wikipedia has a big ol' writeup on symlinks under various systems, looks like a fun read.
rblanca said:
I believe that it's impossible because symlinking "works" after kernel is loaded and safetrap take place (is loaded) before a kernel is loaded....
Click to expand...
Click to collapse
I guess then this could be implemented in some early booting stage of the system by some custom .zip being patched over, kind of the way Mentor.37's ramdisks are. Unfortunately I don't have nearly enough knowledge to do it.
What I hope could be done more easily is altering SS to maybe use not only shared cache but shared data as well - then webtop could be used for safe system, leaving more then enough space for it, and we still would have fairly usable 3.2 GB data for it. Maybe we could even assign preinstall as stock data? @Mentor.37, I'd really love to hear your opinion on this, or maybe even get your alternated safestrap's source so I could try it myself
Sorry guys, I'm dropping this. I tried CM12 in stock slot and it doesn't help the system as much as I hoped for, so there's no need for this from my side.
I also mistook the process of installing ROM in Stock. I thought I have to upgrade the stock system to the new ROM in order to keep Safestrap in it, but it turns out it's independent and when "wiping" stock /system it leaves the Safestrap there, so I can easily do a clean install of a new ROM in the stock slot
LuH said:
I tried CM12 in stock slot and it doesn't help the system as much as I hoped for, so there's no need for this from my side.
Click to expand...
Click to collapse
About that, could you compare the difference regarding performance between CM12 on the safe slot and CM12 on the stock slot?
I currently got it running on safe slot but I'm thinking about trying to install it to stock slot, now that I sold my Lapdock and don't need Weptop mode anymore.
But I only would do it if it increases the performance of the D4.
Shani Ace said:
About that, could you compare the difference regarding performance between CM12 on the safe slot and CM12 on the stock slot?
I currently got it running on safe slot but I'm thinking about trying to install it to stock slot, now that I sold my Lapdock and don't need Weptop mode anymore.
But I only would do it if it increases the performance of the D4.
Click to expand...
Click to collapse
I don't really remember unfortunately, been running it from stock slot for a while now. Before it definitely was way more laggy than now, but that's also when CM12 for D4 was in a VERY early phase.
It definitely increases the performance, I'm just not sure how much. I don't see any reason why leave original system in stock slot though, so no reason to run CM from the safe slot. I don't like the idea of mounting the ext fs with system running from it from fat storage, it's bound to generate some unnecessary overhead.
In case of any major screw-up, sbf is your friend and AFAIK can't get messed up itself It's a good idea to have the factory cable available though, just in case it for whatever reason dies on you with low battery.
Ok, still good to know, thanks! What's sbf?
Well when I got my D4 a few months ago, I thought installing on the stock slot would be dangerous (in terms of bricking) and since I had the Lapdock, I wanted to keep the stock ROM.
But since then I've read that many users have CM12 running on stock slot, so now I want to do that, too. It's just so annoying when the whole phone freezes for half a minute or so and I think that's mostly due to the limited memory (although I have 170-300 MB free most of the time).
Do I have to consider anything special or different while installing than on an install on safe slot?
Shani Ace said:
Ok, still good to know, thanks! What's sbf?
Click to expand...
Click to collapse
see
Q12: What is a SBF?
Shani Ace said:
It's just so annoying when the whole phone freezes for half a minute or so and I think that's mostly due to the limited memory (although I have 170-300 MB free most of the time).
Click to expand...
Click to collapse
Same here, I suspect it's also connected with throttled data transfer requests of multiple apps at once, but the RAM is IMO the biggest factor. In Linux RAM is almost always full and the "free" space is occupied by cache (filesystem cache or whatever else app's cache) ready to be deleted - maybe the phone is stuttering when freeing the "free" space for other use.
Weird is that my brother with almost vanilla L 5.1 on Nexus 4 has system consuming about 100M less RAM than my CM12 - device-specific drivers maybe?
Shani Ace said:
Do I have to consider anything special or different while installing than on an install on safe slot?
Click to expand...
Click to collapse
If you mean on stock slot, just remember that you need to have some system installed there even in order to boot into safestrap - delete old, install new and ONLY then reboot, otherwise you're facing sbf Learned the hard way It doesn't brick your phone (meaning you can unbrick it), but it's lengthy and annoying...
@sd_shadow: Thanks, now I know. Feels kinda stupid having asked one of the FAQ's - can't remember when that happened before.
LuH said:
Same here, I suspect it's also connected with throttled data transfer requests of multiple apps at once, but the RAM is IMO the biggest factor. In Linux RAM is almost always full and the "free" space is occupied by cache (filesystem cache or whatever else app's cache) ready to be deleted - maybe the phone is stuttering when freeing the "free" space for other use.
Weird is that my brother with almost vanilla L 5.1 on Nexus 4 has system consuming about 100M less RAM than my CM12 - device-specific drivers maybe?
Click to expand...
Click to collapse
Ah that's interesting, didn't know that about Linux before. Well I always imagined that when there's little memory left, the drive somehow gets slowed down because there would'nt be enough space for some temp files or executions. But I don't really have a clue.
On the other hand, different devices showing different and inconclusive results like that is something I already experienced many years ago. ^^
LuH said:
If you mean on stock slot, just remember that you need to have some system installed there even in order to boot into safestrap - delete old, install new and ONLY then reboot, otherwise you're facing sbf Learned the hard way It doesn't brick your phone (meaning you can unbrick it), but it's lengthy and annoying...
Click to expand...
Click to collapse
Yeah I know, I had read about it before. But you can't really miss all those hints everywhere, so I think the community takes good care of spreading that time-saving information.
Actually thanks for encouraging me, because last night I flashed CM12.1 and everything onto the stock slot! Today I installed and configured most of the things I needed (including int/ext storage swap) and I have to say, it really runs better! It might not be as smooth as with a more recent smartphone, but it's definitely snappier than CM12 on the safe slot was (now it's gone and will rest in peace^^). It may sometimes take a few seconds, but most of the time it's very fluid, a great, noticeable improvement.
Additionally, now that I don't have to household with the memory anymore, I installed all the apps that I had left out on the safe slot install and even installed a couple of huge games from the Play Store (NFS:MW, NBA Jam, Batman Dark Knight, Injustice) onto my microSD card and it still runs almost without any hick-ups! I haven't tested the games yet, though.
EDIT: It really seems to have something to do with the amount of memory left on /system. After all that installing I was down to ~ 200MB (which would've been normal on the safe slot) and the phone started lagging a little bit more. But after moving some games and apps to the SD I have more than 500MB 600MB - okay after deleting the cache it's 1,26GB - free on /system and the phone runs smoothly again.
Shani Ace said:
EDIT: It really seems to have something to do with the amount of memory left on /system. After all that installing I was down to ~ 200MB (which would've been normal on the safe slot) and the phone started lagging a little bit more. But after moving some games and apps to the SD I have more than 500MB 600MB - okay after deleting the cache it's 1,26GB - free on /system and the phone runs smoothly again.
Click to expand...
Click to collapse
I guess you're talking about /data, not /system (different partitions, /system is usually read-only and system is installed there with stuff you flash from safestrap, everything else goes to /data or /sdcard). Yup, when /data is becoming full, you're gonna experience some strange behavior.
/data is the first "Internal storage" in Storage settings, /system is not shown there, /sdcard is the second "Internal storage" and /sdcard-ext, or "SD card", is the actual microSD in default CM12 setup. I guess you have the last two switched though.