[HOWTO] Use extSdCard as Camera folder on Android 4.3 - Upgrading, Modifying and Unlocking

I recently (successfully) upgraded my Samsung i9505 with Janjan's Pure Google ROM version 4.3-2.1. While everything worked like a charm, I was frustrated with the little space I had in /sdcard, whereas I have a 32Gb sdcard plugged on that smartphone.
Android is GNU/Linux based, and the shell commands provided by most ROMs know how to handle mountpoints, especially mount -o bind, which permits to mount a directory on another directory. This is the trick you can use in order to have a lot more space within your DCIM directory:
Code:
# mkdir /storage/extSdCard/DCIM
# mount -o bind /storage/extSdCard/DCIM /sdcard/DCIM
There you go:
Code:
# df|grep DCIM
/mnt/shell/emulated/0/DCIM 29.5G 11.8G 17.7G 32768
Much better
Those commands are to be used with the root user. Obviously, you can use this trick for every other directory you'd like to extend. In order to make that mount point permanent, use the ROM's init script capabilities, for example with Janjan's ROM:
Code:
# mount -o remount,rw /system
# cat > /etc/init.d/99local
#!/system/bin/sh
/system/bin/mount -o bind /storage/extSdCard/DCIM /sdcard/DCIM
^D # press Control-D here
# chmod 755 /etc/init.d/99local
# mount -o remount,ro /system
Enjoy more space!

Related

System sound replacement need help.

So I'm using the Stock Gingerbread 1.5 Rom from Xboarder56
I'm trying to overwrite:
/system/media/audio/ui/Effect_Tick.ogg
/system/media/audio/ui/Lock.ogg
/system/media/audio/ui/Unlock.ogg
with versions I have of my own
So I did:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblk3 /system
# cd /system/media/audio/ui
# mv Effect_Tick.ogg Effect_Tick.ogg.old
# dd if=/sdcard/BallLaunch_01.ogg of=Effect_Tick.ogg
(repeat for the other two files)
Now this totally worked when I had Villainz w/Sense on my phone but doesn't now, just muted, same exact files even.
I rebooted the phone and still mute.
Anyone want to take a crack at this?
Encoding format? File size?
Thanks

[Q] Utilize space on /system partition for Dalvik cache or apps

Hi guys, gonna be clear as possible,
using custom sense rom, free space /system partition will be around 700mb and AOSP rom will be around 1GB, any tick of your mind to utilize this space to install more apps?
Before this, i create new folder on /system and copy several .apk to it. then using symlink to linking them on /data/app.. however im getting tired as i need to re-create symlink everytime after flashing new rom.
Now i think its better to utilize it with moving dalvik cache directory to /system partition. Last night i try using symbolic link implementation for the idea, but its goes wrong, then I try adding script to init.d but nothing happen. - wrong script maybe.
Did anyone have the same idea??, or can you guys help me to create script to move dalvik cache to /system partition? :silly:
I'm sure I used to do this (move apps) with Titanium Backup on my Desire HD.
I have used this.. have to reboot the phone a few times.. to get it to totally work.. seems to duplicate certain system entries in the data partition..
Needs a tweak here n there I think.. stumped though
Why no one has tried to implement this yet, I dunno... Given the space System partition can have.
Note; system partition has to be mounted as RW on boot..
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 SYSTEM STARTING ++++"
mount -o remount,rw /system
if [ ! -d /system/dalvik-cache ]
then
mkdir /system/dalvik-cache
chown 1000:1000 /system/dalvik-cache
chmod 775 /system/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /system/dalvik-cache/
fi
mount -o bind /system/dalvik-cache/ /data/dalvik-cache/

[HOW TO] add extra +700mb to Internal memory storage +600-900MB from /system

[Tweak root] add extra +700mb to Internal memory storage from /cache & +600-900MB from /system folders.
just run terminal with root & paste code
su
chmod -R 777 /cache
mkdir /cache/"your-program-folder"
mount -o bind /cache/"your-program-folder" /storage/sdcard0/"your-program-folder"
add extra +600mb (+900mb if you have LiteRom) from /system folder.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/sharŠµ
before you can write to /storage/sdcard/share mount it RW
su
mount -o rw,remount /system
after every reboot do it again. how add script to startup folder, any Idea?
all work great. I have 4.5GB + 700MB + 800MB internal storage for my music and maps.
But you cant use any OTA updates because your download /cache folder filed now. Remove all data before update
rm -R /system/share/*
rm -R /cache/*
Re: [Tweak root] add extra +700mb to Internal memory storage
Are you sure you got these commands right? And why don't you just make a script to automatically run these commands at boot? You know, so you don't have to keep running the commands over and over? And you have the work "program" spelled wrong. Its spelled with only 1 "m". Program, not programm.
Sent from my XT907 using Tapatalk 2
Re: [Tweak root] add extra +700mb to Internal memory storage
So what happens if you are using your whole internal sd including this 700 megs and you reboot? Does the system freak out?
Sent from my XT907 using Tapatalk 2
Update
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
Clienterror said:
So what happens if you are using your whole internal sd including this 700 megs and you reboot? Does the system freak out?
Sent from my XT907 using Tapatalk 2
Click to expand...
Click to collapse
everything will be fine, just live little more space on /cache (100mb at least)
UPDATE 1st post. add extra +600mb (+900mb if you have LiteRom) from /system folder. Now I have 6GB internal storage for my music and maps.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/share
before you can write to /storage/sdcard/shear mount it RW
su
mount -o rw,remount /system
But you cant use any OTA updates because your download /cache folder filed now. Remove all before update
rm -R /system/share/*
rm -R /cache/*
serraxer said:
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
everything will be fine, just live little more space on /cache (100mb at least)
UPDATE 1st post. add extra +600mb (+900mb if you have LiteRom) from /system folder. Now I have 6GB internal storage for my music and maps.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/share
before you can write to /storage/sdcard/shear mount it RW
su
mount -o rw,remount /system
But you cant use any OTA updates because your download /cache folder filed now. Remove all before update
rm -R /system/share/*
rm -R /cache/*
Click to expand...
Click to collapse
Well, make a new folder on your sdcard, I used root explorer. I called it "67tweaks", I then zipped up the folder, then navigated to my zipped folder and I removed the .zip extension (doing it this way allowed me to make a new text document, but theres prolly an easier way, but this is the way i used) and then I long pressed it so it would let me open it up as a text document. I deleted some jibberish that was inside, I then started with #!/system/bin/sh, then space, then pasted your commands under the space and I then placed the file under system/etc/init.d folder. Now every time I boot up, the script gets run. You can also use an app like "ROM toolbox" and go to scripts and just create a new script and select it to run at boot, or you can use SMmanager and create a script to run at boot.
serraxer said:
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
I'm no dev so I wouldn't be able to make a script to run at boot, but if you don't have init.d support you can add a script to your init.qcom.post_boot.sh file in system/etc folder and it should run at boot.
Sent from my HTCONE using Tapatalk 2
Click to expand...
Click to collapse
Looks right to me.
Thanks for the info. I am learning to love my M more and more.
thinks, I'm going to have a try.
serraxer said:
[Tweak root] add extra +700mb to Internal memory storage from /cache & +600-900MB from /system folders.
just run terminal with root & paste code
su
chmod -R 777 /cache
mkdir /cache/"your-program-folder"
mount -o bind /cache/"your-program-folder" /storage/sdcard0/"your-program-folder"
add extra +600mb (+900mb if you have LiteRom) from /system folder.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/sharŠµ
before you can write to /storage/sdcard/share mount it RW
su
mount -o rw,remount /system
after every reboot do it again. how add script to startup folder, any Idea?
all work great. I have 4.5GB + 700MB + 800MB internal storage for my music and maps.
But you cant use any OTA updates because your download /cache folder filed now. Remove all data before update
rm -R /system/share/*
rm -R /cache/*
Click to expand...
Click to collapse
I cut and pasted this exactly and it doesn't work. Can you please reply with exact sequences. I keep getting mkdir failed for /cache/your-program-folder, File exists
Will this work on a bionic?
Sent from my DROID BIONIC using XDA Premium HD app

remount with wr privileges. How?

Hello everyone, I've been using android since Eclair and I had a couple of different brands under my ownership. Sony Ericsson, Samsung, Alcatel...
I've always been rooting my phones. After that, each time I needed rw privileges in order to be able to delete files (like built-in apps), place ringtones, alarms and notifications sounds directly into /system/media/audio, rename or backup system files etc., I was using a simple command from a terminal app or via ssh from a desktop giving this syntax:
mount -o remount, rw /dev/block/mtdblock3 /system
Then, until next reboot I could write in /system.
Unfortunately since I got G3 this command won't work. Apparently, either lollipop's or LG's partitions are a bit different that the usual...
After looking around for a while, I came up with a page which shows that this command "ls -al /dev/block/platform/msm_sdcc.1/by-name", lists all partitions' paths by label and that according to the list, /system corresponds to mmcblk0p40. So I was thinking of trying the command a bit altered, like this:
mount -o remount, rw /dev/block/mmcblk0p40 /system
Since I don't have good knowledge of linux -I can't even tell if the old syntax is not working because of LG's implementation or of android's new version (lollipop)- I'd just like someone who has already done this to confirm that I'm right and it works. I'd really not like to brick the phone atm. I feel too old for this s...
Thanks, George...
P.S.: Now, if someone would be kind enough to provide an in-depth explanation of how I could always find by myself (in any newer version of android and any different android implementation), which partition is the appropriate one to use in this command in order to obtain rw for /system, that would be more than welcome!
Edit: I should have mentioned this to avoid getting answers about 3rd party apps which do those stuff like root explorer: I'm looking for a solution, not a workaround. I need the syntax of the command, not a list with apps which do what I'm trying to do using terminal. But thanks adamzki anyway...
Use root explorer pro. That's it.
This command is enough to mount /system as rw;
Code:
mount - o rw,remount /system
forumber2 said:
This command is enough to mount /system as rw;
Code:
mount - o rw,remount /system
Click to expand...
Click to collapse
That's really strange, I had used "mount -o remount,rw /system /system" and it didn't work
I now used "mount -o remount,rw /system" and it works! I'll never understand Linux...
Thanks anyway man!
Thread can be locked.

No System write permissions

I cannot write to my phones system partition. I can successfully run
Code:
mount -o remount,rw /system
from the shell but doing
Code:
mount | grep system
afterwards reveals that the partition is still read only. Root apps like Link2SD and ES File explorer also fail to write to system. I can still do it from inside of TWRP but I'd like to get it working in Android. Is there any fix for this as of now?

Categories

Resources