Help me mount r/o to r/w [fonts] - Amazon Fire Phone

Hi friend. I want add font (new emoji) in my Fire Phone.
Of course my phone has root. But I can switch r/o to r/w in this folder. Other system directory can be r/w.
Folder fonts is -
fonts -> /mnt/sqfs/fonts
Click to expand...
Click to collapse
/dev/block/loop0 /mnt/sqfs squashfs ro,relatime 0 0
Click to expand...
Click to collapse
How Can i mount it? Thank you!
p.s. My english is bad, sorry

The container is already mounted when the OS is running. Click here for a thread about adding / changing fonts.

mount | grep mount and use that location..
[email protected]:/ # mount | grep system
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,discard,data=ordered 0 0
[email protected]:/ # mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
[email protected]:/ # mount | grep system
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,relatime,discard,data=ordered 0 0
[email protected]:/ #

Related

ext4 module 2.6.29 (enclair 2.1) without reflash (raw lag fix)

I compiled ext4 module to work with enclair 2.1 kernel 2.6.29, tested with XXJF5 stock firmware. Need root access, tune2fs and mke2fs static binary (e2fsprog-bin.tgz.zip)
mkdir -p /system/lib/modules/2.6.29/
#copy module.tar.gz in /system/lib/modules/2.6.29/
cd /system/lib/modules/2.6.29/
tar zxvf module.tar.gz
insmod /system/lib/modules/2.6.29/kernel/fs/jbd2/jbd2.ko
insmod /system/lib/modules/2.6.29/kernel/lib/crc16.ko
insmod /system/lib/modules/2.6.29/kernel/fs/ext4/ext4.ko
if=/dev/zero of=/sdcard/sd/filesystem.ext4 bs=1048576 count=2048
losetup /dev/block/loop1 /sdcard/sd/filesystem.ext4
mke2fs -t ex4 /dev/block/loop1
tune2fs -c 0 -i 0 -m 0 /dev/block/loop1
mkdir /sdcard/sddata
mount -t ext4 /dev/block/loop1 /sdcard/sddata
cp -rp /data/data /sdcard/sddata
cp -rp /data/system /sdcard/sddata
cp -rp /data/dalvik-cache /sdcard/sddata
cp -rp /data/app /sdcard/sddata
cp -rp /data/app-private /sdcard/sddata
mount -t ext4 -o bind /sdcard/sddata/data /data/data
mount -t ext4 -o bind /sdcard/sddata/system /data/system
mount -t ext4 -o bind /sdcard/sddata/dalvik-cache /data/dalvik-cache
mount -t ext4 -o bind /sdcard/sddata/app /data/app
mount -t ext4 -o bind /sdcard/sddata/app-private /data/app-private
run your quadrant test, i got 1793. enjoy.
ps: if you want make it permanent look at RyanZA playlogos1 trick. Also make sure your ext4 filesystem is available at boot time instead /sdcard/sddata
Note:
- due its nature ext4 keep data in RAM much more than ext3 before writing on disk, therefore if a powerloss happens before data got written this may results in lost of data. (see delayed allocation). On the other hand a temporary file wont be written to disk, but kept on RAM avoiding read/write cycles. Inode reservation can increase performance as well.
- barrier can be disabled but this may result in a corrupt journal
explain please
you may want to use ext4 without reflash, and at the same time keep your /data untouchable, just in case you need a recovery backup. eg: if /sdcard got corrupt, system will mount your original /data. (desynced)
I had to disable vold, and mv /etc/vold.conf /etc/vold.old, otherwise it coundnt find /sdcard/filesystem.ext4 so I mount it just before everything.
userinit.sh
--
/system/bin/mount -t vfat -o errors=remount-ro /dev/block/mmcblk1p1 /sdcard
insmod /system/lib/modules/2.6.29/kernel/fs/jbd2/jbd2.ko
insmod /system/lib/modules/2.6.29/kernel/lib/crc16.ko
insmod /system/lib/modules/2.6.29/kernel/fs/ext4/ext4.ko
/data/local/bin/losetup /dev/block/loop1 /sdcard/filesystem.ext4
/system/xbin/e2fsck -p /dev/block/loop1
/system/bin/mount -t ext4 /dev/block/loop1 /sdcard/sddata
/system/bin/mount -t ext4 -o bind /sdcard/sddata/data /data/data
/system/bin/mount -t ext4 -o bind /sdcard/sddata/system /data/system
/system/bin/mount -t ext4 -o bind /sdcard/sddata/dalvik-cache /data/dalvik-cache
/system/bin/mount -t ext4 -o bind /sdcard/sddata/app /data/app
/system/bin/mount -t ext4 -o bind /sdcard/sddata/app-private /data/app-private
--
mv /system/bin/playlogos1 /system/bin/playlogosnow
Do not forget to create /system/bin/playlogos1 as follow:
#!/system/bin/sh
sh /system/bin/userinit.sh
/system/bin/playlogosnow
I got 1858
this is just proof do not use on your device if you dont know what you doing. Since vold does not mount partition some application may not recognize /sdcard mounted that way.
id like to find a way to start vold before playlogos1 and resolve this issue, buts vold seems check argv[0] before start.
e2fsprogs recompiled as well ? In other words, will the e2fsprogs from cynogen work on ext4? These do use libs, btw.
I might build support for this into CFLagFix if I can freely use the files
yeah static bin.
husq510 said:
yeah static bin.
Click to expand...
Click to collapse
Just want to ask if it's ok to implament this in my lagfix zips
Ofc ill credit you
sure you can.
Thanks for the statically linked e2fsck
Nvm got it working on captivate also

[Q] How to combine init.d & Link2SD with a stock kernel?

The problem is that there are two possibilities which both interfere with Link2SD:
1. Doomlord - uses sysinit & install-recovery.sh
2. puppet13th - uses debuggerd
Both methods are great, but Link2SD changes the files!
install-recovery.sh
Code:
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-install-recovery.log
echo "$(date) mounting..." > $LOG
mount -t vfat -o rw /dev/block/vold/179:2 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw /dev/block/mmcblk0p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
debuggerd
Code:
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-debuggerd.log
echo "$(date) mounting..." > $LOG
mount -t vfat -o rw /dev/block/vold/179:2 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw /dev/block/mmcblk0p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
If I want to build a ROM with both scripts pre-installed, I'm lost of ideas how I can achieve it.
- Does Link2SD needs all files (debuggerd, install-recovery.sh and init.d-script?) to work? How can I prevent the files from being overwritten?
- Why does Doomlords method doesn't work if I add this to install-recovery.sh?
Code:
# DooMLoRD: enabling init.d support
/system/bin/sysinit
- Did I forget something?

[DEV] SCRIPT MOD inte2ext swap

I am a fresh owner Tf300.
It annoyed me that he sees Tf300 internal memory as sdcard
and as an external Micro SD card.
I searched and znalałem Script of SG3.
Modified it - it works.
But there is a problem.
Micro SD card is mounted as sdcard
but the internal (the old SDcard) will not mount)
Maybe someone can help
Because he wants to improve both were mounted partitions correctly
script base from galaxys3 http://forum.xda-developers.com/showthread.php?t=1772234
KOD:
#!/system/bin/sh
# Wait for the system to mount the internal media and remout it as r/o
# this should prevent the system from writing to it until we make the
# switch, yet keeps the /data/media r/w, so at the end it won't be r/o
for i in $(seq 1 1 3000)
do
if ( grep -c "/storage/sdcard0" /proc/mounts ); then
mount -o remount,ro /storage/sdcard0
break;
fi
usleep 100000
done
# now wait for the external media and remount
for i in $(seq 1 1 3000)
do
if ( grep -c "/Removable/MicroSD" /proc/mounts ); then
# create new temporary mount point
mount -o remount,rw /
mkdir /storage/tmpmnt
mount -o remount,ro /
# do the rebinding using the temporary mount point
mount -o bind /data/media /storage/tmpmnt
mount -o bind /Removable/MicroSD /storage/sdcard0
mount -o bind /Removable/MicroSD /data/media
umount /Removable/MicroSD
mount -o bind /storage/tmpmnt /storage/MicroSD
umount /storage/tmpmnt
# make bind for ums mode
mkdir -p /storage/MicroSD/sdcard1
touch /storage/MicroSD/.nomedia
mount -o bind /storage/sdcard0 /storage/extSdCard/external_sd/sdcard1
# done
break;
fi
usleep 100000
done
exit
I´m no developer but that´s a start. Hope someone helps.
arcance said:
I am a fresh owner Tf300.
It annoyed me that he sees Tf300 internal memory as sdcard
and as an external Micro SD card.
I searched and znalałem Script of SG3.
Modified it - it works.
Click to expand...
Click to collapse
Trochę Polskiego się tu wkradło
Please change word "znalazłem" to "found"
It works for me after I modified it and install the latest busybox v1.21.0. ( I'm using Energy ROM 4.1.1 btw). Let me know if this works for you.
Here's the script ( I also attach the flashable zip) :
#!/system/bin/sh
# Wait for the system to mount the internal media and remout it as r/o
# this should prevent the system from writing to it until we make the
# switch, yet keeps the /data/media r/w, so at the end it won't be r/o
for i in $(seq 1 1 3000)
do
if ( grep -c "/storage/sdcard0" /proc/mounts ); then
mount -o remount,ro /storage/sdcard0
break;
fi
usleep 100000
done
# now wait for the external media and remount
for i in $(seq 1 1 3000)
do
if ( grep -c "/Removable/MicroSD" /proc/mounts ); then
# create new temporary mount point
mount -o remount,rw /
mkdir /storage/tmpmnt
mount -o remount,ro /
# do the rebinding using the temporary mount point
mount -o bind /data/media /storage/tmpmnt
mount -o bind /Removable/MicroSD /storage/sdcard0
mount -o bind /Removable/MicroSD /data/media
umount /Removable/MicroSD
mount -o bind /storage/tmpmnt /Removable/MicroSD
umount /storage/tmpmnt
# make bind for ums mode
mkdir -p /Removable/MicroSD/EXTERNAL_SD
touch /Removable/MicroSD/ EXTERNAL_SD/.nomedia
mount -o bind /storage/sdcard0 /Removable/MicroSD/EXTERNAL_SD
# done
break;
fi
usleep 100000
done
exit
Odp: [DEV] SCRIPT MOD inte2ext swap
Ok trying thanx for help
Sent from my HTC Desire Z using xda app-developers app
One question. Will this script solve the I/O problem, as now the tablet will use my class10 sdcard as internal, or didn't I understand it well?
why not just edit the vold file
Sent From My Unlocked & Rooted 4.2.2 Android Powered []D [] []V[] []D TF300T
Works
I think good solution for people ho heve only 16gb internal and sdmicro 64gb or biger
Edit vold ithink no god solution and not be save
Regards
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
arcance said:
Works
I think good solution for people ho heve only 16gb internal and sdmicro 64gb or biger
Edit vold ithink no god solution and not be save
Regards
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
Click to expand...
Click to collapse
you can edit the vold file and accomplish the same results. you need to use a root explorer.I have done it on every device I own at one point.yes it saves.
Hi
Trying use modification
When try flesh i see error can't find tmpmnt
I don't have idea
Use 4.2 xcromi 4.7.0
And need more space for instal soft my tf300 have 16gb only.
Or sugestion how modyfication vold.
Reagarts
Sent from my ASUS Transformer Pad TF300T using xda app-developers app

Experiences with disabled journalism on EXT4

To optimise and speed up my OP3T I have done several optimisations in build.prop and userinit.sh, using LOS 16.
One of the things I had not tried was disabling journalism, but on the internet everyone who did it is speaking about huge speed improvements.
On my OP3T I did from twrp recovery terminal:
Code:
mount -o remount,ro /cache
mount -o remount,ro /data
mount -o remount,ro /system
# Disable journalism on drives
# /system
tune2fs -o journal_data_writeback /dev/block/sde20 &>/dev/null
tune2fs -O ^has_journal /dev/block/sde20 &>/dev/null
# /cache
tune2fs -o journal_data_writeback /dev/block/sda3 &>/dev/null
tune2fs -O ^has_journal /dev/block/sda3 &>/dev/null
# /data
tune2fs -o journal_data_writeback /dev/block/sda15 &>/dev/null
tune2fs -O ^has_journal /dev/block/sda15 &>/dev/null
mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /system
Ofcourse it is important not to format drives on cleanup, but to use rm -rf, so I also changed default behavior in settings in twrp for cleaning before update.
Tune2fs commands without errors or issues, device booting fine afterwards so seems to be implemented.
And I am mounting my drives in userinit.sh as following:
Code:
mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,commit=60,nobh /system
mount -o remount,noatime,noauto_da_alloc,rw,nosuid,nodev,nodiratime,barrier=0,commit=60,nobh /data
mount -o remount,noatime,noauto_da_alloc,rw,nosuid,nodev,nodiratime,barrier=0,commit=60,nobh /cache
Now my question;
I do not see any difference in bootup speed, starting apps or other stuff after changing the journalism settings with tune2fs.
Did someone try this, or is someone using this and what are YOUR experiences?
At this moment I am thinking of switching back to default because disabling journalism ofcourse also means more risque for loosing data on crash or else...
It seems of no interest to people here?
No one ever tried ext4 without journalism?
Never mind, I went back to default settings.
My experience; no difference for normal usage with or without.
Not enough benefits to take the risk, so my recommendations is to let it default and not change settings as mentioned above.

Invalid argument error when mounting /dev/block/sda1

I'm trying to follow this post: https://forum.xda-developers.com/showpost.php?p=59166089&postcount=124 to try to get link2sd up and running, I've followed the instructions until I encountered an issue:
mount -t ext4 /dev/block/sda1 /storage/usb
mount: '/dev/block/sda1'->'/storage/usb': Invalid argument
Click to expand...
Click to collapse
The device's name is valid, I've even tried umounting the usb drive in /storage, but it still gives me that error. Have I missed something? The post is quite old and some things might have changed since then.
/system/bin/mount -t ext4 /dev/block/sda1 /storage/usb
Child's Play said:
/system/bin/mount -t ext4 /dev/block/sda1 /storage/usb
Click to expand...
Click to collapse
same thing. I've run fsck on the usb drive, just to be sure, but it seems to work perfectly well.
dictorclef said:
same thing. I've run fsck on the usb drive, just to be sure, but it seems to work perfectly well.
Click to expand...
Click to collapse
Do
ls -l /dev/block/sda1
ls -l /storage/usb
to make sure both exist.
dcarvil said:
Do
ls -l /dev/block/sda1
ls -l /storage/usb
to make sure both exist.
Click to expand...
Click to collapse
they do
ls -l /dev/block/sda1
brw------- 1 root root 8, 1 1969-12-31 19:00 /dev/block/sda1
ls -l /storage/usb
total 0
Click to expand...
Click to collapse
Should have tried this already:
/system/bin/mount -vt ext4 /dev/block/sda1 /storage/usb
mount: '/dev/block/sda1'->'/storage/usb': Invalid argument
try '/dev/block/sda1' type 'ext4' on '/storage/usb'
Click to expand...
Click to collapse
It's as if it doesn't see ext4 in the command. I wonder if it could be a bug with this magisk module? https://forum.xda-developers.com/fire-tv/development/magisk-amazon-firetv4k-ntfs-f2fs-ext4-t3991981
dictorclef said:
Should have tried this already:
It's as if it doesn't see ext4 in the command. I wonder if it could be a bug with this magisk module? https://forum.xda-developers.com/fire-tv/development/magisk-amazon-firetv4k-ntfs-f2fs-ext4-t3991981
Click to expand...
Click to collapse
Did you read note 3 at that link?
"Note 3: Some EXT4 drives may fail to mount,most likely this is because e2fsck it's failing to check for errors. In the next version i will try to add a newer version of e2fsck.However, formatting to EXT4 directly on the device will fix the issue."
You can do "cat /proc/filesystems" to make sure you have ext4 support (should NOT have "nodev" before ext4), but you still may need to format the USB drive on your firestick.
dcarvil said:
Did you read note 3 at that link?
"Note 3: Some EXT4 drives may fail to mount,most likely this is because e2fsck it's failing to check for errors. In the next version i will try to add a newer version of e2fsck.However, formatting to EXT4 directly on the device will fix the issue."
You can do "cat /proc/filesystems" to make sure you have ext4 support (should NOT have "nodev" before ext4), but you still may need to format the USB drive on your firestick.
Click to expand...
Click to collapse
Device does have ext4 support:
cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev configfs
nodev debugfs
nodev tracefs
nodev sockfs
nodev pipefs
nodev devpts
ext3
ext2
ext4
vfat
msdos
iso9660
fuseblk
nodev fuse
nodev fusectl
nodev selinuxfs
nodev functionfs
Click to expand...
Click to collapse
And I did try to format the drive using aparted on my firestick, still no luck.
I think I might actually be an idiot, /dev/block/sda1 was already mounted to /mnt/media_rw/[a bunch of numbers and letters]. Unmounted it and it will now mount where I want. Link2sd detects the partition just fine.

Categories

Resources