APK optimazation - G1 Q&A, Help & Troubleshooting

I want to get into optimizing apk's like the 2.0 launcher stock is 9mb. I already make my own roms for my phone but how exactly do i open a apk to get to its contents?
EDIT Nevermind I feel kinda stupid if you cant figure it out try opening it with winrar. LOL

You make your own ROMs yet you dont know how to open an apk?

Well i mostly just rip out what i don't need from other roms. I shuda figured .apk is just a.zip cause everything on android is a .zip of someform lol

Related

HELP!! Extracting and Repacking .cramfs files

ok well since i cant get an answer anywhere else what program will alow me to extract the framework pictures to theme the new JFv1.51 update? 7ZIP doesnt recognise the .cramfs files and was also wondering what to use to repack it. im sure Im not the only one that would appreciate this information. and if its been posted somewhere else im sorry for the repost.
google ".cramfs" theres alot of results
i did sir only thing that comes up is how its a huge process and blah blah blah dont worry im sure someone will help me thanx anyways
After looking into it, it looks like it can only be done in linux. I tried looking at doing it through windows but nothing came up, which sucks. Looks like I won't be upgrading to JF1.51. O well I have JF1.5 ADP running how I want it anyway
Beast84 said:
After looking into it, it looks like it can only be done in linux. I tried looking at doing it through windows but nothing came up, which sucks. Looks like I won't be upgrading to JF1.51. O well I have JF1.5 ADP running how I want it anyway
Click to expand...
Click to collapse
exact same thing that i found and everywhere i look makes it seem like its this overly complicated process and the 1.51 version is really gonna suck if someone doesnt find a way to make it easy to theme.
my 1.50 is also running awesome but unfortunately the problem is just like everything else in xda if you dont keep up you get left out and im kinda getting a little anxious because i feel like i always wanna have the new **** lol but yeah lets see what people figure out.
if nothing gets figured out with the JF build then maybe ill end up moving to another more easily customizable build let it be dudes or haykuros i dont know we'll see
LatinSilEighty said:
exact same thing that i found and everywhere i look makes it seem like its this overly complicated process and the 1.51 version is really gonna suck if someone doesnt find a way to make it easy to theme.
my 1.50 is also running awesome but unfortunately the problem is just like everything else in xda if you dont keep up you get left out and im kinda getting a little anxious because i feel like i always wanna have the new **** lol but yeah lets see what people figure out.
if nothing gets figured out with the JF build then maybe ill end up moving to another more easily customizable build let it be dudes or haykuros i dont know we'll see
Click to expand...
Click to collapse
if your on ADP 1.5, you should have no issue moving to JF151 and keeping the same theme made for JF1.5 (ADP1) (i had no issues).
as an aside,
in comparison to gloss theme template or stock theme template:
i noticed byte size differences in classes.dex and or resources.arsc in these system apps:
launcher.apk
maps.apk
mediauploader.apk
networklocation.apk
phone.apk
services.jar (classes.dex) had a byte size difference
pershoot said:
if your on ADP 1.5, you should have no issue moving to JF151 and keeping the same theme made for JF1.5 (ADP1) (i had no issues).
as an aside,
in comparison to gloss theme template or stock theme template:
i noticed byte size differences in classes.dex and or resources.arsc in these system apps:
launcher.apk
maps.apk
mediauploader.apk
networklocation.apk
phone.apk
services.jar (classes.dex) had a byte size difference
Click to expand...
Click to collapse
good information bro atleast i get to keep my theme
i started to port a theme when i came across the framework.cramfs file. i tired winzip and winrar, i get nothing. i also googled and didnt come across anything but what is a .cramfs file. so i just went back to JF v1.51 ADP and used the custom ported theme i have.
sir*mez said:
i started to port a theme when i came across the framework.cramfs file. i tired winzip and winrar, i get nothing. i also googled and didnt come across anything but what is a .cramfs file. so i just went back to JF v1.51 ADP and used the custom ported theme i have.
Click to expand...
Click to collapse
yeah i did the same thing... im on JFv1.51 now and wanted to port over a new theme im working on and ran into the same road block... framework.cramfs
....you know what really grinds my gears... lol
so i guess back to 1.5 untill a new point in time...\
ALSO
i tried to add the white clock "services.jar" into this and didnt work... but the custom menu lock screen aparently did in this version.. if that helps
hey guys i figured out how to get framework.cramfs to show up as framework-res.apk ,,if you use astro file browser on your phone ,you can go to /system/framework , and just copy framework-res to your sdcard then ,connect to your pc and you will see the framework-res.apk.. I can't resgin so thats as far as i got,,,
Hope this helps
dan0zone said:
hey guys i figured out how to get framework.cramfs to show up as framework-res.apk ,,if you use astro file browser on your phone ,you can go to /system/framework , and just copy framework-res to your sdcard then ,connect to your pc and you will see the framework-res.apk.. I can't resgin so thats as far as i got,,,
Hope this helps
Click to expand...
Click to collapse
So on the phone in /system/framework, it doesn't show the framework.cramfs? It shows the files that are supposed to actually be in the folder?
yep as an .apk , well I only used astro,but yes seems to be the case
this should explain why google changed it >>>>more space<<<
http://en.wikipedia.org/wiki/Cramfs
dan0zone said:
yep as an .apk , well I only used astro,but yes seems to be the case
this should explain why google changed it >>>>more space<<<
http://en.wikipedia.org/wiki/Cramfs
Click to expand...
Click to collapse
Google didn't change it, JF did. He compressed it to make room for all the things he added. He did this in a few other folders. But thanks this could be a long process but I'll try it out
Damm you JF ,lol, jk , see i didn't know that thought google did , but it did work as far as i know ,I had 83mb after fresh install and after running lucid script 87mb
good for space , bad for themes i guess
I'm still try to figure out how to extract what's in the cramfs image in linux. Anyone have any ideas? I wanted to see exactly how much space was saved
honestly i think it was too soon for 1.51 imo because here at wonderful XDA we have to hack and tear everything apart and make it custom and its comming down to where if it becomes too overly complicated to unpack and repack cramfs you might as well not have a rooted phone because its just like the regular us version except noone knows if the stereo bluetooth works on the JF version.
Im most def going back to jfv1.5 untill someone figures this out because i cant stand looking at that ugly ol factory white status bar and that checkered background.
either way from what i understand the only differences between the 1.5 and the 1.51 is just the that 1.51 has HQ youtube vids now and it doesn have multi-touch browser anymore
Beast84 said:
Google didn't change it, JF did. He compressed it to make room for all the things he added. He did this in a few other folders. But thanks this could be a long process but I'll try it out
Click to expand...
Click to collapse
yea i just noticed that after going into the ota original version of 1.5. how bout we just erase the .Cramfs file and extract the framework folder from the original T-mo ota or from the JF V1.51 ADP. repack the JF v1.51U.S., sign it and flash it with that. then we'll be able to get to the framework-res.apk. let me know what ya think.
dan0zone said:
hey guys i figured out how to get framework.cramfs to show up as framework-res.apk ,,if you use astro file browser on your phone ,you can go to /system/framework , and just copy framework-res to your sdcard then ,connect to your pc and you will see the framework-res.apk.. I can't resgin so thats as far as i got,,,
Hope this helps
Click to expand...
Click to collapse
so in other words go through astro or use an unzipping tool that opens cramfs?
then copy your framework.res to the sdcard (using Astro) then copy to the desktop of your computer
Edit files, open archive, pack your framework.res then do what?
doubleokneegro said:
so in other words go through astro or use an unzipping tool that opens cramfs?
then copy your framework.res to the sdcard (using Astro) then copy to the desktop of your computer
Edit files, open archive, pack your framework.res then do what?
Click to expand...
Click to collapse
u would have to go to the terminal on ur phone:
type su
#mount -o rw,remount /dev/block/mtdblock3 /system
#cp /sdcard/download/framework-res.apk (or where you have your framework-res.apk file) /system/framework
#reboot
edit: if that doesnt work use #busybox cp /sdcard/download/framework-res.apk (or where you have you framework-res.apk file) /system/framework
im in linux and have all the files/programs install/needed to create a .cramfs and I can't find a way to decompress/open the .cramfs just how to create a new one. I have google and all my linux forums and nothing seems to be pulling up... Not fun but will still keep looking.
Through ADB you can pull the files off and then push them back on also... So you can resign it and then put it back. I just wish I had a way to do it with the update file I have on my PC so that I can add the programs/files that I want and have an update.zip for it. but heh this will work for now....

How to Barebone a G1 with CM's 4.2.15.1 ROM

I tried reading through the other forums and posts. I have seen quite a few on wm 6.5 but not on Android 1.6 Donut. Can anyone help me with this? I tried using the instructions on
http://wiki.cyanogenmod.com/index.php/Barebones#.2Fsystem.2Fapp.2F
I successfully removed the com.amazon.mp3.apk after trying several times, but have tried other apps and nothing thus far. Any help would be great. Also, if this post is unneccessary, teach me how to delete it and I will. Just looking for help. Thank you.
Bare bone and mod
Hi im no dev and much of a noob
but
easiest way I found is to open your rom and resign it. Then test a couple of time and you'll work out by yourself which one are safe to keep and which one are not. Apk are in the system folder and some in the data one.
thanks to stericson, it's easy as cake
http://forum.xda-developers.com/showthread.php?t=473580
Mod wise, you can change the font (font folder), edit most apk (use 7zip to open the apk or rename it to a zip file, open it, change watever you want, rename it and sign), change the boot screen (framework-res.apk explicit tut somewhere. you got two png image to change, android-logo-mask and android-logo-shine). Can also change build.prop to enhance 2g/3g performance. work very well.
barebone
Hey sipvn,
I didn't really get what I am supposed to do though boss. I appreciate your help.
dnt understand what you want do......uninstall default app??
Just remove unnecessary apps
Use Stericson signer to resign zip file.
Flash
Oh and btw wrong section
geppo1975 said:
dnt understand what you want do......uninstall default app??
Click to expand...
Click to collapse
Yeap, just want to take off the apps I knmow she wont need on the phone. For what ever reason she doesnt want internet or data on her phone so I wont argue. But I want to make sure she doesn't accidentally activate anything and ring the bill up you know. Thank you.
Macrophage001 said:
Just remove unnecessary apps
Use Stericson signer to resign zip file.
Flash
Oh and btw wrong section
Click to expand...
Click to collapse
Sorry for wrong section. Where do I go to do it right? And, how do I use stericson signer? Thank you

[HELP] Making my apk an apk again lol

ok so I finally got my brain to open this apk and change the 9pngs, just to change the colors a little...
How do I make it an apk again? its all in a folder, but i tried ziping it and chnaging the name to apk, and didnt work lol
Rosco911 said:
ok so I finally got my brain to open this apk and change the 9pngs, just to change the colors a little...
How do I make it an apk again? its all in a folder, but i tried ziping it and chnaging the name to apk, and didnt work lol
Click to expand...
Click to collapse
First of all... if you change a 9.png file then it may not work very well since a lot of 9.png files need guides. If you don't know what I'm talking about then you'll probably end up with a messed up app.
If you want to try it anyway, why don't you just take the original apk file and open it up with winrar, replace the png files (or 9.png files in your case), sign the apk file then install it.
I'm assuming that you didn't actually develop the app since you don't even know how to make the apk file.
So based on that assumption I'm going to warn you not to distribute the app unless you have the developers permission.
Oh no no no, I wont distribute.. is just for my personal use, to make my theme match lol
And yeahhh I suck at all of this, so im just gonna leave it for the good.. lol I dont even know how to sign an app.. lol

trouble re-installing system apps.

im currently on phoenix 4.5 and was missing the unified inbox and program monitor widget from rogers 2.2 so i opened up my stock flash and took out the files for:
seven.apk, unifiedInbox.apk +.odex and SamsungWidget_ProgramMonitor.apk +.odex
I tried mounting as R/W and dropped them in System/apps then tried installing...
only the first program installed
"Application not installed"
I dont think its a coinsidence that the ones with .odex files didnt install.
Looked up odex... then Deodexing....
Custom roms are DEODEXED...
deodexing isnt as easy as dropping the odex file into the zip and renaming apk.. is it? because that didnt work either...
ok how can i intall these? what am i missing?
really? no suggestions yet?
deodex the programs, drop into system/app, reboot. No need to install system apps.
Sent from my Craptivate with the leaky rom
what is the proper way to deodex the apps?
i tried rename .apk as .zip
drop in the odex files with windows explorer
rename back to .apk
is there something i missed? anytime i try to repackage an app it wont install.
I tried replaceing the default icons in LauncherPro once before. didnt work either.
am i supposed to zip with a certain program? no compression?
i cant seem to find any instructions on how to do this without digging through hours of app programming first.
Trusselo said:
what is the proper way to deodex the apps?
i tried rename .apk as .zip
drop in the odex files with windows explorer
rename back to .apk
is there something i missed? anytime i try to repackage an app it wont install.
I tried replaceing the default icons in LauncherPro once before. didnt work either.
am i supposed to zip with a certain program? no compression?
i cant seem to find any instructions on how to do this without digging through hours of app programming first.
Click to expand...
Click to collapse
http://code.google.com/p/smali/wiki/DeodexInstructions
cappysw10 said:
http://code.google.com/p/smali/wiki/DeodexInstructions
Click to expand...
Click to collapse
thanks for the link, but i was looking for information "without learning programming first"
the link you posted assumes the reader has a working knowlege of programming. I think i can work most of it out but it explains "what to tell it to do" but rather unclear "what it will do" or what you need.
it mentions pointing the script to the .odex file, but it never mentions needing an apk or outputting a deodexed apk. Or is that not what it does?? the help is written as though you know what you are doing but dont know how to use his script..
i think it wants me to...
so to use it i need the baksmali and its script.
run them and point them to the apk and odex with the proper command.
then i will output a deodexed apk?
i dont want to ask but..
can someone do it for me?
files attaced.....
UnifiedInbox deodexed, installed on Cognition 3.04 working.

[Q] Kitchen - problem flashing

i have tried to modify the froyobylaszlo by removing a couple of system/app
and put my own apps
after that i tried to flash it but i had some errors im not familiar with
hope someone could help me out
im attaching the recovery.log files
EDIT: btw im a complete idiot hahaha... im just starting out
marchking said:
i have tried to modify the froyobylaszlo by removing a couple of system/app
and put my own apps
after that i tried to flash it but i had some errors im not familiar with
hope someone could help me out
im attaching the recovery.log files
EDIT: btw im a complete idiot hahaha... im just starting out
Click to expand...
Click to collapse
which apps did u place in system apps?
did u remove the apps fromm data/app as well?
maximo360 said:
which apps did u place in system apps?
did u remove the apps fromm data/app as well?
Click to expand...
Click to collapse
yeah i think only 1 app is there in data/app = gallery i think i removed that thinking that it was the gallery3d
i changed the launcher and a couple of things in the system/app
are there limitations of which apps that i could put there...
btw is it ok if i change the updater-script to update-script?
or i shouldnt have change that... the kitchen was requesting to change it
hey if you are only removing some apk's you dont need kitchen.. just unzip file.. take out what you want than re-zip and than Sign it! should be able to flash no problem
marchking said:
yeah i think only 1 app is there in data/app = gallery i think i removed that thinking that it was the gallery3d
i changed the launcher and a couple of things in the system/app
are there limitations of which apps that i could put there...
btw is it ok if i change the updater-script to update-script?
or i shouldnt have change that... the kitchen was requesting to change it
Click to expand...
Click to collapse
You should just do what LDrifta said if your still having problems.
OH and regarding the update-script, heres your answer straight from the op of the kitchen:
QUESTION: Why do I need to convert the ROM's updater-script to an update-script when using the kitchen?
The kitchen can only perform operations on an update-script. UpdateR-scripts are too complicated to check because there are so many combinations of parameters for every command and for different devices; plus they can be written in different formatting styles. Thus the kitchen converts them to update-script so that there is one universal method to modify any device's configuration. If we didn't convert the updater-script then it would take months of work to overhaul the dozens of scripts (plus doubling my work) to accept updater-scripts, which would really NOT make a difference in the end anyway and would likely slow down the kitchen due to extra checks made in the updater-script. So please do not request this again and again, there is no gain in doing it (I also don't have that much free time ...).
When you build the ROM you have the option of converting it back to an updater-script, or the kitchen will convert it automatically if it decides it's necessary. The conversion back to the original updater-script is near-perfect, as I have already spent months on the implementation to get it right.
QUESTION: I have converted my update-script to an updater-script, but after flashing I still have the original ROM on the device.
That means your updater-script did not have the proper mount points defined for the system (and/or data) partition. Refer to this post for more info.
QUESTION: My device only supports ROMs with the updater-script/update-binary files but not the update-script
If you extract a ROM that contains an updater-script, then the kitchen will ask you if it should convert it to an update-script. You *must* use an update-script while customizing the ROM, as the kitchen is not capable of modifying updater-scripts. When you are ready to build the ROM, though, you will need to convert it back to an updater-script if the device requires it. Use the option in the Advanced menu to convert update-script to updater-script, or else the kitchen will ask you to convert it while building the ROM.
Click to expand...
Click to collapse
ldrifta said:
hey if you are only removing some apk's you dont need kitchen.. just unzip file.. take out what you want than re-zip and than Sign it! should be able to flash no problem
Click to expand...
Click to collapse
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
marchking said:
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
Click to expand...
Click to collapse
ok well depending on what apk's you are putting in.. if they are system required like a sense app.. it wont work on a froyo base rom.. but if its something like superuser or mail or something and is compatible with your rom than put it in system/app folder.. if its something that you want the choice to uninstall later on like a 'task killer' apk or something, place it in data/app folder..
and to sign it you dont need kitchen, you can download an auto-sign.zip file for windows here on xda.. all you do is unzip it directly to C: drive, place zip file in filder rename it to 'update.zip' than run the 'sign.bat' and it will sign the zip file. than you can flash it
marchking said:
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
Click to expand...
Click to collapse
did u do this on Kitchen?
If you want to add Market or non-stock apps (*.apk) to your ROM (which can be uninstalled or updated from your device later) then select the kitchen's menu option that adds "/data/app functionality". Afterwards you can copy these .apk files to the new /data/app folder of your working folder.
EDIT; After your done adding/deleting all the apps, dont forget to use the sign apk command to sign.
maximo360 said:
did u do this on Kitchen?
If you want to add Market or non-stock apps (*.apk) to your ROM (which can be uninstalled or updated from your device later) then select the kitchen's menu option that adds "/data/app functionality". Afterwards you can copy these .apk files to the new /data/app folder of your working folder.
EDIT; After your done adding/deleting all the apps, dont forget to use the sign apk command to sign.
Click to expand...
Click to collapse
would apps from a 2.2 hero would work? they have a mdpi format???
or do you think i will encounter lots of problems? ^_^
marchking said:
would apps from a 2.2 hero would work? they have a mdpi format???
or do you think i will encounter lots of problems? ^_^
Click to expand...
Click to collapse
Which kind of apps? Like sense apps? I guess they might work, try it out, make a nand backup first tho.
Sent from my COS-DS using XDA App
maximo360 said:
Which kind of apps? Like sense apps? I guess they might work, try it out, make a nand backup first tho.
Sent from my COS-DS using XDA App
Click to expand...
Click to collapse
its actually system/app from miui ported to mdpi...
i was able to flash it but its going into a bootloop...
im not sure how to gather logcat... i dont use adb hahaha...
i only use droid explorer... anyways
i checked the logcat console while it was on the bootloop
it appears to me that the apps that i used is not signed...
any suggestions?
marchking said:
its actually system/app from miui ported to mdpi...
i was able to flash it but its going into a bootloop...
im not sure how to gather logcat... i dont use adb hahaha...
i only use droid explorer... anyways
i checked the logcat console while it was on the bootloop
it appears to me that the apps that i used is not signed...
any suggestions?
Click to expand...
Click to collapse
sign them using the sign apk/zip command in the kitchen
maximo360 said:
sign them using the sign apk/zip command in the kitchen
Click to expand...
Click to collapse
i signed them that seemed to be one problem... based on what im seeing on the logcat it seems now its having lots of problems while installing... FYI im trying to make a miui ported from nexus 1 to hero... trying to make it run on froyo by laszlo... i think there is much more complications here not as easy as i think it would be... but i like challenges ^_^ do you have any idea how we could do this maximo? try checking this link http://forum.xda-developers.com/showthread.php?t=858935
marchking said:
i signed them that seemed to be one problem... based on what im seeing on the logcat it seems now its having lots of problems while installing... FYI im trying to make a miui ported from nexus 1 to hero... trying to make it run on froyo by laszlo... i think there is much more complications here not as easy as i think it would be... but i like challenges ^_^ do you have any idea how we could do this maximo? try checking this link http://forum.xda-developers.com/showthread.php?t=858935
Click to expand...
Click to collapse
I read the thread, and he said he dropped some of the phones he was porting miui for, he was still doing the eris/hero. So seems to me he maybe dropped the g1, not sure tho. I guess you're gonna have to wait til either delsa is done porting it to the g1 or drakko.
Sent from my COS-DS using XDA App

Categories

Resources