Magisk Module Help - Magisk

I'm trying to make a simple Magisk Module to replace a single file in /statem but I can't make the module valid. When I download the template and zip it up MagiskManger won't recognize it. The root of the zip file has the various files, the files are not in there own directory.
The uploaded zip is the packed template repo.

What program are you using to make the zip? Try a different one... On Windows I've used 7zip. Usually, when making simple modules, I do it directly on my phone and then I use FX File Explorer.

Didgeridoohan said:
What program are you using to make the zip? Try a different one... On Windows I've used 7zip. Usually, when making simple modules, I do it directly on my phone and then I use FX File Explorer.
Click to expand...
Click to collapse
I used Astro, I would assume they would both use the same code for that. Isn't creating a zip a STD library feature?

I used that and it worked, just need to figure out why my boot animation didn't seem to change.

gudenau said:
I used that and it worked, just need to figure out why my boot animation didn't seem to change.
Click to expand...
Click to collapse
https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#simple-mount-details

Didgeridoohan said:
https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#simple-mount-details
Click to expand...
Click to collapse
I don't see that path...

gudenau said:
I don't see that path...
Click to expand...
Click to collapse
Create it...

Didgeridoohan said:
Create it...
Click to expand...
Click to collapse
Didn't change anything.

gudenau said:
Didn't change anything.
Click to expand...
Click to collapse
If the info provided in the link above doesn't work and you want help, you're going to have to provide a bit more details than that...

Related

Kernel Manager

TeamWIN has now made their Kernel Manager app work with the XOOM. What it allows you to do, is flash kernels inside android. No more booting into fastboot, or even running update.zips.
https://market.android.com/developer?pub=Team+Win
Just downloaded and just what we need, it is awesome, will get the paid version as promised in the irc LOL
bwcorvus said:
TeamWIN has now made their Kernel Manager app work with the XOOM. What it allows you to do, is flash kernels inside android. No more booting into fastboot, or even running update.zips.
https://market.android.com/developer?pub=Team+Win
Click to expand...
Click to collapse
It corrupted my kernel just fyi to the devs
sfld said:
It corrupted my kernel just fyi to the devs
Click to expand...
Click to collapse
it didn't corrupt your kernel. Just manually push the BCM4329.ko file through adb.
or just to be safe just push everything again manually. That way you know everything was done right.
sfld said:
It corrupted my kernel just fyi to the devs
Click to expand...
Click to collapse
if there are issues, please join us in #kernel-manager on irc.freenode.net. we encourage all devs to participate in troubleshooting any outstanding issues on all devices.
this broke my wifi. what do i do? i have no idea how to do the steps above with adb
grasshoxda said:
this broke my wifi. what do i do? i have no idea how to do the steps above with adb
Click to expand...
Click to collapse
Download and run the one click root file, it will repatch with the kernel that comes in it or you can place the files from the latest kernel release into it. I think thats the best option for you if you are not comfortable using adb.
Get the one click root here.
http://forum.xda-developers.com/showthread.php?t=1011196
i reran rootmyxoom and have wifi back. how to i use this then without losing wifi?
slatejones said:
Download and run the one click root file, it will repatch with the kernel that comes in it or you can place the files from the latest kernel release into it. I think thats the best option for you if you are not comfortable using adb.
Get the one click root here.
http://forum.xda-developers.com/showthread.php?t=1011196
Click to expand...
Click to collapse
lol just finished doing exactly that thanks tho
how do i go about placing the new files into it?
grasshoxda said:
lol just finished doing exactly that thanks tho
Click to expand...
Click to collapse
It could be an issue with the download. Find the file with astro or root explorer and delete it then redownload, or download to your computer and place it on the xoom and have the app install from the sd card instead of downloading it.
If it still doesnt work for you, just reflash the one click root and give it a day or two for the devs to update the app or something.
Hope everything works out for you
grasshoxda said:
how do i go about placing the new files into it?
Click to expand...
Click to collapse
Well.... Uhhh.... Thats not something I tried myself. But I think it would be pretty easy... When you extract the root my xoom folder to your computer, open it up and find the kernel files... then replace them with the updated files from the 1.3.2 zip file. Just unzip the 1.3.2 folder and copy and paste.
Hope this helps
ive opend the rootmyxoom folder and i dont know where to put the contents from the zip
grasshoxda said:
ive opend the rootmyxoom folder and i dont know where to put the contents from the zip
Click to expand...
Click to collapse
I dont have a current version of the one click root, but I would think to look inside either the wifi root folder or the tiamat folder (inside the rootmyxoom folder). Whichever one has the same files from the 1.3.2 folder, copy and paste them over to that folder inside the rootmyxoom folder and you should be golden.
ive looked thru them all , i dont see any files in any of those folders that look like the ones that come in the zip
open up the tiamit files in the root my xoom folder and replace with whatever kernel you want to use. I did this three times with tiamit 1.3.0, and .1 and .2. You can try to just replace the entire file or go in and replace the indiviual files from within the tiamit kernel folder. Be careful though if you replace the wrong files or mix them up could be bad results, usually just no wifi or bootloops.
Oh by the way i always did all this on a windows based computer that way the files look the same or similar
grasshoxda said:
ive looked thru them all , i dont see any files in any of those folders that look like the ones that come in the zip
Click to expand...
Click to collapse
This works great, now if only there can be a similar app that installs themes
Wow, Kernel manager just solved my problem of flashing the new tiamat 1.4.0 kernel.
Was having issues in CWM, instead of pulling my hair out in testing it out via trial by error. Had a (status 0) error while flashing kernel in CWM.
It was resolved by using Kernel Manager!!!
Can't access link to download apk? Anyone have this problem?
Edit: got it downloaded
Sent from my Xoom using Tapatalk
worked great with 1.3 but as soon as i tried 1.4 it broke my wifi, gonna wait till next update and try again, dont like the 1click root method

[Q] Editing cwm zip file

is it possible to edit cwm zip file so i can put my apps under system/app and may be edit build prop so i can change language, local, lcd density ...etc
niyazidk said:
is it possible to edit cwm zip file so i can put my apps under system/app and may be edit build prop so i can change language, local, lcd density ...etc
Click to expand...
Click to collapse
Yes it is if you know to make a cwm zip .or if you dont,download a cwm flashable mod and edit it for your work
Download 7 zip you can use it to edit files without unzipping. Use NotePad ++ to edit build.prop and pretty much anything else for that matter
Swyped From My Galaxy Note
niyazidk said:
is it possible to edit cwm zip file so i can put my apps under system/app and may be edit build prop so i can change language, local, lcd density ...etc
Click to expand...
Click to collapse
You can use 7-Zip to add or remove file from the cwm zip. You can also edit the script (text) file in it.
tknguyencsu said:
You can use 7-Zip to add or remove file from the cwm zip. You can also edit the script (text) file in it.
Click to expand...
Click to collapse
Thanks for help. I can add apps and they are installed but they cant run...
niyazidk said:
Thanks for help. I can add apps and they are installed but they cant run...
Click to expand...
Click to collapse
Did you set them correct permission??Upload your zip if you can.I'll check it and see if I can help
niyazidk said:
Thanks for help. I can add apps and they are installed but they cant run...
Click to expand...
Click to collapse
Remember some of the apps have the associate library files. You need to load these files into the system/lib folder before the apps can run.
Auto install
vijai2011 said:
Did you set them correct permission??Upload your zip if you can.I'll check it and see if I can help
Click to expand...
Click to collapse
tknguyencsu said:
Remember some of the apps have the associate library files. You need to load these files into the system/lib folder before the apps can run.
Click to expand...
Click to collapse
Actually, i have to read about creating a cwm zip file. After that, i can maybe be able to make a zip to install whatever i have.
Thanks for your help...
(It was a bit easer in winmo times. You could just make a new folder with your cab files and after rom installation they could be installed)

can't install noticounter for some reason??

Not sure what I'm doing wrong here, maybe somebody can tell me if I'm missing a step??
I am trying to install the noticounter widget and can't get it to take for some reason. I have flashed the zip file in TWRP a couple times now (it claimed it was successful, but it doesn't seem to have installed anything.)
Is there some other way of installing this that I am unaware of??
jmorton10 said:
Not sure what I'm doing wrong here, maybe somebody can tell me if I'm missing a step??
I am trying to install the noticounter widget and can't get it to take for some reason. I have flashed the zip file in TWRP a couple times now (it claimed it was successful, but it doesn't seem to have installed anything.)
Is there some other way of installing this that I am unaware of??
Click to expand...
Click to collapse
Just install it like any other app, no need to use TWRP.
Either install via ADB: adb install /path/to/app.apk
Or via Wondershare.
Alternate, download APK to your phone, use native BT file transfer and then install file.
st-tps said:
Alternate, download APK to your phone, use native BT file transfer and then install file.
Click to expand...
Click to collapse
Where do I DL the apk file??
All I get are zip files with no APK file to extract??
jmorton10 said:
Where do I DL the apk file??
All I get are zip files with no APK file to extract??
Click to expand...
Click to collapse
I´we never posted any zips, here´s the correct download:
http://lundsoftwares.se/NotiCounter/NotiCounterWidget_v1.0.apk
If it looks like a zip is probably because your unpacking program makes it look like a zip.
jmorton10 said:
Where do I DL the apk file??
All I get are zip files with no APK file to extract??
Click to expand...
Click to collapse
I find sometimes when downloading apk file it downloads as a zip. Just rename from .zip to .apk
Then transfer to watch and run it on the watch
Brendo said:
I find sometimes when downloading apk file it downloads as a zip. Just rename from .zip to .apk
Then transfer to watch and run it on the watch
Click to expand...
Click to collapse
Yea, that's what must have happened.
Renaming it as a zip file worked fine however, thanks for the info.

[guide]easy apk modding (linux)

Most of the guides ive read on XDA say you have to decompile and recompile APKS just to make a couple of modifications to the images. Well I dont believe this to be true. I have tested my method on ubuntu 14.10 and with my nexus 5.
This guide is specifically for modifying images inside of the apks, not the code, or xml itself.
- ADB pull the APK file you want to modify (i chose SystemUI.apk)
- Double click it in File Manager on ubuntu, this should open it up in the archive manager. If not, manually open it up in archive manager
- Click on the "Add Files" button and select which files you want to replace. It will automatically overwrite the current ones.
- Make sure that you are keeping the proper directory structure and are putting the images in the proper place with proper names.
- Copy the new APK file back to your device on /sdcard/file.apk
Then, to get the APK file back on your system without causing problems, I rebooted into TWRP, mounted system and went into the file manager and copy/pasted the APK in the appropriate folder. When you get back into android, chmod 644 new-file.apk. I would not suggest trying to copy the modified APK file into your system while android is running live. Thats why I did it in TWRP. It could cause system unstability, crashing, etc... Im sure that I am not the first person to realize this could be done, but I did discover this on my own because I like to try things. PLEASE, make a backup in case something doesnt work correctly after your mod. Good luck!
bynarie said:
Most of the guides ive read on XDA say you have to decompile and recompile APKS just to make a couple of modifications to the images.
Click to expand...
Click to collapse
Mine doesn't.
XperienceD said:
Mine doesn't.
Click to expand...
Click to collapse
Um, not to be rude but the guide on your signature shows using apktool to decompile and recompile. Soo....? Unless its another guide. And Im not saying ALL guides are, but some, and thats ok. Could you link me to your guide please? I would love to take a look at it. Thanks
EDIT - woops im sorry i didnt really read it... i do see where it says drag and drop the images... good deal. sorry
bynarie said:
Um, not to be rude but the guide on your signature shows using apktool to decompile and recompile. Soo....?
Click to expand...
Click to collapse
Edit: No need for my original reply as you found it.
XperienceD said:
Edit: No need for my original reply as you found it.
Click to expand...
Click to collapse
Yes, and your guide is very good. Thank you for that.

[MOD][TEMPLATE] Magisk Module Template with EvilTheme Patcher

Hello everyone.
This is a little mod to the Magisk Module Template that allows you to patch APK files on-the-fly and have them created as a Magisk Module.
For example, you could have a modified camera module for your ROM, where this patcher would replace the classes.dex file with mods, then pack that as a Magisk Module, using the original file found in the /system (ROM)
For some of the devs that have been around for a while, you would be aware of the old VRTheme modding system, which would allow you to patch files on-the-fly. EvilTheme is basically a newer version of that, so combined with Magisk can be very useful
Here's what this module CAN do:
Replace resources.arsc, classes.dex, AndroidManifest.xml, and META-INF folder
Replace compiled res folders / files
Here's what this module CAN'T do:
Replace files in res/values or smali folders
How to use EVilTheme
(Example using /system/priv-app/SecSettings2.apk)
In the eviltheme folder, go to system and make a folder called priv-app. Inside it, make another folder called SecSettings2.apk
Now make folders as necessary, according to the location of the files you want to theme. For example, battery_icon_50.png is located in res/drawable-hdpi, so make a folder named res inside SecSettings2.apk.
Inside it, create a folder named drawable-hdpi, then paste your new battery_icon_50.png inside.
Repeat step 2 until you've placed your theme files in their appropriate locations.
When you're done, go back to the root folder of the theme (the one that contains eviltheme, engine, etc.) and put all the objects in a ZIP file.
You should use Deflate compression with compression level on Normal, but if your theme is huge, you can safely try compressing using Deflate and the level set to Ultra or whatever high level is available.
Test your mod.
For information regarding the Magisk Module subbmision etc, please read the information HERE
Link to Github Repository: HERE
Enjoy
Nice! Sounds interesting!
I've been using vrtheme for years and even contacted spanna aabout adapting the script to achieve modding of live system files this eliminating the need for recovery zips and even Aroma!
So I have a question about the use and locations of the asset files.
Would it be possible to change, at least the location from which the files get pulled from and placed into the execute folders?
So basically could it be set to pull the image/resource, whatever file from either a data folder or my preference, sd storage?
I've used an asset folder built into my system for similar commands, but with enough options and large files the system partition can get extremely crowded.
Does my question make sense?
Basically i would like to eliminate a big section of my packed 2gb Aroma zip. About 700mb is all vrtheme injected compiled files.
Either way I will definitely be looking into this!
Thanks
stangdriver44 said:
Nice! Sounds interesting!
I've been using vrtheme for years and even contacted spanna aabout adapting the script to achieve modding of live system files this eliminating the need for recovery zips and even Aroma!
So I have a question about the use and locations of the asset files.
Would it be possible to change, at least the location from which the files get pulled from and placed into the execute folders?
So basically could it be set to pull the image/resource, whatever file from either a data folder or my preference, sd storage?
I've used an asset folder built into my system for similar commands, but with enough options and large files the system partition can get extremely crowded.
Does my question make sense?
Basically i would like to eliminate a big section of my packed 2gb Aroma zip. About 700mb is all vrtheme injected compiled files.
Either way I will definitely be looking into this!
Thanks
Click to expand...
Click to collapse
You could, but you would have to look at update-binary and installtheme.sh, then modify it for your needs. So instead of copying the modded files from the flashable zip, you would just have to remove the unzip function and change the path of where they are unzipped to to the location of where the files are on your data partition.
Give it a try
so with this I can technically change the rotation of an app without ever messing with the apk? I've tried editing the AndroidManifest.xml, but after editing I've never been successful putting it back into the apk
dimm0k said:
so with this I can technically change the rotation of an app without ever messing with the apk? I've tried editing the AndroidManifest.xml, but after editing I've never been successful putting it back into the apk
Click to expand...
Click to collapse
If you plan to change androidmanifest.xml you will have to include the newly created META-INF folder for it too.
Could this be used to convert substratum themes to work systemlessly with magisk?
Sent from my Pixel using XDA Labs
qwer777 said:
Could this be used to convert substratum themes to work systemlessly with magisk?
Sent from my Pixel using XDA Labs
Click to expand...
Click to collapse
If you're talking about pre-packaged APK theme files, no it probably won't work, as they still need to be installed.
This is more for files that are already installed that require patching.
Nice work
Got one question - is it possible to modify classes.dex if .apk file is not in system folder? I mean for example, if system app gets updated, it creates new folder in data/app/ with the name of the package and with either -1, -2 or whetever number at the end (ex. data/app/com.google.android.youtube-2).
Do I need to just integrate update into system and then modify it? Or just create new folder in eviltheme one with data/... instead of system/...?
Thanks
I tried to modify system/framework/framework-res.apk/res/drawable-xxhdpi-v4/default_wallpaper.jpg, but unfortunately it did not work. Neither on InFocus M808/mod stock 6.0(mt6753) nor on SamsungS5Neo/mod stock 6.0.1(exynos7580)
Both tried with official Magisk 12.0 and newest beta.
nevermind i didn't read all the way
drei.liter.milch said:
I tried to modify system/framework/framework-res.apk/res/drawable-xxhdpi-v4/default_wallpaper.jpg, but unfortunately it did not work. Neither on InFocus M808/mod stock 6.0(mt6753) nor on SamsungS5Neo/mod stock 6.0.1(exynos7580)
Both tried with official Magisk 12.0 and newest beta.
Click to expand...
Click to collapse
Started another try to replace some icons. did not work. am I missing something or is this template just faulty?
anybody who got this working?
drei.liter.milch said:
Started another try to replace some icons. did not work. am I missing something or is this template just crap?
anybody who got this working?
Click to expand...
Click to collapse
That was a bit rude.
Edit: better to give some details on what you've actually done, maybe even upload your files. Easier to find any faults on your side or possible bugs that way.
I want to add the clock onto my lockscreen statusbar. Would this help me achieve that?
Didgeridoohan said:
That was a bit rude.
Edit: better to give some details on what you've actually done, maybe even upload your files. Easier to find any faults on your side or possible bugs that way.
Click to expand...
Click to collapse
yes ok, the word "crap" maybe was a little bit over the top. i'm sorry for that. I just would like to know, if anybody can report this module/template as working. If so, I would go on looking for the error on my side.
I've actually followed exactly the guide given in OP. (It seems not that tricky to me)
-placed folder tree system/framework/framework-res.apk/res/drawable-xxhdpi-v4/ in the eviltheme-folder and put my default_wallpaper.jpg file in drawable-xxhdpi-v4 folder
-edited module.prop und config.sh
-zipped the whole template folder
-installed via magisk manager
-rebooted
tried with to different phones, beta and official magisk (see my first post)
I'll reproduce my logs and attach them later.
anyway thanks for the hint
drei.liter.milch said:
yes ok, the word "crap" maybe was a little bit over the top. i'm sorry for that. I just would like to know, if anybody can report this module/template as working. If so, I would go on looking for the error on my side.
I've actually followed exactly the guide given in OP. (It seems not that tricky to me)
-placed folder tree system/framework/framework-res.apk/res/drawable-xxhdpi-v4/ in the eviltheme-folder and put my default_wallpaper.jpg file in drawable-xxhdpi-v4 folder
-edited module.prop und config.sh
-zipped the whole template folder
-installed via magisk manager
-rebooted
tried with to different phones, beta and official magisk (see my first post)
I'll reproduce my logs and attach them later.
anyway thanks for the hint
Click to expand...
Click to collapse
Flash Via Recovery, it may work. didnt work for me when i installed from magisk manager.
btw i have a question, is there any way to remove a file from the apk?
shekhawat2 said:
Flash Via Recovery, it may work. didnt work for me when i installed from magisk manager.
btw i have a question, is there any way to remove a file from the apk?
Click to expand...
Click to collapse
thx, i'll try that. which magisk-version do you use? and i guess maybe you can remove a file by placing a dummy.
drei.liter.milch said:
thx, i'll try that. which magisk-version do you use? and i guess maybe you can remove a file by placing a dummy.
Click to expand...
Click to collapse
No brother, I want to delete the file, not to replace it with dummy file. Replacing with dummy file will give system ui FCs.
I saw something delete.list in the installtheme.sh, but I don't know how to use it. If anyone can help, pls help me.
BTW I am using Magisk v12.
shekhawat2 said:
No brother, I want to delete the file, not to replace it with dummy file. Replacing with dummy file will give system ui FCs.
I saw something delete.list in the installtheme.sh, but I don't know how to use it. If anyone can help, pls help me.
BTW I am using Magisk v12.
Click to expand...
Click to collapse
Ok, I see. Perhaps you find sth about it in the vrtheme-topic. Btw. flashing in recovery doesn't work either. I'm not messing around with this anymore and continue using flipster :good:
Where can we download? I want to change Viber's background to pure black so I will change the AndroidManifest. Will this theoretically work?
I was wondering what, if anything, I would need to change for this to work on a pixel. On Pixel's, the install path is system/system. I couldn't tell whether or not this could detect the correct path on its own.
Edit: Never mind. I got it to work.

Categories

Resources