[Q] need help on gps-samsung galaxy y - General Questions and Answers

I'm working in a method to increase SGY's internal /data partition. in my previous method I was using a modified kernel to load sdcard's ext paritition as /data. however, this kernel have bad issue with script manager. I've found the most easy easy way to increase our /data partition size in sgy. no need to install custom kernel, we'll need only a stock kernel with init.d support. with this new method we'll make a script '03data2sd' in init.d folder with these script inside
Code:
#!/system/bin/sh
umount /data
mount -t ext3 -o nosuid,nodev /dev/block/mmcblk0p2 /data
this method will solve my previous kernel incompatibility issue with script manager. however, the gps won't work with this method. the logcat file said that there was something wrong with gps_ril_BRCM. it said that 'RIL LCSAPI' isn't working. does anyone know how to fix it?

Related

[DEV][DATA2SD] More space (and more I/O) for your Desire (Updated/EXT4/Flashable ZIP)

HI all.
I know it has been already done but I didn't find any detailed tutorial for the hTc Desire so I wrote one for you
Howto for a HTC desire with clockworkmod recovery:
I did this with a stock HTC sense 2.2 froyo rooted rom with init.d support and my own kernel, forked from richardtrip sense kernel v5e. I don't know for other ROMs or Kernels. Your ROM must support init.d boot scripts.
What you need is:
* Fast µSD card (Class 4 or 6 recommended. Lots of issues reported with class 10 on the Desire)
* busybox (http://www.busybox.net/downloads/binaries/) on c:\
* Kernel with EXT4 support. The kernel in original ROM does not provide ext4 support!!
* Rom with init.d script support (StarBurst (Froyo) or Supernova (Gingerbread) have a native DATA2SD support)
* If you already have app2sd+ or a similar script, don't do the following hack (or at your own risks) !!
* If you still want to try it, backup your A2SD scripts and roll-back to a pre-A2SD state. Don't ask me why it's not working, I never used APPs2SD so I can't help.
* To help you with ADB, you can use the GUI
If you feel a bit lazy or you're scared to make any mistake and want to skip all the manual installation, then go straight to the bottom of this post and download the flashable script made by droidzone. Many thanks to him!! You can also flash Supernova (Stock HTC gingerbread release) and you'll be good to go within no time.
If you already have this running but you flashed another rom, have a look here. droidzone posted another script to just update the rom you just flashed to get DATA2SD work properly
[size=+1]1/Get yourself prepared[/size]
A/ backup everything (nandroid).
B/ Make sure everything is backed-up
C/ Copy the content of you SD to your computer and keep it handy for a roll-back.
D/ make a copy !!!! (I think know that you've been warned )
[size=+1]2/ Make 2 primary Mb aligned partitions on your SD[/size]
Primary partition 1 will be your usual storage, must be FAT32.
To optimize it, I really recommend to have a look here
Primary partition 2 will be your new storage (/data).
You can use gparted or fdisk (I do prefer fdisk and wrote a guide here ) to partition your SD; but it's up to you and Gparted is working great too.
Use the MB align option of gparted to align your partitions. This helps big time to get a better R/W speed.
With the latest busybox, you can do that on your phone in recovery mode.
You will need also e2fs progs. They're all attached at the bottom of this howto.
[size=+1]3/ Boot your phone in recovery and get it prepared[/size]
Connect to your phone with "adb shell"
You should get a ~# prompt now.
mount /system
mount /data
mount /sdcard
exit
if mount /sdcard fails, try mount /dev/block/mmcblk0p1 /sdcard
You should get this as a result of a "mount" command:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,errors=remount-ro)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,relatime)
Replace you old busybox exec with the new one. It's located in /system/xbin/
adb push c:\busybox-armv6l /system/xbin/busybox
Add the script to init.d folder:
adb push c:\01data.txt /system/etc/init.d/01data
Add the fstab to /system/etc/
adb push c:\fstab.txt /system/etc/fstab
Extract e2fsprogs-arm.zip to c:\
Push all e2fs progs you've extracted from the zip to /system/bin/ the same way:
adb push c:\e2fsprogs\system\bin\e2fsck /system/bin/
adb push c:\e2fsprogs\system\bin\mke2fs /system/bin/
(etc.... for all apps)
Push all e2fs libs you've extracted from the zip to /system/lib/ the same way:
adb push c:\e2fsprogs\system\lib\libext2_blkid.so /system/lib/
adb push c:\e2fsprogs\system\lib\libext2_com_err.so /system/lib/
(etc... for all libs)
adb shell
cd /system/bin
chmod 755 e2fsck
chown 0.2000 e2fsck
(Do the same for all pushed apps.)
cd /system/lib
chmod 644 libext2*
chmod 755 /system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/etc/init.d/01data
chown 0.0 /system/etc/init.d/01data
Finally type this:
:> /system/etc/mtab
[size=+1]4/ Instant of creation[/size]
cd /
For a non-journaled version:
/system/bin/mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64 -O ^has_journal,extent,^huge_file -m 0 -L userdata /dev/block/mmcblk0p2
For a journaled version (safety/AOSP ROMs):
/system/bin/mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64 -O extent,^huge_file -m 0 -L userdata /dev/block/mmcblk0p2
stride and stripe-width are RAID options but they are used here to align the filesystem to the max erase block size of an SD card. In conjunction with EXT4 extents feature (not present in ext3), it gives a bit of extra performance thanks to block allocation. It's used and recommended for SSDs, so it should help our poor little cheap (SSDs) SD cards
I use 64 because 64x4 (4kb block size)=256Kb. 256Kb is the max erase block size per the SD standards.
Your card may have a smaller erase block size but 256K is at least compatible with every card.
If you want to change the block allocation size, change the "64" parameter.
Just change it to - say - 32 (32x4=128kb) etc ...
Tune this to your actual erase block size if you know it.
If you want journaling (better data integrity) at the cost of performance and probably sd card wear, use the journaled option when you format the ext4 partition. Journal will also use some space on your EXT partition.
Read this article or my tutorial for more details on aligning partition and file system on linux.
I'd like to mention at this stage that fortunately, HTC has implemented a nice and clean unmount of /data at shutdown. Unless you remove your phone battery while it is running or android completely crashes and the cache hasn't been flushed to the sd card, you shouldn't suffer from data loss. In that case though, I've implemented a forced check of the data partition to try to recover any errors on the ext4 partition before booting the phone. You can expect to have a fair amount of safety without journal as long as you turn off your phone with standard HTC menu on sense ROMs
Anyway, if you want to try DATA2SD on a AOSP ROM, you *must* use a journal!
[size=+1]5/ verbatim[/size]
type this:
mkdir /sd
/system/xbin/busybox mount -t ext4 /dev/block/mmcblk0p2 /sd
cd /data
cp -a * /sd
cd /
sync
All you data should copied now.
check with a "ls -l /sd" that you have a least the directory structure.
"df" should report the space used on the new filesystem and should be close to your /data.
/system/xbin/busybox umount /sd
[size=+1]6/ Reboot[/size]
Reboot.
Move all you apps (if you have used the Froyo AP2SD) back to the phone, which is now the SD.
Reboot to get a clean and stable phone
Make sure that you don't install any app in the future to the SD. Some apps are installed automatically to SD, move them back to the phone if it is so.
[size=+1]7/ Comments[/size]
IMHO, a readahead of 128kb could be a bit excessive and can penalise read speed when reading small amounts of data. I've reduced it on my phone to 64kb and noticed a slight improvement when for instance the phone reads data to show apps, icons and size when you open the application list in the settings/applications/manage applications menu. Some kernels have a default value of 4K. This is really bad for performance and it must be changed to get good read performance.
To change it, type this while android is running:
echo 64 > /sys/block/mmcblk0/queue/read_ahead_kb
This setting will be lost on reboot. Just add this line to the script if you want to keep it on reboot.
ownhere did a fantastic job at hacking the libsqlite.so library. I patched the original sense lib and I strongly recommend to replace it with the one attached below.
To do so, just boot into recovery mode, mount /system and backup your /system/lib/libsqlite.so file to your sdcard. Then push the patched lib to /system/lib/ and do a chmod 644 on the pushed file.
Reboot and VOILA!
Updates of the flashable ZIP are available here
If you're coming from previous version (2 FAT32 partitions, ext2 file and loop mount) and want to move to this new one, have a look at this post. You don't have to do everything from start and loose your data. You should get there all the needed info to backup your data and restore it to the new EXT4 partition.
ownhere posted a very interesting option to play with in this post. Apparently nodelalloc mount option is giving better score than delalloc on flash memories. I recently tested it and I had better Quadrant and TAP scores so check-it out!
If you want to impress your friends with Quadrant score, just add "noauto_da_alloc" in the mount option of the script or do this manually with adb shell : busybox mount -o remount,noauto_da_alloc /data
The effect is pretty similar on the final score than nodelalloc (at least on my phone/sdcard )
To get back to normal: busybox mount -o remount,auto_da_alloc /data
(Got this setting from here).
It is simply making the system (thus Quadrant) working in cache (RAM) instead of the SD card.
I'm not sure that this settings improves that much real life usage, but at least you'll get what you're looking for: A super (fake) Quadrand I/O score
I may add this setting in future release of DATA2SD. I'm testing it ATM on my phone.
Many thanks to ownhere and melethron for all their thinkings at bringing issues, help and updates to get to this new version.
Many thanks to too droidzone for his great work on a flashable ZIP and integrating DATA2SD in his ROM to make your life easier you flash maniacs
I hope that I didn't forget something. It's working for me so it should work for you.
Read the thread before asking a question !
This sounds really great ... 2 things :
1. your links are broken
2. Can't we generate the file for /data on the first fat32 partition ... would be a lot easier to format the sdcard with only one partition ...
thank you very much for this great information ...
fogbav said:
This sounds really great ... 2 things :
1. your links are broken
2. Can't we generate the file for /data on the first fat32 partition ... would be a lot easier to format the sdcard with only one partition ...
thank you very much for this great information ...
Click to expand...
Click to collapse
No because you won't be able to use your SD as an external drive when connected to USB.
Just checked the links and they're OK
i vouch for sibere's script... i'm one of first "live testers" for his script and it works great and very, very stable
and from what have been tested by several testers , it can work in these roms :
without a2sd+ :
- rooted stock
- leedroid no-a2sd
with a2sd+ :
- auraxtsense
- defrost
- leedroid
- alex-v
Sibere, allow me to add notes from AndroHero on using the script with a2sd+ rom :
- remove the data2sd (or in auraxt, stuff2sd) from system/etc/init.d in the rom zipfile, or if you have install the rom, just remove from system/etc/init.d
- do the sibere script
Regards
BL
I have follow this easyest tutorial and i'm ok.
All credits to AndroHero for tutorial and to sibere for the hack! I'm only copy and paste from the previous thread!
This tutorial is for all app2sd sense rom so you can follow this tutorial not onfly for lee droid.
As attachment the file that tutorial need.
I have made a 2gb partition for data and is an awesome to see 1.80gb internal memory at first boot!!!!
WOOOOW
Now let's start with tutorial!
------TUTORIAL BEGIN-------
WHAT YOU NEED:
1)Root
2)Android SDK
3)15minutes of time
ALWAYS MAKE A NANDROID BACKUP AND SD BACKUP!!!
LET'S START NOW!
1) download leedroid 2.2f (apps2sd version)
2) unzip the .zip file, open the folder, open the system folder, and then inside that open the folder called etc, you will see a folder called init.d, open that and delete the file called 40a2sd, now just navigate back to the root of the rom and re-zip it.
3) now you need to partition your sd card, use gparted to make 2 fat partitions, a large primary partition and a secondary one about 1gb in size.
4) once you have done that copy the leedroid.zip to the sd card, boot into recovery, do all your wipes and flash the rom, one fashed boot it up and set it up as normal.
5) once set up, hold the power button and choose the option to reboot into recovery.
6) once in recovery connect your phone to your pc, open a command prompt and navigate to the tools folder inside the android SDK.
7) now in the command prompt type the following one at a time:
adb shell
mount /system
mount /data
mount /sdcard
exit
8) now leave the command prompt open and download the file at the bottom of the screen, (i have had to zip it, just open the .zip and the 01data file is inside) and copy it to the root of the c:\ drive on your pc.
9) in the command prompt type (one at a time and always wait for the # to appear again before entering a new command)
adb push c:\01data /system/etc/init.d
adb shell
chmod 755 /system/etc/init.d/01data
cd /
mount /dev/block/mmcblk0p2 /sd-ext
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
/system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2
mkdir /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
cd /data
cp -a * /sd
cd /
/system/xbin/busybox umount /sd
exit
adb reboot
10) your phone will now reboot with a much bigger /data/ partition.
------TUTORIAL END-------
I suggest to activate the boost!
type in adb shell window with android running:
busybox mount -o remount,noatime,nodiratime /mnt/asec/ext/ext2 /data
sibere said:
No because you won't be able to use your SD as an external drive when connected to USB.
Just checked the links and they're OK
Click to expand...
Click to collapse
Sounds real logical ...8) ... Ups ... shortcut in brain ...8)
bluelavender said:
i vouch for sibere's script... i'm one of first "live testers" for his script and it works great and very, very stable
and from what have been tested by several testers , it can work in these roms :
without a2sd+ :
- rooted stock
- leedroid no-a2sd
with a2sd+ :
- auraxtsense
- defrost
- leedroid
- alex-v
Sibere, allow me to add notes from AndroHero on using the script with a2sd+ rom :
- remove the data2sd (or in auraxt, stuff2sd) from system/etc/init.d in the rom zipfile, or if you have install the rom, just remove from system/etc/init.d
- do the sibere script
Regards
BL
Click to expand...
Click to collapse
Year sure, you're free to add notes mate
will this increase the battery usage?
kakit526 said:
will this increase the battery usage?
Click to expand...
Click to collapse
No effect at all on the battery usage. the usage is around the same .
BL
only one question:
is it better than using a2sd+?
what is the difference?
i had a lot of memory issues with a2sd+ (internal memory decrease very quickly compared to a2sd storage until i get the 'low memory' error message), does this solve my problem?
thanks
bye
Alessandro
Does this really increase IO speed? Can anyone who managed to set this up please post ur Quadrant benchmark.
alessandro_xda said:
only one question:
is it better than using a2sd+?
what is the difference?
i had a lot of memory issues with a2sd+ (internal memory decrease very quickly compared to a2sd storage until i get the 'low memory' error message), does this solve my problem?
thanks
bye
Alessandro
Click to expand...
Click to collapse
Yes, it will solve the problem
The reason why internal memory still decreases with a2sd+ is because not every part of the apps are moved to sd-card . Some of the data parts are still in the internal memory.
This script moves entire data folder to sd card, so nothing in internal memory get decreased
It can be any size you want. So far, the maximum tested size is 2 gb i think was tested by mattiadj & androhero.
BL
I tried once, i got 1956 score (CPU at 998Mhz)
Does this preserve the data on the card? Or do you have to copy everything back on?
Of course I'll have backups, but just asking
coutts99 said:
Does this preserve the data on the card? Or do you have to copy everything back on?
Of course I'll have backups, but just asking
Click to expand...
Click to collapse
it will survive the boot... of course, if you wipe factory data, everything will be gone...but it is safe and survive normal reboot or recovery reboot
BL
This is what is on clean flash of leedroid and after this hack!
I have made a 2gb partition....
Image talks alone....one word: THANKS!
Great job!
Now I expect seeing this bundled into all ROMs around here...
Any improvements are welcome but beside the space can you feel the I/O at some points or is it just a number?
Dude you are legen........ wait for it........... DeRY =D
hope to find a little time to test this awesome tutorial =]
what would happen if the SD card failed? does this render the phone unuseable until a new rom is flashed?

Need FS Block Size: Bad Magic Block Error

SHORT: I need the filesystem block size (location would be nice too; however, I can guess that) so I can use e2fsck to restore my super-block.
LONG: I have been having issues for the past several days where I cannot umount /system. I thought it may have been a bad conversion going to/from or from/to rfs and ext4 and thought doing the conversion again had fixed it. But alas...it didn't.
I cannot umount the files system from adb ("device is busy" error) or CWMR ("Couldn't find valid filesystem superblock" in the log) on any version of ROM or using any kernel that I can find. Voodoo can seem to convert the filesystem (back/forth), but it only seem to work if I tell it to from the Voodoo Control and then reboot, which is odd. Still cannot umount.
When I try and use Navenedrob's Ext4 Formatter, it fails for /system. CWMR's log shows:
/tmp/tune2fs: Bad magic number in super-block while trying to open /dev/block/stl10
Couldn't find valid filesystem superblock
Should be fixable with e2fsck, if I can get the correct information from tune2fs.
Typically, the command should be:tune2fs -l /dev/block/stl10 OR tune2fs -l -L /system
That said, tune2fs is tell me "-l" is an unknown option.
Can someone who is familiar with tune2fs (or other filesystem tools) in the Android/BusyBox environment please post either the correct command or a list of the contents of the filesystem super-block? Please be sure to include if your /system is in EXT4 or RFS.
Man, I haven't see this **** in years. Even then, it was pretty exclusive to virtual/networked file system (e.g. LVM).
Any-who, much appreciated....
So, after sleeping on it, I came to realize an error in my thinking...
I cannot use e2fsck to fix an RFS filesystem. Even more upsetting is that I cannot seem to find anything on The Google about command line RFS tools. Guess I could try a conversion and EXT filesystem, then change the superblock, then convert back to RFS, but that seems awfully convoluted.
Suggestions?
I suggest you odin with pit and check repartition. That *usually* fixes everything.
Sent from my debloated ep1q charge......bro.
Thanks for the tip...I probably should have mention that I've used Pit+ED1 numerous times in a effort to fix this. It goes through successfully; however, it doesn't actually wipe the partition and I've found old files in /system.
UPDATE:
Last thing I tried is manually wiping everything from /system (in CWMR + adb shell). Also, wiped everything I could find having anything to do with voodoo or EXT4 (just in case). After power off then back to recovery, I found I could umount /system. Created a new partition, formatted, then wacked the partition.
I just (successfully) ran ED1+pit from the Samsung Flashing Utility (which I have NOT tried using before) and I am now in the process of upgrading. Once I have root back, I'll go see if the fix for /system was permanent.

[Q] ext4 optimizations

Now, i know there are a *few* places in the dev section that have ext4 optimizations. But these "optimizations" are for the conversion from ext3 to ext4 without having the reformat and everything.
I've been trying (unsuccessfully) to change some of the ext4 mount flags for better speed. My problem is, everything i do in making a CWM flashable with a ext4 optimize sh script errors out with a Status 0. it doesn't even run.
But this time, i though i'd try a few things using adb shell. I got some tune2fs stuff working, so i thought i'd run an fsck on it. There isn't any fsck located on the phone. So i copied over a fsck.ext4, ran it but then got this error (and it also left my rom unuseable, but luckily i had a nandroid):
Code:
***file system was modified*** invalid argument passed to ext2 library while rewriting block inode bitmaps
.
And when doing an ls of /sbin, there isn't anything in there related to ext4, let alone ext3. So i'm wondering, why is our phone supports ext4 partitions, but doesn't actually have anything to support them?
EDIT: running just the tune2fs seems to have worked, just need to test out any differences found first.

Idea for creating extra storage space

I have a good 2 GB of space that I am unlikely to use on the /data partition. So I created an 'sdcard' directory in there. What I'm trying to do is trick the system into believing that it's a second SD card. Can android support more than one? It's all good getting the directory to work as a secondary storage place, but the problem is, media scanner will not show pictures/music that are in that directory.
So my question is, is it possible to edit the ramdisk (init.rc) or vold.fstab etc or any other files, so the system is tricked into believing it's an actual storage card? I have tried making symlinks and doing directory bindings from /data/sdcard to /storage/sdcard1, but haven't had any luck.
Edit:
something like this maybe in init.rc??
symlink /storage/sdcard /sdcard
symlink /storage/sdcard1 /data/sdcard
export EXTERNAL_STORAGE /storage/sdcard
export SECONDARY_STORAGE /storage/sdcard1
I'm sure something is possible.
The nicest thing would be to have vold bind-mount a directory or loop-mount a filesystem image, but I'm not sure vold can do that at all and if it can I don't know what the syntax for that would be.
This would probably be a bit different between sense and aosp as it looks like vold is different.
You can easily bind-mount it yourself.
Either way, if you want to mount it on (say) /sdcard2 or anywhere on the root file system, you have to edit the ramdisk in the boot image.
But you can also mount it on top of /sdcard
mkdir /data/extra_sd
mkdir /sdcard/extra_sd
busybox mount --bind /data/extra_sd /sdcard/extra_sd
( ^^^-- I found that /system/bin/mount doesn't do --bind or -o loop and that busybox mount does.)
I tried this and it works. I have not yet experimented with putting it in an init.d script or so to mount it on boot and see if mediascanner scans it.
However, using this method you may corrupt stuff when you USB-mount your sdcard onto your PC. I'm not sure.
-Jobo
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
ardax said:
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
Click to expand...
Click to collapse
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
djsubtronic said:
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
Click to expand...
Click to collapse
I don't think it should, since it's not changing the partition layout of the internal memory itself, just globbing it together and slapping virtual volumes on top with LVM. The biggest things are making sure that the kernel has LVM support and binaries built in and that recovery can get to those LVM binaries.
Perhaps I'm wrong though.
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
I really like the idea using data to get some extra space.
I tried "busybox mount --bind" via console and it works. Now i will have a look at ScriptManager.
But what happens if you are installing/updating a new ROM. Do you lose all your things located in /data?
regards
If you format /data then yes, obviously. You are only creating a "shortcut" to /data/folder.
Also, if you run out of space in /data/app/ you can move apps to /system/app instead.
I did that on my blade with a way too big /system/ partition and way too small /data/ partition
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
Could I get a hold of that script by chance?
Daiskei said:
Could I get a hold of that script by chance?
Click to expand...
Click to collapse
+1. Yes, please share.
One S | Xparent Blue Tapatalk 2 | Viper 1.2.1 | Bricked Beastmode
So updating a ROM without formating data partition should be no problem.
But for installing a new ROM i have to backup the folder in the data partition.
I tried to use ScriptManager, but this app seems to be bit overloaded.
After this i installed GScriptsLite.
In there i made a new script with something like this:
busybox mount --bind /data/myfolder /sdcard/myfolder
The script is not started automatically after a reboot, but after running the script via GScriptsLite the folder is mounted.
Yeah I suppose it could be difficult if changing ROMs, but I use CM only so I never worry about changing the data partition. But if I do, I just copy the /data/media folder onto my PC using adb pull, then do the wiping/flashing, and finally push the media folder back before booting the ROM.
As for the script, it's essentially just this one line:
Code:
busybox mount -o bind /data/media /storage/sdcard0/Music/Music2
I've kept the script file itself on the /data partition as well. In script manager I've set it to run the script as SU and on boot, and that's it. I've mounted it into a sub folder within Music since I use PlayerPro and it only adds music found within /sdcard/Music.
Yes, ScriptManager is a lot more complicated than GScripts, but it always mounts it automatically on boot so saves the hassle of having to remember to manually run the script if you ever reboot. Plus you only have to sort it out once then never open the app again if you don't want to

[IDEA] Need community help! A safer solution for memory woes on Marshmallow.

When I installed Android 5.0 and later 6.0 ROM on our Xperia L experience was much better than stock. These ROM's are simply fantastic! However, we have memory issues. Yeah we can use apps like Link2SD or foldermount, but that's too much of a hassle. Thet's not really a long-term solution.
The main problem is that /data partition is too small to handle modern app file sizes. It's only 1GB.
And /sdcard partition also exists (which is seperate from data) and represents internal memory - that's 4GB.
On top of that our phone has externalSD slot - /extSD option.
When you install an app it always directly installs to /data. Yeah you can move it. But still 1GB is not enough, somehow I keep getting not enough memory notification.
So the first solution by @Kahana82 was to repartition. That way we could remove 2GB from /sdcard and give it to /data. But the problem is that when we change partitions our phone gets bricked when stock ROM is flashed again.
But I have come across a new idea that could work. Just need community help for that as I am not that experienced.
So instead of repartitioning we could simply mount /SDCard as /data (just rename it!) and mount /data as /SDCard. That way we could increase /data from 1GB to 4GB and I think it is enough for basic app needs. And therefore flashing stock ROM should work as it is just change in kernel or system. Only 1GB internal memory wouldn't be a problem since Android 6.0 allows us to mount externalSD as internal memory.
Now how to do it. I have taken a look at this thread for 2011 Xperia Arc. Looks like ramdisk could be modified to do so as I see that mountpoint is there.
EDIT: OK, I've managed to unpack boot.img and ramdisk. Here's what I get:
fstab.qcom file
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,formattable,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.1/mmc_host/mmc0* auto auto defaults voldmanaged=sdcard0:32,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
I propose another solution.
Format "SD 0" as EXT4.
Then mount during the boot of Android, "SD 0" as DATA partition.
Simply replace "date" with "SD 0" at the time of installation of partitions.
This does not alter the structure of partitions and would give the 4 GB device for apps installation.
I've done tests. It's easy to format using the TWRP "SD 0" as EXT4.
The same process is easy to reverse.
It is safe because it does not change the structure of the partitions. If there is any problem just restore the Stock ROM.
Soon just need help to know which Android configuration files need to change mount "SD 0 in EXT4" like the DATA unit.
The Xperia L pass from 1,57GB to 4 GB !!!
Help, please !!!!
All the MM ROMs for Xperia L should have Adoptable Storage. You could format a partition of your SD Card as Adoptable Storage (using Apps2SD). And you can then move most of the apps to that partition in its entirety. Apps downloaded from Play Store would automatically go to the Adopted Storage.
Only certain apps like WhatsApp and Maps would refuse to move. You could use Link2SD to force move such apps to Internal SD of your device. It will move a big part of it.
On older ROMs, you should be able to setup a partition of your SD as linkable storage, allowing Link2SD or Apps2SD to move the whole app to the partition.
DragonClawsAreSharp said:
All the MM ROMs for Xperia L should have Adoptable Storage. You could format a partition of your SD Card as Adoptable Storage (using Apps2SD). And you can then move most of the apps to that partition in its entirety. Apps downloaded from Play Store would automatically go to the Adopted Storage.
Only certain apps like WhatsApp and Maps would refuse to move. You could use Link2SD to force move such apps to Internal SD of your device. It will move a big part of it.
On older ROMs, you should be able to setup a partition of your SD as linkable storage, allowing Link2SD or Apps2SD to move the whole app to the partition.
Click to expand...
Click to collapse
There are advantages to swap partitions instead of using the SD Card:
- The new partition date would be within the device's NAND memory. So there are the risks involved in using a sdcard always fragile ...
- How the partition is within the NAND memory beyond the security there is the highest performance.
The only downside is that the restriction would increase from 1,57GB to 4GB.
In my case I not use the smartphone for gaming. All of my APPs would fit into 2.5GB.
If I still needed more space, could use "Adoptable Storage".
- Could unmount and remove the SD card when wanted, after all was being used only for personal files and not apps.
Also it would be a great experimental situation of low risk to learn how to configure mount partitions on Android.
ConceptBR said:
There are advantages to swap partitions instead of using the SD Card:
- The new partition date would be within the device's NAND memory. So there are the risks involved in using a sdcard always fragile ...
- How the partition is within the NAND memory beyond the security there is the highest performance.
The only downside is that the restriction would increase from 1,57GB to 4GB.
In my case I not use the smartphone for gaming. All of my APPs would fit into 2.5GB.
If I still needed more space, could use "Adoptable Storage".
- Could unmount and remove the SD card when wanted, after all was being used only for personal files and not apps.
Also it would be a great experimental situation of low risk to learn how to configure mount partitions on Android.
Click to expand...
Click to collapse
Guys, devs are apparently working on unifying partitions. That's the best solution.
It is already working on Xperia T. So it is possible on Xperia L as well.
Let's just wait and see for now.
IMO This is actually top priority for Xperia L lol other that this the device is working just fine.
ConceptBR said:
I propose another solution.
Format "SD 0" as EXT4.
Then mount during the boot of Android, "SD 0" as DATA partition.
Simply replace "date" with "SD 0" at the time of installation of partitions.
This does not alter the structure of partitions and would give the 4 GB device for apps installation.
I've done tests. It's easy to format using the TWRP "SD 0" as EXT4.
The same process is easy to reverse.
It is safe because it does not change the structure of the partitions. If there is any problem just restore the Stock ROM.
Soon just need help to know which Android configuration files need to change mount "SD 0 in EXT4" like the DATA unit.
The Xperia L pass from 1,57GB to 4 GB !!!
Help, please !!!!
Click to expand...
Click to collapse
That's the same thing I was thinking. But yeah, thanks for the info that SDCard can be formatted to ext4. Then I think this can happen:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/devices/platform/msm_sdcc.1/mmc_host/mmc0 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
Ehh, will try to make boot.img soon. You guys think this code would succeed? Then /sdcard wouldn't exist but let's just see if data would.
I've tried it and it f..ked my phone. I had to reflash stock and go to mm from there ...
cojocar.andrei said:
I've tried it and it f..ked my phone. I had to reflash stock and go to mm from there ...
Click to expand...
Click to collapse
Sorry to hear that...
In my case I need an even simpler solution ...
Using TWRP formatted "SD 0" as EXT4.
I managed to UnMount "/DATA" and "/sdcard".
I would like to reverse the mounts.
Partitioning modifies the structure of partitions.
Mounting is by software changes and safe.
The solution will allow any time to install the ROM Stock since the structure of the partitions will not be changed.
As in TWRP Terminal can ride correct partitions?
if I'm wrong then correct me, please ...
Device Configuration Partitons
sdcard -> /dev/block/mmcblk0p32
Userdata-> /dev/block/mmcblk0p31
CHANGE
sdcard -> /dev/block/mmcblk0p31
Userdata-> /dev/block/mmcblk0p32
------------------------------------------------------------
Is it correct? ADB Shell or Terminal?
unmount /sdcard/
unmount /Userdata/
mount -o rw /dev/block/mmcblk0p32/ /userdata/
mount -o rw /dev/block/mmcblk0p31/ /sdcard/
And reboot smartphone?
/system/init/init.rc?
------------------------------------------------------------
Sorry my bad english...
ConceptBR said:
In my case I need an even simpler solution ...
Using TWRP formatted "SD 0" as EXT4.
I managed to UnMount "/DATA" and "/sdcard".
I would like to reverse the mounts.
Partitioning modifies the structure of partitions.
Mounting is by software changes and safe.
The solution will allow any time to install the ROM Stock since the structure of the partitions will not be changed.
As in TWRP Terminal can ride correct partitions?
if I'm wrong then correct me, please ...
Device Configuration Partitons
sdcard -> /dev/block/mmcblk0p32
Userdata-> /dev/block/mmcblk0p31
CHANGE
sdcard -> /dev/block/mmcblk0p31
Userdata-> /dev/block/mmcblk0p32
------------------------------------------------------------
Is it correct? ADB Shell or Terminal?
unmount /sdcard/
unmount /Userdata/
mount -o rw /dev/block/mmcblk0p32/ /userdata/
mount -o rw /dev/block/mmcblk0p31/ /sdcard/
And reboot smartphone?
/system/init/init.rc?
------------------------------------------------------------
Sorry my bad english...
Click to expand...
Click to collapse
In theory it should work. I've tried it but it didn't come up right for me. I suspect the line in fstab.qcom for the user data that I've replaced (/devices/platform/msm_sdcc.1/mmc_host/mmc0).
I think we should replace
/dev/block/platform/msm_sdcc.1/by-name/userdata
with
/dev/block/platform/msm_sdcc.1/by-name/sdcard
and of course format sdcard as ext4.
I see no reason why it shouldn't work. Probably I'll try it again in a few weeks, when I'll have some spare time ...
So for this to work the fstab.qcom needs to look like this:
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/sdcard /data f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,formattable,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.1/mmc_host/mmc0* auto auto defaults voldmanaged=sdcard0:31,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
Great job! It's usable?
Option58 said:
Guys, devs are apparently working on unifying partitions. That's the best solution.
It is already working on Xperia T. So it is possible on Xperia L as well.
Let's just wait and see for now.
IMO This is actually top priority for Xperia L lol other that this the device is working just fine.
Click to expand...
Click to collapse
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
stuckbootloader said:
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
Click to expand...
Click to collapse
Want to hear my advice? Install ROM that gives you most data space, I don't know which ROM that is. And use your device as-is until you buy new one. You could also replace your motherboard.
I know this is not xda-spirit like, but I have to say give up messing with your existent motherboard before you hard-brick your device, I destroyed mine. Had to buy new device. Xperia L can be hard-bricked if you mess with partitions.
stuckbootloader said:
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
Click to expand...
Click to collapse
In Xperia T, i think what @Adrian DC use a sdcard emuled for this...
Option58 said:
Want to hear my advice? Install ROM that gives you most data space, I don't know which ROM that is. And use your device as-is until you buy new one. You could also replace your motherboard.
I know this is not xda-spirit like, but I have to say give up messing with your existent motherboard before you hard-brick your device, I destroyed mine. Had to buy new device. Xperia L can be hard-bricked if you mess with partitions.
Click to expand...
Click to collapse
Other Roms? In Galaxy S2 for example, with PIT partitions(other method), all ROMS working today with pits (official cyanogenmod inclusive) . I'm sorry, but, this is the price of testing
Thread closed at OPs request

Categories

Resources