[Q] init.rc mount-points - General Questions and Answers

Hello
I will try to be brief. I am trying to modify stock init.rc (ofc inside boot.img). I want to mount second partition(ext2) of my SD to root as /data. Also for performence I would like to leave /data/dalvik-cache on NAND yaffs2 partition. Issue is I dont know what options of mount I have to use.
Code:
93. on fs
94. # mount mtd partitions
95. # Mount /system rw first to give the filesystem a chance to save a checkpoint
96. mount yaffs2 [email protected] /system
97. mkdir /system/flex
98. mount yaffs2 [email protected] /system ro remount
99. [COLOR="Red"] mount ext2 [email protected] /data[/COLOR] [COLOR="SeaGreen"][B][U]wait[/U] nosuid dev errors=continue[/B][/COLOR]
or [COLOR="Red"]/dev/block/mmcblk0p2[/COLOR]
# mount yaffs2 [email protected] /data nosuid nodev
100. mount yaffs2 [email protected] /cache nosuid nodev
102. on post-fs
168. # create dalvik-cache and double-check the perms
169. mkdir /data/dalvik-cache 0771 system system [COLOR="MediumTurquoise"]# <- Should it be in "on fs" section?[/COLOR]
170. [COLOR="Red"]mount yaffs2 [email protected] /data/dalvik-cache [/COLOR][COLOR="SeaGreen"][B]nosuid nodev[/B][/COLOR]
171. chown system system /data/dalvik-cache
172. chmod 0771 /data/dalvik-cache
If someone have knowledge about that, please devote me a little of your time.

Related

[Q] XT720 NAND writing permissions

I have Motorola XT720. Device is rooted, but I don't have possibility to change any file in system folders. I need it for overclocing/undervolting. Is there any way to change it? I used root explorer and it give me info that system is read only.
In root explorer you must click the r/w mount button on the top of the screen. Why not just get milestone overclock for you over/under clocking needs.
I'm an idiot I simply didn't see that option... Thank you very much. Reason why i do not want use milestone overclocking is, I want to set undervolting for all frequencies and add conservative governor.
Dont feel bad I didn't see it either at first.
in adb shell
$ su
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
$ rm /system/'filename'
$ $ mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
$ sync
$ reboot
teruyume said:
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Click to expand...
Click to collapse
Just be careful that your /system may be mounted off a different partition, depending on your rom. Like mine is /dev/block/mtdblock7.

Uni-Boot (Both OC/Non-OC in a single boot.img)

Within 24 hours, I've seen many requests asking for OC'ed kernels and Non-Oc'ed kernels (i.e. boot.imgs), so thought there could be a solution... :fingers-crossed:
Then, came up with this simple idea, based on my previous project [PROJECT][DIY]Dual Boot ~ the Yin-Yang way!...
During kernel compilation, the "Developer" is asked to enable 3 simple settings:
Code:
CONFIG_MSM_CPU_FREQ_SET_MIN_MAX=y
CONFIG_MSM_CPU_FREQ_MAX=600000
CONFIG_MSM_CPU_FREQ_MIN=122880
AFAIK, these are the configs needed to enable stock frequencies, and, at stock frequencies, there is no nand burn, as of yet!
Then, while packing the boot.img, add these three lines:
Code:
chmod 0777 /sbin/busybox
chmod 0777 /sbin/mount_script.sh
exec /sbin/busybox sh /sbin/bootsdcard.sh
after:
Code:
mount yaffs2 [email protected] /system
mount yaffs2 [email protected] /system ro remount
mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Then, get the busybox executable (get it from this thread, will re-upload later), and create a script named "mount_script.sh". Both should be placed in the ramdisk's sbin folder...
BTW, the "mount_script.sh" script should contain this:
Code:
#!/sbin/busybox sh
#^Gotta find alternative for this, or try with the /system/xbin/busybox :P
MOUNT="/sbin/busybox mount"
UMOUNT="/sbin/busybox umount"
#Continue iff two partitions in SD-Card exist for OC'ing
if [ ! -e /dev/block/mmcblk0p2 ] || [ ! -e /dev/block/mmcblk0p3 ]
then
exit
fi;
#unmount /data and /cache first!
$UMOUNT /data
$UMOUNT /cache
#mount sd-data and sd-cache respectively
$MOUNT -t ext3 -o noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
$MOUNT -t ext3 -o noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p3 /cache;
So, users wouldn't have to be worrying about Oc'ed and Non-Oc'ed kernels anymore... They can just download and flash the kernel updates. if they have two partitions, they will automatically be mounted, and users can OC. if not, no problem, the kernel will bootup at stock frequencies, no problem of burnt nand
XDA:DevDB Information
Uni-Boot (Both OC/Non-OC in a single boot.img), a Tool/Utility for the HTC Pico (Explorer)
Contributors
thewisenerd, http://forum.xda-developers.com/member.php?u=4869275
Version Information
Status: Beta
Current Beta Version: 0.1
Beta Release Date: 2013-10-26
Created 2013-11-16
Last Updated 2013-11-15

Can only see sdcard as root.

I have a HTC One M8. I have a sdcard with 2 partitions. /dev/block/mmcblk1p1 is vfat, /dev/block/mmcblk1p2 is ext4. I've used this to mount the sdcard:
Code:
mount -o remount,rw /
mkdir /storage/sdcard3
mount -o remount,ro /
mount -t ext4 /dev/block/mmcblk1p2 /storage/sdcard3
mkdir /storage/sdcard0/user-data
sdcard /storage/sdcard3 /storage/sdcard0/user-data 1023 1023 &
As root in a terminal, I can read and write to /storage/sdcard0/user-data no problem, however none of the apps can see it, not even file managers with root access. Maybe there is an extra step involved for KitKat? I'm also using the HandleExternalStorage Xposed module, which at least helps with the vfat partition.
Bump.

[Q] Moto G (XT1032) Internal partition formatted problem

My first gen moto g is stuck in a bootloop, everything i have done so far has not worked.I have tried to flash using fastboot and mfastboot with different stock images in all I get failed to erase partition, remote failure.
The internal storage says it has 0 mb of space. I have Twrp installed and using cat /proc/partitions finds no partitions
~ # ←[6ncat /proc/partitions cat /proc/partitions major minor #blocks name
I have managed to push a Stock rom but can´t flash it with mount data error,mount sd card error, mount system error and mount cache error..
I have tried to use Adb remount but it fails
remount failed: Success
I also tried the following commands
adb shell
su
mount -o rw,remount -t yaffs2 /system
mount -o rw,remount -t yaffs2 /data
mount -o rw,remount -t yaffs2 /cache
And they give the following error
adb shell ~ # ←[6nsu su /sbin/sh: su: not found ~ # ←[6nmount -o rw,remount -t yaffs2 /system mount -o rw,remount -t yaffs2 /system mount: can't find /system in /proc/mounts ~ # ←[6nmount -o rw,remount -t yaffs2 /data mount -o rw,remount -t yaffs2 /data mount: can't find /data in /proc/mounts
In recovery mode, i went to advanced, then Terminal Command, then entered the command df and it listed
Filesystem 1K BLocks Used Available %Use
tmpfs/dev 443852 48 443804 0
tmpfs/tmp 443852 24 443828 0
I have also uploaded a recovery.log
Any help would be greatly appreciated
I have found this xda post with the partition table and sizes of the moto g. http://forum.xda-developers.com/showpost.php?p=48855450&postcount=35
I also found this xda post where they partition the emmc http://forum.xda-developers.com/showthread.php?t=2596521 , if someone could help me identify what should I put in adb.
I think the solution is to reformat using adb but i dont know how.
I have the exact same problem and would love to know if you have fixed it please.

usage of preinstall_cleanup.sh

Hi!
I see that all the ROMs has the file /system/preinstall_cleanup.sh
What is the meaning of this file?, it delete a folder that not exist on the ROM
Code:
#!/system/bin/sh
log -t PackageManager "Start to clean up /system/preinstall_del/"
mount -o rw,remount -t ext4 /system
rm system/preinstall_del/*.*
mount -o ro,remount -t ext4 /system
Is some kind of legacy code?

Categories

Resources