Magisk Module development help

Search This thread

eris667

Member
Aug 9, 2017
32
0
This is my first attempt at a Magisk Module (to fix a issue with a few poorly coded legacy apps and not trip safety net) inject or replace a font and set proper permission on the file

My super simple experiment is here (based on the template from Git)

https://drive.google.com/file/d/1PHdRjzefpSMg51KUOffo4FtqlfoxshOM

Magisk gives me a error when I try to install :confused:
I probably did something wrong, hopefully someone can point me in the correct direction (error one, not a valid Magisk Module, error two Magisk is not activated)

I appreciate any insight - please move this post to the correct location if needed
 
Last edited:

eris667

Member
Aug 9, 2017
32
0
I started on Git, but I may have inadvertently been in the wrong place / pulled the wrong file -- I will go back through that link you provided tomorrow and see if something jumps out at me
 

Didgeridoohan

Retired Senior Moderator
May 31, 2012
12,300
1
14,850
Gone
Google Nexus 4
Nexus 6
Yeah, you have a whole host of mixed issues there...

First, all the module files have to be in the root of the module zip, not in the magisk-module-DroidSansFallback you have them in now (this is the "not a Magisk module").

Second, your update-binary is a webpage... That ain't gonna work very well. When you download the module_installer.sh script, save it from the raw view (there's a button above the code when you open the file on GitHub).

Last (but this is only cosmetical really, since it won't affect anything) you found some really old module to base your work on, because the config.sh file hasn't been used for ages, and the readme file is ancient.

Fix the above and follow the instructions in the docs and you should be good to go.
 
Last edited:

Didgeridoohan

Retired Senior Moderator
May 31, 2012
12,300
1
14,850
Gone
Google Nexus 4
Nexus 6
There is no longer an official template provided.

The current module installation setup is so simple that it really doesn't need it. Put whatever files you want to mount in /system, whatever boot script or prop files (as described in the docs) you want to run in the root of the zip, create the module.prop (again, described in the docs) so that you'll have some info about the module in the Manager, zip it up and flash it.

If you want to customise things more you do that with the customize.sh script (described in the docs).

If you really need a template there's always @Zackptg5's MMT-Ext...
 
  • Like
Reactions: Zackptg5

eris667

Member
Aug 9, 2017
32
0
So I downloaded a current module and looked through the files / structure and then the docs -- and now I have this
https://drive.google.com/file/d/1z4tlH6wGDpq0UnkxPF0f6i-DohcKnux-/view?usp=sharing

When I go to /system/fonts I now see DroidSansFallback.ttf (it was not present before installing the module)
and no error messages!!

I think I need to read a little more, on Android 5-8 adding this font into /system/fonts (manually) fixed my problem - now I am on Android 9 (OnePlus 6t TMO variant) and I do not see any changes from adding the file (fonts.xml issue?)

I really wanted to try this as a learning experience, and because the old method trips CTSProfile to false
I appreciate your patience - at least now I have a better starting point
 

eris667

Member
Aug 9, 2017
32
0
updated (linked file updated as well) no change.. .. ..
I did double check that the module places the file in the correct location, and when the module is disabled the file is removed
 

eris667

Member
Aug 9, 2017
32
0
I found this on a random Google search (ASE) from a unrelated topic (Chinese character support)
On Android 9 it's Noto CJK, e. g. "Noto Sans CJK JP" font family (located in /system/fonts/NotoSansCJK-Regular.ttc). There is no DroidSansFallback.ttf anymore.

Could that explain why adding the file did not work?
 

eris667

Member
Aug 9, 2017
32
0
I will take a stab at injecting a modified fonts.xml and see if that changes anything - thanks!
 

eris667

Member
Aug 9, 2017
32
0
I experimented with adding a line into the fallback section of the fonts.xml (to reference the new font), and replacing the fonts.xml with a older version from Android 8 --- neither had any effect that I could discern
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    There is no longer an official template provided.

    The current module installation setup is so simple that it really doesn't need it. Put whatever files you want to mount in /system, whatever boot script or prop files (as described in the docs) you want to run in the root of the zip, create the module.prop (again, described in the docs) so that you'll have some info about the module in the Manager, zip it up and flash it.

    If you want to customise things more you do that with the customize.sh script (described in the docs).

    If you really need a template there's always @Zackptg5's MMT-Ext...