Can't find BOOTCLASSPATH in "init.rc" file - T-Mobile LG G3

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.

Related

Merging Flashable ZIPs

Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
i think you need to edit the meta file and the xml file, but this can be done though.
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
it is possible to merge update.zip files but its important to understand their structure and how the commands are executed.
also signing .zip files is a whole different topic...
hopefully this helps get you going in the correct direction!
joeykrim said:
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
Click to expand...
Click to collapse
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
chandlerw88 said:
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
You would want to read up a little bit and make sure you understand the commands, but yes. You do not want to copy the entire set of commands, just the particular needed lines. Often you don't need to change anything because the script may just say copy this entire system directory and everything in it will go.
Sent from my PC36100 using XDA App
It's pretty basic.
Move all the files into the same zip delete everything in meta-inf except the update script.
Adjust the script accordingly, pay attention to syntax or better yet just look at all the individual scripts and put them together, then remove dupes
As for zip signing..
This is what you need
http://forum.xda-developers.com/showthread.php?t=666441
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
PSULightingGuy said:
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
Click to expand...
Click to collapse
yes, its called 7-zip and its your new best friend in this battle. heres how i learned.
i started ripping apart the things that i liked, including roms themselves. now find an update zip that has the files inside the folders that you will need to add, and you can then recycle that update zip. here it is plain and simple:
1.use 7zip to VIEW; NEVER UNZIP the files(forget about windows zips)
2.check what folder the apps you will be putting in belong in
3.put them in their corresponding folders(some apps are tricky when you need to install their libs too and you dont know it)
4.erase the 3 bottom files in your meta-inf folder
5.resign the rom
6.verify the sign(look for the new certs)
7.move to sd
8.flash rom
9.have a pop,beer, or w/e your vice.(my fave is cherry coke)
if you need help getting started feel free to pm. you dont know who i am, but ive been thru this process many times.
​
Actually, that's not quite what I'm talking about... I want a flashable zip that will add certain images (the battery meter) to the INSIDE of a .apk file that already exists on the device. Not sure if it's possible, but if so, I'd love to know... If not, I'll try pulling the .apk and using 7-zip...

7-zip cant modify files

I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Albinoman said:
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
Not true, regular image files can (should) be able to be draged out, edited, and droped back in an apk using 7-zip.
nighthawklude99 said:
I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
Click to expand...
Click to collapse
My guess would be that the apk was decompiled at some point before, but not recompiled right, or with the right program. Which phone.apk are you having issues with, the one on your phone or the one your pulling the pngs from?
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
nighthawklude99 said:
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
Click to expand...
Click to collapse
Sounds like your install of 7z may be messed up. I just tried it to make sure something didnt change in an update and it works fine for me still with default configuration.

[Q] framework decompile help.

Not sure if this is the right spot or should actually go in development or here since I got lectured for putting it in development the last time.
But what I am trying to do is decompile the framework file from the stock rom and change a xml and recompile so as to bypass the tetheringprovison call.
The last time I did this on the HTC One S I ran into the trouble that the recompiled verision didn't work and ended up just opening the recompiled apk as a zip pulling the xml and replacing it in the original apk and load that.
That seemed to do the trick on that phone.
I think the problem is with compression as the output apk I get after recompiling is never even close to the original size.
I am having the same issue when it comes to the file for the gs3.
So far I haven't tested a recompiled one yet since I haven't rooted yet but just working on the file.
That is a job for a little later on my days off where I don't need my phone.
But with this one the file I am looking for once it is decompiled shows in res/values/arrays.xml for this one. How ever if I open either the source file or the recompiled when I don't see those values folders anywhere inside.
I am not sure if they are just hidden in something else or where the other files are.
I am using the newest verision of apk multi tool to recompiling and decompiling with compression values tested at 1 and 0.
both the framework-res.apk and twframework files are loaded into it as well as dependencies.
Any ideas on the best way of changing out this one file?
Or if anyone can recompile one with the following arrays.xml file instead that I have attached.
When it is decompiled it does show the right folder string "\res\values" and the array.xml inside I have just made a change to the xml that would not check the tethering provision on the device to allow the built in tether to work again. and a recompiled verision with that file will bypass any tethering check
any help would be greatly appreciated.
*edited* to include the arrays xml
Anything found in the "values" directory are not going to be visible inside the apk they are files used to build the actual apk that tells the other XML and other files where things are. Compression won't break an apk. What exact file are you editing? Also you are going to have to root if you want to put the modded file back on the device..
Sent from my SGH-T999 using Tapatalk 2
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
M9x3mos said:
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
Click to expand...
Click to collapse
I decompile framework-res.apk all the time with no issues. What is the exact issue you're having?
Sent from my SGH-T999 using Tapatalk 2
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
M9x3mos said:
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
Click to expand...
Click to collapse
You cannot replace XML files with other XML files. You have to open the XML in notepad++ and edit the actual lines of code then recompile. And I thought you weren't rooted so how are you able to push the app back to the device? Also, are you setting correct permissions for the newly compiled apk?
Sent from my SGH-T999 using Tapatalk 2
Yeah sorry for the late reply.
I am still tinkering with it. I wanted to root just till I had a day off that it wouldn't kill me to have the phone down for a little.
I will be rooting it in the next day or two since I am off.
After recompiling the APK and pulling the XML out of that one and putting in the original was the only way I could get the change to take on the One S.
When I was testing then, and will try the same procedure with the GS3, is after recompiling it with the tool I would put on sd card then using twrp copy to the phone and chmod 644
Out of curiosity what would be the DD command for backing up the recovery to the sd card?
I am having trouble finding that.
I would like to have that to flash back on the phone as I am planning to try this again from within twrp and see what happens.
From my understanding for triangle away to work you need to be on stock recovery right?
Ok
Now I have a new problem I have stumbled upon.
I have modded the file but when I try and push it with ADB from the pc even after system mounted it tells me that permission is denied.
Any ideas why that is happening?
Tried copying over with root explorer and that froze during copy and then resulted I'm a boot loop.
Not sure if that was because of the method or a problem with the file I made.
When decompiling does that need to be done with the twframework dependence or just simple decompile?
Also then after switching the arrays.xml I can just recompile with no compression or do I have to do something with keeping files.
Since the arrays is in something else I'm not sure what it shouldn't keep.
Any ideas would be greatly appreciated.
And I can't find if should either be zipaligned or signed. Some articles say signed some say don't sign system apks
Holy crap... youre allllllllllll over the place one bite at a time.. Quick answers first:
You do not need to backup your recovery. It is flashable via Odin and is much safer to flash via odin then it is using DD. With DD, you could flash the wrong partition by a simple slip of a keystroke. IE you typed '9' instead of '0'
Secondly: You got that 'freeze' issue using Root Explorer because framework-res.apk is constantly in use by the system. The BEST way to apply any system file is by creating a flashable zip file then applying it through recovery.
Thirdly: You do NOT need stock recovery to use Triangle Away, ive used it twice now with CWM as my recovery.
About your issues with decompiling recompiling.. I dont think its necessary to install the twframework... i dont recall if i had to when i was on Frosty, but doing "java -jar apktool.jar if <twframework here>" wouldnt hurt.
Also what exactly are you trying to modify?
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
M9x3mos said:
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
Click to expand...
Click to collapse
Quick question, are you running Stock Jellybean? And who is your carrier? There was a hacked apk that enabled tethering.. not sure what its called. just read about it. Never tried/downloaded it.
i got this to work last night for frosty 11.2.1, AllenD87 over at the att forums helped me get it right.
I have the stock jellybean on tmo device and use with simple mobile service
Just checked out the other one hack/mod that was looking like the same kind of mod where made changes to the framework and put it back.
different firmware so I don't that I should try that on mine.
i just decompiled framework-res.apk made the changes and recompiled. put it in the rom and flashed the whole rom.
Trying to keep the absolute stock rom.
I just installed twrp since it has file manager so I don't need to make a flashable zip but just copy over and chmod 0644
first attempt gave me a boot hang so I am going to try compiling with a different tool
Ok found out the problem was the multi tool inwas using
Used the beta instead and everything worked ok

Odex ANY touchwiz ROM for the GN2 #moreperformance

“ADMIRAL WILL YOU PLEASE COLOR CODE THAT WALL OF TEXT?” – why yes I will.
GREEN = Informational stuff about what we are doing.
BLUE = Instructions for process
RED = IMPORTANCE, PLEASE DO NOT DISREGARD
BLACK = not too important
PINK = very manly
####################################################################
DISCLAIMER – THIS WILL IMPROVE PERORMANCE (again…lolllll) AND FURTHER AND FARTHER OPTIMIZE YOUR DEVICE, SAVE STORAGE SPACE ON YOUR INTERNAL SD, AND PUT YOUR /SYSTEM/FRAMEWORK DIRECTORY AND ALL CONTENTS ON THE MOST POTENT ANABOLIC STERIODS KNOWN TO MAN. I AM NOT RESPONSIBLE IF/WHEN YOU FINISH READING THIS THREAD YOUR DEVICE RUNS OFF WITH YOUR GIRLFRIEND/WIFE/FAMILY/JOB BECAUSE IT IS NOW MORE “MANLEY” THAN YOU (see wut I did there…manley..rofl…).
####################################################################
Ok on to the serious part….
First, why odex? And what does it mean?
1.Odexing has the following benefits: Saves space in your /data directory, speeds up boot times SLIGHTLY, boosts loading of apps (in this case the apps that compose your framework), zip aligns framework and corresponding .odex files, reduced CPU cycles by optimizing framework.
2.So what is an “odex” file? Android applications similar to zip files. APK stands for “android package” and all of them contain java code, which is the second language in android aside from Linux. This code speaks to the device to execute operations that in turn speak to other system files, then ultimately the kernel, hardware, etc etc etc… we’ll not get into that. Java code is packed into a file within the APK called a “classes.dex” file and this file is parsed (copied) by the dalvik JVM and a cache of the processed classes.dex file is stored in the device’s /data/dalvik-cache directory.
An odex file is basically an already processed version of the classes.dex file that is “execution ready” for Dalvik. When xxxx application is “odexed”, the classes.dex is removed from the APK entirely and the information is converted to an odex file, and stored aside its owner APK (or in this case framework file). So rather than have two copies of the same file, and in different locations, you have one copy of that file, in the same location of the APK, all ready to go, and therefore making it more optimized for access by you – the user.
The benefits of doing this are tremendous! I have been doing this to all of my ROMs since I can remember. This process is detailed, but simple, just read carefully. I outlined the directions as simple and clear as I possibly could
On to the fun part>>>>>
FIRST, BEFORE YOU CONTINUE, BEAR IN MIND I DO NOT CURRENTLY HAVE A SCRIPT MADE TO UNDO THIS MOD, ONCE IT IS DONE, IT IS DONE! IT IS SAFE, HOWEVER, JUST FOLLOW DIRECTIONS CAREFULLY!
ALSO, MAKE SURE YOU ALREADY HAVE YOUR FAVORITE THEME INSTALLED! I WILL NOT BE RESPONSIBLE IF YOU APPLY THIS MOD THEN TRY TO FLASH XXXXX THEME AND GET CAUGHT IN A BOOT LOOP BECAUSE YOU COULDN’T DECIDE IF YOU WANTED GREEN OR BLUE BATTERY ICONS THEN CHANGED YOUR MIND ABOUT IT AFTER DOING THIS…..just don’t waste your time posting in this thread if you do that. But if you MUST bother such a story, here is your answer to the problem… “flash your ROM again, no need to wipe data, your device will boot now”############
Instructions:
1.Download Terminal emulator and FX file explorer and FX root add on from market.
2.Download the zip file at the end of this post named “odex.zip” to your device.
3.Open FX file explorer, find the odex.zip file, long press on it and select “open with” then select “Archive Extractor” then hit “extract here”
4.After it is done, you will then find a folder named “odex” in the same location of the downloaded “zip” version. Llong press on that folder and select copy
5.Navigate to the home screen of the FX file app, and select the red system logo (this is the one that allows you to explore as root.
6.Navigate to /data/local/tmp, when you get to tmp, select the icon at the top right corner of the app that says “clipboard” and paste the folder into /data/local/tmp
You should now have a folder there named “odex”
7.Long press on the folder, select “permissions” and check ALL of the 3 boxes for Read, Write, and Exec(ute)… if you have done this successfully the bottom left of that little popup window for setting permissions should say 0777, hit “ok” to commit the changes.
8.Now go into the odex folder, and inside of it repeat step 7 for ALL 5 files. They should all have FULL permissions.
9.After that is done, hit back until you are at the root directory, seeing “System (Root)” at the top of the FX file window with the red box with a # symbol inside of it. You’ll notice as well, the top right corner there is a yellow lock icon, inside a green box. We need that to be red, with an “unlocked” lock icon. Select it, and disregard built in FX file warning about how the world is going to end etc etc etc if you don’t know what you are doing – you know what you are doing, so no worries. If it is already red and “unlocked” then awesome, skip to step 10.
10.Scroll down a bit, and you will see “system” folder, this is your system directory. Go in there, and again make sure we are “red” and “unlocked” in the top right corner. You are a savage animal at this point, on a mission. Your device needs optimizing, disregard doomsday warnings about the T1000 enslaving the human race and how your brother will likely turn into a cylon if you unlock your /system directory (or make it read/writable… which is all this is doing)
NOW! The really fun part. You got your favorite theme? Sweet. Got your odex files all cocked and ready to rock? Check. Got your kids addicted to Teletubbies in case you mess up your ***t and you need like an hour to fix it?!?! Kidding… that won’t happen…
FIRST BEFORE YOU CONTINUE!!!!! PUT YOUR DEVICE INTO AIRPLANE MODE!!!!!!! You do not want to get a phone call or something while this script is executing. Interruptions will be rude and unkind… Please follow this instruction, please. For the love of the last terrible terminator movie.
11.Open terminal emulator, and type the following commands WITHOUT the quotes, hitting enter after each line:
“su” (if it asks for super user permission, grant it, obviously, if it doesn’t ask, you have already granted it)
“/data/local/tmp/odex/odex”
About 8.7 seconds later, it should be done, and you will see a little message saying “reboot to recovery and wipe cache and dalvik cache one more time” at the very end.
12.Hold power button, select “reboot options” then “recovery” hit ok, boom. If you don’t have that neat little modification to your android.policy.jar file, then power off, and boot into recovery by holding the volume up, home, and power button. In that order, until you see something on your screen. If you are NOT RUNNING EXT2… meaning you are not running Malicious ROM and/or you have not used my ext2 modificaitons…. Then simply type “reboot recovery” in terminal emulator, hit enter, and skip all the previous crap in “12”… “but then y u no say that first admiral?” … “Don’t question me son, it is for the good of the nation and humanity, and noobs who would read “oh ok reboot recovery BOOM” then they corrupt a file somewhere because of an unclean shutdown and are back at step -1 of this entire instruction which is restoring their backup… if they were pansy enough to make a backup. The admiral is manley, he has no use for backups. But he also knows what to do in case he needs one and doesn’t have one, cadet.”
ALSO IMPORTANT!!!!! Before you wipe dalvik cache again from recovery… if you are running my ext2 modification for /system /data/ and /cache…. MAKE SURE YOU VERIFY “THE BOX” is checked in twrp settings… you know which one I am talking about at this point. lol. It is the “format with yadda yadda rm command”
Wipe dalvik cache from recovery once more, then reboot the device.
DONE! Your ROM is now odexed!
-Admiral
http://db.tt/na11Ma9L
Another may mod. I'm not the only one who enjoys odexed. I was actually going to make the next release odexed... or was at least tossing the idea around in my head
Sent from my SGH-T889 using xda app-developers app
kintwofan said:
Another may mod. I'm not the only one who enjoys odexed. I was actually going to make the next release odexed... or was at least tossing the idea around in my head
Sent from my SGH-T889 using xda app-developers app
Click to expand...
Click to collapse
Well now you can.
I'm a firm believer in odexing. Most efficient way to run. I'm all about efficiency
Sent from my SM-N900T
Is tweaked odexed?
Sent from my SGH-T889 using xda premium
Tweaked is not odexed by default. You can find out if the ROM you are running is odexed or not by going to /system/framework with a file explorer. If you see a bunch of files in there with ".odex" tags on the tail end of them, then it is odexed.
If they are not there, then it is not odexed.
Sent from my SM-N900T
AngryDinosaur said:
Is tweaked odexed?
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
Non if the custom ROMs are odexed. It's more of a stock thing
Sent from my SGH-T889 using xda app-developers app
Alright
Sent from my SGH-T889 using xda premium
I keep getting this
Sent from my SGH-T889 using xda premium
Can we Odex our roms with XPosed framework mod installed? Or can we only Odex the apps and not system? Thanks a bunch for sharing.
Noellenchris
noellenchris said:
Can we Odex our roms with XPosed framework mod installed? Or can we only Odex the apps and not system? Thanks a bunch for sharing.
Noellenchris
Click to expand...
Click to collapse
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?
ezsoulja said:
I keep getting this
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
For some reason it is thinking you are trying to execute a folder? And not a file?
Not cutting or flaming you in any way, but this is a user error. You typed the command properly, and everything looks like it SHOULD have executed. Go back to the step where you are moving the odex folder to the /data/local/tmp directory, make sure you did everything correctly, and retry.
Admiral Sir Manley Power said:
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?
For some reason it is thinking you are trying to execute a folder? And not a file?
Not cutting or flaming you in any way, but this is a user error. You typed the command properly, and everything looks like it SHOULD have executed. Go back to the step where you are moving the odex folder to the /data/local/tmp directory, make sure you did everything correctly, and retry.
Click to expand...
Click to collapse
i made sure of it, i extracted the folder to the tmp folder and changed the odex folder 1 and 2 to 777 and all the files inside the 2nd odex folder and had both the root of the system and folder unlocked with the red icon. im not sure what could else be missing. im on tweaked 2.4.1 btw
ezsoulja said:
i made sure of it, i extracted the folder to the tmp folder and changed the odex folder 1 and 2 to 777 and all the files inside the 2nd odex folder and had both the root of the system and folder unlocked with the red icon. im not sure what could else be missing. im on tweaked 2.4.1 btw
Click to expand...
Click to collapse
Why do you have two odex folders?
Sent from my SGH-T889 using Tapatalk 2
Admiral Sir Manley Power said:
you can odex any framework with this...
Not sure what you mean by the second part of your question, though. This is odexing your framework... which is found in /system ...?.
Click to expand...
Click to collapse
With XPosed installed it can modify the framework, I'm afraid if I odex the framework, the xposed add on will crash my system. There is also an application on XDA called "Odex Me" which only Odex's the Applications and not the framework, that's what I was talking about in my second part of the question. I suppose I can do a backup and give it a go and see what xposed does.
Also Xposed also does other system mods other than framework. So it may only disable the framework modding portions after I odex the framewok.
Noellenchris
Admiral Sir Manley Power said:
Why do you have two odex folders?
Sent from my SGH-T889 using Tapatalk 2
Click to expand...
Click to collapse
For some reason when I extracted it, that's the way it came.. So it's basically just like the line says /data/local/tmp/odex/odex
EDIT: just removed one of the odex folders from within the odex folder and transfered the files to the first folder and everything worked from that point on..
Sent from my SGH-T889 using xda premium
noellenchris said:
With XPosed installed it can modify the framework, I'm afraid if I odex the framework, the xposed add on will crash my system. There is also an application on XDA called "Odex Me" which only Odex's the Applications and not the framework, that's what I was talking about in my second part of the question. I suppose I can do a backup and give it a go and see what xposed does.
Also Xposed also does other system mods other than framework. So it may only disable the framework modding portions after I odex the framewok.
Noellenchris
Click to expand...
Click to collapse
You'll be fine.
Go ahead and do it. Just make a backup of your /system if you wanna be safe, that's what they are there for
The DL link isn't working
Edit: Got it downloaded and working thanks for the odex man.
P.S What can be modified without messing up the odex for example will xposed framework modules cause the rom and odex to have complications. Thanks in advance
Sent from my SGH-T889 using xda premium
gonnapushthru06 said:
The DL link isn't working
Edit: Got it downloaded and working thanks for the odex man.
P.S What can be modified without messing up the odex for example will xposed framework modules cause the rom and odex to have complications. Thanks in advance
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
It may or may not. Honestly, either way it will require a little bit of work on your part after you flash it (assuming it actually boots, but it should...)
Just, best thing to do, like I said in the OP... Is flash your themes first, then odex. It will save you from the extra headaches and work trying to do the process in reverse.
Admiral Sir Manley Power said:
You'll be fine.
Go ahead and do it. Just make a backup of your /system if you wanna be safe, that's what they are there for
Click to expand...
Click to collapse
I've odex'd and it seems fine with xposed, after reading info on xposed they say it works on deox and odex roms, and it's running smooth. For some reason the screen appears brighter and sharper, probably some mod is not working but either way it is smooth and placebo maybe but looks great. Thanks again. I've done this in the past, but never to the system, just apps.
Noellenchris

[HELP]Implement Swipe to remove notification for GB

Someday I found this:
[HOWTO]Implement Swipe to Remove Notification
I like this function but my phone can't update to 4.1.2 (I8160-TGY don't have JellyBean Firmware...)
So I tried to modify it.
But deodex the whole ROM is a hard work.
So I found this:
[Toturial][Windows] How Editing The ODEX framework files? [Simplified]
I tried to decompile framework.odex ,and compile without modifications ,then my phone can boot normally.
So I'm sure this method is possible.
========================
So now I know how to decompile and compile.
And I find many thread about this but I still have no idea...
Even if I can compile it after modify, I still got bootloop.
Here is my deodexed framework.jar and SystemUI.apk:
https://www.dropbox.com/s/vj5u68g4qfo7zwp/Desktop.rar
Can any devs help me to modify it?
THANKS A LOT!!!
changes umanalm
I found that if I compile and decompile again, some string become different.
So now I don't know how to decompile correctly........
I use baksmali1.4.2 and decompile via command line:
java -jar baksmali-1.4.2.jar -a 10 -x framework.odex
When you compile apk your output is not signed. that is reason why you cant boot
here is what to do
1. Open output apk with 7-zip
2. Open original apk with 7-zip
3. Take meta-inf folder from original and drag to new apk
4. You will have signed apk and you can push it to your device
hope this will help you
btw. for decompiling i use
apktool d path\original.apk path\outputfolder
for compiling
apktool b path\outputfolder path\output.apk
Rox said:
When you compile apk your output is not signed. that is reason why you cant boot
here is what to do
1. Open output apk with 7-zip
2. Open original apk with 7-zip
3. Take meta-inf folder from original and drag to new apk
4. You will have signed apk and you can push it to your device
hope this will help you
btw. for decompiling i use
apktool d path\original.apk path\outputfolder
for compiling
apktool b path\outputfolder path\output.apk
Click to expand...
Click to collapse
I know that.
Because my phone haven't DEODEX, so I Just put classes.dex into framework.jar and odex it.
So it's not my question, but thank you for reply.
Why dont you just deodex rom using android kitchen and do your mods?
Sent from my GT-I8160
Rox said:
Why dont you just deodex rom using android kitchen and do your mods?
Sent from my GT-I8160
Click to expand...
Click to collapse
I tried.
But I can't boot after I deodex my rom.
I use system.tar.md5 to make CWM Flashable ROM.
These is my method: (Android Kitchen version is 0.223, I already download 0.224 but I never use it....)
1.Choose 1 to decompress system.tar.md5 and make Work Folder.
2.Then choose 0 to Advanced option, and choose 11 to de-odex the whole ROM.
3.Repack a CWM Flashabe ROM.
4.Format all partition and flash it.
5.Reboot, and the screen stay in "SAMSUNG GT-I8160".
Is there any wrong? or I have to use Android Kitchen 0.224?
You probably make some mistake.
Can you post updater script to see if problem is there.
Btw. You can try copying system folder to sd card from root directory and than use it as working folder for kitchen
Edit:
Oh, you formatted all partitions? You dont need to format them you possibly lost some device specific files required for boot. Try without formatting
Sent from my GT-I8160
Rox said:
You probably make some mistake.
Can you post updater script to see if problem is there.
Btw. You can try copying system folder to sd card from root directory and than use it as working folder for kitchen
Edit:
Oh, you formatted all partitions? You dont need to format them you possibly lost some device specific files required for boot. Try without formatting
Sent from my GT-I8160
Click to expand...
Click to collapse
Thanks!
This time I make a deodexed ROM via kitchen 0.224, And flash it without formatting.
It still can't boot, and when I enter to CWM, it can't mount any partition.
So I reflash stock ROM via Odin v3.07....
Oh, few days ago I tried to make a CWM flashable zip with only de-odexed /system/app and /system/framework.
It also can't boot.......

Categories

Resources