Request: Marshmallow Build.prop Local.prop - Huawei Mate S

Can somebody give me a Build. prop and their local.prop of the marshmallow version of this device?
The build prop is on
/system/build.prop
and the local prop is on
/cust/hw/eu/prop/local.prop
I they can be pulled through adb using adb pull

Related

I need build prop help

I know there is a line you can type in build prop to get multi window enabled on 6.1 I had it in my previous Rom xtrasmooth but since they updated the Rom its no longer there does anyone know what to type in build prop?
Find out "ro.build.type" line from the build.prop file.. Now look for text that says user then change it to userdebug. then save it and reboot. now go into developer options and enable it.
From terminal,
setprop ro.build.type userdebug
Not sure it's persistent like that, but it may be easier to copy paste for other people.
Sent from my Nexus 6
If I've helped you, don't forget to hit thanks!

[Q] How to change a build.prop value using resetprop

Hello guys. I'm trying to make some modifications in my build.prop using magisk's systemless interface. In a module, I saw that resetprop can add lines in build.prop, but, I need to change a specific line in build.prop and resetprop in a module intercafe can't do that (or can, I don't know ). I was thinking in creating a script using su + resetprop to delete and include again, and I'll put in a .sh file inside /magisk/.core/service.d/ to run in every boot.
Code:
su
resetprop --delete [my build.prop line]
But I don't know to to include a line using this interface (script in terminal).
So, I need you, guys haha
Just put whatever resetprop commands you want inside a file, put that file in service.d and give it execution permissions (755). You don't need "su" in there... It's Magisk executing those scripts and it already has escalated privileges.
If it doesn't work, try putting the file in post-fs-data.d instead.
To do this with a module, simply put your commands inside the service.sh file (or post_fs_data.sh) in the common folder.
https://github.com/garethwza/TheFla...mmit/25fb6a451a4d5280c26dbd67f4c5dfad7a3f20fc how to do this with resetprop? resetprop is binary here. how to make it?
Didgeridoohan said:
Just put whatever resetprop commands you want inside a file, put that file in service.d and give it execution permissions (755). You don't need "su" in there... It's Magisk executing those scripts and it already has escalated privileges.
If it doesn't work, try putting the file in post-fs-data.d instead.
To do this with a module, simply put your commands inside the service.sh file (or post_fs_data.sh) in the common folder.
Click to expand...
Click to collapse

Cannot input command in build.pro with Magisk

Hi,
I have some problem about build.prop and magisk
i install module enable camera2api in my phone (mi note3 stock rom eu)
after i reboot and check command in build.prop
it show #persist.camera.HAL3.enabled=1 not persist.camera.HAL3.enabled=1
How to fix this issue ?
Thank you
Magisk doesn't directly edit the build.prop file, only the values. Use the the getprop command in a terminal emulator to check the new value.

[Help] Modifying and replacing existing files

Hi! I need to modify build.prop in /vendor partition. As i understood system.prop can't affect it. So i decided to edit it with "sed" cmd. But i got stuck on boot script. It is executed in magisk logs, but there is no code executed (i added one copy+paste cmd to test).
How should i properly modify /vendor files?
Should i modify it in post-fs-data.sh or service.sh?
I'm noob in magisk module making
Bash:
# This script will be executed in post-fs-data mode
# More info in the main Magisk thread
MODDIR=${0%/*}
#testing and no result
cp /system/build.prop /storage/emulated/0/build.propes
cp /system/build.prop /sdcard/build.propes
#i want to do this
sed -i 's/ro.product.system.brand=Xiaomi/ro.product.system.brand=Google/g' ${$MODDIR}/system/build.prop
sed -i 's/ro.product.system.brand=Xiaomi/ro.product.system.brand=Google/g' ${$MODDIR}/vendor/build.prop
Why do you need to edit the actual build.prop file? Isn't it enough to use the resetprop tool (system.prop in the module).
Didgeridoohan said:
Why do you need to edit the actual build.prop file? Isn't it enough to use the resetprop tool (system.prop in the module).
Click to expand...
Click to collapse
I've tried to do this via system.prop, but got negative result. When i do replace modified files through recovery, i get positive result. Idk whats the problem, cuz i even tried to mount files in moddir/system/ folder. Seems android somehow detects any changes
So i have to copy files to module folder, modify, and replace them in original directory. Now the problem is in editing file, i successfully copied file but "sed" doesnt seem to work lol
What do you mean with "negative results"? Does the prop value not change? Have you tested with the getprop command (because you can't look in the prop file, it won't change when using the resetprop tool)?
Using a Magisk module to magic mount the prop files is likely not going to work since that will happen way too late for the files to be read by the system.
Didgeridoohan said:
What do you mean with "negative results"? Does the prop value not change? Have you tested with the getprop command (because you can't look in the prop file, it won't change when using the resetprop tool)?
Using a Magisk module to magic mount the prop files is likely not going to work since that will happen way too late for the files to be read by the system.
Click to expand...
Click to collapse
Negative result for me - app does not recognize me as another device. There is some protection in it that doesnt simply read system props. It read the build props in root directory. (last android security patch)
I just need to modify files in module directory and thats all. I have only this problem now.
No apps can read the build.prop files directly (unless they're root apps, of course)... Apps will be reading the values, not the file, which is why the resetprop tool works without changing the prop file.
If you really want to go for it though your sed command looks fine, except that I would use ${MODDIR}/system/vendor/build.prop since I don't think the ${MODDIR}/vendor symlink will be available when post-fs-data.sh is executed.
Not sure why you're copying the files to the internal storage and why you're naming them .propes, so can't say much about that.

How To Guide How to change files in the directory /system with Magisk

How to change files in the directory /system with Magisk
Note:
I tested the instructions below with Magisk 24. 25.0, and 25.2 on an ASUS Zenfone 8 running OmniROM (Android 12 ) .
The filesystem for /system is normally mounted read-only In Android 12 and it's difficult to change files in that filesystem.
One possible solution to change files in /system is to create a Magisk module for this task.
For testing if a Magisk Module would work like expected you can create a Dummy Magisk module . The steps to implement the Dummy Magisk Module are:
Install Magisk, enable root access for the shell in Magisk and enable access via adb (this can be done in the "Developer Options" in the system settings)
Next connect to the phone using the command
Code:
adb shell
and become root user
Code:
su -
Now create a sub directory in the directory
/data/adb/modules
e.g.
Code:
ASUS_I006D:/ # ls -ld /data/adb/modules/*
drwxrws--- 3 u0_a118 media_rw 3452 2022-05-30 12:12 /data/adb/modules/playstore
ASUS_I006D:/ #
Then copy the new files for the directory in /system to that directory (/data/adb/modules/<modulename>/ is equal here to the root dir, /, on the phone)
Example:
Code:
ASUS_I006D:/ # find /data/adb/modules/playstore
/data/adb/modules/playstore
/data/adb/modules/playstore/system
/data/adb/modules/playstore/system/etc
/data/adb/modules/playstore/system/etc/permissions
/data/adb/modules/playstore/system/etc/permissions/com.android.vending.xml
/data/adb/modules/playstore/system/priv-app
/data/adb/modules/playstore/system/priv-app/Phonesky
/data/adb/modules/playstore/system/priv-app/Phonesky/lib
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libbrotli.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libconscrypt_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libcronet.85.0.4181.5.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libgame_sdk_device_info_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libphonesky_data_loader.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libtensorflowlite_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/Phonesky.apk
/data/adb/modules/playstore/system/priv-app/FakeStore
/data/adb/modules/playstore/system/priv-app/FakeStore/oat
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64/FakeStore.odex
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64/FakeStore.vdex
/data/adb/modules/playstore/system/priv-app/FakeStore/FakeStore.apk
ASUS_I006D:/ #
Now reboot the phone.
After the reboot all files in /data/adb/modules/<modulename> will be mapped to /system by Magisk, e.g:
Code:
ASUS_I006D:/ # find /system/priv-app/Phonesky/
/system/priv-app/Phonesky/
/system/priv-app/Phonesky/lib
/system/priv-app/Phonesky/lib/arm
/system/priv-app/Phonesky/lib/arm/libbrotli.so
/system/priv-app/Phonesky/lib/arm/libconscrypt_jni.so
/system/priv-app/Phonesky/lib/arm/libcronet.85.0.4181.5.so
/system/priv-app/Phonesky/lib/arm/libgame_sdk_device_info_jni.so
/system/priv-app/Phonesky/lib/arm/libphonesky_data_loader.so
/system/priv-app/Phonesky/lib/arm/libtensorflowlite_jni.so
/system/priv-app/Phonesky/Phonesky.apk
ASUS_I006D:/ #
ASUS_I006D:/ # find /system/priv-app/FakeStore/
/system/priv-app/FakeStore/
/system/priv-app/FakeStore/oat
/system/priv-app/FakeStore/oat/arm64
/system/priv-app/FakeStore/oat/arm64/FakeStore.vdex
/system/priv-app/FakeStore/oat/arm64/FakeStore.odex
/system/priv-app/FakeStore/FakeStore.apk
ASUS_I006D:/ #
Because the mapping will be done while booting the phone it will also survive updating the OS on the phone to a new version as long as the user data is not deleted and Magisk is installed in the boot partition.
Notes:
Magisk "replaces" existing directories and files in /system with the files in that directory by using bind mounts.
You can not add additional files or directories to /system using this method -- it's only possible to add additional files and directories to the existing sub directories in /system.
This Magisk feature can also be used to make files in sub directories in /system writable -- see How to make files in system writable for detailed instructions.
This method can also be used to replace files in the directories /vendor, /product, or /system_ext:
from https://topjohnwu.github.io/Magisk/guides.html:
The system folder​
All files you want to replace/inject should be placed in this folder. This folder will be recursively merged into the real /system; that is: existing files in the real /system will be replaced by the one in the module’s system, and new files in the module’s system will be added to the real /system.
If you place a file named .replace in any of the folders, instead of merging its contents, that folder will directly replace the one in the real system. This can be very handy for swapping out an entire folder.
If you want to replace files in /vendor, /product, or /system_ext, please place them under system/vendor, system/product, and system/system_ext respectively. Magisk will transparently handle whether these partitions are in a separate partition or not.
Click to expand...
Click to collapse
But this seems to work only to replace existing files in these directories.
This method to replace files in /system simulates a module in Magisk so if everything is okay I strongly recommend to create a "real" Magisk Module with the new files for /system.
Trouble Shooting
If something does not work check the Magisk log file in /cache :
/cache/magisk.log
History
Update 10.06.2022
added the infos about how to update files /vendor, /product, /system-ext
Update 12.06.2022
The Magisk Module to install the patched Playstore used in this example can be downloaded here
http://bnsmb.de/files/public/Android/PlayStore_for_MicroG.zip
see also this Message
https://forum.xda-developers.com/t/...h-a-patched-playstore-from-nanodroid.4456421/
Update 03.10.2022
The sentence about how to update files in /vendor, /product, /system-ext was missing here --fixed
Added a note about what can not be done using this method
Update 04.11.2022
Added the hint for the post to make files in /system writable
Doing some cleanup to make the instructions more clear
Update 18.01.2023
See How to change any file or directory using Magisk for another approach to change files on read-only mounted filesystems.
Can this way be used with the Product and other folders?, framework?
To remove apps?, make fake apk's?
NisseGurra said:
Can this way be used with the Product and other folders?, framework?
Click to expand...
Click to collapse
I just did a quick test and it seems that replacing files in other folders seems not to work
(but this was only a quick test without checking the documentation for Magisk ...)
To remove apps?, make fake apk's?
Click to expand...
Click to collapse
I don't think that you can remove files because Magisk uses bind mounts for replacing the files. But you can disable apps by creating empty files.
E.g. in my example in the previous post
/data/adb/modules/playstore/system/priv-app/FakeStore/FakeStore.apk
is an empty file to overwrite (and therfor disable) the file
/system/priv-app/FakeStore/FakeStore.apk.
That's neccessary because FakeStore.apk and Phonesky.apk use the same signature and that is not allowed in Android.
regards
Bernd
Tested to change a app: SamsungCalendar
Copied the files to /data/adb/modules/
Want to exchange the samsung calendar to an other calendar app that cant be installed due to name conflict.
Replace app?, seems no go
NisseGurra said:
Tested to change a app: SamsungCalendar
Copied the files to /data/adb/modules/
Want to exchange the samsung calendar to an other calendar app that cant be installed due to name conflict.
Replace app?, seems no go
Click to expand...
Click to collapse
Post an "ls -l" for the directory with the app you want to replace and the output of
ls -lr /data/adb/
The file structure in /data/adb/module must match the file structure in / , e.g. to replace the file
/system/priv-app/<appname>/<app.apk>
the file to replace that app must be
/data/adb/modules/<modulename>/system/priv-app/<appname>/<app.apk>
Module Name can be any name .
regards
Bernd
I have try this again, seems magisk creates an file connected to the replaced file.
How do i make these files?
I have some 200 apps in system that i like to disable. Would an "fake" apk disable these apps?
Tested calendar app again, it replaces apk but as its in system/app it can not start the "calendar"
Hi,
Do you think that in this module I can switch mbm system file from
vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
kubans2301 said:
Hi,
Do you think that in this module I can switch mbm system file from
vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
Click to expand...
Click to collapse
Hi
The file does not exist on my phone:
Code:
ASUS_I006D:/ # ls /vendor/rfs/msm/mpss/readonly/vendor/
firmware
ASUS_I006D:/ #
So I will create it now:
Code:
ASUS_I006D:/data/adb/modules/fmradio # mkdir -p system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # echo "# Test file" > system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # cat system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
ASUS_I006D:/data/adb/modules/fmradio #
and reboot
Code:
ASUS_I006D:/data/adb/modules/fmradio # reboot
after the reboot the file is thre:
Code:
ASUS_I006D:/data/adb/modules/fmradio # cat /vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # echo "Test 1234" >>./system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # cat /vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
Test 1234
ASUS_I006D:/data/adb/modules/fmradio #
So it should also work to "overwrite" an existing file in that directory.
regards
Bernd
regards
Bernd
NisseGurra said:
I have try this again, seems magisk creates an file connected to the replaced file.
How do i make these files?
I have some 200 apps in system that i like to disable. Would an "fake" apk disable these apps?
Tested calendar app again, it replaces apk but as its in system/app it can not start the "calendar"
Click to expand...
Click to collapse
HI
I missed that post -- what did you do exactly and what did not work?
regards
Bernd
just make a Replace list in customize.sh in magisk zip is fine
Thank you so much. It works perfectly on my Xiaomi mi 11 on miui 14 (android 13). It is easy and very fast way to change files in subfolders in system when it mounted read-only.
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
So this replaces files or just creates some links?
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
veso266 said:
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
So this replaces files or just creates some links?
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
Click to expand...
Click to collapse
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
Click to expand...
Click to collapse
correct (and if booting to save mode does not work anymore you can boot from the recovery image and fix the problem)
So this replaces files or just creates some links
Click to expand...
Click to collapse
/system is mounted read-only and neither you nor Magisk can replace files on a read-only mounted filesystem . Magisk creates bind mounts for the files and directories to replace.
Bind mounts only exist in memory and will be removed by a reboot.
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
Click to expand...
Click to collapse
yes, just deactivate or deinstall the Magisk Module. This can be done either in the Magisk App, in an adb shell, or, if the phone does not boot anymore, from within a booted recovery image
regards
Bernd
bnsmb said:
correct (and if booting to save mode does not work anymore you can boot from the recovery image and fix the problem)
/system is mounted read-only and neither you nor Magisk can replace files on a read-only mounted filesystem . Magisk creates bind mounts for the files and directories to replace.
Bind mounts only exist in memory and will be removed by a reboot.
yes, just deactivate or deinstall the Magisk Module. This can be done either in the Magisk App, in an adb shell, or, if the phone does not boot anymore, from within a booted recovery image
regards
Bernd
Click to expand...
Click to collapse
Thanks, let me first tell you I am using Android 10 (no need to upgrade, and I don't want some obscure api to be removed, which I found out about when I need it)
I was able to make a small module that adds a priv-app, a permissions and a library, and it works great
No the onlything I need to add is a system service
So I need to replace framework.jar (I also have EdXposed installed through Riru and I dont want to break it)
Now I have Samsung Galaxy S10+ (SM-G975F) which doesnt have this service, but korean version of it (SM-G975N) has
So for the first test, I just wanted to transplant framework.jar (using the same android version of course) from SM-G975N to my SM-G975F
this seams easier to do then patch my framework.jar, because I read that system service also needs to be signed, and I don't know how to do that yet
I hope replacing framework.jar file will be enought (since I also read system services are located elsewhere)
The service I need to add is called: FMRadioService.java (and is located under com\android\server\ (if you decompile framework.jar)
Now I need to figure out how to recover, if something goes wrong (because something alawys goes wrong, I would like to be prepared)
So how to enter safe mode and disable my module?
And you said that if this doesnt work I can boot from recovery image (what image? is stock recovery allright? (I don't have TWRP yet (I will install it, once I figure out how), and I explained the reasons in this thread: https://forum.xda-developers.com/t/...-app-after-you-have-root-with-magisk.4564363/ )
Thanks
veso266 said:
Thanks, let me first tell you I am using Android 10 (no need to upgrade, and I don't want some obscure api to be removed, which I found out about when I need it)
I was able to make a small module that adds a priv-app, a permissions and a library, and it works great
No the onlything I need to add is a system service
So I need to replace framework.jar
Now I have Samsung Galaxy S10+ (SM-G975F) which doesnt have this service, but korean version of it (SM-G975N) has
So for the first test, I just wanted to transplant framework.jar (using the same android version of course) from SM-G975N to my SM-G975F
this seams easier to do then patch my framework.jar, because I read that system service also needs to be signed, and I don't know how to do that yet
I hope replacing framework.jar file will be enought (since I also read system services are located elsewhere)
The service I need to add is called: FMRadioService.java (and is located under com\android\server\ (if you decompile framework.jar)
Now I need to figure out how to recover, if something goes wrong (because something alawys goes wrong, I would like to be prepared)
So how to enter safe mode and disable my module?
And you said that if this doesnt work I can boot from recovery image (what image? is stock recovery allright? (I don't have TWRP yet (I will install it, once I figure out how), and I explained the reasons in this thread: https://forum.xda-developers.com/t/...-app-after-you-have-root-with-magisk.4564363/ )
Thanks
Click to expand...
Click to collapse
Hi
I don't have a Samsung phone and as far as I know Samsung uses other tools then other vendors for accessing the phone ...
Anyway, these are the instructions to do this on an ASUS Zenfone 8 (using fastboot and adb):
To enter the safe mode just press the power button; wait until the dialog with restart, power-off, etc occurs. Klick on the restart button in that dialog without releasing the power button of the phone. A new dialog to confirm the Save mode should appear.
To boot the ASUS Zenfone 8 from the recovery image boot the phone into the bootloader
adb reboot bootloader
and then issue on the PC
sudo fastboot boot <recovery_image>
<recovery_image> can either be the TWRP image for the phone or the recovery image for the LineageOS (or any other recovery with enabled access via adb).
adb is enabled by default in the TWRP image; in the LineageOS access via adb must be enabled via a menu entry after booting from the image.
AFAIK the stock recovery from Android does not support access via adb.
The phone can also be booted from the recovery installed on the phone via
adb reboot recovery
if the installed recovery supports access via adb.
And, for the records:
In most cases where the OS is loaded after booting the phone but seems to hang, access via adb will already work.
The Magisk Modules are stored in sub directories the directory /data/adb/modules/ , e.g.:
Bash:
ASUS_I006D:/ # ls -l /data/adb/modules/
total 21
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 MiXplorer
drwxr-xr-x 4 root root 3452 1970-01-29 22:32 PlayStore_for_MicroG
drwxr-xr-x 5 root root 3452 1970-01-29 22:32 addbin
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 bootctl-binary
drwxr-xr-x 5 root root 3452 1970-02-01 14:10 btop++
drwxrwxrwx 3 root root 3452 1970-01-29 22:32 nano-ndk
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 ssh
ASUS_I006D:/ #
To disable a Magisk module after the next reboot create the file
/data/adb/modules/<modulename>/disable
To force Magisk to remove a Magisk module after the next reboot create the file
/data/adb/modules/<modulename>/remove
(see also here: https://forum.xda-developers.com/t/some-hints-for-using-magisk-on-android-phones.4471857/)
Note that Magisk will disable all Magisk modules automatically if the phone is booted into Safe mode.
regards
Bernd

Categories

Resources