Any one know how to modify /system partition on OPL27.76-71-2-3? Magisk not working. - Moto Z Questions & Answers

If not apply two commands below before flashing magisk, phone will boot-loop:
echo KEEPVERITY=true>>/data/.magisk
echo KEEPFORCEENCRYPT=true>>/data/.magisk
Click to expand...
Click to collapse
But the modification in recovery is not effective.
In android system can't remount /system to r/w, the same with /.
And I can't found any qcom.fstab or other .fstab like file in boot.img.
PhoeniX kernel is working but can't enable wifi.
https://forum.xda-developers.com/moto-z/development/kernel-visionz-t3650698
Any one can help me? Thanks~:crying:

Related

[Q] How to "adb remount" vibrant?

When i give this command "adb Remount"
it comes up with an error - No such file or directory.
I am in stock 2.2 rooted with Super One click.
I have enabled USB Debugging.
I am not able to install Busybox latest version either.
I did search the forum... one said i will not be able to do it at all on a stock kernel. If thats true, what else can i do?
p.s - I want to fix this issue in adb... I will try root explorer if there is no fix for this.
rajkumar484 said:
When i give this command "adb Remount"
it comes up with an error - No such file or directory.
I am in stock 2.2 rooted with Super One click.
I have enabled USB Debugging.
I am not able to install Busybox latest version either.
I did search the forum... one said i will not be able to do it at all on a stock kernel. If thats true, what else can i do?
p.s - I want to fix this issue in adb... I will try root explorer if there is no fix for this.
Click to expand...
Click to collapse
-try not capitalizing "remount".....ADB is case-sensitive
-kernel shouldnt matter
-what are you trying to remount for, just out of curiousity?
-Why cant you install latest busybox?
rajkumar484 said:
When i give this command "adb Remount"
it comes up with an error - No such file or directory.
I am in stock 2.2 rooted with Super One click.
I have enabled USB Debugging.
I am not able to install Busybox latest version either.
I did search the forum... one said i will not be able to do it at all on a stock kernel. If thats true, what else can i do?
p.s - I want to fix this issue in adb... I will try root explorer if there is no fix for this.
Click to expand...
Click to collapse
I have this problem as well. I think it has to do with the default privlages of the adb service that runs on the phone. For instance, adb shell gives the non-root prompt of $. On other phones I've used an sdb shell gives the root prompt of #. Since a remount requires root privlages, adb remount will not work. The default adb privlage "might" be a kernel mod, or perhaps there's build.prop edit that can help. I never did figure out how to have root privlages via adb by default.
As a work around, you can type "su" once you adb shell into the phone to get root privlages. Make sure that you accept the root permission request on your phone the first time. I also found a remount script that can be put in /system/bin so that once you have root permission via adb shell, doing a remount is pretty simple. If you're interested, I'll try and upload the scipt later.
remount script
mattb3 said:
As a work around, you can type "su" once you adb shell into the phone to get root privlages. Make sure that you accept the root permission request on your phone the first time. I also found a remount script that can be put in /system/bin so that once you have root permission via adb shell, doing a remount is pretty simple. If you're interested, I'll try and upload the scipt later.
Click to expand...
Click to collapse
Yes, can you please upload that, i will try it.
About the other question about why i want to remount - I want to fix that ascending ringtone issue. So i am trying to push phone.apk into system/app folder.
Busybox wont install because when i try it comes up with an error - 'nand not activated or remount failed"
Script is pasted below. Note that this is for voodoo roms. For non-voodoo roms simply replace all occurrences of ext4 with rfs. Create a text file called remount and put it in /system/bin on your phone. Of course since you don't have write permission, you'll have to execute the remount command by hand the first time. The command is: mount -o rw,remount -t ext4 /dev/block/stl9 /system
Once "installed" you use it by typing "remount rw" to make the system partition writable, and "remount ro" to make the system partition read only again. I wish I could credit the original author of this script, but I honestly can't remember where I found it. Hope it helps.
#!/system/bin/sh
#
# Remount /system partition
case "$1" in
ro)
echo "Setting /system to RO (read only)"
mount -o ro,remount -t ext4 /dev/block/stl9 /system
echo ""
echo "Current status of /system mount:"
mount |busybox grep "/system ext4"
echo ""
;;
rw)
echo "Setting /system to RW (read write)"
mount -o rw,remount -t ext4 /dev/block/stl9 /system
echo ""
echo "Current status of /system mount:"
mount |busybox grep "/system ext4"
echo ""
;;
status)
echo ""
echo "Current status of /system mount:"
mount |busybox grep "/system ext4"
echo ""
;;
*)
echo "Valid input format:"
echo " remount [ro|rw|status]"
echo " ro = read only (default)"
echo " rw = read write (to make modifications)"
echo " status = current mount mode"
echo ""
echo "Current status of /system mount:"
mount |busybox grep "/system ext4"
echo ""
exit 1
esac

[Q] Hosts file ressetting on reboot

Does anybody know why my hosts file gets reset after a reboot no matter whether I change with adaway or adblock or if I manually replace the hosts file myself and set to read only. Have searched about and only solution I read about was get a custom kernel. Although I am already on a custom kitkat ROM and using dorimanx kernel for galaxy s2. Also never had problems with hosts resetting on jb or ICS. Even creating a symlink to data/data/hosts doesn't work. On reboot the symlink just gets replaced with the original useless hosts file.
Sorry to bump but it is irritating and can't find a solution.
just some hints,
hosts file is located on /system partition which should be read only mounted during runtime.
check:
Code:
# mount | grep /system
/dev/block/mmcblk0p9 /system ext4 ro,seclabel,relatime,user_xattr,barrier=1,data=ordered 0 0
ro is ok. If so, the file can be changed only during boot (some init script) or later by app with root permission.
check if some init script is not involved:
Code:
# grep hosts /init*
Code:
#grep hosts /system/etc/init.d/*
Is there any output of the commands? I'm on i9100/CM10.2 and there is no output.
Then would be good to revoke root permissions to all apps (not unroot) and see if the issue is still there.
and also check the time of last change of the file:
Code:
ls -l /system/etc/hosts
is it realy during boot?
After spending entirely too much time on this I finally have a working solution. Save the contents of this script to your internal SD card. Ensure the last line is a blank carriage return.
Code:
#!/system/bin/sh
sleep 10
mount -o rw,remount /system
cp /storage/emulated/0/Download/working/hosts /system/etc
Install Script Manager (SManager), and set this script as: on boot, executable, as root. This will then copy your custom "hosts" file under your SDcard to /system/etc after 10 seconds.
Using this script through init.d didn't work for me, which I guess means whatever was over-writing my "hosts" file was doing after the init.d process.
Definitely remount system partition to read only again. Append following line to your script:
Code:
mount -o ro,remount /system
d0gd3v said:
Definitely remount system partition to read only again. Append following line to your script:
Code:
mount -o ro,remount /system
Click to expand...
Click to collapse
good call, thanks

CIFS Module for MOJO Kernel 3.4.35

Alright, finally we have CIFS support on MJO.
Cross compiled on ArchLinux from the sources posted by Rich, config pulled from /proc/config.gz and just compiled the CIFS+md4 module.
Works great here:
Code:
//10.0.0.11/vault 3.6T 2.9T 709.1G 81% /mnt/shell/emulated/0/vault
Make sure you have root, insmod md4.ko, insmod cifs.ko and enjoy! I'm using this to access my MP3s for aMPD so that my Mojo can act as my stereo too.
*edit* also make sure you have busybox installed in order to mount, and pass a username option. ie:
Code:
busybox mount -ousername=guest //1.1.1.1/share /sdcard/share
vostok4 said:
Alright, finally we have CIFS support on MJO.
Cross compiled on ArchLinux from the sources posted by Rich, config pulled from /proc/config.gz and just compiled the CIFS+md4 module.
Works great here:
Code:
//10.0.0.11/vault 3.6T 2.9T 709.1G 81% /mnt/shell/emulated/0/vault
Make sure you have root, insmod md4.ko, insmod cifs.ko and enjoy! I'm using this to access my MP3s for aMPD so that my Mojo can act as my stereo too.
*edit* also make sure you have busybox installed in order to mount, and pass a username option. ie:
Code:
busybox mount -ousername=guest //1.1.1.1/share /sdcard/share
Click to expand...
Click to collapse
That's a good idea.. just updating the modules rather then the actual kernel.
By any chance, would you know how to approach updating the kernel on the mojo?
Thank you! These modules worked for me. However I was getting an "invalid parameter" error message. Finally I had to work around it as:
Code:
busybox mount -o unc=\\\\192.168.0.2\\share name,username=myself,password=password1 -t cifs none /mnt/point
It may depend on the version of busybox..
@gwaldo if you wanted to flash a custom kernel this is what I would do:
Code:
[email protected]:/ # ls -al /dev/block/platform/sdhci-tegra.3/by-name
ls -al /dev/block/platform/sdhci-tegra.3/by-name
lrwxrwxrwx root root 2014-04-13 18:31 APP -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-04-13 18:31 CAC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-04-13 18:31 DTB -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-04-13 18:31 LNX -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-04-13 18:31 MDA -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2014-04-13 18:31 MSC -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-04-13 18:31 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-04-13 18:31 TMP -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2014-04-13 18:31 UDA -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2014-04-13 18:31 USP -> /dev/block/mmcblk0p7
[email protected]:/ #
key line:
Code:
lrwxrwxrwx root root 2014-04-13 18:31 LNX -> /dev/block/mmcblk0p3
grab the boot image:
Code:
cat /dev/block/mmcblk0p3 > /sdcard/boot.img
load it in archikitchen: http://forum.xda-developers.com/showthread.php?t=2597220
create a barebones project, put the boot.img in the project folder, unpack. gives us:
Code:
./kernel
./kernel/boot.img-cmdline
./kernel/boot.img-kerneloff
./kernel/boot.img-zImage
./kernel/ramdisk
./kernel/ramdisk/ueventd.goldfish.rc
./kernel/ramdisk/init.nv_dev_board.usb.rc
./kernel/ramdisk/proc
./kernel/ramdisk/data
./kernel/ramdisk/init.rc
./kernel/ramdisk/init.mojo.rc
./kernel/ramdisk/ueventd.mojo.rc
./kernel/ramdisk/system
./kernel/ramdisk/sys
./kernel/ramdisk/init.usb.rc
./kernel/ramdisk/init
./kernel/ramdisk/default.prop
./kernel/ramdisk/sbin
./kernel/ramdisk/sbin/watchdogd
./kernel/ramdisk/sbin/ueventd
./kernel/ramdisk/sbin/adbd
./kernel/ramdisk/init.trace.rc
./kernel/ramdisk/fstab.mojo
./kernel/ramdisk/dev
./kernel/ramdisk/init.qvs.rc
./kernel/ramdisk/init.tf.rc
./kernel/ramdisk/init.goldfish.rc
./kernel/ramdisk/ueventd.rc
./kernel/boot.img-tagsoff
./kernel/boot.img-ramdiskoff
./kernel/boot.img-ramdisk.gz
./kernel/boot.img-base
./kernel/boot.img-pagesize
./META-INF
./META-INF/com
./META-INF/com/google
./META-INF/com/google/android
./META-INF/com/google/android/update-binary
./META-INF/com/google/android/updater-script-85_USER
./META-INF/com/google/android/updater-script-10_SYMLINKS
./META-INF/com/google/android/updater-script-99_TAIL
./META-INF/com/google/android/updater-script-90_KERNEL
./META-INF/com/google/android/updater-script-80_EXEC
./META-INF/com/google/android/updater-script-91_MODEM
./META-INF/com/google/android/updater-script-00_HEAD
./META-INF/com/google/android/updater-script-20_PERMISSIONS
./META-INF/com/google/android/updater-script
./system
./boot.img
Replace
Code:
./kernel/boot.img-zImage
with a new built kernel, repack the boot image, and you can try to boot it with fastboot without killing anything:
Code:
fastboot boot newboot.img
Should work. I will experiment in a few days when I get more time, perhaps.
vostok4 said:
@gwaldo if you wanted to flash a custom kernel this is what I would do:
...
Should work. I will experiment in a few days when I get more time, perhaps.
Click to expand...
Click to collapse
Hi vostok4, thanks for the reply.
I used the zip config from the mojo and use my kernel with the extracted initramfs from the boot.img in mojo-signed-ota-MO0202-WW.zip firmware update.
./fastboot-linux -i 0x0738 boot zImage.gwald initramfs.cpio.gz
Click to expand...
Click to collapse
It boots fine and can confirm it booted the kernel via google's setting.
I add more FS (NTSF/exfat write) support in the kernel but I'm not familiar with androids permissions.
Just cautious with it.
It would be nice if there was a system recovery image so if we made a mistake we can reset it to factory.
I kinda left it there for a while.. not sure what else to add
From a recovery standpoint with the kernel, you already have the boot.img from the update, so you can always boot that... And the device auto goes into fastboot for you, so I think a recovery from every brick should be possible.
Words are cheap though
vostok4 said:
From a recovery standpoint with the kernel, you already have the boot.img from the update, so you can always boot that... And the device auto goes into fastboot for you, so I think a recovery from every brick should be possible.
Words are cheap though
Click to expand...
Click to collapse
Oh I meant doing something wrong on the filesystem, there's no rom/image for it , NAND I think it's called, the Android OS partition.
Like the guy that changed his permissions and made his entire MOJO readonly.. I think the only fix is the reflashing.
I did post about a guy who found the recovery menu on the MOJO
http://www.freaktab.com/showthread.php?12075-FOUND-MAD-CATZ-M-O-J-O-RECOVERY-MENU
So, that could work, haven't tried..
gwaldo said:
Oh I meant doing something wrong on the filesystem, there's no rom/image for it , NAND I think it's called, the Android OS partition.
Like the guy that changed his permissions and made his entire MOJO readonly.. I think the only fix is the reflashing.
I did post about a guy who found the recovery menu on the MOJO
http://www.freaktab.com/showthread.php?12075-FOUND-MAD-CATZ-M-O-J-O-RECOVERY-MENU
So, that could work, haven't tried..
Click to expand...
Click to collapse
I think working with similar key combinations to enable nvidia recovery mode is more important. That way with nvflash we can make a copy of a clean install, and always be able to flash it back. My mojo always goes to this mode when I try the fastboot method, but it might be a special unit
Can I ask you which toolchain you used / which guide you followed? I'm following the guide at http odroid.us/mediawiki/index.php?title=Step-by-step_Cross-compiling_a_Kernel but I'm having some problem (the compiled modules wind up being armv5 instead of armv7) and I'm noob at cross compiling.
paulatz said:
Can I ask you which toolchain you used / which guide you followed? I'm following the guide at http odroid.us/mediawiki/index.php?title=Step-by-step_Cross-compiling_a_Kernel but I'm having some problem (the compiled modules wind up being armv5 instead of armv7) and I'm noob at cross compiling.
Click to expand...
Click to collapse
Looks like how I did it, I use mint linux
i don't have much of a cheap sheet, but I'll post it when I get on my PC.
gwaldo said:
Looks like how I did it, I use mint linux
i don't have much of a cheap sheet, but I'll post it when I get on my PC.
Click to expand...
Click to collapse
Don't worry, I have managed to do it using the official ndk from google (I'll post the details if someone ask for them when I can find the time).
I have compiled uvcvideo.ko, but it still is not working (uvcvideo: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)), but I do not want to hijack you thread. I'll open a specific one if I can find the time to work on the issue for real.
Just for more information here, I compile on ArchLinux and use the following make line:
Code:
$ CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make
With the following packages from the AUR (kernel headers package was modified to get the correct version):
Code:
arm-linux-gnueabi-binutils 2.24-1
arm-linux-gnueabi-eglibc 2.18-1
arm-linux-gnueabi-gcc 4.8.2-1
arm-linux-gnueabi-linux-api-headers 3.4.35-1
paulatz said:
Don't worry, I have managed to do it using the official ndk from google (I'll post the details if someone ask for them when I can find the time).
I have compiled uvcvideo.ko, but it still is not working (uvcvideo: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)), but I do not want to hijack you thread. I'll open a specific one if I can find the time to work on the issue for real.
Click to expand...
Click to collapse
It's not my thread, but here's what I do:
Mint Linux 14 (i know its old)
I downloaded the build chains:
https://github.com/DooMLoRD/android_prebuilt_toolchains/
Install extra utils:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Click to expand...
Click to collapse
Export env vars:
export CROSS_COMPILE=/home/-USER-/-DIR-/android_prebuilt_toolchains-master/arm-eabi-linaro-4.6.2/bin/arm-eabi-
export ARCH=arm
Click to expand...
Click to collapse
Prepare the kernel
make clean && make mrproper
Click to expand...
Click to collapse
extract the kernel from your MOJO kernel.zip and place in the kernel folder.
make your changes:
make menuconfig
Click to expand...
Click to collapse
Compile it:
make -j5
Click to expand...
Click to collapse
how to install cifs module
vostok4 said:
Alright, finally we have CIFS support on MJO.
Cross compiled on ArchLinux from the sources posted by Rich, config pulled from /proc/config.gz and just compiled the CIFS+md4 module.
Works great here:
Code:
//10.0.0.11/vault 3.6T 2.9T 709.1G 81% /mnt/shell/emulated/0/vault
Make sure you have root, insmod md4.ko, insmod cifs.ko and enjoy! I'm using this to access my MP3s for aMPD so that my Mojo can act as my stereo too.
*edit* also make sure you have busybox installed in order to mount, and pass a username option. ie:
Code:
busybox mount -ousername=guest //1.1.1.1/share /sdcard/share
Click to expand...
Click to collapse
sorry, bui I don't understand how install the cifs module -cifs-module-kernel-3.4.35.zip-
Could anyone support me, please
darkodarko said:
sorry, bui I don't understand how install the cifs module -cifs-module-kernel-3.4.35.zip-
Could anyone support me, please
Click to expand...
Click to collapse
What are you doing exactly? Which result do you expect? Which result do you get instead?
cheers
paulatz said:
What are you doing exactly? Which result do you expect? Which result do you get instead?
cheers
Click to expand...
Click to collapse
I want connect my mojo with my nas through cifs and mount a specific folder.
I rooted mojo whit MMM MoDaCo Mod.
but I dont have any idea how use the cifs-module-kernel-3.4.35.zip file
Thanks in advance
You need to put the archive somewhere on your MOJO, and run the following as root:
insmod md4.ko
insmod cifs.ko
Then you can mount using either mine or gwaldo's mount line.
I can write up how I got it to automount later, in order for the mount to be accessible to every application it has to be outside of /sdcard, I did mine in /mnt/share, and have it mounting on boot (in an ugly method).
darkodarko said:
I want connect my mojo with my nas through cifs and mount a specific folder.
I rooted mojo whit MMM MoDaCo Mod.
but I dont have any idea how use the cifs-module-kernel-3.4.35.zip file
Thanks in advance
Click to expand...
Click to collapse
You need to extract the content of the zip file onto a usb drive/MICROSD and copy the files to the MOJO.
Then follow vostok4's instructions
in busybox (with root permission)
cd to-where-you-put your .ko files (you need to know linux command line)
then run
insmod md4.ko
insmod insmod cifs.ko
Then you need to mount it as below:
vostok4 said:
Alright, finally we have CIFS support on MJO.
Make sure you have root, insmod md4.ko, insmod cifs.ko and enjoy! I'm using this to access my MP3s for aMPD so that my Mojo can act as my stereo too.
*edit* also make sure you have busybox installed in order to mount, and pass a username option. ie:
Code:
busybox mount -ousername=guest //1.1.1.1/share /sdcard/share
Click to expand...
Click to collapse
PS: you'll need to do this EVERYTIME you reboot/restart MOJO.
PS2: I haven't done this my self but that's my understanding.
OK, in order to not do it everytime manually, I have something like this (note the sleep 30 is ugly but I didn't bother writing a method to trigger on network connectivity). This requires busybox installed (I use this one: https://play.google.com/store/apps/details?id=stericson.busybox)
If you aren't comfortable with manually mucking around, then I'm not sure what to tell you to This is assuming you have root and busybox installed.
In order to create files under /system and /etc you need to mount /system as read-write:
Code:
$ su
# mount -orw,remount /system
# cp /sdcard/install-recovery.sh /etc/
# chmod 777 /etc/install-recovery.sh
# mount -oro,remount /system
That would copy install-recovery.sh from the sdcard (we need to do this because we have a secure boot and can't adb push to /etc). It also sets the file as executable (we want that). SO, these are the files you need:
/etc/install-recovery.sh (needs chmod 777)
Code:
#!/system/bin/sh
# fake init.d support
/system/bin/sysinit
/system/bin/sysinit (needs chmod 777)
Code:
#!/system/bin/sh
# fake init.d support
# the script below is what i use to mount my cifs share
/system/bin/sh '/system/etc/init.d/99vault'
# these are commented out, but run-parts would be the proper way to use the init.d folder
# however I couldn't get it to work on my mojo, so i just call the script directly
#export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
#run-parts /system/etc/init.d
/etc/init.d/99vault (or /system/etc/init.d/99vault if you expand the symlink) (needs chmod 777)
Code:
#!/system/bin/sh
/system/xbin/busybox mount -orw,remount /
# sometimes disappears on reboot, lets just create the mount folder to be safe
/system/xbin/busybox mkdir /mnt/vault
/system/xbin/busybox mount -oro,remount /
# mount our cifs module
/system/xbin/busybox insmod /system/etc/cifs/md4.ko
/system/xbin/busybox insmod /system/etc/cifs/cifs.ko
# wait for network to come online
sleep 30
# mount the actual share
/system/xbin/busybox mount -ousername=guest //10.0.0.11/vault /mnt/vault
That will get you mounted after each reboot without fail, at least in my experience.
did someone managed to make it work on cm 12.1?

If ... then ... else and init.rc

Hi, I'd like to ask a general question about device boot. I'd like to mount /system, /data, and /cache partitions in selected locations based on detection of sdcard in the device.
How could I add an if ... then ... else statement to init.rc before that /system, /data, and /cache partitions are mounted? Any ideas?
Solved
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
cristian_c said:
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
Click to expand...
Click to collapse
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
nullbyte001 said:
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
Click to expand...
Click to collapse
I've found on fs_property:ro.mount.fs=EXT4 in init.rc. In that section, I've added the following iine:
Code:
exec /busybox ash /mount_partitions.sh
[of course, I've placed busybox arm compiled binary (the version provided by busybox android app should work) and a mount_partitions.sh script (created by myself) into boot image ramdisk (I mean / main directory, the same where init.rc is located) ]
You could also need to give permissions to busybox and to .sh script. You could also need to remount / in read-write mode, in case of issues with the above command.

Can't edited build prop

I can't edit build prop ,i have rooted my device android 10 , i try to edit my build prop and it doesn't save any change , tried to change premission to rw using root explorer and terminal doesn't change
I tried build prop apk ,it says can't saving !!
What is the problem and how can i slove it!?
build.prop is in /system which is always read-only, probably protected by vbmeta, maybe FEC, possibly packed in super.
So, the question is, what do you actually want to do?
Do you want to change the file just for the fun of it or change a property for some reason?
How did you root your device? With Magisk or without?
Renate said:
build.prop is in /system which is always read-only, probably protected by vbmeta, maybe FEC, possibly packed in super.
So, the question is, what do you actually want to do?
Do you want to change the file just for the fun of it or change a property for some reason?
How did you root your device? With Magisk or without?
Click to expand...
Click to collapse
I want to add line(persist.sys.clipboard.max_items=10)
I have rooted it by Magisk
You can just setprop persist.sys.clipboard.max_items 10
Can't you? One time should do it?
Renate said:
Renate said:
You can just setprop persist.sys.clipboard.max_items 10
Can't you? One time should do it?
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Thank you for your replay
Itjust to increasing the capacity of clipboard of gboard
No i can't add any thing to build prop
It does not save changes
Or doesn't accept to change the permission to read-write
Or even in. Build prop editor it shows error saving build prop
I don't know how to edit or what should i do or where is the problem
Code:
C:\>adb shell
$ su
# setprop persist.sys.clipboard.max_items 10
# getprop persist.sys.clipboard.max_items
10
Renate said:
Code:
C:\>adb shell
$ su
# setprop persist.sys.clipboard.max_items 10
# getprop persist.sys.clipboard.max_items
10
Click to expand...
Click to collapse
Thank you very much I will try it
But there is any way to edit it on my android
Or What is the problem that prevents me from modifying it
rab33h said:
Or what is the problem that prevents me from modifying it?
Click to expand...
Click to collapse
I wouldn't know. You don't actually say anything about what it prints out.
build.prop is a file. You shouldn't care what's in there.
In any case, you haven't demonstrated that persist.sys.clipboard.max_items is actually in there.
Renate said:
I wouldn't know. You don't actually say anything about what it prints out.
build.prop is a file. You shouldn't care what's in there.
In any case, you haven't demonstrated that persist.sys.clipboard.max_items is actually in there.
Click to expand...
Click to collapse
Thank you and orry for the inconvenience
That's what show for me when I try to change the permission using root explorer :
Warning Permissions change was not successful . Please note that some file systems ( e.g. SD card ) do not allow permission changes .
When i try to add code and exit with save then reopen it doesn't change in build prop
And when i edit the file using buildprop editor :
Error Saving build prop
This is in terminal:
:/ $ su
:/ # mount -o rw,remount /system
mount: '/system' not in /proc/mounts
1|:/ #
I don't believe that I advised you to do anything with mounts.
Why don't you just try what I actually did advise?
@rab33h Magisk is a systemless root method. Renate has explained the reason(s) in post #2 already. any questions left?
Renate said:
alecxs said:
@rab33h Magisk is a systemless root method. Renate has explained the reason(s) in post #2 already. any questions left?
Click to expand...
Click to collapse
Click to expand...
Click to collapse
No thank you
for systemless method to change build.prop entries you may interested in Magisk resetprop or more advanced MagiskHidePropsConf module.
the easiest way is to create a startup script yourself and place it in service.d
/data/adb/service.d/script.sh
Code:
#!/system/bin/sh
resetprop ro.build.product dandelion
you can also control the behavior with -n and -p flags (refer to documentation)
alecxs said:
for systemless method to change build.prop entries you may interested in Magisk resetprop or more advanced MagiskHidePropsConf module.
the easiest way is to create a startup script yourself and place it in service.d
/data/adb/service.d/script.sh
Code:
#!/system/bin/sh
resetprop ro.build.product dandelion
you can also control the behavior with -n and -p flags (refer to documentation)
Click to expand...
Click to collapse
Thank you very much
But sorry for this stupid question
In this situation of magisk
Can i change the permission by terminal or termux?
Using this command
mount -o rw,remount /system
first you need to understand /system is a directory inside system partition. the partition is mounted read-only, that has nothing to do with permissions. if you want to remount the partition read-write do it with it's proper mount point / (rootdir) and not with containing directory.
second, android doesn't allow modifications of system files, avb/dm-verity prevents that. you need to disable it in vbmeta partition first.
and third, the file system itself has deduplicated blocks + ro flag to prevent any rw mount attempts. if it is ext4 file system, you can unshare blocks (will expand memory) and remove the ro flag. for other file systems (erofs/f2fs) it needs recreation of the whole partition as ext4.
the usual method for modifying dynamic partitions is offline, means you create your own super.img with lpmake and flash it into device. there exist various helper scripts here to automate this.
it's absolutely possible to do this so you can remount rw afterwards.
but it will break OTA and is not worth the hassle. Magisk is a systemless root solution, system partition is not modified and remain completely stock.
if you want to add/delete/replace files in /system go with the time and use the proper Magisk systemless solution.
https://forum.xda-developers.com/t/4537601
alecxs said:
first you need to understand /system is a directory inside system partition. the partition is mounted read-only, that has nothing to do with permissions. if you want to remount the partition read-write do it with it's proper mount point / (rootdir) and not with containing directory.
second, android doesn't allow modifications of system files, avb/dm-verity prevents that. you need to disable it in vbmeta partition first.
and third, the file system itself has deduplicated blocks + ro flag to prevent any rw mount attempts. if it is ext4 file system, you can unshare blocks (will expand memory) and remove the ro flag. for other file systems (erofs/f2fs) it needs recreation of the whole partition as ext4.
the usual method for modifying dynamic partitions is offline, means you create your own super.img with lpmake and flash it into device. there exist various helper scripts here to automate this.
it's absolutely possible to do this so you can remount rw afterwards.
but it will break OTA and is not worth the hassle. Magisk is a systemless root solution, system partition is not modified and remain completely stock.
if you want to add/delete/replace files in /system go with the time and use the proper Magisk systemless solution.
https://forum.xda-developers.com/t/4537601
Click to expand...
Click to collapse
Thank you very much

Categories

Resources