[DPI] Dialer, MusicPlayer, Calc, FM, Camera + GUIDE +utility(kinda)

Search This thread

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
Thanks Xan.... I was reading the post and I didn't link in my brain that the dialer was needed. Your awesome!!! Now does the Dialer just simply overright the existing when installed? I assume so....
Hm, you need to have r/w mounted system and adb push this .apk to /system/app/

When most of apps will be done I will pack them into one update.zip and release as a whole.
 
  • Like
Reactions: slider2828

faruko1

New member
Mar 13, 2010
4
0
rah it actually works! im trying to change the FM radio. did as the instructions said and multiplied some of the dips by 1.5 and changed it from dip to px. and it comes out ok... ill change whats left of dips later and attach the FM radio.

you was right it does take time:(
 

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
rah it actually works! im trying to change the FM radio. did as the instructions said and multiplied some of the dips by 1.5 and changed it from dip to px. and it comes out ok... ill change whats left of dips later and attach the FM radio.

you was right it does take time:(

Dont bother :)
I've made a simple command line utility to convert xml files from apks.
Source + binary + info incoming.
 

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
update:
added FMRadio and MusicPlayer (full)
[MultiDPI]GalaxySpack-CWM.zip
Contains all mods of STOCK done by me.
layout_resize.zip
source+bin of xml patching utility
 
  • Like
Reactions: ock and faruko1

faruko1

New member
Mar 13, 2010
4
0
update:
added FMRadio and MusicPlayer (full)
[MultiDPI]GalaxySpack-CWM.zip
Contains all mods of STOCK done by me.
layout_resize.zip
source+bin of xml patching utility

There are a couple of apps that werent modded in the cwm zip:
  • Allshare
  • Calendar
  • Clock
  • Camera
  • Write and go
  • Voice recorder
  • Aldiko eBook

Thanks alot dude!
 

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
Looked into Camera -> almost fixed.
Calendar and Clock looks complicated..

When it came to Calculator or Dialer it was an easy shot since none of their parts should scale with DPI. In calendar and clock some parts should scale while others should get a fixed dimension. Will run a simple 'replace all' scenario (maybe tomorrow, kinda bored) over them; will see what happens.
 
  • Like
Reactions: slider2828

slider2828

Senior Member
Jul 19, 2010
1,153
128
Looked into Camera -> almost fixed.
Calendar and Clock looks complicated..

When it came to Calculator or Dialer it was an easy shot since none of their parts should scale with DPI. In calendar and clock some parts should scale while others should get a fixed dimension. Will run a simple 'replace all' scenario (maybe tomorrow, kinda bored) over them; will see what happens.

Thanks for doing this. Its soooo awesome, but I think if you start working on stuff like galaxy tab stuff, you could do some of these things.
 

SamHaLeKe

Senior Member
Aug 17, 2010
2,215
3,316
Brussels
You did it xan! awsome pack... working on 182 dpi here

A very nice side effect is that the dialer and contacts now open INSTANTLY by clicking on it, no more waiting! I think it's due to the hard compression?

Nice work as allways

Sent from my GT-I9000 using XDA App
 

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
You did it xan! awsome pack... working on 182 dpi here

A very nice side effect is that the dialer and contacts now open INSTANTLY by clicking on it, no more waiting! I think it's due to the hard compression?

Nice work as allways

Sent from my GT-I9000 using XDA App

Noticed it too... Dialer seems to work faster. Its compressed, yes.

//edit:
Attached multi-dpi Camera.apk (the one hacked by Fr4gg0r) its not perfect but somewhat better.
 

Attachments

  • Camera.apk
    2.4 MB · Views: 429
Last edited:

faruko1

New member
Mar 13, 2010
4
0
ooh i just found the video player doesnt scale THAAT well, its a tiny thing. The volume bar isnt aligned properly and the bar on the bottom, whatever its called that lets you scrub through the video, that doesnt make full use of the space.
 

rori~

Senior Member
Aug 21, 2009
4,209
820
Vienna
Just noticed this thread here...
I know this density prob too.

Using Nexus One with density 220 (default is 240), I edited FM.apk for my use.
But unfortunately, I dont think it´s usefull for your Galaxy phones, sorry.
 

Attachments

  • compare.jpg
    compare.jpg
    77.4 KB · Views: 336

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
ooh i just found the video player doesnt scale THAAT well, its a tiny thing. The volume bar isnt aligned properly and the bar on the bottom, whatever its called that lets you scrub through the video, that doesnt make full use of the space.

Fixed that. It was quick :)

BTW: I would like to encourage ROM makers to include these modified apps I post - there is no difference in default (240) setting and it adds scaling. Why cant we have MULTIDPI rom out there?


Tried repacking ClockPackage.apk and TouchWizCalendar.apk with no success.
Only way I figured to get them working is answering yes and yes in script; but changes in styles.xml and dimen.xml dont seem to make any effect that way.
 

Attachments

  • VideoPlayer.apk
    521.1 KB · Views: 279
Last edited:

aladin6

Senior Member
Mar 7, 2009
2,230
356
Redmi Note 10 Pro
Thank you xan !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I use your VoltageControl app and this pack for changing stock apps when changing density !!!!!!!
Thank you.
 

Einride

Senior Member
Sep 8, 2010
370
120
* now there comes my small commandline java utility - it resizes (replaces hardcoded dip values with 1,5 times bigger rounded px values) layouts in files passed by commandline.
-copy .xml files you want to modify to its dir;
-invoke by (windows!):
Code:
for /f %a IN ('dir /b *.xml') DO call java LayoutResizer %a
(idk why resize_all.bat doesnt work)

The batch file doesn't work because in batch files you need to use %% in front of variables, as opposed to just one when entering commands on the command line. Yes, it's confusing :)

So put this in the resize_all.bat:

Code:
@echo off
for /f %%a IN ('dir /b *.xml') DO call java LayoutResizer %%a

(@echo off is of course just to reduce the text output in the terminal window, as you probably know :) )

Thanks a lot for your work on this, xan!
 
  • Like
Reactions: xan

Einride

Senior Member
Sep 8, 2010
370
120
Thanks :) this will make it even easier :)

Here's a Python script that should do about the same as the java application and the batch script (a similar shell script for *NIX along with the java app would of course work, but that would be too easy :D):

Code:
import sys, re, fileinput, glob

pattern = re.compile("([0-9]*)(dip)")
xmlFiles = glob.glob("*.xml")

def dipReplace(matchObject):

    dipValue = int(matchObject.group(1))
    pxValue = round(dipValue*1.5)

    return str("{0}px".format(pxValue))

for line in fileinput.input(files=xmlFiles, backup=".bak", inplace=1):
    sys.stdout.write(re.sub(pattern, dipReplace, line))

Save the script as LayoutResizer.py or whatever you want to call it :)

Should run on Python 2.4 and higher at least, tested on 3.1 (Windows) and 2.4 (RHEL5). Put the XML files in the same folder as the Python script and run the script. Backup files will be made (*.xml.bak) in the same folder as well.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hello, you all know that when you change screen density in build.prop a problem with some apps appears.

    [MultiDPI]GalaxySpack-CWM.zip contains Dialer, Music Player, FMRadio, Calculator
    all modded to support multiple DPI
    You can just flash this via CWM or extract individual APKs and replace them in /system/apk/
    Newest: Camera.apk
    Video Player
    How to do it yourself? (example on DialerTabActivity.apk)
    * its quite easy, if you want do fix any app you need to know how to edit .xml files, have some basic knowledge about android layout files. If you just want to repack Dialer its easier, because I supply the layout file you just need to recompile the file with apkmanager replacing one of layout files
    - download layout_resize.zip file attached (you are welcome to improve the app);
    - download APK Manager;
    *optional step, not sure if its needed: get framework files from your device and goto apk_manager_4.9\other and install framework files:
    Code:
    java -jar apktool.jar if "[dir]\apk_manager_4.9\twframework-res.apk"
    Code:
    java -jar apktool.jar if "[dir]\apk_manager_4.9\framework-res.apk"
    - copy DialerTabActivity.apk from your device to "\apk_manager_4.9\place-apk-here-for-modding"
    - start script.bat and select decompile apk (if it doesnt work you probably need to do optional step and then try with dependencies, skipping part where it asks for apks)
    * now there comes my small commandline java utility - it resizes (replaces hardcoded dip values with 1,5 times bigger rounded px values) layouts in files passed by commandline.
    -copy .xml files you want to modify to its dir;
    -invoke by (or just use convert_all.bat, now working, thanks Einride!) (windows!):
    Code:
    for /f %a IN ('dir /b *.xml') DO call java LayoutResizer %a
    (idk why resize_all.bat doesnt work)
    - modified files are in converted directory, you need to copy them over files in apk_manager_4.9\res\

    - hit compile apk
    - select yes for system apk and yes for min # of errors
    - delete \apk_manager_4.9\keep\resources.arsc and \apk_manager_4.9\keep\res\layout\dialer_app.xml (and any other xml file corresponding to one you have modified
    - hit any key
    - the apk you need to copy back to your phone is \apk_manager_4.9\place-apk-here-for-modding\unsignedDialerTabActivity.apk

    If any rommakers would like to include these apks feel free to do so :)
    Also you are welcome to fix remaining apps including:
    -clock
    -calendar
    -allshare


    kudos:
    APKTOOL + SIGNAPK authors :)
    APKMANAGER author :)
    4
    If you guys are interested still in MultiDPI. Please PM me cause I this is a very old thread and not many people check it any more.
    2
    Thanks :) this will make it even easier :)

    Here's a Python script that should do about the same as the java application and the batch script (a similar shell script for *NIX along with the java app would of course work, but that would be too easy :D):

    Code:
    import sys, re, fileinput, glob
    
    pattern = re.compile("([0-9]*)(dip)")
    xmlFiles = glob.glob("*.xml")
    
    def dipReplace(matchObject):
    
        dipValue = int(matchObject.group(1))
        pxValue = round(dipValue*1.5)
    
        return str("{0}px".format(pxValue))
    
    for line in fileinput.input(files=xmlFiles, backup=".bak", inplace=1):
        sys.stdout.write(re.sub(pattern, dipReplace, line))

    Save the script as LayoutResizer.py or whatever you want to call it :)

    Should run on Python 2.4 and higher at least, tested on 3.1 (Windows) and 2.4 (RHEL5). Put the XML files in the same folder as the Python script and run the script. Backup files will be made (*.xml.bak) in the same folder as well.
    2
    update:
    added FMRadio and MusicPlayer (full)
    [MultiDPI]GalaxySpack-CWM.zip
    Contains all mods of STOCK done by me.
    layout_resize.zip
    source+bin of xml patching utility
    1
    Try checking/unchecking compatibility mode in spare parts.

    ANY DPI pixel-perfect dialer added to first post :D
    About requests I've received recently: now you can do it yourself :)