Partitioning internal flash - Android Software/Hacking General [Developers Only]

I have an Archos 7 Home Tablet running Android 1.5 Cupcake
Thanks to the one click root development happening for the N1 right now, it is possible to root stock roms. i.e. Without flashing a custom rom etc (though these are also available).
Due to the fact that /system is on a cramfs filesystem, it isn't possible to root permanently, but only for a session.
In any case, the thing I need most is increased app storage.
Here is some info on the current config:
Code:
# mount
rootfs / rootfs rw 0 0
/dev/root / cramfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock4 /system cramfs ro 0 0
/dev/block/mtdblock7 /data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock6 /cache ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock9 /data/data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock4 /sqlite_stmt_journals/sys_bin_orig cramfs ro 0 0
tmpfs /system/bin tmpfs rw,size=4096k 0 0
/dev/block//vold/31:8 /flash vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0111,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
The default roms also seem to have busybox (v 1.11) builtin.
What I want to do is either increase /data and /data/data (to approx 256 mb each) or implement some form of apps2sd which puts apps on the internal flash memory.
Can anyone point me in the right direction? Or give me some advice?
I run linux on my PC.

Related

[Q] POV Mobii tablet: apps to /system/app not possible

Hi,
I am trying to copy an apk to /system/app on this tablet, but it does not work as expected.
I do the following, but /system/app remains read-only.
=====================
=============================
c:\Users\gerrit\android-sdk-windows\tools>adb shell
#
# id
id
uid=0(root) gid=0(root)
#
# mount
mount
rootfs / rootfs rw 0 0
/dev/root / cramfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /proc/bus/usb usbfs rw 0 0
/dev/block/mtdblock4 /system cramfs ro 0 0
/dev/block/mtdblock7 /data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock6 /cache ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock9 /data/data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
#
#
# mount -o rw,remount -t cramfs /dev/block/mtdblock4 /system
mount -o rw,remount -t cramfs /dev/block/mtdblock4 /system
#
#
# mount
mount
rootfs / rootfs rw 0 0
/dev/root / cramfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /proc/bus/usb usbfs rw 0 0
/dev/block/mtdblock4 /system cramfs ro 0 0
/dev/block/mtdblock7 /data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock6 /cache ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
/dev/block/mtdblock9 /data/data ext3 rw,nosuid,nodev,errors=continue,data=ordered 0 0
# exit
exit
c:\Users\gerrit\android-sdk-windows\tools>adb push vending.apk /system/app
failed to copy 'vending.apk' to '/system/app/vending.apk': Read-only file system

symlinks and /mnt/sdcard

What filesystem format is the internal memory that's presented as /mnt/sdcard? If it's EXT4 can you link from it to /mnt/external1 that's formatted FAT32?
The reason I ask is I have an RSS client that will only save its cache to /sdcard but I have more saved content from my old phone than will fit in the internal memory (by about 2x) and I was thinking of rooting to be able to do a symlink between the directory on /sdcard and the external card.
afidel said:
What filesystem format is the internal memory that's presented as /mnt/sdcard? If it's EXT4 can you link from it to /mnt/external1 that's formatted FAT32?
The reason I ask is I have an RSS client that will only save its cache to /sdcard but I have more saved content from my old phone than will fit in the internal memory (by about 2x) and I was thinking of rooting to be able to do a symlink between the directory on /sdcard and the external card.
Click to expand...
Click to collapse
This sounds interesting, I've got an app or two that default to sdcard even when I change their preferences to external1, would be a good way to make them use the right location without having to navigate to it each time.
Code:
rootfs / rootfs ro,relatime 0 0tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=0,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/carriercust /carrier ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/tombstones /tombstones ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/pds /pds ext3 rw,nosuid,noexec,relatime,barrier=0,data=writeback 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:97 /mnt/external1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=
cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepag
e=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/external1/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Here's what it says on mine from the output of 'mount'
Well, it turns out symlinks don't work on the locally hosted /sdcard due to Fuse. However there IS a solution. I ended up using this tool to do a directory to directory mount. It's quite a hack, and when combined with the chroot Debian install I did on my phone makes my mount table a million lines long, but it does work =)

[MOD]Boot mod by RickWyatt swap internal for external and init.d

Boot Mod Made By Me
REMEMBER TO BACK UP YOUR ROM FIRST
information
as you all no data/media is linked to /sdcard so with my mod you can swap sdcard for external sdcard so downloads camera pictures and game data all go to extrnal sdcard the phone still shows internal as 10gb and as I use a 16gb card it shows 16gb
as you can see the phone still this storage/sdcard0 is still linked to /sdcard
Code:
[email protected]:/ $ su
/system/bin/sh: su: not found
127|[email protected]:/ $ mu
/system/bin/sh: mu: not found
127|[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p12 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p13 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p10 /firmware vfat ro,relatime,fmask=0133,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/mmcblk0p11 /tombstones ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.rockstar.gta3-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/dm-1 /mnt/asec/com.speedsoftware.rootexplorer-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/vold/179:17 /storage/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
[email protected]:/ #
with my mod you get
extSdCard linked to /sdcard and mnt/sdcard
your intrnal sdcard is still linked to storage/sdcard0
init.d is enabled
this is for stock 4.1.2
downloads
uploading now
rickwyatt said:
Boot Mod Made By Me
information
as you all no data/media is linked to /sdcard so with my mod you can swap sdcard for external sdcard so downloads camera pictures and game data all go to extrnal sdcard the phone still shows internal as 10gb and as I use a 16gb card it shows 16gb
as you can see the phone still this storage/sdcard0 is still linked to /sdcard
Code:
[email protected]:/ $ su
/system/bin/sh: su: not found
127|[email protected]:/ $ mu
/system/bin/sh: mu: not found
127|[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p12 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p13 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p10 /firmware vfat ro,relatime,fmask=0133,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/mmcblk0p11 /tombstones ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.rockstar.gta3-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/dm-1 /mnt/asec/com.speedsoftware.rootexplorer-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/vold/179:17 /storage/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
[email protected]:/ #
with my mod you get
extSdCard linked to /sdcard and mnt/sdcard
your intrnal sdcard is still linked to storage/sdcard0
init.d is enabled
this is for stock 4.1.2
downloads
uploading now
Click to expand...
Click to collapse
Great! I need extSdCard, go outside 32GB SDCard as internal SDCard
This mod is slightly different top the earlier one I used as the earlier swapped internal for external.
This one is better for my needs. Thanks a lot
swap internal for external and init.d
We flash through CWM ? Am i correct ?
I have problem with photo gallery, after installation, I can not watch pictures. And without SD card I can not use camera.
How to uninstall your mod?
HOW TO INSTALL ??? [MOD]Boot mod by RickWyatt swap internal for external and init.d
rickwyatt said:
boot mod made by me
remember to back up your rom first
information
as you all no data/media is linked to /sdcard so with my mod you can swap sdcard for external sdcard so downloads camera pictures and game data all go to extrnal sdcard the phone still shows internal as 10gb and as i use a 16gb card it shows 16gb
as you can see the phone still this storage/sdcard0 is still linked to /sdcard
Code:
[email protected]:/ $ su
/system/bin/sh: Su: Not found
127|[email protected]:/ $ mu
/system/bin/sh: Mu: Not found
127|[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p12 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p13 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p10 /firmware vfat ro,relatime,fmask=0133,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/mmcblk0p11 /tombstones ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.rockstar.gta3-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/dm-1 /mnt/asec/com.speedsoftware.rootexplorer-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/vold/179:17 /storage/extsdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
[email protected]:/ #
with my mod you get
extsdcard linked to /sdcard and mnt/sdcard
your intrnal sdcard is still linked to storage/sdcard0
init.d is enabled
this is for stock 4.1.2
downloads
uploading now
Click to expand...
Click to collapse
how do i install please ???
smaberg said:
This mod is slightly different top the earlier one I used as the earlier swapped internal for external.
This one is better for my needs. Thanks a lot
Click to expand...
Click to collapse
Can this be incorporated into your rom Smaberg? Would be great if it could (assuming the original dev was ok with that)
hi sir!
i like this mod! can you please show to us how did you do this? do we have to modify the kernel or just make an init.d script?
thanks a lost sir!

How to verify 'discard' flag working in fstab.cardhu?

I have TF700 running Crombi-KK F2FS on data, and added the 'discard' flag to fstab.cardhu to (hopefully) ensure trim of flash memory. Is there some way to verify that the discard function is working?
gc2712 said:
I have TF700 running Crombi-KK F2FS on data, and added the 'discard' flag to fstab.cardhu to (hopefully) ensure trim of flash memory. Is there some way to verify that the discard function is working?
Click to expand...
Click to collapse
The fstab,cardhu gets modified by my boot process depending upon what you chose. I intentionally remove the discard option as it cause me bootloops.
However to check if yours has persistd ( and it may have if you haven't been anywhere near data2sd or rom2sd) is run the following in a terminal
mount | grep /dev/block/*
look for the /data and you will see what options it has been mounted with, interested to see if discard has persisted and why it won't work on my device
sbdags said:
The fstab,cardhu gets modified by my boot process depending upon what you chose. I intentionally remove the discard option as it cause me bootloops.
However to check if yours has persistd ( and it may have if you haven't been anywhere near data2sd or rom2sd) is run the following in a terminal
mount | grep /dev/block/*
look for the /data and you will see what options it has been mounted with, interested to see if discard has persisted and why it won't work on my device
Click to expand...
Click to collapse
I tried running the above command in terminal. Without su just got 'permssion denied' on all. With su there was no response in terminal at all So just tried:
[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc 0 0
/dev/block/mmcblk0p8 /data f2fs rw,nosuid,nodev,noatime,background_gc=on,user_xattr,acl,errors=panic,active_logs=6 0 0
com.android.chrome_cache /data/data/com.android.chrome/cache tmpfs rw,relatime,size=102400k 0 0
mobi.mgeek.TunnyBrowser_cache /data/data/mobi.mgeek.TunnyBrowser/cache tmpfs rw,relatime,size=102400k 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ #
Looks like the discard flag was just ignored? Any way to make it persist?
gc2712 said:
I tried running the above command in terminal. Without su just got 'permssion denied' on all. With su there was no response in terminal at all So just tried:
[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc 0 0
/dev/block/mmcblk0p8 /data f2fs rw,nosuid,nodev,noatime,background_gc=on,user_xattr,acl,errors=panic,active_logs=6 0 0
com.android.chrome_cache /data/data/com.android.chrome/cache tmpfs rw,relatime,size=102400k 0 0
mobi.mgeek.TunnyBrowser_cache /data/data/mobi.mgeek.TunnyBrowser/cache tmpfs rw,relatime,size=102400k 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ #
Looks like the discard flag was just ignored? Any way to make it persist?
Click to expand...
Click to collapse
You can't edit the fstab directly as it gets replaced by the kernel on every boot.
so go to /system/boot/print.d
Open 30fstab-f2fs in a text editor
On this line change it from
$BB sed -i '/mmcblk0p8/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime,//;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' /fstab.cardhu
to
$BB sed -i '/mmcblk0p8/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime/discard/;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' /fstab.cardhu
Reboot but be prepared for a bootloop that you can only fix by undoing what you just did.... Have a nandroid ready to go
sbdags said:
You can't edit the fstab directly as it gets replaced by the kernel on every boot.
so go to /system/boot/print.d
Open 30fstab-f2fs in a text editor
On this line change it from
$BB sed -i '/mmcblk0p8/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime,//;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' /fstab.cardhu
to
$BB sed -i '/mmcblk0p8/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime/discard/;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' /fstab.cardhu
Reboot but be prepared for a bootloop that you can only fix by undoing what you just did.... Have a nandroid ready to go
Click to expand...
Click to collapse
Just a cautious check on syntax before I do this. Every other flag on that line is of the form: ;s/flagx,// , yet in this instance you suggest just forward slash after 'nodiratime', ending with just a forward slash instead of two forward slashes. Is this intentional or should the syntax be: //;s/nodiratime,//;s/discard,//;s/noauto_da_alloc, etc.
Although I've used linux for years (Since Red Hat 7!) and have just enough knowledge to follow instructions to edit scripts, I still don't grasp syntax very well. (Just enough to know if I get it wrong things screw up
Also, if I save a copy of the 30fstab-f2fs file to sdcard can I simply copy it back using TWRP (latest) instead of a full nandroid restore?
Sorry if these are dumb questions. Your help is greatly appreciated.
gc2712 said:
Just a cautious check on syntax before I do this. Every other flag on that line is of the form: ;s/flagx,// , yet in this instance you suggest just forward slash after 'nodiratime', ending with just a forward slash instead of two forward slashes. Is this intentional or should the syntax be: //;s/nodiratime,//;s/discard,//;s/noauto_da_alloc, etc.
Although I've used linux for years (Since Red Hat 7!) and have just enough knowledge to follow instructions to edit scripts, I still don't grasp syntax very well. (Just enough to know if I get it wrong things screw up
Also, if I save a copy of the 30fstab-f2fs file to sdcard can I simply copy it back using TWRP (latest) instead of a full nandroid restore?
Sorry if these are dumb questions. Your help is greatly appreciated.
Click to expand...
Click to collapse
Yes it is my correct - my edit will replace nodiratime with discard Your edit will look for discard (which isn't there) and replace it with nothing
Personally I'd do a full nandroid but yes as long as you can partially recover then that single file should be ok.
sbdags said:
Yes it is my correct - my edit will replace nodiratime with discard Your edit will look for discard (which isn't there) and replace it with nothing
Personally I'd do a full nandroid but yes as long as you can partially recover then that single file should be ok.
Click to expand...
Click to collapse
Many thanks (red face here). I'll give it a try today and do the full nandroid backup just in case. Will report back the result.
Well! That was a debacle.:crying:
Changed to:
"$BB sed -i '/mmcblk0p8/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime/discard/;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' /fstab.cardhu "
It didn't boot loop, but eventually booted into a screen which said, "Encryption Unsuccesful. Encryption was interrupted and can't complete. As a result your tablet is no longer accessible" etc....
Thank god for the nandroid! When I reflashed the nandroid, TWRP reported that it was formatting system to ext4 even though it was originally F2FS. However when I rebooted and checked in terminal it indicated that the FS on system was in fact F2FS.
# mount |grep /dev/block/mmcblk0p8
/dev/block/mmcblk0p8 /data f2fs rw,nosuid,nodev,noatime,background_gc=on,user_xattr,acl,errors=panic,active_logs=6 0 0
No idea why, but its all working again, but alas, no 'discard' option. Could this be the reason?
[email protected]:/ # fstrim -v /data
fstrim: FITRIM: Inappropriate ioctl for device
Don't know what that error means and google wasn't my friend this time.
gc2712 said:
I tried running the above command in terminal. Without su just got 'permssion denied' on all. With su there was no response in terminal at all So just tried:
[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc 0 0
/dev/block/mmcblk0p8 /data f2fs rw,nosuid,nodev,noatime,background_gc=on,user_xattr,acl,errors=panic,active_logs=6 0 0
com.android.chrome_cache /data/data/com.android.chrome/cache tmpfs rw,relatime,size=102400k 0 0
mobi.mgeek.TunnyBrowser_cache /data/data/mobi.mgeek.TunnyBrowser/cache tmpfs rw,relatime,size=102400k 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ #
Looks like the discard flag was just ignored? Any way to make it persist?
Click to expand...
Click to collapse
Here is my /dev/block* information:
Code:
[email protected]:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc,discard 0 0
[COLOR="RoyalBlue"]/dev/block/mmcblk0p8 /datai ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc,discard 0 0[/COLOR]
[COLOR="RoyalBlue"]/dev/block/mmcblk1p2 /data f2fs rw,noatime,background_gc=on,discard,user_xattr,acl,errors=panic,active_logs=6 0 0[/COLOR]
tmpfs /Removable tmpfs rw,relatime,mode=755,gid=1000 0 0
browser_cache /data/data/com.android.browser/cache tmpfs rw,relatime,size=102400k 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:49 /Removable/MicroSD texfat rw,relatime,uid=1000,gid=1015,umask=0000,
allow_utime=0022,nls=utf8,min_prealloc_size=64k,readahead=4M,discard,errors=continue 0 0
[email protected]:/ #
It seems to stick with the "discard" mounting flag...
LetMeKnow said:
Here is my /dev/block* information:
Code:
[email protected]:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /system ext4 ro,noatime,nodiratime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc,discard 0 0
[COLOR="RoyalBlue"]/dev/block/mmcblk0p8 /datai ext4 rw,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,acl,barrier=0,noauto_da_alloc,discard 0 0[/COLOR]
[COLOR="RoyalBlue"]/dev/block/mmcblk1p2 /data f2fs rw,noatime,background_gc=on,discard,user_xattr,acl,errors=panic,active_logs=6 0 0[/COLOR]
tmpfs /Removable tmpfs rw,relatime,mode=755,gid=1000 0 0
browser_cache /data/data/com.android.browser/cache tmpfs rw,relatime,size=102400k 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:49 /Removable/MicroSD texfat rw,relatime,uid=1000,gid=1015,umask=0000,
allow_utime=0022,nls=utf8,min_prealloc_size=64k,readahead=4M,discard,errors=continue 0 0
[email protected]:/ #
It seems to stick with the "discard" mounting flag...
Click to expand...
Click to collapse
What is the additional partition mmcblk1p2 for data? The partition mmcblk0p8 which on my system is my data partition has been located on /datai and is ext4 on yours. How does that happen? Are you using data2sd or something?
gc2712 said:
What is the additional partition mmcblk1p2 for data? The partition mmcblk0p8 which on my system is my data partition has been located on /datai and is ext4 on yours. How does that happen? Are you using data2sd or something?
Click to expand...
Click to collapse
Yes, you are correct. I am using Data2sd. I am running f2fs on my external data partition (/dev/block/mmcblk1p2) and leave my internal data partition as ext4 because it is just a backup data partition that I actually never use it.
LetMeKnow said:
Yes, you are correct. I am using Data2sd. I am running f2fs on my external data partition (/dev/block/mmcblk1p2) and leave my internal data partition as ext4 because it is just a backup data partition that I actually never use it.
Click to expand...
Click to collapse
Ah! Mystery solved then. sbdags was right then that with internal F2FS /data the discard option will bootloop, or, as in my case boot and trash the data partition requiring factory reset. Hopefully, the F2FS file system and KitKat manage garbage collection well enough without fstrim/discard as I don't want to reinstall again as ext4 at this point. Perhaps someone will make it work in the future.
gc2712 said:
Ah! Mystery solved then. sbdags was right then that with internal F2FS /data the discard option will bootloop, or, as in my case boot and trash the data partition requiring factory reset. Hopefully, the F2FS file system and KitKat manage garbage collection well enough without fstrim/discard as I don't want to reinstall again as ext4 at this point. Perhaps someone will make it work in the future.
Click to expand...
Click to collapse
Hmm, I did help one user using f2fs on internal data partition with discard flag on JB Rom. He had no issue until moving on with KK Rom. If I can have the tf700 long enough, I will test it out on the internal data so we can rule it out...
Garbage collection is to reclaim your locked up or old memory that old apps keeps holding on without using them. I believe that is what it is for but I may be wrong...

Substratum not applying themes

Has anyone had any luck applying Substratum themes? I read a post 2 months ago from a user that said he was succesful but that's about it. I've tried various themes and none of them have worked. Do I have to delete Theme Editor, go back to the stock theme of EMIUI and then try substratum? I'm confused. I'm rooted, obviously.
I would think you need the substratum framework in place for it to work. In aosp roms they usually bake the framework in for it to work.
sent from my rotary phone
jr313 said:
I would think you need the substratum framework in place for it to work. In aosp roms they usually bake the framework in for it to work.
sent from my rotary phone
Click to expand...
Click to collapse
nope. it's running compatible to hwdesigns. I applied a sub theme ( see pictures attached )
on some FW it's quite tricky to mount the vendor partition rw. I mounted it manually via es file explorer, installed substratum, installed the theme and applied it. everything needs root of course
WieserZ1C said:
nope. it's running compatible to hwdesigns. I applied a sub theme ( see pictures attached )
on some FW it's quite tricky to mount the vendor partition rw. I mounted it manually via es file explorer, installed substratum, installed the theme and applied it. everything needs root of course
Click to expand...
Click to collapse
Hmmm. That didn't work for me. Looking inside SuperSU, it seems that substratum doesn't even ask for root permissions. All I have inside SuperSU is Rom Control and Viper. When I go into setting inside substratum, it says "rooted mode (certified)" but I can't apply any themes. I checked and everything in my root folder has drw permissions, including vendor. Any tips?
try delete App data, then uninstall, flash your choice of root ( as I guess SuperSU ) again, reboot, then reinstall ... it has to ask for root privilege, otherwise it won't perform. The last chance I could advise if it doesn't work after previous steps is to delete SuperSU app data too.
WieserZ1C said:
nope. it's running compatible to hwdesigns. I applied a sub theme ( see pictures attached )
on some FW it's quite tricky to mount the vendor partition rw. I mounted it manually via es file explorer, installed substratum, installed the theme and applied it. everything needs root of course
Click to expand...
Click to collapse
Please help me too. my overlay folder is also read only and I don't have es file explorer option because it doesn't work (with root) on my device after marshmallow update.
CheifX said:
Please help me too. my overlay folder is also read only and I don't have es file explorer option because it doesn't work (with root) on my device after marshmallow update.
Click to expand...
Click to collapse
Couldn't you just mount it from a terminal?
Code:
su
mount -o rw,remount /vendor
I am super noob
ante0 said:
Couldn't you just mount it from a terminal?
Code:
su
mount -o rw,remount /vendor
Click to expand...
Click to collapse
Please click on image
CheifX said:
Please click on image
Click to expand...
Click to collapse
What happens if you type
mount -o remount,rw /vendor
?
You might have have to type just "mount" to check which device /vendor is at and what fs it uses
Example: mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /vendor
Yaffs2=fs, /dev/block/mtdblock3=device in this example. Type mount to find out where vendor is located and replace device and fs with the ones you find. I take it you're not using a Mate 9?
I also want to apply this
ante0 said:
What happens if you type
mount -o remount,rw /vendor
?
You might have have to type just "mount" to check which device /vendor is at and what fs it uses
Example: mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /vendor
Yaffs2=fs, /dev/block/mtdblock3=device in this example. Type mount to find out where vendor is located and replace device and fs with the ones you find. I take it you're not using a Mate 9?
Click to expand...
Click to collapse
unfortunately, I can't found vendor in these commands.
[email protected]_4G:/ # mount
mount
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/memcg cgroup rw,relatime,memory 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/dm-0 /mnt/expand/760fbce2-4992-4d33-879e-8458ca5696c1 ext4 rw,dirsync
,seclabel,nosuid,nodev,noatime 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user
_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id
=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_i
d=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/default/self/primary fuse rw,nosuid,nodev,noexec,noatime,
user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/platform/sdio_emmc/by-name/system /system ext4 ro,seclabel,noatime,da
ta=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/userdata /data ext4 rw,seclabel,nosuid,nod
ev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev
,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/prodnv /productinfo ext4 rw,seclabel,nosui
d,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,gro
up_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/self/primary fuse rw,nosuid,nodev,noexec,noatime,user_id=1023
,group_id=1023,default_permissions,allow_other 0 0
/dev/block/loop0 /su ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
[email protected]_4G:/ #
CheifX said:
unfortunately, I can't found vendor in these commands.
[email protected]_4G:/ # mount
mount
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/memcg cgroup rw,relatime,memory 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/dm-0 /mnt/expand/760fbce2-4992-4d33-879e-8458ca5696c1 ext4 rw,dirsync
,seclabel,nosuid,nodev,noatime 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user
_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id
=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_i
d=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/default/self/primary fuse rw,nosuid,nodev,noexec,noatime,
user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/platform/sdio_emmc/by-name/system /system ext4 ro,seclabel,noatime,da
ta=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/userdata /data ext4 rw,seclabel,nosuid,nod
ev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev
,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/sdio_emmc/by-name/prodnv /productinfo ext4 rw,seclabel,nosui
d,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,gro
up_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/self/primary fuse rw,nosuid,nodev,noexec,noatime,user_id=1023
,group_id=1023,default_permissions,allow_other 0 0
/dev/block/loop0 /su ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
[email protected]_4G:/ #
Click to expand...
Click to collapse
Ah. Try mounting /system as rw.
'mount -o rw,remount /system' or remount,rw, whichever works. I thought /vendor was the problem, but it's probably /system/vendor/overlay.
All Black
ante0 said:
Ah. Try mounting /system as rw.
'mount -o rw,remount /system' or remount,rw, whichever works. I thought /vendor was the problem, but it's probably /system/vendor/overlay.
Click to expand...
Click to collapse
Hahaha changed theme prity easily by changing vendor,overlay to RW with X-Plore (a file manager). Anyway thanks to everyone for replying

Categories

Resources