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.
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.
Bounty: US$200
Running CM12.1 on klte (galaxy S5).
I can run a script in /system/etc/init.d directory, but some parts of it do not work:
E.g.
Code:
mount -o remount,rw -t yaffs2 `grep /system /proc/mounts | cut -d' ' -f1` /system
Code:
mount -o remount,rw rootfs /
do not work when run from the script.
The same script executes perfectly fine when run from the shell.
Any help is highly appreciated.
NEXUS 5X SuperbootWARNING: I am not responsible for anything that happens as a result of flashing these modified boot images.
This kernel is based on MTC20K (Marshmellow) & NBD90W (Nougat) stock builds. It features several mods added by me & continues the work of others. Consider it my lil experiment for now.
Features:
System verification disabled
Force encrypt /data disabled
System mode root on boot
Init.d support
Chainfire modified sepolicy
Insecure ADB Version
Allows su binary update
More to come?
Coming Soon:
LostAndroid
Chainfire Liveboot
Device Admin Restore
One click install
Changes made:
ramdisk/sepolicy: replaced using:
Code:
supolicy --save outfile /sdcard/sepolicy
(outputted from rooted N5X in system mode)
ramdisk/fstab.bullhead: changed "forceencrypt" to "encryptable" and removed verification
Code:
/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,[COLOR="green"]encryptable[/COLOR]=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata
/dev/block/platform/soc.0/f9824900.sdhci/by-name/system /system ext4 ro,barrier=1 wait[COLOR="red"][STRIKE],verify=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata[/STRIKE] [/COLOR]
/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor /vendor ext4 ro,barrier=1 wait[COLOR="red"][STRIKE],verify=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata[/STRIKE][/COLOR]
ramdisk/init.rc: added services daemonsu, superboot, init.d
Code:
##Superboot MOD added by:
##[email protected]
service superboot /system/bin/sh /superboot.sh
class main
user root
group root
oneshot
service daemonsu /sbin/daemonsu --auto-daemon
class late_start
user root
group root
oneshot
on property:ro.daemonsu.persist=1
start daemonsu
on property:ro.supersu.persist=0
stop daemonsu
## Init.d MOD by [email protected]
service userinit /sbin/busybox run-parts /system/etc/init.d
class late_start
user root
group root
oneshot
on property:ro.init.d=1
start userinit
on property:ro.init.d=0
stop userinit
ramdisk/superboot.sh
Code:
#!/sbin/sh
##SUPERBOOT MOD ADDED BY:
##[email protected]
mount /system
mount /data
mount -o rw,remount /system
mount -o rw,remount /system /system
mount -o rw,remount /
mount -o rw,remount / /
if ! -e /system/xbin; then
mkdir /system/xbin
fi
if ! -e /system/daemonsu; then
cat /superboot/su>/system/xbin/daemonsu
cp /superboot/su /system/xbin/daemonsu
fi
if ! -e /system/su; then
cat /superboot/su>/system/xbin/su
cp /superboot/su /system/xbin/su
fi
if ! -e /system/lib64/libsupol.so; then
cat /superboot/libsupol.so /system/lib64/libsupol.so
cp /superboot/libsupol.so /system/lib64/libsupol.so
fi
if ! -e /system/xbin/supolicy; then
cat /superboot/supolicy>/system/xbin/supolicy
cp /superboot/supolicy /sytem/xbin/supolicy
fi
echo 1 > /system/etc/.installed_su_daemon
chmod 6755 /system/xbin/su
chmod 6755 /system/xbin/daemonsu
chmod 644 /system/etc/.installed_su_daemon
chmod 644 /system/lib64/libsupol.so
chmod 755 /system/xbin/supolicy
rm /system/recovery-from-boot.*
sync
mount -o ro,remount /system
mount -o ro,remount /system /system
mount -o ro,remount /
mount -o ro,remount / /
other additions to ramdisk:
Code:
ramdisk/sbin/busybox
ramdisk/sbin/daemonsu
ramdisk/sbin/sh
ramdisk/superboot/libsupol.so
ramdisk/superboot/su
ramdisk/superboot/supolicy
HIGH RISK TESTING
NBD90W
Please participate in poll if using this version to let me and the community know if this works as expected. Does it boot, root, init.d work?
Downloads:
NBD90W
MTC20K
All changes made with the help of Android Image Kitchen by osm0sis
If you like my work and others, show that love with a thumbs up
XDA:DevDB Information
Nexus 5X Superboot Autoroot, Kernel for the LG Nexus 5X
Contributors
Geofferey, c3k, CNBLACK
Kernel Special Features: force encrypt disabled, dm-verity disabled, init.d, superboot
Version Information
Status: Testing
Current Stable Version: MTC20K
Current Beta Version: NBD90W
Created 2016-10-13
Last Updated 2016-10-17
Reserved
Lol is it to early to request nougat xD. Nice build bro.
Haha I will try it tomorrow. I don't know if there is any new security in the boot.img that will affect it. I will make one and upload for you to test, if it works out I will put it up. Might even get it tonight.
edit:
I'm going to upload a Nougat Kernel FOR TESTING, beware!!! Let me know what happens and if it boots or not. I am not on Nougat so I can not test myself.
How can I use init.d?
Should I have root permission?
Do I have to create folder "init.d" in /system/etc/ then copy init.d script file there ? just done it?
Just create init.d folder in /etc if it doesn't exist. What version did you use? This kernel automatically roots the phone.
lol My nickname included to contributor!
Okay.. So, SYSTEM-MODE root is work on your modified boot image?
Yup, lol if it wasnt for you i wouldnt have known how.
On the MTC20K it does for sure afaik. The NBD90W nobody has told me. Should in theory tho.
Hello.
I just started messing around with my Z3 and so far followed the tutorial here https://forum.xda-developers.com/z3-compact/general/recovery-root-mm-575-lb-t3418714 to install root and recovery without unlocking the bootloader. Also took the chance to make a backup of the ta partition.
My objective was being able to mount an external ext4 partition so I could move game data and free some internal space. I believe the official kernel doesn't support init.d so I searched and found a script that worked and added it to the bottom of init.qcom.post_boot.sh.
Code:
### Init.d support ###
busybox run-parts /system/etc/init.d/
It's a very simple script that creates /sd-ext folder if it's missing and mounts /dev/block/mmcblk1p2 there
Code:
#!/system/bin/sh
#
# mounts ext partition from sd card
if [ ! -d /sd-ext ];
then
mount -o rw,remount /
install -m 774 -o 1000 -g 1000 -d /sd-ext
mount -o ro,remount /
fi
if [ ! -d /sd-ext ];
then
echo sd-ext not created >> /data/Test.log
else
mount -o rw -t ext4 /dev/block/mmcblk1p2 /sd-ext
fi
It was something that I got on some forum plus some trial and error and some Linux knowledge I have.
It seemed to work. The directory was created and mounted and I was able to move the games there using Titanium Backup.
But after I rebooted, the folder was there and all the data, but the apps don't show up on the apps list. I have to reinstall them...
Am I missing something? How can I fix this?