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

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.

Related

[GUIDE] How to make mymode themes

Well I haven't had much time lately to make themes but I figured i got enough time to explain how. This is how i do it in windows 7.
1) First thing i assume that you already have androidsdk on the root of your C drive. Lets go ahead and add it to your system path. If it's not called androidsdk go ahead and change it to that. Now open up your startmenu, right click computer, click properties, then click advanced system settings, in the advance system settings select environment variables. In the second box down look for path select it and choose edit. copy and paste this
Code:
;C:\androidsdk\tools
in there. Click okay.
2) download the jre and jdk from here and install them. Now you need to add them to your system path so copy paste this
Code:
;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Java\jdk1.6.0_20\bin
to your system path just like you did in the first step.
3) Download apk manager from here. Now run it and when it says clean out all current projects click yes. Now thats ready to go.
4) Download an image editing program. I use gimp. Also if you don't have it 7-zip
your all set to go now so lets start over with the numbers
1) choose a mymode apk and extract it with 7-zip. Open up the res folder select a png that you want to change and change it with the image editor you chose.
2) when you've changed the images you want open up the original apk as an archive with 7zip. Then place the res folder of the modified unzipped apk into the archive and close the archive.
3) Now open up apk manager and place the mymode apk into the place here for signing folder click script batch choose no then type 15.
4) Now put the newly signed apk into your androidsdk/tools folder and close apk manager.
5) open command prompt and type this
Code:
cd\
cd androidsdk/tools
adb install whatever.apk
I'll update this with pics a more thorough guide.
Thanks to everyone that made this easy
reserved for themes to come
Thanks been waiting for a thread like this.
thanks, if i ever get any free-time between jobs and kid and fiancee i will look into this a little more
This is an awesome guide! I messed around with theming mytouch/g1 back when I had one.. so this will be great to make some themes for the slide..
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
ryanolson7 said:
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
The nest theme is in the framework, its not an .apk like the rest, its built into the system. The rest of the mymodes themes are .apks and if you edit those they will override the stock "nest" theme. The only way it will show up different in the theme chooser is if you edit the preview snapshot to be a preview of your theme. If you wanna keep the original theme, the nest theme is it and you should edit a different theme .apk...
-BMFC
Sent from my ROOTED MyTouch3G Slide
Okay so I got the next three days off and I already got two mymode themes pretty much done well their done but I just learned of a way to change the name so they are there own standalone apk instead of using another apk name. I've been using puppypride (which by the way isn't puppies those are full grown dogs) and switching out the pngs and you couldn't have the regular puppypride now you can have both
hope you don't mind but I did a mod of your themes and took out the bubbles since some people always create threads about it
Help with following guide
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
impimms said:
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
Click to expand...
Click to collapse
Actually the guide needs to be fixed a little because i'm guessing your getting compiling errors when using apk manager? But the best way to do this is to open up the mymode theme (using 7zip) as an archive delete meta-inf folder then replace the pngs with ones of your choice as long as they are the same scale. Then resign. and install
totally lost
I've followed these directions to a T and when it comes to using the apk manager i am getting nothing, please help
You guys that are having trouble with apk manager...its honestly not necessary to use Apk Manager for this. Mymodes themes are system .apks and shouldn't be re-signed. What you need to do is forget about apk manager (for now) and drop the UNsigned .apk into the ROM update you are using, and resign the whole ROM using the autosign tool created by jesusfreke. Or just adbpush the .apk. but don't resign the .apk.
Here's the link for the autosign tool to sign ROM updates. its in the THIRD POST and its auto-sign .zip, NOT the signing.zip in the first post. you can put it anywhere you want and you just drop (a copy of) your ROM update in the autosign folder, rename it update.zip, then run the sign.bat to sign. it will create another file, update-signed.zip. you shouldnt need to wipe when flashing the same ROM over itself, but i cant guarantee this is true for all ROMs.
you can also make an update that will only flash the .apk to /system/app, and nothing else will be changed. basically just make a copy of the update for the ROM youre using, then delete everything but the /system directory from the zip. then go into that /system directory and delete everything but the /app directory, then go into it and delete all the .apks and odex file or whatevers in there. ALL OF IT. when you are finished you should have an update with nothing in it but a /system/app directory. you put your modded .apk in there in /system/app, and thats it for that.
then you must edit the update script and remove MOST of its contents so that it only does what you want it to. THIS IS IMPORTANT! Go here to learn how to create an update script. what youll need is way simpler than the examples, youll want it to look basically like this...
Code:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
this update script will copy ANYTHING in the /system directory to /system on your device, regardless of subdirectories. that means anything in /system will go in /system, anything in /system/app will go to /system/app, etc. but since you only have one .apk in there it wont mess with anything but what you put in there. this way, you have a NOWIPE update for...well, whatever you want to put in it.
so you just drop the new shortened update-script in /META-INF/com/google/android/
and then use the autosign tool to resign your new update then flash away! This also takes less time cus its only flashing one file instead of flashing a whole ROM just to replace that one file...
hope this helps...
-BMFC
Sent from my T-Mobile myTouch 3G Slide using XDA App
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Tbrewer80 said:
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Click to expand...
Click to collapse
I'm having issues with this as well... After I do the whole signing apk thing, it installs fine, but when I go to MyModes, the preview is black and when I select it, the MyModes app force closes. I don't get it.

[ATTN][DEV] VillainROM and Partners Presents VillainTheme System 0.4.1 [THEMERS ONLY]

VillainTheme System 0.4.1, aka VRTheme.
http://www.villainrom.co.uk/forum/showthread.php/4971-About-VillainTheme-System
pulser_g2 said:
OK, so I think it's time to explain what this is about. It's born from the idea that came about on IRC, for a way to make a theme once for a ROM, rather than have to adjust it for each incremental update for a given ROM or ROMs.
As a user, you don't need to know much - just flash this zip like a regular zip, and you'll get your theme running. But you should be able to apply themes to any device, ROM, and version of the ROM, without it causing adverse effects. That means less time spent by themers making the original theme, and less time spent modifying it constantly for new versions of ROMs.
As a themer? Well, here is the information:
Inside the zip, in the vrtheme folder, you can create a folder called "system" and "data". The former is required, the latter is not required unless you wanted to theme a data app (strongly not recommended, unless you know the app will be there on every phone)
Inside the system or data folder, create a subfolder "app", and in these, make subfolders named EXACTLY after the APK name. For example, to theme the Browser, you need a folder called "Browser.apk". It must be correctly capitalised.
Within there, place the files you require for your theme, in the relevant locations. So most PNGs will be in res/drawable-hdpi/. You can put in xml files too (those which are not in resources.arsc), if you compile them via apktool, and extract them with a zip tool.
In the vrtheme folder, as well as system and data folder, one called "raw" can exist. Within here, you can place files to be copied verbatim to the ROM (for example, modified JAR files). Note that using this may make the theme device dependent (read WILL make it device dependent)
And that's about it.
Features
Will modify APKs in a ROM, without changing signatures, and can be used on any ROM where the filenames of themed files is the same.
Should not need updated between versions of a ROM
Zipaligns all APKs before installation
Stores a backup of all files being modified in /cache/vrtheme-backup/
Requires no coding abilities or editing of files - just drag and drop
Can copy "raw" files, though at risk of not working on other devices (well, let's face it, it won't work on likely a slightly different ROM, so this feature is not recommended or encouraged)
Credits
D.O.C for the original idea in a discussion on IRC
Stericson for the original idea of metamorph. While totally different, it's a shared goal to separate themes from ROMs
Matt from the Metamorph team, for the zip binary compiled for Android
Seshy
EULA
Click to expand...
Click to collapse
Nothing evil or complicated - just a few little things. You should not charge for access to this code. That includes a zip containing this, or a derivative of it. So please don't sell themes using it. That's not particularly cool. If you want to use it commercially for some reason, get in touch with us.
If you spot a bug or error, and find a fix, please reply in this thread and let us know, or post the changes you made. If you're going to distribute the changed version, it is expected that you share the change made by contacting us, or posting it here.
Finally, don't be a douche - don't rip this off or call it your own, and leave all headers and comments identifying the origin of the code in place. Don't rename this to match your ROM or "team" name - it's not cool, and it's not yours to go and adjust. I chose to make this a readable "plain" script, but can easily obfuscate and encrypt it if you want to be a douche.
Copyright VillainROM (2011). All rights reserved
Click to expand...
Click to collapse
Download VillainTheme 0.4.1 TWRP compatible (Thanks to Dees_Troy)
Download VillainTheme 0.4.1 (thanks D.O.C)
Download VillainTheme 0.4.0 (thanks D.O.C)
Download VillainTheme 0.3.6 experimental
Template for phones: http://www.mediafire.com/?9nxxuagdj4o72k4
Template for Android 3.0+ Tablets: http://www.mediafire.com/?5gyr1g0xgd05t70
Download VillainTheme 0.3.4
Template for phones V0.3.4: http://www.mediafire.com/?ugjaj89i5oxb2nh
Template for Android 3.0+ Tablets V0.3.3: http://www.mediafire.com/?xxucc8xyt2x3k9s
(WP 7 Theme to show where everything goes.)
If any of the templates get updated I will make sure to post the updated version with a changelog.
This was posted with permission from Pulser_g2 as he is on vacation.
If you have any issues you can PM me and I will try to solve them, you can also drop by on the VillainROM.co.uk IRC channel and see if someone can help.
Also will state this again, all credit should go to Pulser, I am just posting this since he was away on vacation.
Changelog
Changelog
0.4.1 TWRP compatibility
Added TWRP Recovery compatible vrtheme (thanks to TWRP developers for compiling the zipalign binary, and again, thanks to androidphone2012 for pointing it out)
0.4.1 compatibility issues
Removed mounting partitions as blocks from updaterscript.
Removed bootlogo flasher from updaterscript
0.4.0 bugfix
Fixed permissions privileges in installtheme.sh
0.3.6 experimental
Different handling of raw files.
0.3.5 experimental
Fixed ASCII art in updater script.
Minor clean up of installtheme.sh
Added preview.png to template.
0.3.4
Changed the way the .zip handles raw files again. Just put them in the raw folder.
0.3.3
Modified installtheme.sh as it was giving possible problems.
0.3.2
Fixed a problem with raw folder copying. Put contents of /raw in /system now on the root of the .zip
Fixed some status 0 errors.
Currently known bugs:
You might need to grab an updater-binary fit for your device (just grab it from any .zip that will flash on your device.
Great work.
Nice work hope to see this development go along way....and support other phones
Sent from my LG-LS670 using Tapatalk
jose-n-liany08 said:
Nice work hope to see this development go along way....and support other phones
Sent from my LG-LS670 using Tapatalk
Click to expand...
Click to collapse
Multidevice support is one of the aims of the project..
jose-n-liany08 said:
Nice work hope to see this development go along way....and support other phones
Sent from my LG-LS670 using Tapatalk
Click to expand...
Click to collapse
the template SHOULD theoretically work on more phones.
I want that on CyanogenMod!
Great work mate
Galaxy S - Tapatalk
Sounds very promising. I'll have to check it out. Thanks
In case someone in the future or near future makes an app to choose the themes.
Maybe an idea to put a theme preview.png somewhere in there.
Kudos, great idea guys.
Thank you eveyone involved in this but one question....
Does this support modifying the resources.arsc as well as xmls?
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");
To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");
Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.
wewoapsiak said:
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");
To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");
Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.
Click to expand...
Click to collapse
As for the credits, not a 100% sure what pulser wanted, but I think you can edit the updater script UI print however you want as long as you give credit where credit is due.
Yes, for anyone searching, that's fine to add the theme name etc to the updater-script ^P
Also I'll add in a feature for /data later today.
wewoapsiak said:
Would you mind if themers edited the lines in updater-script:
ui_print("Preparing to theme...");
ui_print("Thanks for using VillainTheme Flasher");
To something that states the name of the theme, ie:
ui_print("Preparing to install xxx theme...");
ui_print("Thanks for using VillainTheme Flasher");
ui_print("To install xxx theme");
Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.
Click to expand...
Click to collapse
That is cool to adjust to add the xxxx theme It's just to stop people going "thanks for using bob's theming system". You can go add your theme name into the updater-script if you wish (and that is indeed a good idea).
Also, seshy, can we add to the template a "preview.png" as Noonski said, as I have an idea like he said - we could use an app to search the sdcard for /sdcard/themes, look into the preview.png in each, and then auto-flash them
The boot animation - you can do that easily - just add it to /raw/data/local and it will copy
wewoapsiak said:
Also, could the function be added to copy a bootanimation.zip over to /data/local/ or is the plan to keep copying over to the /system/ folder?
Works great on the G2x running CM7 BTW.
Click to expand...
Click to collapse
Updated the template: http://www.mediafire.com/?ugjaj89i5oxb2nh
just make a /data folder in the /raw folder, or if you want to copy over things for /system, just make a /system folder in the /raw folder.
can't actually test it at the moment so you'll have to report back on if it works.
seshmaru said:
Updated the template: http://www.mediafire.com/?ugjaj89i5oxb2nh
just make a /data folder in the /raw folder, or if you want to copy over things for /system, just make a /system folder in the /raw folder.
can't actually test it at the moment so you'll have to report back on if it works.
Click to expand...
Click to collapse
Very great idea this project!
I'm trying to port my theme with your 0.3.4 zip, but it doesn't want to flash ... (error (Status 6) Installation aborted)
Could you take a look to my package? I'm sending you a PM.
Thanks!
edit: oups, it starts well, my script is full of mistakes ...
Working very well for system apps! I've tried with root explorer (vrtheme/data/app/com.speedsoftware.rootexplorer-1.apk), and after flashing, the app has disappeared... I did a retore with titanium and now I have "com.speedsoftware.rootexplorer-1.apk" and "com.speedsoftware.rootexplorer-2.apk"...
ZeuBug said:
Very great idea this project!
I'm trying to port my theme with your 0.3.4 zip, but it doesn't want to flash ... (error (Status 6) Installation aborted)
Could you take a look to my package? I'm sending you a PM.
Thanks!
edit: oups, it starts well, my script is full of mistakes ...
Click to expand...
Click to collapse
Any log? Also so the first apk is still there just not showing up?
seshmaru said:
Any log? Also so the first apk is still there just not showing up?
Click to expand...
Click to collapse
It was very complicated because without Root explorer, I can do anything!
I think I was just not able to launch root explorer and too, it did not appear in my app drawer (GoLauncher Ex). And after restore via Titanium, there was 2 apks. Now, I have made a nand restore for make another test with another data/app, with less "dead end"!
OK, here is my log.
I just tried with a freeware, "pagesjaunes", and same result: the apk is still in data/app/ but not showed in my app drawer. When I try to install it by clicking on it in data/app/, I have "app non installed". Signature pb?
ZeuBug said:
OK, here is my log.
I just tried with a freeware, "pagesjaunes", and same result: the apk is still in data/app/ but not showed in my app drawer. When I try to install it by clicking on it in data/app/, I have "app non installed". Signature pb?
Click to expand...
Click to collapse
Seeing as signature is left intact, it's not a signature problem. Have you rebooted to check if it popped up after a reboot?
Also as stated modifying apps in /data IS discouraged.

[MOD] Multi DPI Camera and Samsung Keyboard

Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
fOmey said:
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
Click to expand...
Click to collapse
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
dagrim1 said:
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
Click to expand...
Click to collapse
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
ksekhar said:
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
Click to expand...
Click to collapse
Yup, it does. (But again, doesn't bother me as much as I don't look at it long because I usually hold my phone to my ear anyway ).
But yeah, I think I know where to fix it... It's the Contacts apk I mentioned above but there is an issue with decompiling/rebuilding it so can't fix it yet. Looking into it.
Did notice when decompiling and recompiling including resources it fails, when keeping resources intact it does work.
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Meh, been looking into it some more and also found this:
http://forum.xda-developers.com/android/software-hacking/how-to-recompile-tw-contacts-phone-t3066350
and
http://www.ez-pg.com/guide-how-to-decompilerecompile-lollipop-seccontacts.html
I tried modifying the manifest as instructed, but the apk still didn't work. Perhaps because signature verfication is not properly disabled on my rom. BUt if it isn't it is also not for the majority of the users in which case siumply supplying the apk wouldn't work anyway.
I also tried resigning the apk, no luck. Copying the original manifast is also not going to work afaik with a changed manifest file...
More info about signature verficiation:
http://forum.xda-developers.com/showthread.php?t=2725233
http://forum.xda-developers.com/showthread.php?t=2342262
Perhaps I will try this soon as well, but for now I think I'll leave it be...
sebdigital said:
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Click to expand...
Click to collapse
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
dagrim1 said:
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
Click to expand...
Click to collapse
I'm on 5.1.1 today and noticed that contacts/dialer is (almost) multi DPI already without having to do anything. And your camera mod works on 5.1.1 too!
Sent from my SM-G920F using XDA Free mobile app
can u change this Camera 480 dpi camera s6 to 420 dpi?
https://mega.nz/#!M4Ui0KoR!TKsPKkMl-XQHyiJ_DNf53eQCGZTrYWhuHaAnhAYXeSM
thanks you very much
can be used for other than s6 for SamsungCamera4. ??
my android device A8 6
dagrim1 said:
Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Click to expand...
Click to collapse
how to fix on parse error, after recompile SamsungCamera4.apk with apktool
with or without edit error on parse...
My device Galaxy-A8

[Request help] Making flashable zip to add carrier mbn files

I have a Pixel 5.
The stock rom does not have South Korean carrier mbn files.
I managed to source the files from the Internet.
I tried to copy paste it into
/system/vendor/rfs/msm/mpss/readonly/vendor/mbn/mcfg_sw/generic/Pixel
but it doesn't work (I can't change folder properties to write).
I tried using the volte_switch.zip from this guide
Module to enable 5G/VoLTE/VoWIFI on Pixel4a 5G/Pixel5
Update (9 Oct 2022): Upload module here. Update (7 Apr 2021): If you are looking for the manual way to add 5G support besides the magisk module way or the module does not work for you. Please refer to #54 for the detailed steps. Thanks again to...
forum.xda-developers.com
and modified the files to add the mbn files of my choice but flashing the zip deletes all folders under generic/Pixel/ except my country's folder.
Removing the "module" from magisk manager and rebooting brings everything back.
Is it possible to make a flashable zip to add the mbn files?
Or does it require repacking the radio.img?
Or does the volte_switch.zip install the mbn files systemlessly?
If you post your Magisk module it might be easier to say why it doesn't work.
But if the Pixel directory is emptied out it sounds like you have a replace file in there causing issues. Just guessing though...
Didgeridoohan said:
If you post your Magisk module it might be easier to say why it doesn't work.
But if the Pixel directory is emptied out it sounds like you have a replace file in there causing issues. Just guessing though...
Click to expand...
Click to collapse
Thanks for the suggestion. I've uploaded the flash zip file as well. When I went through the install script, I did notice the "replace" code in there. How should I change it to?
Ok after much googling, I figured out.
I added in all my original mbn folders as well and then typed in:
REPLACE="
/system/vendor/rfs/msm/mpss/readonly/vendor/mbn/mcfg_sw/
"
into customize.sh
This Replaced the folder with all the original and new mbn files.
Ok, I thought it worked but it's not actually working.
The new mbn files seems to be there but when I force a mbn reload by changing sim cards, it still loads the "original" files as if the new files aren't actually there.
For countries/carriers that's not listed in google's official supported list, the phone uses a 'generic' carrier mbn which is located in the generic/pixel/common/wildcard/pixel_wildcard/mcfg_sw.mbn.
This wildcard mbn is the generic carrier file that has 5G disabled by default. So in theory, all I need to do is replace the wildcard mbn with a different carrier's mbn which has 5G enabled by default. Then create magisk module and flash it to have it replaced.
My module appears to replace the files but the new files don't actually get loaded. When I change sim cards to force a reloading of mbn file, It still loads the old files.
What can I do to fix this? Any help is appreciated. Thanks.
Attached is my module.
Calling @Didgeridoohan good sir, if you could kindly provide me with knowledge about the post above, if possible. Thanks.
swangjang said:
Calling @Didgeridoohan good sir, if you could kindly provide me with knowledge about the post above, if possible. Thanks.
Click to expand...
Click to collapse
Busy life...
In theory you shouldn't at all need to do that replace function and add back all the stock files with the module. Magisk should take care of mounting or replacing only the files you need, so anything else is just redundant... But if it works, sure.
But it seems like it doesn't.
If you can verify with a file explorer that the files have been replaced with the ones from your module and the values still are taken from the original files that very likely means that there's more to it than just replacing those files.
You could provide the module install log and the Magisk log (Canary release so that it's actually useful) to see if there's anything wrong there.

[REQUEST] Module to replace a file in vendor/etc

I have an LG V60 phone and I would like to put the phone in "high impedance mode" all the the time for more power to the earphones even if they are less than 50 ohm impedance.
In LG V40/50, it was very simple by rooting the phone and making some modifications in the one of the files that was in the "vendor/etc" directory. The problem with LG V60 is it does not allow any write access to the vendor folder at all.
So the only feasible option that I can think of is to create a Magisk module that replaces the original file with the modified one. My biggest disadvantage is not knowing anything about writing codes including Magisk module ones. So I was wondering if anyone could create a Magisk module that would replace the original file through Magisk?
ADDTIONAL INOFRMATION:
I am running Magisk 25 on a fully rooted LG V60.
The file that needs to be changed is mixer_paths.xml and it resides in the "vendor/etc" folder. I have created the modified file.
So if someone is able to develop a module to accomplish this, I will place the modified file in the "system/vendor/etc" folder of the Magisk module, as I understand it.
Many thanks for your support!
You can use this template system in future as its super easy
The template itself is here
GitHub - Zackptg5/MMT-Extended: Magisk Module Template Extended
Magisk Module Template Extended. Contribute to Zackptg5/MMT-Extended development by creating an account on GitHub.
github.com
click the Code button, then download zip
then extract the zip into a folder and rename the folder "MMT-Extended-master" to the something more meaningful, like the name of your module
Read the wiki and docs here to go step by step to create your first module:
Home
Magisk Module Template Extended. Contribute to Zackptg5/MMT-Extended development by creating an account on GitHub.
github.com
Notably the heading:
How do I make a MMT Extended mod?​
The steps for a simple file addition/replacement module, which are simple, should be steps 1-4, then 8. Then zip up the modules (as a zip) and test.
For you, if you read along (in Step 3) you will need to create a folder vendor, under the existing system one, and then a further etc folder under vendor, and put the necessary file (mixer_paths.xml in there.
If you try and fail, post back and someone will assist. But we prefer people to at least read the documentation and try first, ideally...this is the way the great didgeridoohan mentored myself and many others, he was not big on spoonfeeding
Imagine the satisfaction you might get finding out youre capable of such feats...i promise its not rocket surgery
Feel free to PM even, if you get stuck and think you have a silly question - of course knowing me, and i do, you'll probably get an even sillier, and off topic answer as well...
hint: you can knock out this basic module in far far less time than it took me to write all this
Thank you!
So my changes look like this:
1. Put the modified file in the system/vendor/etc folder of the Magisk module.
2. Made the needed changes to the customize.sh as attached.
Royaltiger said:
Thank you!
So my changes look like this:
1. Put the modified file in the system/vendor/etc folder of the Magisk module.
2. Made the needed changes to the customize.sh as attached.
Click to expand...
Click to collapse
Yes, though you'll need to uncomment (remove the leading #) from the set_perm lines to make them active, also you only really need the 2nd one
Royaltiger said:
Thank you
73sydney said:
Yes, though you'll need to uncomment (remove the leading #) from the set_perm lines to make them active, also you only really need the 2nd one
Click to expand...
Click to collapse
Click to expand...
Click to collapse
So I made the module with the suggested changes in customize.sh and put the modified mixer_path.xml file in the system/vendor/etc folder of the module. Module installs fine with Magisk but when it reboots, the device hangs on the initial LG screen and does not go anywhere from there.
I am attaching the customize.sh snapshot. Also, attached is the module file.
See here under "Disabling/uninstalling modules manually" if youre not able to boot
Module Issues:Magisk and MagiskHide Installation and Troubleshooting guide
www.didgeridoohan.com
I am assuming that it is not possible to accomplish what I wanted to achieve.
Royaltiger said:
I am assuming that it is not possible to accomplish what I wanted to achieve.
Click to expand...
Click to collapse
mixer_paths files have been replaced for years, long before magisk even...i did it back as far as the Galaxy S2 from memory, so im not sure why this didnt work for you, was the mxer_paths file specifically for your device? i have no clear idea why it hasnt worked for you
this thread has a guide to making /system RW, so you could manually copy the file and overwrite it, but id really consider how much you want to replace mixer_paths before i set out to do that
V60 Bootloader Unlock and Magisk Root
Earlier today I was alerted to https://www.cnblogs.com/yanhua-tj/p/15525593.html which has the actual firehose and steps to unlock! However it seems to be in Simplified Chinese so I'll translate it here for you. The firehose is attached below...
forum.xda-developers.com
73sydney said:
mixer_paths files have been replaced for years, long before magisk even...i did it back as far as the Galaxy S2 from memory, so im not sure why this didnt work for you, was the mxer_paths file specifically for your device? i have no clear idea why it hasnt worked for you
this thread has a guide to making /system RW, so you could manually copy the file and overwrite it, but id really consider how much you want to replace mixer_paths before i set out to do that
V60 Bootloader Unlock and Magisk Root
Earlier today I was alerted to https://www.cnblogs.com/yanhua-tj/p/15525593.html which has the actual firehose and steps to unlock! However it seems to be in Simplified Chinese so I'll translate it here for you. The firehose is attached below...
forum.xda-developers.com
Click to expand...
Click to collapse
Actually I had no problem in editing the mixer_tavil.xml file in LG V40/50. But when it comes to LG V60, the file is read-only. There is no way to edit it due to dynamic partition. Hence, I was seeking the only option available i.e., via Magisk module.
Royaltiger said:
Actually I had no problem in editing the mixer_tavil.xml file in LG V40/50. But when it comes to LG V60, the file is read-only. There is no way to edit it due to dynamic partition. Hence, I was seeking the only option available i.e., via Magisk module.
Click to expand...
Click to collapse
So, I encountered the same problem and found what you did wrong. I was able to write my own Magisk module and it works wonderfully. It took so much time to understand how to do it because there is no proper tutorial.
If you are still active and trying to know how to do it the right way, here comes the explanation:
The Replace = " /system/vendor/etc/ " must not be written as it completely wipes the actual folder from your phone. This is why you were not able to turn the phone on. It should be like this:
Replace = " " (That part must be blank)
The rest of the code is good. If you try it like this now, you will see it will work, just like mine did.
Cheers
Does not work. May I see your module? Please upload it here as attachment.
I even put my edited file under /data/adb/modules/<my directory>/system/vendor/etc. It shows up in Magisk as a module and the file loads (as it is not visible in file explorer) but there is no change in volume. So the thing is not working.

Categories

Resources