can I extract the contents of a mod.zip and take the .jar or .apk and copy and paste them into the framework dir of the working working folder? i tried copying a custom .apk file into the framework dir of the working folder and it went into a boot loop.
alucke
There could be several reasons for a boot loop. If I understand you correctly, you are working on a ROM using dsixda's kitchen, and you want to add an apk before flashing? Could you provide more information like what apk and what folder you are trying to add it to? I suspect it might have something to do with the signature of the apk. I'm not 100% sure but I believe that the system apks all need the same signature when flashing a new ROM.
alucke said:
can I extract the contents of a mod.zip and take the .jar or .apk and copy and paste them into the framework dir of the working working folder? i tried copying a custom .apk file into the framework dir of the working folder and it went into a boot loop.
alucke
Click to expand...
Click to collapse
If you are changing things within the framework you also need to edit the .xml files within the framework. The best way to learn is to take the stock rom and load it into a working folder. then take a custom rom that you can find all the differences to stock on when loaded on your phone and load that into the kitchen. Compare the stock roms working folder with the custom rom working folder and take note of all the differences and figure out how they were achieved. Dont just look at apk files. Look at the update script as well as the xml files in all the folders too. Repeat with another ROM and you will start to see how to change things around yourself.
I really wanted the Motorola Weather widget, so I download the system app dump of the Defy, and found what I desired. An .APK file and an .ODEX file. I have no problem installing the .APK, but what is the .ODEX file? Is it important? And if yes, than how do I install it?
You should put the odex file in the same folder where apk was copied during the installation.
Or, without installing, copy apk + odex in /system/app folder.
Hello everyone,
I'm trying to deodex but i get everytime a .odex error.. Ive read somewhere that i need to delete that file and try it again.. but the program stops at every .odex file, i guess it isnt the meaning to delete every .odex file ??
AskinSavascisi said:
Hello everyone,
I'm trying to deodex but i get everytime a .odex error.. Ive read somewhere that i need to delete that file and try it again.. but the program stops at every .odex file, i guess it isnt the meaning to delete every .odex file ??
Click to expand...
Click to collapse
Hi
You have to delete/remove every .odex file from the folder were you have the .apk files.
Now the deodexing will work fine for you and you can pudh the files to the System/app folder with ADB
A thank you would be nice, if i helped you in any way.
hi,
i want to know how do devs create an apk file that can edit files in system folder. for example sound files etc. generally a flashable zip is created which will replace the stock file with a modified one. The same thing, this time without going into recovery but being able to do it with an app itself.
Yes, ready to learn.
Anybody know where to find the BOOTCLASSPATH order on this device? It's usually found in the "init.rc" file in the root directory of android, but it's nowhere to be found in that file on this device.
Is there some other way I can find the BOOTCLASSPATH other than finding it in one of the files?
Any help would be appreciated. Thanks!
Boostjunky said:
Anybody know where to find the BOOTCLASSPATH order on this device? It's usually found in the "init.rc" file in the root directory of android, but it's nowhere to be found in that file on this device.
Is there some other way I can find the BOOTCLASSPATH other than finding it in one of the files?
Any help would be appreciated. Thanks!
Click to expand...
Click to collapse
OK, found it, guys. It is located in the "init.environ.rc" file, rather than the standard which has been init.rc. Good to go, now. Thanks!
Boostjunky said:
OK, found it, guys. It is located in the "init.environ.rc" file, rather than the standard which has been init.rc. Good to go, now. Thanks!
Click to expand...
Click to collapse
Took me a while to find it too, you could also always do:
echo $BOOTCLASSPATH
in shell. For anyone looking for this. Here's the full path:
Code:
/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/com.lge.frameworks.jar:/system/framework/WfdCommon.jar:/system/framework/org.codeaurora.Performance.jar
And here it is without the /system/framework/ path if you want to use it for dex/odex
Code:
core.jar:conscrypt.jar:okhttp.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework2.jar:telephony-common.jar:voip-common.jar:mms-common.jar:android.policy.jar:services.jar:apache-xml.jar:webviewchromium.jar:com.lge.frameworks.jar:WfdCommon.jar:org.codeaurora.Performance.jar
What are you working on Bootsjunky?
havanahjoe said:
Took me a while to find it too, you could also always do:
echo $BOOTCLASSPATH
in shell. For anyone looking for this. Here's the full path:
Code:
/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/com.lge.frameworks.jar:/system/framework/WfdCommon.jar:/system/framework/org.codeaurora.Performance.jar
And here it is without the /system/framework/ path if you want to use it for dex/odex
Code:
core.jar:conscrypt.jar:okhttp.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework2.jar:telephony-common.jar:voip-common.jar:mms-common.jar:android.policy.jar:services.jar:apache-xml.jar:webviewchromium.jar:com.lge.frameworks.jar:WfdCommon.jar:org.codeaurora.Performance.jar
What are you working on Bootsjunky?
Click to expand...
Click to collapse
Just working on odexing a deodexed rom for personal use.
Sent from my LG-D851 using Tapatalk
Well, this is turning out to be big ol' boat load of fail. I take it that Xposed framework has some compatibility issues with Odexed ROMs?
Boostjunky said:
Well, this is turning out to be big ol' boat load of fail. I take it that Xposed framework has some compatibility issues with Odexed ROMs?
Click to expand...
Click to collapse
I have Xposed running on my stock ROM, which is odexed.
May I ask why you are odexing a deodexed ROM? Since there is only one G3 deodexed ROM I know of, why are you starting with ZoneROM and not from stock?
I have modified TetherNetwork.smali in the services.jar file of my stock rom and was able to get it odexed again after modifying.
No particular reason, other than that I just happened to have it flashed and setup on my device how I like everything. I just figured I'd top it off by odexing the ROM to slim down the footprint of the filesystem (I would be removing the classes.dex files after finishing the odex process).
I may just go ahead and jump back to a completely stock base and go from there.
Sent from my LG-D851 using Tapatalk
Boostjunky said:
No particular reason, other than that I just happened to have it flashed and setup on my device how I like everything. I just figured I'd top it off by odexing the ROM to slim down the footprint of the filesystem (I would be removing the classes.dex files after finishing the odex process).
I may just go ahead and jump back to a completely stock base and go from there.
Sent from my LG-D851 using Tapatalk
Click to expand...
Click to collapse
Oh I see. I have never done odexing or deodexing before. Is it possible to automate it and get all the dex files odexed? What problem did you run into? I had some issues getting my file deodexed but eventually got it to work. I missed a few things along the way, so maybe I can help?
I'm so used to setting up new ROMs that I don't think twice before jumping to another one. I have that sh*t down.
I also like the flashable blue theme he has for his ROM, and while I am capable of performing the same type of theming on the stock system files, I just don't have enough spare time to do it all.
Sent from my LG-D851 using Tapatalk
Boostjunky said:
I also like the flashable blue theme he has for his ROM, and while I am capable of performing the same type of theming on the stock system files, I just don't have enough spare time to do it all.
Sent from my LG-D851 using Tapatalk
Click to expand...
Click to collapse
Doesn't the theme need the files to be deodexed to work? How much more space do the deodexed files take compared to stock? I've been thinking of trying the other ROM, but like yourself, everything is working the way I like it for now, and there aren't that many benefits to the ROM yet (for me at least). I'll still check it out, and I'm sure it will get more features, or someone else will come up with a different take on the stock ROM.
I quickly threw together an odexing script that takes care of all the core files from the BOOTCLASSPATH first, then it odexes the remaining files in the framework folder.
Perhaps I'll have to sift through the script again and check that I didn't make any spelling errors.
Sent from my LG-D851 using Tapatalk
Most color scheme theming is done via .png and .xml edits, which are not found in the classes.dex files, but rather, in the "res" archive of the apk.
Sent from my LG-D851 using Tapatalk
The savings in space on the filesystem varies depending on the number of apps and whether the ROM is "Properly" odexed or not. If it's not properly odexed, the filesystem will end up even larger than a DeOdexed filesystem.
In a DeOdexed ROM, for every APK or JAR file, there is a classes.dex file within that APK/JAR archive. From this classes.dex file, the Dalvik Virtual Machine decompiles and stores an extracted/optimized classes.dex file known as the "dalvik-cache". So, in short, you end up with 2 dex files for every apk and jar package. 1 that is zipped into the apk/jar, and 1 that is extracted into the dalvik-cache directory.
In an Odexed ROM, for every APK or JAR file, there is a .odex file within the same folder that the APK/JAR is located. However the "classes.dex" file we spoke of earlier is no longer found inside a "properly" odexed apk or jar package. Where did it go? Well, it is the .odex file. It has simply just been pre-extracted, decompiled, and optimized for the system to use. And all without having to store it in the dalvik-cache directory. So, in short, you only end up with a single dex file (in this case, .odex) for each apk/jar package.
So, that's where you see the filesystem space savings.
The initial ROM size of an Odexed ROM is larger than a DeOdexed ROM (because the classes.dex files are zipped/compressed within the apk/jar package, whereas .odex files are not zipped/compressed).
But, after a DeOdexed ROM has initially booted up (I'm sure you've seen the message upon boot-up after clearing dalvik-cache that says "Android is upgrading x of xxx files), the resulting filesystem size is quite a bit larger since it now essentially has 2 copies of each classes.dex file from each apk/jar package (one compressed, the other decompressed).
Now, I said something about a "properly" odexed ROM. There are instances where a person will Odex their ROM, but won't pull the classes.dex file out of the apk/jar package after it's been odexed. This results in each apk/jar file potentially having 3 copies of the classes.dex file. 1 located within the apk/jar package (compressed), 1 located in the same folder as the apk/jar package (decompressed .odex file), and 1 in the dalvik-cache directory (again, decompressed as a classes.dex file).
Whew. That was a long explanation, but hopefully it gets the point across.
One thing I'm curious about is if ART will work with a "properly" Odexed filesystem. The reason I question it is because LG's filesystem would NOT be considered "properly" odexed since each apk/jar package has not only a .odex file, but also has a classes.dex file located within the package. So I have to wonder if ART uses the classes.dex file much like the Dalvik Virtual Machine, and that it won't convert a .odex file to an .oat file.
Just to update:
I found the issue via pulling a logcat during boot-up (or bootloop, rather). The issue was that I had attempted to Odex the framework file "com.qcom.bluetooth.jar" which just happens to NOT have a classes.dex file inside of it. Even though it didn't have a classes.dex file, the script still generated a false .odex file for that package, and thus during boot-up, the phone was not digging the file that made no sense.
Got her all Odexed in the framework, and am just about finished with odexing the /system/app/ and /system/priv-app/ apks. So far, so good.
I'll see if I can't get a filesystem size comparison after I'm finished with everything.
Results are in. The amount of space saved by Odexing the ROM I'm using ended up being 103.53 MB. Not as much as I imagined it would cut down (keep in mind, all the space savings is in the /data partition. The /system partition ends up using more space than the deodexed version of the ROM).
The sizes look like this.
Deodexed system size: 1.34 GB
Deodexed data size: 1.83 GB
Odexed system size: 1.53 GB
Odexed data size: 1.55 GB
Edit: I also tried enabling ART, and, as I expected, it doesn't work.