Change an .apk's resolution - Touch CDMA Android Development

i know myn and K_K have had success resizing things like the desk clock and other stuff but there have been a few .apk's recently that have needed resizing so how would i go about doing it
some of these apps that do include:
the new voicesearch.apk
and the new google voice with widget that can be found here
http://forum.xda-developers.com/showthread.php?t=767084

thoughtlesskyle said:
i know myn and K_K have had success resizing things like the desk clock and other stuff but there have been a few .apk's recently that have needed resizing so how would i go about doing it
some of these apps that do include:
the new voicesearch.apk
and the new google voice with widget that can be found here
http://forum.xda-developers.com/showthread.php?t=767084
Click to expand...
Click to collapse
I believe they use apktool but I could be wrong. I think once you have it broken down, it requires that all pictures be resized also... not sure what the percentage or anything is, but I think there's another tool that can batch resize images.

Most times you use apktool to disassemble the apk then change some values in xml files. Then build a new apk and copy the compiled xml files from the newly built one to the original one. Actually you would then need to sign the modifed apk but as the stuff we usally goes into /system it's trusted and used anyway.
As for resizing bitmaps I did it on the wallpapers not because it was needed but because it was a waste of space using wallpapers made for 480x800 and 320x480. It propably also runs a little faster with wallpapers that has the correct size for the device but noone has measured it asfaik.
As for the new VoiceSearch I did try QVGA adjusting it but for some reason my modified version didn't work so I dropped it. Also the only thing you need to pass the initial dialog is to start it in landscape mode. After that it works fine in QVGA asfaik.

thanks guys! your always helpful

Anybody want to try this for swype? I don't really like HVGA, but I can't type without swype...

Can I get your adjusted GV app, thoughtlesskyle?

know.patience said:
Can I get your adjusted GV app, thoughtlesskyle?
Click to expand...
Click to collapse
i never got around to doing it actually

kallt_kaffe said:
Most times you use apktool to disassemble the apk then change some values in xml files. Then build a new apk and copy the compiled xml files from the newly built one to the original one. Actually you would then need to sign the modifed apk but as the stuff we usally goes into /system it's trusted and used anyway.
As for resizing bitmaps I did it on the wallpapers not because it was needed but because it was a waste of space using wallpapers made for 480x800 and 320x480. It propably also runs a little faster with wallpapers that has the correct size for the device but noone has measured it asfaik.
As for the new VoiceSearch I did try QVGA adjusting it but for some reason my modified version didn't work so I dropped it. Also the only thing you need to pass the initial dialog is to start it in landscape mode. After that it works fine in QVGA asfaik.
Click to expand...
Click to collapse
Hello there, i am new in this development. I did successful disassembler the apk. But i am not sure how to resize the resolution from 320x480 to 320x240. I am not well verse into xml programing. I would really appreciate if you could assist me on doing it. Please advice.
Thanks a million in advance.
rgs
Ang

i have some question. how if i want to play games that higher than my resolution?? for example, my phone was xperia x8 and i want to play eternal legacy. and now, is there posible to edit an apk and change resolution so it can run on my device??

actiually i want to make rock band playble in my x8 since i notice rock band game screen are too large for my device. i really want rock band so bad

kang_hae_na said:
actiually i want to make rock band playble in my x8 since i notice rock band game screen are too large for my device. i really want rock band so bad
Click to expand...
Click to collapse
Have you found a solution for Rock Band?

Related

Problems with modifed Startup-GIF´s

Hello everybody,
this is my first post in this forum and my english is very bad, because i am an bavarian noob I take my german text to the google-translator an this is the result:
I have tried to change my startup screens what has failed miserably. I have the original files with the trail version of Ulead Gif Animator processed and pushed to the Hero. The results you can see here. I have the orig. and modifed attached files. Can anyone of you tell what went wrong?
Thx,
the bavarian opallabtb
I noticed whilst browsing the Hero file system (in root somewhere) that there are a number of config files for boot and on my Orange Hero, an Orange startup animation.
No idea how you do it (rooted & text editor maybe), but you will probably have to edit these
thank you joemax for your quick answer.
There is only one xml file in the folder /system/media. It calls boot_animation.xml
I didnt touch this file. The names of the modifed files are the same as the original ones. Is it possible that the Ulead gif animator change anything in the gif file (transparent background, etc)?
greets
Sorry, I have no idea then. My depth of knowledge at this point is very poor
Can the Hero actually play the gig animation you copied across ?
I use ASTRO to browse my Hero, it plays and views images, video and gif files. Try to see if its actually playable 1st.
Sorry but thats all I can think could be causing it.
I bet you crapped yourself when you first saw that messed up boot screen
I've had a look at the gif files you're using and they differ from the originals. The ones you made, each frame has different background properties. If you look at each frame in the original, they're all 320*480 with a background colour index of 199; they all have a black (transparent) background of 320*480.
But the modified gifs have frames which don't have the same sized and colour index backgrounds, and this is the only thing I can see that would cause the problem. When you view them in windows picture viewer, they show up fine; I think it's something to do with the transparency and the fact that the first frame IS the right size and colour but the rest are not.
In fact now that I look at your video again I'm certain this is the case. I know how to fix this, what program did you use to modify the frames?
Edit: Okay maybe I should read posts better, you used Ulead Gif Animator. If you can send me the individual images of each frame I could put this together for you in a way I'm sure will work
Hi,
thank you for your support!
Switchbitch said:
I bet you crapped yourself when you first saw that messed up boot screen
Click to expand...
Click to collapse
lol, yes it was. I thought I would have an expensive paperweight
I dont know how to do this:
Switchbitch said:
If you can send me the individual images of each frame I could put this together for you in a way I'm sure will work
Click to expand...
Click to collapse
Can you take the Frames/Pics or whatever you want from the "modifed.zip" package?
Thank you!

Weather Widget from 2.0 BackPorted

I searched the forum to see if someone had done this and couldn't find it. I back ported the weather widget from 2.0 in case anyone is interested (works fine on donuts). This is the beginning of my development work. Hope this helps!
Please just take the .zip file and rename it to .apk
copy to your sdcard and install with any file explorer or
connect your device to your pc with development enabled
type "adb install MotAccuWeatherWidget.apk"
Red
G1 with latest Cyan
Thank you to this site and all the developers for their inspiration and hard work.
This has been around for a while...
Good work, though. Kudos and thanks for the effort.
Oh, sorry. I guess I'll probably get flamed by like 30 ppl now. lol. I guess I will try my hand at the Dock applications, unless that has been done too?
Red
redd12345 said:
Oh, sorry. I guess I'll probably get flamed by like 30 ppl now. lol. I guess I will try my hand at the Dock applications, unless that has been done too?
Red
Click to expand...
Click to collapse
If anyone flames you, they're stupid. You did good work, even if it was in vain. Car Dock has been ported to Donut, though I don't think the little nightstand Dock from Droid is running on anything prior to 2.0... Not sure, though, as it doesn't interest me all that much.
thanks for the encouragement. is there a list of things that show what needs to be back ported or which ones have already been? I want to contribute.
Red.
redd12345 said:
thanks for the encouragement. is there a list of things that show what needs to be back ported or which ones have already been? I want to contribute.
Click to expand...
Click to collapse
Not to my knowledge. It might not be a bad idea for one of the leading devs to start a thread here on things we want from new phones to run on our phones, and check them off as they are accomplished. 75% of the list would be from the Nexus One, at the moment. You really want to help? See what you can do to get Launcher2 from the Nexus working on Dream... Just changing the build.prop doesn't work, so we'll have to fix errors one by one. Hope you're better at coding than I.
There is also more info in the Dream app section, where these apps are usually released...good work, keep it up!
Hi, there's a version that does not work with 1.6 (only 2.X). Which version is?
BR.
I'm not sure. I pulled this weather widget from Eugene373's AOSP Rom port and hex edited the AndroidManifest.xml to make the MinSDK 3 instead of 5. I can't tell you much more than that. I hope this helps you.
Red.
Give this widget a shot and see if it's the one you are looking for. At least one person might make use of it. haha
Red
yukkio said:
Hi, there's a version that does not work with 1.6 (only 2.X). Which version is?
BR.
Click to expand...
Click to collapse
So, does anyone know if this will work on 1.6? Cyanogen MOD ROM?
It will work on any 1.6 rom. I am running Cyanogen's 11.1 (most recent.) This widget typically works on most people's "custom roms" as long as the 1.6 base is the same, it's just that there is a MinSDK value that prohibits users on a lower SDK from using the application. I dropped that value to 3, so I think that it should also work on hero roms (1.5 cupcake base) if someone likes the graphics on this widget better than the weather app that is included. Hope this helps.
Red.
Ps. I am going to be trying my hand at creating themes instead. My only experience with programming was C++, Pascal, and Visual Basic and that was close to 8 years ago! lol. I'm a little outdated as far as Java goes.
I'm really looking forward to using Stericson's Metamorph. It is such a great effort for theme development.
i sure could use it im new to xda im non root for now, but i would like to make a few nice add ons to my mt3g till i get the guts to root. is thr some good stuff here for a non root like me
Awesome job. I appreciate the work.
Odd question though, what do you do in the process of back porting? I'd love to learn..
Nice Widget, thanks. I was using weathereye before. I like this one better.
Thanks. In the case of this widget, it was ok to backport it because it doesn't call on any other functions that are proprietary to a specific rom (ie. Happenings widget from Blur calls tons of other functions in the home.Blur). There are a few places online when you look up backporting (I'll try to remember to post the links for people.)
You want to start by unziping the aplication you want to backport. Just rename it to a .zip file.
When you look in the file, you will see AndroidManifest.xml. This file has been compiled out as a binary file so you can't read it like a normal .xml file. You want to then download AxmlPrinter2.jar and run that to change the AndroidManifest.xml to AndroidManifest.txt by typing "Java -jar AmxlPrinter2.jar AndroidManifest.xml > AndroidManifest.txt"
The hard part is to find the byte offset in the AndroidManifest where it says the MinSDK value is. The MinSDK value needs to drop from 6 or 7 down to "2" so that you can use the widget on Cupcake or higher. There is a program online and I will post the link when I get home that you use with Eclipse to find the byte offset and then you have to use a Hex editor to change the value in the original .xml file.
Once you use the hex editor and save your changes, you zip up all the files and use the apkbuilder.exe that is in the sdk tools directory by typing "apkbuilder application_name.apk -z application_name.zip"
that will make an apk from a zip file and then you right-click and resign the apk file. From there, you just copy it to your sd card and you know the rest.
It is a pretty dirty and painful approach to porting an app. That is why I am more interested in working on themes. You can just unzip the apk's you want to use and edit the /res directory and then rebuild the app and sign it. Photoshop works great for it.
I'm planning on making a theme/rom that uses hero (1.5) for a base, but slimming it down and using widgets that are smaller like the one that I ported and changing a lot of the graphics for the clocks and such.
I hope this helps for anyone interested in developing.
Red.
Wisefire said:
Awesome job. I appreciate the work.
Odd question though, what do you do in the process of back porting? I'd love to learn..
Click to expand...
Click to collapse

[Application] Mac: Convert HDPI images to MDPI

Beta!
I Put together this small application last night.
Pretty Simple, but it does the job well
Use it to convert Images from HDPI themes (nexus one, galaxy s, droid, etc.) To MDPI to use on your phone (Magic, G1 and other smaller devices)
Just select a bunch of image files (using shift) and press OK. This will decrease the selected images by 75%, suitable for an MDPI resolution screen.
Works on Snow Leopard. Not to sure about older operating systems
Could throw another one together to convert MDPI to HDPI on request.
Enjoy! suggestions welcome
Updated: Added some extras I guess I should call this release.. 0.8, because i'm still not sure if its working properly..
Nice i wil test it later when im on my mac but thanks this will save lots of time for loads of people
Crap i dont have a mac
Someone had asked in my thread regarding this. I found that 66% was adequate for mdpi as it brings it as close to its original resolution. The .9png's have to be excluded however when resizing. Even then, the end result isnt what i would call perfect but its a start.
Great work regardless.
Working on 10.5 Lepoard - Macbook Air - I havent tried out converting the files yet but it opens so thats good i'll say in about half hour if its working good Thanks
It shows that it's working for me, but it just closes before it even starts.
Come on guy. I want to Port over a few Themes to my G1. Any idea?
good stuff!
U guys don't mind having to resize certain images ? If no, then im almost done a beta version of hdpi-to-mdpi for theme-porter. Would be awesome if u cud test it out
I'll test it out. Hopefully it'll work better then this.
Original Android <3ers! said:
It shows that it's working for me, but it just closes before it even starts.
Come on guy. I want to Port over a few Themes to my G1. Any idea?
Click to expand...
Click to collapse
It closes but look at your status bar it does it up there mate dw
hehe lol
Hello Children
Are you sure you want to do this?
Yeah why Not
Click to expand...
Click to collapse
MacaronyMax said:
It closes but look at your status bar it does it up there mate dw
hehe lol
Click to expand...
Click to collapse
Actually, when I press it, it closes the whole thing.?
Sorry about that, it does it in the background once you confirm. Don't know how to make it show the progress. It takes about One minute to do 700 images on my computer.
.9.png files too?
And how does this effect the .9.png files that when edited you lose the guides and thus messing up your theme? I had noticed that if you so much as open some of them up and make any changes at all it will mess everything up.
Here's something worth looking into.
http://forum.xda-developers.com/showthread.php?p=8312390#post8312390
any such app for windows too? similar type of an app?
Does this also work MDPI>HDPI? Quality doesn't matter for me .

display resolution

the display resolution of my wildfire is so **** looks like i an using some old black and white handset, i got rooted wildfire any one knows how to get it better? thanks
adb pull /system/build.prop
Edit the file
find "ro.sf.lcd_density = 120"
change 120 to something like 100
save
adb push build.prop /system/build.prop
thx but no idea
thx buddy but i dont know how is that all done
i have adb installed in my computer though
what rom are you using?
post your build.prob here and i could make an zip to flash
Well the resolution is what it is. I don't know if changing the dpi of the screen would make it look sharper or anything , but the resolution is hardware. Not changeable by software.
ok
i just want the texts to be sharper than it is now, coz i cant read any thing on web unless i zoom in, texts are fractioned so its hard to understand
avseq said:
i just want the texts to be sharper than it is now, coz i cant read any thing on web unless i zoom in, texts are fractioned so its hard to understand
Click to expand...
Click to collapse
when maybe dpi should be 140.
but less things will fit on screen but they should be bigger, like a "zoom in"
info
i am using wildpuzzlerom v7.2
build no
1.28.1107.2 cl233281 release keys
wildpuzzlerom7.2 files
thanks
thankyou i will try and post the result
avseq said:
thankyou i will try and post the result
Click to expand...
Click to collapse
yes please post result, as i cant test them my self right now.
wht abt colour
gyz what abt the colour, colour looks really bad on wildfire if i install a new theme will it change the colour setting or is there any other trick to get better colour?
I just tried this and the results... well adwlauncher got a really interesting the actionbutton background totally messed up and the icons in notification actually looks worse. Text is slightly better i think though. All in all , no thanks. 8)
(and the resolution is still the same , but the ui 'takes up less of the screen' sorta)
Going the other way might make it look nicer , but i suspect the same problems arise , and also icons would hardly fit and so on... less space for stuff on the screen is a bigger problem than a little bit uncrisp graphics imo.
Edit: Didnt see your packages there Danne , i ripped it out and edited it , gonna try 140 too tho.
messy
i tried with the 140 one
things are proper messed up now its pretty worse thn i xpected, i am gonna try 100 one and post the result
Tried both now.
Apps don't scale that well , i guess the dpi change works on the larger phones cause they have the space to let text fit anyway and so on. Snowstorm in 140 has text all over it , adw actionbuttons are better but not that good and so on...
So then we could drop this idea for mean while
result for 100
tried the 100 one. texts looked a little bit better to me but things wont fit in the screen like when there is an app on homescreen text are half visible, not good, any other idea gyz?
and one more thing can anyone send me apk for rom manager because somehow my market wont show rom manager and tried scanning the qr code still wont work. it would be great, thanks for trying to help everyone, hope someone finds a better way.
danne_jo said:
So then we could drop this idea for mean while
Click to expand...
Click to collapse
Yeah, to be honest i didn't expect it to really get better , i did think the system would be better att resizing it all though.
As i said earlier , it's the resolution on the wildfire that isn't good enough to get the crispness of other phones.
I have a question about the .zip's you post too btw.
Would it be possible to switch the build.prop inside the archive and flash that, or is there some kinda checksum that would only allow the original file to be inside?
If it is possible to change the files , would you mind putting together a .zip that copies files into /system/fonts/ ?
I downloaded linux and stuff to try to get a rom-cooker working but my linux skills are fail. Hmm , is there a windows cooker available?
71baker said:
Yeah, to be honest i didn't expect it to really get better , i did think the system would be better att resizing it all though.
As i said earlier , it's the resolution on the wildfire that isn't good enough to get the crispness of other phones.
I have a question about the .zip's you post too btw.
Would it be possible to switch the build.prop inside the archive and flash that, or is there some kinda checksum that would only allow the original file to be inside?
If it is possible to change the files , would you mind putting together a .zip that copies files into /system/fonts/ ?
I downloaded linux and stuff to try to get a rom-cooker working but my linux skills are fail. Hmm , is there a windows cooker available?
Click to expand...
Click to collapse
You can mod package without re-signing them with SignApk, it's only recommanded to signapk when you mod vanilla.apks
71baker said:
Yeah, to be honest i didn't expect it to really get better , i did think the system would be better att resizing it all though.
As i said earlier , it's the resolution on the wildfire that isn't good enough to get the crispness of other phones.
I have a question about the .zip's you post too btw.
Would it be possible to switch the build.prop inside the archive and flash that, or is there some kinda checksum that would only allow the original file to be inside?
If it is possible to change the files , would you mind putting together a .zip that copies files into /system/fonts/ ?
I downloaded linux and stuff to try to get a rom-cooker working but my linux skills are fail. Hmm , is there a windows cooker available?
Click to expand...
Click to collapse
yes you can change build.probs in the zip
just make a folder called fonts and put that in one of the zips i added in this thread. remove build.prop and you should have a zip that update the fonts

Dell Stage UI Port

Since seeing the Dell Streaks UI (Dell Stage Launcher) i downloaded it and put it on my phone. As a launcher it works great, but there are alot of issues. So I am going to work on porting it over to the Eris, becasue it is a well built fast ui ( i am clocked at 710 and there is not lag). But I do need some help so this will be a slow process.
Here we Go
Ok im already pretty lost any suggestions on where to start?
we're all gonna need "a little" more than "i started to port a rom and am now stuck, please help."
what have you done? what's the ROM doing? booting? any errors when DDMS is running? what are they? logcat?
the streak has an 800×480 pixels resolution display, correct? so there are gonna be some sizing issues that you'll have to correct as well (honestly, a PITA)...
on top of that, isn't the streak still on 1.6? has it got a 2.2 update yet?
or... are you JUST using the launcher? or the entire ROM?
i don't mind helping anyone here when i can... just need a little to work with
tenzomonk said:
we're all gonna need "a little" more than "i started to port a rom and am now stuck, please help."
what have you done? what's the ROM doing? booting? any errors when DDMS is running? what are they? logcat?
the streak has an 800×480 pixels resolution display, correct? so there are gonna be some sizing issues that you'll have to correct as well (honestly, a PITA)...
on top of that, isn't the streak still on 1.6? has it got a 2.2 update yet?
or... are you JUST using the launcher? or the entire ROM?
i don't mind helping anyone here when i can... just need a little to work with
Click to expand...
Click to collapse
Its not the rom i am porting its dells Stage UI it is a launcher
The streak is going to get 2.2 here soon. But this was leaked. I have it installed and it runs no FCs which is a plus. Off the bat i did notice that there is a massive screen resolution difference so it doesnt like to scale like you said. That is what i am trying to over come. I am sort of a newbie at this so i am doing research at the same time to expand and learn.
Somethings i am noticing.
1. It looks like portirate and landscape are backwards. So the widgets are all funky.
2. When first booting up there are no icons in the app draw.
At this current moment i am installing all the android development tools that i will need (Eclipse and so on, I already have Android Sdk installed). But im trying to get my hands on ADW's apk to compare the xml files for how ADW scales to different resolutions so i can apply that to Dells Stage UI
Thank You in advanced for dealing with a newbie who wants to learn.
gotcha!
i've got the files sitting here.
it looks pretty nice... but you'll have to resize all the png files each of the apks... as well, you'd have to edit (hex) a few of the xml's as well.
the resizing might be tricky, as the resolution isn't an "even" scale with our screen res. 320 x 480 "x" 1.5 = 480 x 720... but that would probably look ok and be best "match"
however, i've done LOTS of editing of the png's in many files, roms (theming, etc)... and it's quite "enjoyable" hex editing... meh, not really my strong point!
would definitely be "sexy" to pull it off! hopefully someone smarter then me can give some insight to the hex editing
did you have to use/install the LCD density change too? http://forum.xda-developers.com/showthread.php?t=765639&highlight=dell
tenzomonk said:
gotcha!
i've got the files sitting here.
it looks pretty nice... but you'll have to resize all the png files each of the apks... as well, you'd have to edit (hex) a few of the xml's as well.
the resizing might be tricky, as the resolution isn't an "even" scale with our screen res. 320 x 480 "x" 1.5 = 480 x 720... but that would probably look ok and be best "match"
however, i've done LOTS of editing of the png's in many files, roms (theming, etc)... and it's quite "enjoyable" hex editing... meh, not really my strong point!
would definitely be "sexy" to pull it off! hopefully someone smarter then me can give some insight to the hex editing
did you have to use/install the LCD density change too? http://forum.xda-developers.com/showthread.php?t=765639&highlight=dell
Click to expand...
Click to collapse
Yes i did but it didnt do anything so i guess im down to editing the pngs...here we go again.....where are the PNG's?
Might be of some help
http://www.ubergizmo.com/15/archives/2010/11/htc_evo_4g_gets_dell_stage_user_interface.html
for png locations... use 7zip (or your favorite archiving program)... open up each of the apks...
you will find all the png's in the various folders
Has anyone got a port of the entire ROM to boot? Mine bootloops and I haven't had time to really look into it.
tenzomonk said:
for png locations... use 7zip (or your favorite archiving program)... open up each of the apks...
you will find all the png's in the various folders
Click to expand...
Click to collapse
That is the first thing i did ( i did use seven zip) but there are no png files. I pulled appart the actual launcher to get started on that because i think if that gets fixed the widgets might be de-opxted. so they should scale. Other than that in all the files it is either xml or orl.....wait i found them lol great . Any sugestions on what programs to use to edit them?
gnarlyc said:
Has anyone got a port of the entire ROM to boot? Mine bootloops and I haven't had time to really look into it.
Click to expand...
Click to collapse
Running an Eris kernel in it?
Has the rom been deodexed?
Stonent said:
Running an Eris kernel in it?
Has the rom been deodexed?
Click to expand...
Click to collapse
Well, yes and yes, of course. I took DJ Steve's Froyo and ported it. Not real successfully yet, but I gave it a try. If I get a chance, I'll logcat the boot if it gives me such a thing.
okay I'm also working on this but for the sprint hero. The launcher and it's widgets install fine without any mods (running cyanogen 2.2) But of course since it's an mdpi device it's really out of whack. So far I was able to change the shared uid by removing the meta-inf from all the apks and resigning them all using release keys. I then used apk manager to decompile the apks. I can decompile and recompile the widgets no problem but when it comes to the launcher it doesn't compile. Of course without the launcher having the correct dimensions none of this really matters. If anyone has any ideas.
Almost forgot that this is basically the same stock launcher that comes in 2.2 so the dimensions could pretty much be copy pasted over

Categories

Resources