Related
Did anyone has tried the dsixda Android Kitchen to make a custom rom for OB ? Is it working ?
http://forum.xda-developers.com/showthread.php?t=633246
or just give me a link to very helpful site about how to make custom rom for OB
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
gabwerkz said:
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
Click to expand...
Click to collapse
many thanks gabwerkz. I had been searching ebook The Complete Idiot's Guides to custom rom, but I think the book has not published yet.
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
N00BY0815 said:
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
Click to expand...
Click to collapse
Your post help me a lot... thanks... I will try what you told me todo...
And If your rom need a bootanimation just PM me right...
I am making a ROM for personal use(I probably won't release it). I want to integrate the LagFree script into it...I don't think it's just a matter of copying the script from one zip to another, since there is the META-INF folder that contains updater-script and such...how do I integrate the script into my ROM?
If you want to modify The updater-script use notepad++ and change whatever you want in it beside phone info of course
As an Android newbie, what bothered me most was coming across terminology beyond my comprehension. Not coming from a Linux background it became hard to keep up with the oh-so-commonly-used words spread all across the development community. Likewise, since I didn’t understand the terms, consequently I was unable to determine is something was of any use to me or not. From what I have seen, this problem extends to many novice and even average users.
One commonly occurring word when playing with custom ROMs and firmware, and even themes is deodexed and odexed. Most users fail to understand what these terms actually imply, and while developers would boast again and again about their themes and ROMs being deodexed, the average user is left clueless as to what is going on.
WHAT IS AN ODEX FILE?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
HOW THIS WORKS
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
ADVANTAGES & DISADVANTAGES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Was this article helpful? If you are confused with some other terms and want us to help explain them, please let us know in the comments.
Screen Shots
Reserved 2.
Help for getting the deodexed files onto Galaxy Tab S 8.4
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
rob.allen78 said:
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Thank you so much! I recently started to explore things like custom ROMs on my SM-T800. I can definitely use a crash course in things like this. Especially since I have not (yet) been able to get Xposed on CM 12.1, pacman-ROM and Phoenix-ROM.
Thanks!
rob.allen78 said:
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
DUHAlgerianSkills said:
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
Click to expand...
Click to collapse
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
ashyx said:
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
Click to expand...
Click to collapse
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Thanks for these explanations
Create a flashable zip for your tab using this
https://play.google.com/store/apps/details?id=zip.me
i donno how it works but seems legit, check it out.
rob.allen78 said:
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Click to expand...
Click to collapse
Hi all.
I am developing a magisk module that modifies system/framework/services.jar and some APKs using Magic Mount for Pokemon GO and other games.
I am using the Magisk Module template where I have added relevant files/folders to system.
The APKs I added work successfully.
But the framework .JAR files such as services.jar that I added are not loaded by Android after reboot.
As in, the .JAR files are replaced successfully, but Android exhibits no change, as if it was not using them and using instead the stock .JAR files.
I tried checking via md5sum in the terminal whether the services.jar file had in fact been swapped for the one embedded in my Magisk Module.
It had been successfully changed.
Maybe the OS wasn't loading these .JAR files at all, so as an experiment, I tried swapping services.jar for an empty file.
The phone still booted, and running md5sum and cat confirmed that system/framework/services.jar was an empty file.
My best guess is that framework files are loaded way before system/app APKs, but I found no information regarding my issue via Google.
I hope that someone here could please offer some quick tip or wisdom. Thank you in advance.
P.S.: I checked the open source Magisk modules I could find, and those that used framework .JAR replacements did not implement anything other than the basic template. An example: SonyFramework (My account can't post links yet).
Did you deodex your ROM, or is it a deodexed ROM?
I think you can only patch framework classes on deodexed ROMs.
Fif_ said:
Did you deodex your ROM, or is it a deodexed ROM?
I think you can only patch framework classes on deodexed ROMs.
Click to expand...
Click to collapse
Thank you for the suggestion.
The ROM I'm working on is Stock and Odexed by default.
The .JAR files I am including in the Module are Deodexed mods of the stock ones.
I tried the following as per your reply:
A) deodexing the whole ROM
B) deodexing the whole /system/framework/*
C) deodexing /system/framework/services.jar and removing odex residue (services.odex)
Unfortunately the device won't boot with A or B :S
With C it boots correctly, but the main issue remains.
---
An interesting behavior I found, is that when substituting (stock odex services.jar) with (modded deodexed services.jar),
the /system/framework/oat/arm/services.odex and other odex residue disappears for services.jar.
This along with the md5sum matching the modded version makes me think that maybe /system/framework gets loaded before Magic Mount gets to modify it.
Digging through open source Magisk modules I am yet to find the missing piece.
Thank you for your help Fif_, and to whoever takes the time to read my thread
Have a look at this thread. https://tapatalk.com/shareLink?url=...3793&share_type=t
[MODULE] Smali Patcher 0.8 and compare methods.
The module to replace patched, de-odexed services.jar definitely works.
shoey63 said:
Have a look at this thread (...)
Click to expand...
Click to collapse
Thanks, "Smali Patcher" was indeed a good clue.
What I found in the "Smali Patcher" project:
-> services.odex was being deleted
But I also needed to modify framework.jar
unfortunately there is no "framework.odex" file.
Googling around seems that framework.jar's odex companion is stored in "/system/framework/arm/boot.oat", but boot.oat contains many more unrelated .jars :S
After fully Deodexing the WHOLE ROM, the Magisk Module works.
I wonder if there is a way to remove framework.odex from boot.oat... that would be very useful.
Thank you guys for your help,
Hello Fellow Users,
Let me start with the fact that I have zero experience of making flash modules (TWRP/Magisk) and am just dabbling around.
Some background, I found a TWRP flash zip file which makes changes to vendor partition of Redmi Note 7 Pro (violet) running MIUI OS (Android Q) - this is a sound mod.
Now, with TWRP file the issue is that if it doesn't work or has any issues, we need to dirty flash ROM all times (or atleast dirty flash the vendor partition). There is no one-click remove option.
Hence I thought why can't the same be done via Magisk systemless and dabbled around a bit. Below is my experience of the last 2 days.
Now, coming to the original TWRP file - it copies/replaces three folders with included files to vendor partition. Path of folders is following
Code:
/vendor/etc
/vendor/lib/soundfx
/vendor/lib64/soundfx
These 3 folders and similarly named files within them already exist by default in the phone prior to flashing.
Now basis the Magisk guides I saw around and wiki from @Zackptg5 I did the following changes to the default template:
1) Edited customize.sh to define folders to be replaced
Code:
REPLACE="
/vendor/etc
/vendor/lib/soundfx
/vendor/lib64/soundfx"
2) Since Magisk will always look for the vendor under the system folder and so I moved the vendor folder under system folder
Basis same, created attached module and flashed and it installed.
But then three queries in my mind:
1) Are the new files actually replaced systemless and in-use? My concerns as don't see any intended change in sound
2) Is there a way to check if new files are being used o available to system?
3) Is this method of putting replace under customize.sh file the way out? While studying some similar modules making changes to vendor partition, I found that they have default (no change) customize.sh but rather make changes to common/post-fs-data.sh etc
So, looking forward to feedback from users experienced in making Magisk module. Thanks in advance for your time and efforts!
PS: attached is the WIP module which I wrote and also got installed in Magisk Manager
TLDR: How to make a Magisk Module using TWRP files to ensure systemless modification of folder/files in the vendor partition
1 - The REPLACE variable is used to replace the directories you specify with empty folders, not with what you want to add systemlessly. You might want to follow the advice written in the customize.sh file and read the documentation (@topjohnwu has everything explained there):
https://topjohnwu.github.io/Magisk/guides.html
Edit: If you do want to first "remove" (systemlessly, of course) everything in those folders, then keep them in the REPLACE variable. I just realised that it's a little unclear if that's what you want to do or not...
2 - That's the correct procedure. If all you want to do is to add or replace some files to your device, the only thing you need is to put those files in the /system directory of your module. That's it. The customize.sh file is used if you want to customise the installation logic of your module (not necessary if you're just adding files to your device) and post-fs-data.sh and service.sh are boot scripts to run code at boot (again not necessary if you're just adding files systemlessly to your device, see the linked docs for details).
Right now your module isn't adding anything, since the directories in the module's system folder are all empty. There's nothing to add. All it does is to replace those directories with empty ones (see #1 above). I'd say that using MMT is way overkill for such a simple module...
One you've installed a module Magisk will mount that modules files over your existing ones at boot. If the file under the real system path matches the one found in the module directory (under /data/adb/modules) everything is working as it should.
@Didgeridoohan Thanks for taking our time to give detailed reply and guidance
Finally was able to successfully install the module (named AudioEngine) and I do see files under /data/adb/modules but I have the following issue:
All these new files are under:
/data/adb/modules/AudioEngine/system/vendor folder and not under
/data/adb/modules/AudioEngine/vendor folder
Is that ok? If yes, why do we see /data/adb/modules/AudioEngine/vendor separately too?
Attached is final module as well as the screenshot of /data/adb/modules/AudioEngine/ as seen in file manager.
The /vendor folder is a symlink to /system/vendor, created by Magisk. That's just how Magisk works...
From your screenshot it looks like things are working as they should.
That uninstall script looks unnecessary though. The module isn't placing or altering anything outside the module folder, so when uninstalled there won't be any leftovers anyway.
im also try to do something similar with some audio libs in vendor partition for poco f2 with miui12 however if i add any libs to go into vendor/lib, for some strange reason, i lose wifi. theres no issues if vendor/lib/soundfx or vendor/lib64 is occupied with files just the lib directory only. the actual files that are going into lib are not replacing anything but are new files