[MODS][KPU] Pack for odexed/deodexed [24/05/12]

Search This thread

faku1810

Senior Member
Jun 14, 2012
175
78
Would it be possible for you to make a flashable zip compatible with your pack so we can have crt on animation too?

I've tried sirilpta's mod but it didn't work and you said it's because it's made for deodexed roms, and mine is odexed. I understand if it's not possible, but my phone feels "incomplete" when it only has crt off animation.
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
Would it be possible for you to make a flashable zip compatible with your pack so we can have crt on animation too?
Maybe, but don't count on it. I'm not using KPU, I'm using CyanogenMod, so I can't test my work and it's important when you mod such an important thing like services.jar. The reason why I didn't include the CRT ON effect is that the OFF effect is included in Android (you need to change a boolean value, no smali editing), while the ON effect needs to be added.

(quoting from the other thread...)
Also i'm not much into this stuff, i just got my i9003 a couple of months ago and haven't done much to it, so i wouldn't know how to make this mod work on my rom, should i try following the tutorial from the OP and modify the services.jar from your pack?
It's possible, but it's not the easiest thing to do if you are a beginner. Mods for odexed are more difficult to do, but I make a shell script to automatize the process, so it shouldn't be that different.
If you want to port this mod, download the deodexed pack from the OP, mod services.jar as exmplained in the guide and then use my tool to build the odex as I explained in that thread. If you don't know how to mod jar files, there are many tutorials on the net.
Good luck.
 

faku1810

Senior Member
Jun 14, 2012
175
78
It's possible, but it's not the easiest thing to do if you are a beginner. Mods for odexed are more difficult to do, but I make a shell script to automatize the process, so it shouldn't be that different.
If you want to port this mod, download the deodexed pack from the OP, mod services.jar as exmplained in the guide and then use my tool to build the odex as I explained in that thread. If you don't know how to mod jar files, there are many tutorials on the net.
Good luck.

I'll try and see if i can pull it off, though it's not that important, really. However i have another doubt you might be able to help me with. I want to have the main pack from op + crt off + screenshot power menu + circular battery mod.

So in order to do so, i have replaced some files in the pack (modified framework-res.apk, SystemUI.apk, and other things) and then i flashed it, and flashed crt off zip afterwards.. But now, when i charge battery it only shows up to the 22nd png, and so I tried to pull framework-res.apk and modify the corresponding xml with no satisfactory results (it works, but then i get a graphical glitch you can see in the attachments). Then i tried replacing that xml directly in the crt zip, getting a nice permanent "unknown_battery_status" png, so i had to reflash the original zip.

Finally, i read your last reply here about crt-off being just a boolean value, and so i decided to apply fruchtfliege's method again, using the pack's framework-res.apk and edit that boolean value, plus adding circular battery mod. Recompiling and replacing it in a copy of crt-off.zip to flash it, it seemed way too easy. However after doing so, i got a boot loop, so i had to reflash crt-off.zip

Is there any way i can get all the mods i mentioned (plus the ones included in your pack) in one working flashable zip? Sorry for the long post.

Edit: The second screenshot was the same as the first -.-' thought it should have shown how the "More" menu was completely black (even text), therefore i'll include a screenshot of how it should look (plus you can see how charging battery is shown, even though it's almost fully charged)
 

Attachments

  • SC20120616-180342.jpg
    SC20120616-180342.jpg
    28.2 KB · Views: 67
  • SC20120616-191933.jpg
    SC20120616-191933.jpg
    35.5 KB · Views: 64
Last edited:

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
Flash the pack + the mods you want in the OP and then:

Circular battery mod:
Download from the OP "CRT off effect", get from it and open framework-res.apk with a file archiver, go to "res/drawable-hdpi" and replace all the stat_sys_battery_XX.png with your circular battery images without uncompressing/decompiling it.

CRT ON:
I made it for you, I didn't it carefully, I didn't try to understand what I was doing and it's not odexed. I simply followed the tutorial. HERE
Downlaod my tool (odexer) to odex it. You simply need to put services.jar inside /PATH/TO/THE/TOOL/deodexed/framework and run the script. It does everything automatically. After that you need to replace the files with the modded ones.

To easly make a flashable zip, get the pack and replace your new modded files with those inside the zip.

A suggestion. Once you finished, zipalign all the modded files. I assume you are using a CF-root kernel (and that you don't know how to manually do it), so open "Tweaks" or whatever its name is, check "Auto zipalign" and then reboot.
Once you did that, you can uncheck the option.
 

faku1810

Senior Member
Jun 14, 2012
175
78
CRT ON:
I made it for you, I didn't it carefully, I didn't try to understand what I was doing and it's not odexed. I simply followed the tutorial. HERE
Downlaod my tool (odexer) to odex it.

Thanks a lot!! I'd click the Thanks button, but i guess i don't have enough posts to do it. I really appreciate you taking the time to do it, I'll test it and give feedback later :p

Circular battery mod:
Download from the OP "CRT off effect", get from it and open framework-res.apk with a file archiver, go to "res/drawable-hdpi" and replace all the stat_sys_battery_XX.png with your circular battery images without uncompressing/decompiling it.

I forgot to mention it explicitly in my last post, but i already did this, however, last time i checked the framework-res.apk, there were only 22 pngs inside, and i assume it has to do with the stats-battery-charging.xml, but it can't be edited in that framework-res.apk

Anyways, i'll try backing up everything and flashing the restore zips before trying again with the mods, following your advices. Thanks for your patience and help. :D
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
I forgot to mention it explicitly in my last post, but i already did this, however, last time i checked the framework-res.apk, there were only 22 pngs inside, and i assume it has to do with the stats-battery-charging.xml, but it can't be edited in that framework-res.apk

And I forgot to say that you need to use that particular framework-res.apk because the one in the pack doesn't have the camera picture used in the power menu (screenshot) ;). Adding that image is not enough, you need to do other things, so it's easier and faster to use that file as base.

And yes, the number of pictures depends on XXXXXXX.xml.
 
  • Like
Reactions: faku1810

faku1810

Senior Member
Jun 14, 2012
175
78
I see, I had noticed that picture was missing when i flashed another framework-res.apk, so i'll just stick to crt off.

I'll see what i can do about that xml then, because the one i get from crt-off framework-res can't be edited using notepad++, plus it has a smaller size than frutchfliege's edited one. Is there any way to replace it / edit it without decompiling the whole apk?
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
I'll see what i can do about that xml then, because the one i get from crt-off framework-res can't be edited using notepad++, plus it has a smaller size than frutchfliege's edited one. Is there any way to replace it / edit it without decompiling the whole apk?

That's how "compiled" xmls look like. You have to decompile it first.


EDIT: sorry, there's writte to use as compression level 0, I missed it.

If you are following fruchtfliege's tutorial and you get bootloops, do this:
....
10. now it's time to paste your modified/downloaded stat_sys...
11. apk manager -> compression level: 0
12. go back to apk manager and type 11 to compile your framework
...

If not, extract the apk and then re-compress it as zip using as compression level 0.


You need to replace the xml with a compiled one, but you need to know what's the corrispective decompressed xml.

EDIT 2:
Try this.
Decompile the apk, edit the xml and then recompile it. Once you did that, take from the recompiled apk the xml and replace it inside my framework-res.apk.
 
Last edited:

faku1810

Senior Member
Jun 14, 2012
175
78
Okay, finally i got it working.. in the end i didn't need to restore and start over again. All i did was decompiling the apk, take a look at how the xml should be edited, worked on that, and after a few errors (which i still don't know what caused, but were gone after some retries) compile it again. Then I could take what i needed and replace the files in the original framework-res.apk and now it works just perfect when charging.

After that was done, i tested your crt on mod, and i can confirm that it works, after being odexed and flashed (I included it in my modded crt-off + circular battery.zip). However, I feel it's not exactly like in this video, but kind of shorter maybe?

Anyways, i wouldn't mind if it was just that because, short or not, it works.. But sadly it doesn't always work, sometimes the screen turns on the "usual" way, I'd upload a video to show what i mean, but my lg gt360's camera is not that good nor it can capture the effect fast enough. I've looked at the tutorial for it and can't find anything that seems related to duration.. This phone is great at making me feel dumb.
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
Maybe the code of the tutorial is not perfect. As of now there's nothing I can do to help. The video is not needed.
Try to ask in sirilpta's thread if there's someone else with the same problem. In this case, you'll know that the problem is the code used.
 
  • Like
Reactions: faku1810

faku1810

Senior Member
Jun 14, 2012
175
78
I'll do that, just for the sake of it :p However you've done an amazing work already and i thank you for that. I'm sorry for taking away so much of your time for such matters, but thanks to you my phone is just like i wanted it to be :D
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Hey guys,

    I made these flashable zips to easly get a stock, but yet powerful, ROM.
    This is for odexed KPU and deodexed KPU.

    If you have any suggestions, leave a message.

    Why odexed? Why not.
    See this if you are interested in modding odexed apks.

    Here the list of mods in this pack (and "how to" if you want to port them to other firmwares): see below for the updates

    Autobrightness doesn't work properly. Basically the sensor determines the current ambient light every Xseconds. If the value is not so different from the previous lux value, it's ignored. That's good because it prevents random brightness changes, however it works well only with the stock values, while the values I set are too close and sometimes the brightness is "stuck". You should do some changes to prevent this: [1], [2]
    FYI: the values I set are not that good. If anyone is interested and know how to change them, here is what I'm using now:
    Code:
        <integer-array name="config_autoBrightnessLevels">
            <item>6</item>
            <item>22</item>
            <item>110</item>
            <item>432</item>
            <item>684</item>
            <item>2780</item>
        </integer-array>
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>3</item>
            <item>20</item>
            <item>35</item>
            <item>50</item>
            <item>110</item>
            <item>180</item>
            <item>255</item>
        </integer-array>


    Note: Clear data for Messaging under Settings->Applications->Manage Applications (it won't delete your messages) to make the changes effective. The stock app can only save one date (sent or received), if you need both of them use another app.

    I changed few things in the theme (I took some images from CyanogenMod 7).
    If you don't like some images, see the last part of this post. (I also wrote why I can't add swipe to remove notifications)
    No additional apps included, no apps removed, no data wipes, no kernel included, no tweaks.

    Downloads:
    odexed
    deodexed
    __________________________________

    Extended powermenu with Screenshot option - thanks to cybert and for this.
    [android.policy.jar, framework-res.apk]
    __________________________________

    CRT off effect: (enable animations: Settings->Display->Animation)
    [framework-res.apk]
    __________________________________

    Incoming Call Ringtone Flip to Mute (thanks to dhiru1602) + No increasing ring (thanks to YG007)
    [Phone.apk]
    odexed
    deodexed
    Sensor Usage
    You might notice some Sensor Usage for Phone app. This is quite normal because the Sensors are used to check the Orientation of the phone. This would last only for the duration of the Call Ring. I have checked to see if the sensors are being stopped and It seems to work fine. Let me know if there are any issues, because if there is any issue with the sensors, it might lead to a battery drain.

    Note: I have configured the sensor settings to be effective only when the phone is resting on a flat surface with the screen upwards. I have found that this type of configuration is required to prevent issues with phone going mute accidentally when its in your pocket and you receive a call. Unfortunately, I don't receive many calls to practically test it for accuracy. Hope it serves the purpose.
    __________________________________

    Toggle buttons shortcut: thanks to M_J_Nazari and _JKay_ for this.
    If you longpress on a toggle button in the notification bar, you'll get to the respective setting page. [SystemUI.apk]
    Flash the pack to restore the original file
    __________________________________

    6 Toggle buttons: http://xdaforums.com/showpost.php?p=26461422&postcount=48
    __________________________________

    Additional zips:
    (these should work on every stock rom)

    Disable TouchWiz sounds
    Sounds disabled: low battery, charger/usb plugged in, battery charged + boot sound (it simply renames some audio files in /system/media/audio/ui/ and /system/etc/):

    Chainfire touchscreen tweaks
    More info here. Probably you won't feel any difference

    Button LED notifications
    More info here. There's no need to use Lightflow, unless you need missed call notifications (Lightflow takes the control of your LEDs, so it's possible that some apps that natively supports LED notifications won't be able to use them).
    You need to do a change in the kernel to fully support this feature.

    If you want to convert the partitions in ext4, use CF-Root-ext4-v1.3u1-Addon.apk. You can get it from here.
    You can easly convert from and to RFS and check filesystem integrity.
    IMPORTANT: Make sure you have at least 10MB of free space in /system before the conversion (you can see the amount of free space from ext4 Manager [CF-Root-ext4-v1.3u1-Addon.apk]), otherwise the conversion will fail, but there's no problem, the addon will automatically convert /system in RFS and restore all the files (the other partitions will be converted in ext4).
    3
    Don't you think that "back+home button" is a bad key combo for taking screenshots?



    Thanks to cybert for this.

    odexed
    extended-screenshot.zip

    deodexed
    extended-screenshot-deodexed.zip

    I included CRT off effect
    I used the wrong framework-res.apk :p

    EDIT:
    Use the zip in the OP to enable CRT off effect.
    If you have downloaded 'crt-off-effect.zip' before, download it again (I added the "Camera" picture used in the power menu).
    2
    Do u think it is better a odexed system or a deodexed one? What are the advantages?

    The problem of an odexed rom is that modding, as you probably know, is harder and some mods don't work, unless you reodex the whole rom (there are some scripts here on xda that does it for you, but doing so you can't use your modded files on a stock rom, they'll only work in your reodexed rom).

    The main difference is that Android doesn't have to generate .dex files for odexed apks/jars (no .dex files in /data/dalvik-cache/ for them"). This brings, as far as I know, these advantages:

    1. The first boot requires less time (Android has to build .dex files only for apps in /data)
    2. /system is a read-only partition, so it's really hard to corrupt odex files, while it's possible to have a corrupted Dalvik cache (I don't think this is a common issue, it never happened to me). This can also gives problems when you flash a zip because the .dex file made before the flash doesn't work with the new apk, but all these issues can be solved with a Dalvik cache wipe (=> point 1).
    3. An odexed rom requires less space in /data (again, see point 1), but it also true that it uses more space in /system (deodexed apk size < odexed apk + odex size), but, as I said, /system is a read-only partition, so there's no need to have free space there.

    But I really don't know if there's any difference in the performance of your rom.
    I'm using an odexed rom because that's how it was when I flashed it. Plus I don't have any problem in modding odexed apk, I even made a shell script that helps me in that (maybe I'll release it, I have to clean the code first), so I had no reason to deodex my rom (the few mods I use are made by myself :D).
    2
    i know this sounds very noob but really wants to know this.if i use odexed rom,may i be able to delete samsung bloatware in /system/apps safely?

    Yes. You can. But in this case you have to remove 2 files: application and odexed resources (they will lie in the same directory.

    Отправлено с моего GT-I9003
    2
    It seems that call recording mod requires too many changes (3 additional libraries and 2 apks to mod), I think I won't do it, sorry.
    If someone needs to record his calls, an app should be enough (for example https://play.google.com/store/apps/details?id=com.record.my.call). You can also use a deodexed mod, just delete all the .apk and the .odex.

    @klau7
    I preferred not to add "Flip to mute" because it could be buggy, an improper implementation could make Phone.apk use too much battery (it obviously needs to use sensors), that means too much effort (testing, debugging etc) for something I don't need. (You can always mute incoming calls by keeping pressed the volume button).


    CRT off effect? See the OP ;)