[Submission] OxyMod | OxygenOS Modification Tool
https://github.com/metaspook/OxyMod
@metaspook Since this a script based module, it will take a little longer than usual for me to analyze it. I hope you don't mind it. Meanwhile, instead of Magic Mounting binaries into /system/bin, could you place them in $MODPATH and call them from there.
@metaspook Reviewed it, here are some points.....
- You shouldn't be Magic Mounting companion binaries, please place them in $MODDIR.
- You are using ANSI escape sequences in echo, make sure to use -e flag with echo to avoid errors.
- You are using this syntax, VAR=$(cmd &); does it work correctly ?? The & will cause cmd to be asynchronous which will return immediately, so there should be a race between cmd and VAR assignment, kindly fix that.
- You shouldn't be making PATH this long, most you added should already be there. It will likely reduce performance, fix this, too.
NOTE: If you don't respond within 48 hours, your submission will be rejected without further notice.
The module is device specific so maybe edit your update-binary to make sure the device installing it is a device running OxygenOS, not just a OnePlus Device
@metaspook Reviewed it, here are some points.....
- You shouldn't be Magic Mounting companion binaries, please place them in $MODDIR.
- You are using ANSI escape sequences in echo, make sure to use -e flag with echo to avoid errors.
- You are using this syntax, VAR=$(cmd &); does it work correctly ?? The & will cause cmd to be asynchronous which will return immediately, so there should be a race between cmd and VAR assignment, kindly fix that.
- You shouldn't be making PATH this long, most you added should already be there. It will likely reduce performance, fix this, too.
NOTE: If you don't respond within 48 hours, your submission will be rejected without further notice.
SOLVED:
- Anyway, they don't need anymore so I've removed them.
- Those are already escaped in assigning value of variables, you might have seen that I've already used '-e' flags somewhere if needs.
- You might missed '#' before it, its a comment, not a working line.
- Thanks for informing this, I should reduce the unnecessary paths from PATH before, now reduced it.
"I like to write codes future proof and easy debug that's why needs to keep something that may seem unusual to other but future use for me."
** Thanks for Reviewed and advising me to fix issues, if any further advise please reply. I hope now my module would be approved. Thank You.
The module is device specific so maybe edit your update-binary to make sure the device installing it is a device running OxygenOS, not just a OnePlus Device
💡 Description could be "OnePlus Modification Tool" but easily can be seen in description it's "OxygenOS Modification Tool" means more specific by *OxygenOS not just OnePlus devices. 💡 Even if anyone install this module by mistakenly in wrong device and or ROM it won't break their devices normally, they should just uninstall this module from magisk manager.
🎈🎈 Thanks for your suggestion 👍 I may add some code in next version to detect if OxygenOS actually.
@metaspook cool, just don't fall into the trap of giving users too much credit, you'll have plenty of MIUI users complaining about it not working, trust me, better act now before it hits the repo:smile:
@metaspook
First and second, OK.
-
Then what's this ?? https://github.com/metaspook/OxyMod/blob/master/system/xbin/oxy#L79
-
You still really don't need to modify PATH since all you added must already be in PATH.
-
Thanks to @OldMidnight for pointing out this. Kindly add checks for OxygenOS and abort if other ROMs. No matter how safe the module or how clear the description is, you can't expect all users to be so clever.
Kindly respond within 48 hours or …..
@metaspook
First and second, OK.
- Then what's this ?? https://github.com/metaspook/OxyMod/blob/master/system/xbin/oxy#L79
- You still really need to modify PATH since all you added must already be in PATH.
- Thanks to @OldMidnight for pointing out this. Kindly add checks for OxygenOS and abort if other ROMs. No matter how safe the module or how clear the description is, you can't expect all users to be so clever.
Kindly respond within 48 hours or …..
SOLVED:
- Issue fixed, (even previous line didn't make any issue I tested many times) anyway line is now.
SCOLORVAL="`settings get system screen_color_mode_settings_value`"
- PATH is now (File 'oxy' in '/system/xbin').
export PATH=${PATH}:/system/xbin
- I added 2 new function to device n OxygenOS check so If user's device isn't OnePlus* and not running OxygenOS* when user 'install module' > 'reboot'. it will self-destruct (OxyMod module) before a user even notice means it won't install actually. This part I tested by try to install on another device and yes the module isn't installing on another device means the functions are working!! 😊. So it's done. @OldMidnight if you wonder why not I did this device check thing in 'update-binary' is because I want less touch the files from "magisk-module-template" and it will be easy to implement when a new template comes. And before I putting here device/rom check function I've checked many modules (device even rom specific) but they don't including device/rom check functions 'update-binary' nor in other place. Don't know how they get APPROVED then. 🤔🤔 Anyway mine is done.
💡💡 So, this is my LAST ATTEMPT even after these fixes, this module isn't approved then nothing to do. One last request PLEASE make "Magisk Repo Submissions" guide more detailed specially for coding what type of syntax, commands, variables, PATH, functions allowed what are not so one won't have to get hassle like me. Thank you..
New repo added: oxymod, please accept the collaboration invitation in your email