.apk optimizers.... - Epic 4G General

i am looking for ways to optimize .apk files any information would be useful. I tried using apk manager on my system files and app files and it loaded however it didnt fully function.
PyRo

did you load in your TW framework?

Related

[Q] making system apks Into regular installable apks.

I was wondering how to make a system apk such as idk the browser into a regular installable apk so that someone with no knowledge of pushing apks can install it along side their apk.
Generally system apps are just normal apps, only installed on a system partition. If you pull a system apk from a device, then you should be able to install it normally on any other device.
There are exceptions from this rule:
You can't install an app if you have it installed already. Many system apps are installed on most devices by default and this is the reason, why you can't install e.g. Browser.apk pulled from other device - most probably you have it installed already.
There are 2 solutions: you could remove system app before installation of new one or just replace it - but this isn't what you want. To create normal, installable apk you would have to modify its package name as I did with Google Maps.
Some system apps use system internals, private APIs or privileges, some additional libraries, etc. For example Settings.apk changes internal settings of OS - you can't do that in normal apk.
You can't easily move/install such apps, they're integrated with system.
thanks for this long great reply. So lets say I pulled my dialer apk changed the package name, could I install it on a friends phone NOT on the system partition ?
I'm trying to pull the dialer apk from gingerbread and port it into a normal apk using apk tool, but once and changed the package name and all that and compile it I go to install it on my phone but it says that it could not open it as an apk file. Any ideas?
Newklearx3 said:
thanks for this long great reply. So lets say I pulled my dialer apk changed the package name, could I install it on a friends phone NOT on the system partition ?
Click to expand...
Click to collapse
I think not. Note that Phone.apk is only one app that can dial, you can't add such feature to your own app, so most probably it uses private APIs to do that. It's integrated-with-system one. Same for Settings.apk and PackageManager.apk, but you should be able to pull Browser.apk, Launcher.apk, MMS.apk, Gmail.apk, Talk.apk, etc., change their package name and install on another device.
Ahh, there is one more group: SenseUI, Motoblur, etc. apps, which use additional framework resources: images, colors, texts. They won't work on a device lacking this framework, but it should be possible to make these apps framework-independent by copying all dependencies to app itself. Not that easy, but possible
Brut.all said:
I think not. Note that Phone.apk is only one app that can dial, you can't add such feature to your own app, so most probably it uses private APIs to do that. It's integrated-with-system one. Same for Settings.apk and PackageManager.apk, but you should be able to pull Browser.apk, Launcher.apk, MMS.apk, Gmail.apk, Talk.apk, etc., change their package name and install on another device.
Ahh, there is one more group: SenseUI, Motoblur, etc. apps, which use additional framework resources: images, colors, texts. They won't work on a device lacking this framework, but it should be possible to make these apps framework-independent by copying all dependents to app itself. Not that easy, but possible
Click to expand...
Click to collapse
Dude, you're amazing! So how would I go about porting the gingerbread dialer to workable installable apk?
I might be doing something wrong but I pulled the launcher and changed the package name and still the same error
Okay, i guess I'm not. I copied the apk ( unmodded ) from the rom zip and placed it on my SD card to install it and the same error, so there must be something wrong.
figured out it was the sdk version, got it to show up but wont install now.
im also interested in porting specific development apk, lets say.. CM Settings into a non Cyanogen. Tried that once by pulling CM*.apk and push it to other non Cyanogen but got cant be installed message.. any hints on this?
phoezies said:
im also interested in porting specific development apk, lets say.. CM Settings into a non Cyanogen. Tried that once by pulling CM*.apk and push it to other non Cyanogen but got cant be installed message.. any hints on this?
Click to expand...
Click to collapse
Use logcat as a start to see dependencies
XDA App

[Q] apk file issue!!

I have a confusion regarding android. this is very general query.
In Computer, first we have to have exe file to install anything and then we click on it to install the app on windows computer generally. when the app is installed on computer, we have installed app files in program files and then a dump (that is exe file) which we keep to install this app on any other computer.
Now, please let me know if this is applicable in android phones also?
I know that in android, there is .apk file instead of .exe file in computer. I observed that after installation apk file disappears. Is this true?
Not sure if in understood well, did you mean if instal anything from SD card? If you are asking that the answer is yes, i install everything from SD card and the apk file stay there after installation.
What if u install any app from Market?
vijay.gupta said:
I have a confusion regarding android. this is very general query.
In Computer, first we have to have exe file to install anything and then we click on it to install the app on windows computer generally. when the app is installed on computer, we have installed app files in program files and then a dump (that is exe file) which we keep to install this app on any other computer.
Now, please let me know if this is applicable in android phones also?
I know that in android, there is .apk file instead of .exe file in computer. I observed that after installation apk file disappears. Is this true?
Click to expand...
Click to collapse
Even in Android you can see the .apk files under /system/app. Also applications installed by you can be backed up & later restored using software available on market.
"Normally" these apks dissapear when you download from.market, but all of.your apks are stored in your phone, the thing is that you have to hav permission to do that, when you download an apk (the single file) and store it in sd card to install it, the apk is copied to the phone.
Sent from my GT-I5801 using XDA App
But if u back up ur apps as .apk and install them later using softwares (with exception of Titanium backup) u will loose connection between the app and android market (that means no updates)
the best option is to backup ur apps with titanium backup along with user data and restore it using the same
how do i access /system/app? Do I need to root the phone in order to see this directory?
vijay.gupta said:
how do i access /system/app? Do I need to root the phone in order to see this directory?
Click to expand...
Click to collapse
Download Terminal emulator from market & you are ready to go to /system/app !!!!
You can also download Root Explorer and so the same
Thank all. Can you please confirm what I am writing below:
Suppose I buy a android phone (with android 2.1 so you cannot install apps from SD card) in which I installed an application named XYZ from Market. Now, there is a apk file for XYZ which gets downloaded somewhere in the phone memory and then it gets installed automatically.
Now, I just want to know, where does this apk file go after XYZ is installed? Does it stay in phone memory with the installed files of XYZ.
If it goes to phone memory and not deleted from there, then phone memory
if u install .apk from market it will be stored and installed in /data/app in phone memory. i do not think it is stored twice in the phone.
Do u mean to say that only the installed file gets stored and. apk. File got deleted automatically after getting installed?
vijay.gupta said:
Do u mean to say that only the installed file gets stored and. apk. File got deleted automatically after getting installed?
Click to expand...
Click to collapse
Remember that an .apk file its a variant of the .jar files when you install an .apk this file gets stored inside the phone along with its necesary dependencies when the app starts, the os reads this file line by line while the app is executed.
In short terms the .apk file its the application itself that need a proper interpreter to run, in that way when you install and app to the phone, it copies this file and links the dependencies, so the .apks downloaded from makret are stored directly inside the app folder, in that way you can extract them from this folder and use it in another android phone.
You are relying too much on the windows ways of things. You see an exe file installion in windows essentially unpacking everything (other things aside) where it is needed and you then often see a bunch of files and folders. This is not what happens in android, the apk file is conserved when installed and can be found in the root part of your phone. Its data/app/ if installed on your phone, mnt/asec. (or something like asec) if installed on your sd card. You can copy that file to your sd card or send it to another device and install it again. I did just that today (I sent an apk to a friend)
anyway i dont think its same if i delete .apk + odex files from /data/app as i uninstall it with titanium backup. i think TB will be delete also data stored by the app inside the database (its the place where the apps are saving data, settings, etc...)
In case you are installing from Android Market:
1. When you are at market, it doesn't ask you to download. You will only get option either to install or update the existing app.
2. If you are a normal user, after installing, you won't be able to see the apk file anywhere on your memory card. But if you are a root user or with the help of special file managers and specific apps like root explorer and terminal emulators, you can locate those spk files in the phone's hidden memory.
3. If you are a root user, or with the help above mentioned type of apps, you can locate the apk files in phone memory and copy it on your memory card and distribute it to your wish.
4. If you are worried for paid apps and losing your phone or apps because of resetting or any other reason then stop worrying. A record of your paid apps is stored in google servers. So, even if you reset your phone or lose your phone, once you log in to a your new android device with the same google account, it will automatically show your paid apps. You don't have to pay for it again. Just need to install it again. This is applicable only if you are paying for the app through android market and you are logging into your android device with the same google account you had before losing your apps.
In case of installing via your SD card:
1. apk files are just like java files (.jad or .jar). You can download it on your PC from various sources and transfer it to your SD card or any of your friends' via USB, bluetooth or any other way.
2. After transfering the apk file to your SD card, it doesn't get automatically installed. You have to click it or open it to install, just like how we double click the exe file in windows.
3. Whether installed or not installed, the apk file you transfer to your SD card will always remain there unless and untill you or someone else delete it or you format your memory card.
4. Once installed, a copy of the same apk file would also be there in your phone's hidden memory, which you can access using special apps.
If you worried about losing your apps, try searching for other apps which backups apk... you can do so at android market. Moreover, also search on the net about having root access on your android device.. it'll let you access files in your phone's memory.
I hope, this would solve down all your queries !!!
Thanks next2 devil. Very gud explanation. It cleared almost all confusions. I have some more confusions that i want to clear out.
1) just a general query that just like exe file got unpacked after double clicking on it and install its files in c: genrally, does the same happen with apk, jad and jar files?
2) just want to clear out that phone memory which is hidden for normal users contains the copy of only those apk files that are currently installed on the phone and not the ones that are uninstalled or not installed at all?
vijay.gupta said:
Thanks next2 devil. Very gud explanation. It cleared almost all confusions. I have some more confusions that i want to clear out.
1) just a general query that just like exe file got unpacked after double clicking on it and install its files in c: genrally, does the same happen with apk, jad and jar files?
2) just want to clear out that phone memory which is hidden for normal users contains the copy of only those apk files that are currently installed on the phone and not the ones that are uninstalled or not installed at all?
Click to expand...
Click to collapse
1. I am not sure about JAD and JAR files, but yes, APK files unpack itself to get installed. You can come to know the exact size/space that would be taken by the app directly from the android market. Details would be given there.
2. Yes, the phone memory would be having copy of files only which is installed. There would be no copy of any apk file which in not installed.
Thanks next2devil. Your response give rise to one more query.
if i compare unpacking logic from windows, there is no need for original exe file to remain in existence after it has been installed and user can delete exe file after installing it. Deleting exe file has no negative impact on the working of installed app. Please let me know if this is also the case with apk files? If yes, then what is the need of apk file to remain in phone memory after it has been installed?
vijay.gupta said:
Thanks next2devil. Your response give rise to one more query.
if i compare unpacking logic from windows, there is no need for original exe file to remain in existence after it has been installed and user can delete exe file after installing it. Deleting exe file has no negative impact on the working of installed app. Please let me know if this is also the case with apk files? If yes, then what is the need of apk file to remain in phone memory after it has been installed?
Click to expand...
Click to collapse
Short and simple. Deleting the apk file from /data/app removes the app.
Sent from my Lestatious v1.4.5.5 Galaxy 3 FROYO

Need a means to compile apks

OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Realorasz said:
OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
apk's are just renamed zip files.
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Realorasz said:
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
yes, set to store...all you have to do is long-press the file and select rename...same to change it back afterward. I don't know about what app will allow you to set to store, but there are a TON of free zip apps. Check the market
I need to edit them though, and if I extract it edit it then zip it with an app, it's not set to store.
From my X10a running WB CM 6.1.3 V053
Root explorer can open xml files in apps but I don't think it can edit them.
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
CMoney87 said:
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Yeah signapktic can sign on the phone, all I need is an app that either will, zip things set to store like in sundae or one that will directly modify the contents of the zip.
From my X10a running WB CM 6.1.3 V053
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
akila87 said:
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
Click to expand...
Click to collapse
Well making it a zip on my phone didn't screw anything up. I can still browse normally. What I need is a means to edit a zip without compressing it, like you have to for bootanimatjons and everything else.
From my X10a running WB CM 6.1.3 V053
I would suggest having a look through the market....download every free app you can find and see if any help. There are so many out there that I have no idea which would work for exactly what you will want it to do. Really, trial and error is the best way, sometimes lol
eclipse
I'm not sure I understand correctly, some previously mentioned are right on track.
Contents of an APK file are as normal zip files, extract the APK with winrar, 7zip or similar program.. make modifications and re-zip it and change the file name.
Important process called "Zip Align" optimizes the file for the APK format and helps to optimize and align the archive for memory mapping I/O ensuring the payload is delivered correctly, for more info - mmap
If you would like to reverse an APK file, I choose to use APKTOOL a Google hosted project and complete with it's own reverse engineering syntax called "baksmali" - This wraps AAPT - Android Asset Packaging Tool part of the android SDK - need this installed.
An issue exists with obfuscated Java classes. Meaning source code has been scrambled (obfuscation algorithm) enabling it be understood by a compiler but no longer is human readable. Another issue is Signing the APK file as most installers are to authenticate the issuing publisher.
To build an APK anyone only need's have the Eclipse IDE and Android SDK installed and you can do this without even having an Android device by using the emulator to build and test your application.
Happy play!
EDIT: Apk edit and Apk tool are both able to help in this situation also.

[Q] .apk can not open

Hi All,
I am using the latest nightly on galaxy note N7000. My problem is related to .apk files. I have couple of .apk's in my sd card which i cannot install. As soon as i touch it to open for installantion, it gives me an error file cannot open. Please Help!!
First bit of "help" is that if you don't fully and completely describe your question, it isn't answerable.
Which APKs? How are you trying to install them? What do the logs ("logcat") tell you? Have you successfully installed them on other ROMs? Which ROMs? Which versions of APKs and ROMs? Are you using stock kernels? Have you tried it on a clean install of the ROM?
the built in downloads is apart of the documents app. it wont install apk files. u need to download a file manager from the app store to do so.
bulletbeef said:
the built in downloads is apart of the documents app. it wont install apk files. u need to download a file manager from the app store to do so.
Click to expand...
Click to collapse
Thank You for the quick reply. I tried to install them with using a kind of app installer and it installed.

Unable to uninstall: com.sonyericsson.album_5.4.A.0.22.apk

I recently installed com.sonyericsson.album_5.4.A.0.22.apk, but like a noob I didn't read the description before hand and the apk file is actually only for Xperia Z2 System/Media/App ] Apks and Odex and Jar files for Z1
The apk installed as normal, however I can't find the application in my app drawer and using root explorer the album apk is not showing in system/app system/private app or any other location.
The problem is that I am not able to install the correct version as the wrong apk has to be removed somehow first, when I try to restore the version that used to work from titanium backup - it just hangs at restoring and never restores successfully. Trying to restore the apk directly from a file manager results in a "not installed" message - I think this is because the wrong apk is still hidden somewhere in my device.
Any suggestions guys? any suggestions will be highly appreciated :good:
Heres the thread from which I found the incorrect apk from:
http://forum.xda-developers.com/showthread.php?t=2665174
I've also attached the apk file here.
krohme said:
I recently installed com.sonyericsson.album_5.4.A.0.22.apk, but like a noob I didn't read the description before hand and the apk file is actually only for Xperia Z2 System/Media/App ] Apks and Odex and Jar files for Z1
The apk installed as normal, however I can't find the application in my app drawer and using root explorer the album apk is not showing in system/app system/private app or any other location.
The problem is that I am not able to install the correct version as the wrong apk has to be removed somehow first, when I try to restore the version that used to work from titanium backup - it just hangs at restoring and never restores successfully.
Any suggestions guys? any suggestions will be highly appreciated :good:
Heres the thread from which I found the incorrect apk from:
http://forum.xda-developers.com/showthread.php?t=2665174
I've also attached the apk file here.
Click to expand...
Click to collapse
If you installed it like a normal app (just opened the apk), then look into /data/app.
Someguyfromhell said:
If you installed it like a normal app (just opened the apk), then look into /data/app.
Click to expand...
Click to collapse
Thanks for the suggestion, but its not there either - strange.
Then how do you know, that it isn't gone yet?
The system wont allow me to install it again or any other com.sonyericsson.album.apk file, I'll keep checking system directories one by one until I find it.
Flash philz recovery, then download aroma file explorer from here http://forum.xda-developers.com/showthread.php?t=2236977 then, boot into recovery, begin to flash aroma file manager. Once the manager loads, navigate to the file you want to delete and do it that way
Sent from my SM-N9005 using XDA Premium 4 mobile app
speedyjay said:
Flash philz recovery, then download aroma file explorer from here http://forum.xda-developers.com/showthread.php?t=2236977 then, boot into recovery, begin to flash aroma file manager. Once the manager loads, navigate to the file you want to delete and do it that way
Sent from my SM-N9005 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'll give this a try thanks bro :highfive:

Categories

Resources