Experiences with disabled journalism on EXT4 - OnePlus 3 Questions & Answers

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.

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

[GUIDE] Make Link2SD use a disk image instead of a second ext2 partition

Was using Link2SD to move apps to the second partition of a micro SD card for the usual reasons... Then did -something- that broke the micro SD card slot. Now what to do?
Possible solutions:
Is it possible to repartition the internal NAND? -- Wouldn't that involve unpacking and repacking the kernel image? Better not... Although it was an inexpensive tablet, it would be an expensive brick.
Is it possible to bind-mount a directory on the "internal SD" for use with Link2SD? -- Would that even work with vfat? (Permissions and stuff...)
What about replacing the ext2 SD-card partition with a disk image
Materials:
Android tablet. (Broken SD card slot optional.)
Root with busybox installed.
Link2SD installed and configured -- This has to be done prior to breaking the SD card slot. Link2SD's startup scripts are needed, which it may not create without a "properly" formatted and installed SD card.
Computer with Linux installed OR a Linux Live DVD -- To create the disk image and transfer the contents from the physical SD card to the image file. I used Ubuntu.
USB transfer cable (optional) -- To transfer the disk image from the computer to the tablet. Also to execute terminal commands on the tablet. Possible to do over a network, but the cable can be faster and more convenient.
Do not try this unless you are fully prepared to brick your device.​
Method:
Create the disk image on the computer:
Code:
qemu-img create -f raw link2sd-disk.img 3G
Format the disk image to ext2:
Code:
mkfs.ext2 link2sd-disk.img
Mount the disk image to a newly created directory:
Code:
mkdir /tmp/link2sd-disk
sudo mount -o loop link2sd-disk.img /tmp/link2sd-disk
Mount the original SD card with the second ext2 partition.
Copy the contents of the sd card to the disk image. Use rsync to keep file permissions and other metadata. The trailing "/" on the directory names is important.
Code:
sudo -s
rsync --archive --hard-links /media/path-to-sd-card/ /tmp/link2sd-disk/
Unmount the sd card and disk image.
Code:
sudo umount /tmp/link2sd-disk
Transfer the disk image to your tablet.
Code:
adb push link2sd-disk.img /mnt/sdcard/link2sd-disk.img
Edit /system/bin/debuggerd on the tablet:
Code:
adb pull /system/bin/debuggerd
Edit debuggerd with your favorite text editor. Pay careful attention to the actual identity of the internal sd card as used on your tablet (/dev/block/mtdblock9). Notice that "busybox mount" is used. The normal mount command does not support the necessary options.
Code:
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-debuggerd.log
ls -la /dev/block/ 1>>$LOG 2>>$LOG
echo 1>>$LOG 2>>$LOG
echo "$(date) mounting..." > $LOG
busybox mount -t vfat -o rw,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,shortname=mixed,errors=remount-ro /dev/block/mtdblock9 /mnt/sdcard 1>>$LOG 2>>$LOG
busybox mount -t ext2 -o loop,rw /mnt/sdcard/link2sd.img /data/sdext2 1>>$LOG 2>>$LOG
echo 1>>$LOG 2>>$LOG
mount >> $LOG
echo 1>>$LOG 2>>$LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Backup the original file and transfer the new file and set permissions.
Code:
adb shell mv /system/bin/debuggerd /system/bin/debuggerd.001
adb push debuggerd /system/bin/debuggerd
adb shell chmod 755 /system/bin/debuggerd
All done. Reboot. :fingers-crossed:
Hope the above is useful or enlightening. Let me know if I need to explain anything in greater detail.
I've tested this on HTC One X and it does not work. After mounting sdcard and my image using these commands:
Code:
busybox mount -t vfat -o rw,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,shortname=mixed,errors=remount-ro dev/block/vold/179:14 /mnt/sdcard 1>>$LOG 2>>$LOG
busybox mount -t ext2 -o loop,rw /mnt/sdcard/link2sd.img /data/sdext2 1>>$LOG 2>>$LOG
I have access to the image file from /data/sdext2 but my sdcard is not visible in the system (but it is mounted in the /mnt/sdcard). Does anyone know how to mount .img during boot? Binding to debuggerd seems to be not the best option. :S
EDIT BELOW:
I've found a solution to this issue:
1. create 03mountsd file
2. put it in the /etc/init.d/ directory (for example, using adb)
3. reboot
03mountsd contents:
Code:
#!/system/bin/sh
#added by link2sd
LOG=/data/mountsd.log
COUNTER=60
ls -la /dev/block/ 1>>$LOG 2>>$LOG
echo 1>>$LOG 2>>$LOG
echo "$(date) mounting..." > $LOG
while [[ $COUNTER -gt 0 && ! -f /storage/sdcard0/app.img ]]; do
COUNTER=$(($COUNTER-1))
sleep 1
done
echo "=> COUNTER = $COUNTER" > $LOG
# busybox mount -t vfat -o rw,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,shortname=mixed,errors=remount-ro /dev/block/vold/179:14 /mnt/.sd 1>>$LOG 2>>$LOG
busybox mount -t ext4 -o loop,rw /storage/sdcard0/app.img /data/sdext2 1>>$LOG 2>>$LOG
echo 1>>$LOG 2>>$LOG
mount >> $LOG
echo 1>>$LOG 2>>$LOG
EDIT: still not working: applications moved using link2sd and this method are not visible for android. :/

Help me mount r/o to r/w [fonts]

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]:/ #

Categories

Resources