Install duplicated apps ver without overwrite - General Questions and Answers

I have a question here , is there any way to Installing duplicated apps ver without overwrite each other ?
Eg : firefox verion 21 smooth and fast but version 24 provide more features. Hoping to install both each other if I needed some features.
Currently the only option is , backup data 22 and 24 with titanium bk and restore it when I need the features.
Possible to install alongside without overwrite ? needed to modified the .apk ? I was hoping to retain the original apk.
It's just like you installing Office 2007 and 2010 alongside in the same window.
Thank you

xdadfm said:
I have a question here , is there any way to Installing duplicated apps ver without overwrite each other ?
Eg : firefox verion 21 smooth and fast but version 24 provide more features. Hoping to install both each other if I needed some features.
Currently the only option is , backup data 22 and 24 with titanium bk and restore it when I need the features.
Possible to install alongside without overwrite ? needed to modified the .apk ? I was hoping to retain the original apk.
It's just like you installing Office 2007 and 2010 alongside in the same window.
Thank you
Click to expand...
Click to collapse
I think you cannot without modifying the two .APK, can you rename one then copy to root/system/app ?

xdadfm said:
I have a question here , is there any way to Installing duplicated apps ver without overwrite each other ?
Eg : firefox verion 21 smooth and fast but version 24 provide more features. Hoping to install both each other if I needed some features.
Currently the only option is , backup data 22 and 24 with titanium bk and restore it when I need the features.
Possible to install alongside without overwrite ? needed to modified the .apk ? I was hoping to retain the original apk.
It's just like you installing Office 2007 and 2010 alongside in the same window.
Thank you
Click to expand...
Click to collapse
By modifying the package name of any of the .apk file, I think you should be able to install both versions.. because while installing an App, Android will compare the .apk's package name with the .apks already installed before... The point of modifying the .apk file is to make sure that Android sees it as a completely different app, and not think of one as an update to the other...
For more info, check out link below:
http://stackoverflow.com/questions/1222302/android-multiple-custom-versions-of-the-same-app
and try Googling this:
"install two versions of the same app android"

ivan.untalan said:
I think you cannot without modifying the two .APK, can you rename one then copy to root/system/app ?
Click to expand...
Click to collapse
It crash as I assume
Sami Kabir said:
By modifying the package name of any of the .apk file, I think you should be able to install both versions.. because while installing an App, Android will compare the .apk's package name with the .apks already installed before... The point of modifying the .apk file is to make sure that Android sees it as a completely different app, and not think of one as an update to the other...
For more info, check out link below:
http://stackoverflow.com/questions/1222302/android-multiple-custom-versions-of-the-same-app
and try Googling this:
"install two versions of the same app android"
Click to expand...
Click to collapse
The linked having various discussion but non of them are working
I had google around and the only way is to have different profile https://play.google.com/store/apps/details?id=fahrbot.apps.switchme&hl=en
Which is very risky getting boot looping.
The safest method is to modified the .xml but I am not an android dev.I doesn't know how to modified it.
Does anyone know any tools which can modified .apk to custom version. ?
Thank you

xdadfm said:
It crash as I assume
The linked having various discussion but non of them are working
I had google around and the only way is to have different profile https://play.google.com/store/apps/details?id=fahrbot.apps.switchme&hl=en
Which is very risky getting boot looping.
The safest method is to modified the .xml but I am not an android dev.I doesn't know how to modified it.
Does anyone know any tools which can modified .apk to custom version. ?
Thank you
Click to expand...
Click to collapse
For modifying .apk files you need to Download and Setup a small tool called APKTOOL (for Windows)
Below is the link to the GUI version of apktool:
http://forum.xda-developers.com/showthread.php?p=33815550
The original version of apktool works with Windows' Command Promt's command line interface... If you want that instead, then Google "apktool for windows" or anything similar
After decompiling, I think you need to edit your AndroidManifest.xml file BUT I am not sure about this.. please Google "how to change application package name android"

Related

Custom clockworkmod compatible update.zip

Hello, I would like to create my own update.zip that would be compatible with clockwork mod. I have several files in several locations that I manually copy over after new installs like multicolored bash nano iwconfig iwlist etc. And I think it would be much easier to create a installable package for that, I also delete a number of built I. Apps like tweeter amazon etc. And I have seen the scripts inside oyhers update.zip's that I could add the bash commands to remove those things as well.unfortunately I know nothing about what clockworkmod wants and I see binarys inside these zips dont know if those are customized for each zip or the same in all of them, I dont know what files or information is absolutely required. The best possible solution is if I had a blank update.zip that held all of the required files settings and all I needed to do was add my files and asd a few lines to a preexisting script to remove sum stock apps.thinking back I might have seen a file containing all the files names and md5 chucksums for each as well which if necessary I can do. Is there something like this available for download sumwhere? If not ajy resources to learn the required information and find the required binarys.thank you in advance.
Sent from my Droid using Tapatalk
Hi,
I've been trying to learn the same thing. I'm curious if you found anything useful since posting this.
Of course, if I find anything, i'll post back here too.
Thanks.
Same problem here
Good to hear someone with same problems. I want to create a generic ROM for myself and I want to use ClockworkMod to help flash it instead of using fastboot.
Well, I have found no documentation about what ClockworkMod may need for a zip file.
But I guess it could be possible to just replace them with your own by downloading an existing zip file created by someone else.
I'll try it to see if that works or not. Of course, a documentation would be better.
I regularly flash a new CM7 Nightly as they are released and I have to manually modify some things each time a new rom is flashed. I change screen density and add a notification ringtone that CM7 does not have. I wanted to automate that. Since I have to reflash the Google Apps each time anyway, I thought why not modify the gapps zip to include my changes. After searching the web I found a little info about how to do it. I just modify the zip on my computer using WinRar, copy the file to my device and re-sign the package using signapktic which is free on the market. Then flash using CWM. It worked great. No more manual adjustments. There are some instructions here which helped me:
http://forum.cyanogenmod.com/topic/15030-moving-apps-to-system/
I been getting into the kitchen
http://forum.xda-developers.com/showthread.php?t=633246
So far i`ve managed to integrate a few apps , ringtone should be easy
next the fonts from utmost rom
thanks to the kitchen, Im now running at script kiddie level

Signed my ROM - still getting E:sig errors in CWM.

As the subject line states: I've signed (successfully?) my custom ROM zip file using various programs/methods. Each of them claims a successful signed zip at the end. However, when I try applying my ROM via CWM, I get the standard E:sig verification failed error msg. (Of course, disabling the verification check in CWM allows my ROM to be installed, error-free).
Yes, I've been through all the signing tutorials (that I could find) on this board. A couple were quite useful, but all they did was confirm I was doing the procedure correctly.
Here's a bit of background on my ROM:
It's actually a collection of 4 types of APKs:
some stock, Sense stuff... presumably signed by HTC
some 3rd party (Market) APKs... presumably signed by the appropriate author
some of my own APKs (signed by me, with my own SSL key)
some of my own APKs (not signed at all)
I've also gone in and modified some existing stock HTC APKs.
I tell you this info because I think this is where the problem might be.
Is it possible to sign a ROM file only at the ZIP level (and thereby encompass all the APKs within it)?
If not, do I have to go inside the ROM and sign each APK individually? Do I need to sign them all, or only those that have changed? And which key do I sign it with? (mine? generic test?) Is there ever a scenario where I have to remove/replace an existing signature from an APK with my own signature? Do I need to remove any existing META-INF folders before attempting to sign anything?
These are the questions to which I could find no answers.
Any help would be greatly appreciated.
Thanks,
- Anthony
Tigger31337 said:
As the subject line states: I've signed (successfully?) my custom ROM zip file using various programs/methods. Each of them claims a successful signed zip at the end. However, when I try applying my ROM via CWM, I get the standard E:sig verification failed error msg. (Of course, disabling the verification check in CWM allows my ROM to be installed, error-free).
Yes, I've been through all the signing tutorials (that I could find) on this board. A couple were quite useful, but all they did was confirm I was doing the procedure correctly.
Here's a bit of background on my ROM:
It's actually a collection of 4 types of APKs:
some stock, Sense stuff... presumably signed by HTC
some 3rd party (Market) APKs... presumably signed by the appropriate author
some of my own APKs (signed by me, with my own SSL key)
some of my own APKs (not signed at all)
I've also gone in and modified some existing stock HTC APKs.
I tell you this info because I think this is where the problem might be.
Is it possible to sign a ROM file only at the ZIP level (and thereby encompass all the APKs within it)?
If not, do I have to go inside the ROM and sign each APK individually? Do I need to sign them all, or only those that have changed? And which key do I sign it with? (mine? generic test?) Is there ever a scenario where I have to remove/replace an existing signature from an APK with my own signature? Do I need to remove any existing META-INF folders before attempting to sign anything?
These are the questions to which I could find no answers.
Any help would be greatly appreciated.
Thanks,
- Anthony
Click to expand...
Click to collapse
Here is something that works if you decompile and recompile a apk take the res folder out the part you tweaked and throw it in one that wasn't tweaked or extracted and the Sig will be good.
Sent from my PG86100 using xda premium
reaper24 said:
Here is something that works if you decompile and recompile a apk take the res folder out the part you tweaked and throw it in one that wasn't tweaked or extracted and the Sig will be good.
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
Okay, so you're saying that signing at the level of the ROM ZIP simply isn't enough. (I wish the guides would say that).
You're saying, I will need to preserve the sigs on the original APKs? I get that. But now that raises more questions:
- when you say "decompile" an APK, I assume this is a simple unzip/extract? That's all I've been doing so far (I use 7-Zip).
- Say I now have an extracted APK (assume it was an HTC stock), I can inject my modified files. Piece of cake. I now have an HTC APK with my own data in there. But what about all the other APKs that make up my entire ROM? Do they ALL have to been signed the same way? (In this example, do they ALL have to be HTC signed?) I'm guessing NO, because there are apps in the data/apps directory from the Market, with their own vendor sigs. I can't see why I would have to re-sign those APKs using the HTC sig.
- So, we're back to my original question: can't you sign a ROM at the ZIP level, or do I have to go back into each individual APK inside that ROM and re-sign them all? Why would the original signature work, but not my own? I have generated my own SSL keys, so in theory I should be able to unzip a APK, tweak it, and re-sign it as my own.
Why does my ROM keep failing the signature test in CWM? I am looking for the necessary and sufficient conditions to allow my ROM (any ZIP file, really) to pass the signature verification check.
No one on this board has been able to answer that, so far.
Thanks so much,
- Anthony

APK-Fire - tool to add language from 1 rom's apk files to an other

Hi,
After flashing a custom rom I noticed that rom didn't have my language, so I wanted to add it to this custom rom.
After a great and long journey and thx to the info found on this forum I managed to add the language I wanted.
During the journey I started to write a small tool to make the whole process a bit less painful. The tool has been growing from as simple batch decomiple - recompile apk tool to 1 that adds the value folders and do the resources.arsc switch thing.
This is my 1ste release and is still a beta version so still has some errors, stuff to be added and bad code. But still I hope some of you can use it.
If you got any questions just post or pm
Greetings
Installing the tool.
Just extract all files to your root folder and run the ignite script as root. That's it.
There is a help option that guide you step by step.
EDIT: Small adjustment in the language lists and added the Custom_language_list option
EDIT: Like I said tool is still in beta stage, it seems that yesterday in my hurry to get it ready I screwed up big time (like command to make a cp without telling where to copy to) anyway already beta version 1.1 is out now
UPDATE: 1ste real release out now.
Killed some more bugs
Updated the help page
Added some layout editing
Added or updated the log handeling
how can i insert pt language on last jaggyrom for htc explorer ?
I would appreciate if u created a 'How To' for Super Noobs like me ...
a windows version
If there is a windows version,it will be more appreciated.
bascro said:
I would appreciate if u created a 'How To' for Super Noobs like me ...
Click to expand...
Click to collapse
There is a help function in the tool that guide through most of the steps from the moment you got your hands on tha apk files.
So now the question is how to get those apk files.
Well I like to use Android-Kitchen to unpack rom's, and you'll need that tool anyway to add the new apk files to the rom.
1. Decompile the rom containing the language you want. (Can be stock-rom, your original rom, other custom,...)
2. Copy all the apk files from the systeml/app folder to the stock_APK.
3.Copy the framework-res.apk and com.htc.resources.apk from the system/framework folder to flare/framework and the stock_APK folders
The rest of the how you'll find when you start APK-Fire and use option 'h'
Note: Not all of the apk file will decompile without errors, those that give errors (like market, street, superuser,...) you don't realy need to add language so just delete those apk's from the stock_APK and the decompiled_APK folders.
pedrofidalgo said:
how can i insert pt language on last jaggyrom for htc explorer ?
Click to expand...
Click to collapse
To add portugees you can choose to add all the languages from the South_West_Europe list.
or
you put pt and pt-rPT (each on a diff line) to the Custom_language_list.
then follow the steps you'll find in help option.
picodaren said:
If there is a windows version,it will be more appreciated.
Click to expand...
Click to collapse
There is a windows version called APK Edit
Only prob here is that you have to open the apk that has the wanted language, copy those folders, open the apk from the rom where you want to add the language to and repeat this process for all the apk files 1 by 1.
If you take this road plz let me know how long it took yah
i have jaggy rom. and a backup of my stock rom in Portuguese. can i install pt language on jaggy rom ?
Need a little help .. : p
pedrofidalgo said:
i have jaggy rom. and a backup of my stock rom in Portuguese. can i install pt language on jaggy rom ?
Need a little help .. : p
Click to expand...
Click to collapse
sure you can.
Step trough:
1 Set-up Android-kitchen
2 Decompile your stock rom
3 copy the content of the system/apk folder to the APK-Fire/stock_APK
4 copy the 2 apk files from system/framework to APK-Fire/stock_APK AND APK-Fire/flare/framework
5 Start APK-Fire and install the frameworks (option 1)
6 Decompile the apk files (option 2)
7 Add the language code to the Custom_language_list each language code get's it's own line. (you find this file in the APK-Fire/lighter folder) for portugees you add something like this:
pt
pt-rPT
8 Get the value folders containing the portugees language (option 4)
9 Now you can choose to back up the stock_apk and the decompiled_apk folders (option 6 / 1) or delete the content of those 2 folders.
10 Got back to the kitchen and decompile the Jaggyrom and repeat the steps 2 till 6 as before.
11 Now copy the value folders you took from the stock rom to the jaggyrom (option 5)
12 Recompile the apk files (option 3)
(check log for errors, warnings you could ignore but errors need attention, be aware that non stock apps mostly will give errors but those also don't need additional language)
13 Do the resources.arsc switch thing to fool the signature security (option 6)
(for more info what this is all about read the switch_resources script)
14 Copy your upgraded apk files from the APK-Fire/firebox/translated_APK folder to the Android-kitchen/WORKING_****/system/app (don't forget to copy the 2 framework apk files to the Android-kitchen/WORKING_****/system/framework folder and not the app folder)
15 Cook your rom
16 Flash the rom
17 Hold your fingers crossed while booting
18 Hopely enjoy the costum rom in your desired language.
Hope this helps you.
Cosmoon said:
sure you can.
Step trough:
1 Set-up Android-kitchen
2 Decompile your stock rom
3 copy the content of the system/apk folder to the APK-Fire/stock_APK
4 copy the 2 apk files from system/framework to APK-Fire/stock_APK AND APK-Fire/flare/framework
5 Start APK-Fire and install the frameworks (option 1)
6 Decompile the apk files (option 2)
7 Add the language code to the Custom_language_list each language code get's it's own line. (you find this file in the APK-Fire/lighter folder) for portugees you add something like this:
pt
pt-rPT
8 Get the value folders containing the portugees language (option 4)
9 Now you can choose to back up the stock_apk and the decompiled_apk folders (option 6 / 1) or delete the content of those 2 folders.
10 Got back to the kitchen and decompile the Jaggyrom and repeat the steps 2 till 6 as before.
11 Now copy the value folders you took from the stock rom to the jaggyrom (option 5)
12 Recompile the apk files (option 3)
(check log for errors, warnings you could ignore but errors need attention, be aware that non stock apps mostly will give errors but those also don't need additional language)
13 Do the resources.arsc switch thing to fool the signature security (option 6)
(for more info what this is all about read the switch_resources script)
14 Copy your upgraded apk files from the APK-Fire/firebox/translated_APK folder to the Android-kitchen/WORKING_****/system/app (don't forget to copy the 2 framework apk files to the Android-kitchen/WORKING_****/system/framework folder and not the app folder)
15 Cook your rom
16 Flash the rom
17 Hold your fingers crossed while booting
18 Hopely enjoy the costum rom in your desired language.
Hope this helps you.
Click to expand...
Click to collapse
i dont know how to do it :/
if i give you my backup can you add pt language for the last jaggyrom ?
cumps
really??
I've already robbed the experience from you of wandering through the jungle of this mystic entity called Android by making the wandering seem nothing more then a walk through the park.
And now you tell me you don't want to know this mystic entity?
Nah I don't buy that, you almost got me there.
I'm willing to guide you through every step but I refuse to carry you.
If you'r on IRC or msn or I can meet you there to start your journey.
Btw at the current rate Jaggyjags is spitting out rom's I can't keep up adding stuff for everyone so I go by the rule:
You translate 1 version of a rom for a man and you made him happy till the release of the next version. You teach a man how to translate a rom and you made him happy for many versions
pedrofidalgo said:
i dont know how to do it :/
if i give you my backup can you add pt language for the last jaggyrom ?
cumps
Click to expand...
Click to collapse
seriously, I know you like your phone and want get the best out of it but your maximum effort is installing .zip roms or .zip updates?
you've got 2 options.
1. Stick with whatever you have right now: your Portuguese backup or any available custom rom.
2. research, research again, try things out and learn. Try to stop asking people to do things for you. It's difficult, I know, specially when you are used to it, but don´t worry, it always is.
Believe me, it is a really nice feeling when you get things done on your own.
good luck
Would you teach us HOT TO DO IT MANUALLY (without using APK Fire)
pmeler said:
Would you teach us HOT TO DO IT MANUALLY (without using APK Fire)
Click to expand...
Click to collapse
Well.... all right then
I've explained most of how to add language already, k most of it in close relation with the use of APK-Fire. Anyway I'll try to explain the whole process starting from the base rom till the modified one.
Step 1
Check if your (custom) rom really really doesn't have your language. Try also 'morelocal' app. This simple step can save you lot's of time
Step 2
Now that you't sure that the (custom) rom doesn't have your language or you just want to add more languages to the rom you build your self you have to go and look for roms that do have the language(s) your want to add.
Possible finding places:
- different versions of the leaked stock rom
- Others people custom rom's
- Rom's for other devices. ! Won't work for the 2 framework apk files, but has good chances to work with the other apk files !
Step 3
Question now probably is how can I find out what languages a rom contains (specialy those for other devices). Well easy, you just have to dismantle the rom's and to be sure a few apk files.
The easyest way to dismantle a rom is to use Android-Kitchen. This tool doesn't need alot of installing or modification but I do recommend you read the how to etc.
So now you have easy access to all the content files of the rom.
Take a few apk files from the system/app folder and dismantle them with 'Apk Tool' or if you realy want to go hardcore 'aapt'. And check the 'app-name'/res for 'values-*' folders that you need.
Step 4
Now that you've found the folders containing the translation (those values-* folders) you've got to copy them to to 'app-name'/res of the afk file from the rom you want to add language to.
dismantled app from copy value folders dismantled app from
rom with language -----------------> rom without language
Step 5
recompile the dismantled app where you just added the value folders to
Step 6
You thought you where allmost done didn't you??? Now the real fun part just starts.
In order to bypass the security that check for the integity of the apk file we need to cheat abit.
You need the new apk file and the original apk (the one without the language)
*rename the 'app-name'.apk file (from both version) to 'app-name'.zip
*delete the resources.arsc file from the original 'app-name'.apk (now temporaly 'app-name'.zip)
*take that same file from the new apk file and copy it to the original apk
* rename the original back from 'app-name'.zip to 'app-name'.apk
* Copy that apk file back into the rom (Android-Kitchen remember)
Step7
Now you repeat this proces for ALL apk files you find in the rom.
Yup all +100 apk files from 1 rom + the same +100 apk files from the other rom need to get this treatment.
Step 8
Cook rom
So you see 8 simple step is more or less what it takes.
Same tutorial but better here
Even more resources here and here
Updated the tool
Cosmoon said:
Updated the tool
Click to expand...
Click to collapse
It doesn't seem to do the last step for me. The one that is supposed to copy the resources.arsc. It just creates another copy of the stock, without the new resources.arsc.
Any idea of what's going on? Would be a flavor to not have to do this manually!
Hmm I fully tested the latest update with the 2 rframework apk files and everything worked fine.
Are you sure that it's just a copy of the stock apk folder?
The switch_resources script does all the final steps. renaming, delete file from stock, copy from new to stock and rename back.
As I still have to add loggin to this part you should see an output on screen showing what the script is/was doing.
While that part is running you should see a folder called 'temp' (inside firebox or 1 of the subfolders of firebox).
Inside the firebox/recompiled_APK you should find a folder for each app containing the resources.arsc file.
And as last check you can compair the size of the 3 diff apk files. (stock, recompiled and translated). If I'm not mistaken the translated is the smallest (how strange it may sound)
Also make sure the tool is in your root folder.
If possible send me the output you get during this fase.
Cosmoon said:
Hmm I fully tested the latest update with the 2 rframework apk files and everything worked fine.
Are you sure that it's just a copy of the stock apk folder?
The switch_resources script does all the final steps. renaming, delete file from stock, copy from new to stock and rename back.
As I still have to add loggin to this part you should see an output on screen showing what the script is/was doing.
While that part is running you should see a folder called 'temp' (inside firebox or 1 of the subfolders of firebox).
Inside the firebox/recompiled_APK you should find a folder for each app containing the resources.arsc file.
And as last check you can compair the size of the 3 diff apk files. (stock, recompiled and translated). If I'm not mistaken the translated is the smallest (how strange it may sound)
Also make sure the tool is in your root folder.
If possible send me the output you get during this fase.
Click to expand...
Click to collapse
They are identical, not even smaller so Although i was running this in cygwin on windows so it might be that. I'll try to boot it up in ubuntu to see if it's any difference Could be the su that's messing with me in cygwin :S
leolulz said:
They are identical, not even smaller so Although i was running this in cygwin on windows so it might be that. I'll try to boot it up in ubuntu to see if it's any difference Could be the su that's messing with me in cygwin :S
Click to expand...
Click to collapse
Never tried it on windows with cygwin, I'm running a debian linux, so that could be the thing that's messing it up.
Still good to know that only that part doesn't work on windows, I'll see if I can modify the script.
THANK YOU Cosmoon !
I asked because I want to remove unsued language from framework-res.apk to make it slimmer
Cosmoon said:
Never tried it on windows with cygwin, I'm running a debian linux, so that could be the thing that's messing it up.
Still good to know that only that part doesn't work on windows, I'll see if I can modify the script.
Click to expand...
Click to collapse
Ye, but it could work although, i never checked the su/root stuff, kinda rushed it yesterday to see how it worked Anyways it's a nice script and ill love to see this project getting further
pmeler said:
THANK YOU Cosmoon !
I asked because I want to remove unsued language from framework-res.apk to make it slimmer
Click to expand...
Click to collapse
Hmm never thought about that. Only thinking of adding stuff but having a option to remove can be handy to.
I'll add it in the next update.
Thx great idea man

install apk extracted from other stock firmware or roms deodexed - help

Hello everyone, I hope I have posted in the right section, I have to ask you a question that despite several hours of trial and research remains to me: I was going to download the firmware official google nexus 7 and take the apk that interest me, and install them on our tablet 7plus.
I downloaded the version both deodexed and odexed of the google nexus 7 and I extracted, for example, the contacts.apk DEODEXED from it.Installing the apk android ics stock tells me: error with the analysis of the packet. I also tested with version odexed putting the apk file and the odex file into the folder system / apps but also restarting did not work ...
1) it's possible what I want and for example it's possible to install another launcher (ex. launcher.apk stolen from google nexus 7 stock deodexed) like a normal apk and use it just pressing home button and selecting it instead of touchwiz launcher?
2) if yes can you explain me the procedure?
3) do you know where I can find the backgrounds stock once downloaded any ROM (which gives me the compacted system folder plus other img etc etc?
Thank you in advance .... sorry for my english, i hope you have understood my intention : I'm going to replace the application of our contacts and launcher tab with those of the google nexus 7
See you soon, Andrea
djskarpia said:
Hello everyone, I hope I have posted in the right section, I have to ask you a question that despite several hours of trial and research remains to me: I was going to download the firmware official google nexus 7 and take the apk that interest me, and install them on our tablet 7plus.
I downloaded the version both deodexed and odexed of the google nexus 7 and I extracted, for example, the contacts.apk DEODEXED from it.Installing the apk android ics stock tells me: error with the analysis of the packet. I also tested with version odexed putting the apk file and the odex file into the folder system / apps but also restarting did not work ...
1) it's possible what I want and for example it's possible to install another launcher (ex. launcher.apk stolen from google nexus 7 stock deodexed) like a normal apk and use it just pressing home button and selecting it instead of touchwiz launcher?
2) if yes can you explain me the procedure?
3) do you know where I can find the backgrounds stock once downloaded any ROM (which gives me the compacted system folder plus other img etc etc?
Thank you in advance .... sorry for my english, i hope you have understood my intention : I'm going to replace the application of our contacts and launcher tab with those of the google nexus 7
See you soon, Andrea
Click to expand...
Click to collapse
I don't think you can just copy over a system apk from one device to another without porting it which I cannot help you with. Same thing goes for the launchers they too would need to be ported over. You could try and use something like apkManager to decompile the app then make the necessary changes to it, i.e. resolution, device name, etc, etc,. then compile it. I have no experience doing this with apps and you might find some help by digging around in the main android development forum, not the one for this device the main one.
http://forum.xda-developers.com/forumdisplay.php?f=524

[Q] Pushing modified framework-res.apk?

Hi, I'm trying to modify /system/framework/framework-res.apk (on the stock Samsung Oreo ROM), more exactly config_locationProviderPackageNames in res/values/arrays.xml so that I can add org.microg.nlp as location provider. I've used the latest apktool (2.3.4) to unpack and repack the apk. I'm replacing it from TWRP and I checked that it has the same owner and rights. And after rebooting the device never finishes booting up (stuck at Samsung logo and blue led).
If I boot back to recovery and put back the original framework-res.apk the system boots fine.
What else do I need to do to make it accept the modified framework?
hey
Are you ONLY modifying the apk?
I would say there is a lot of things to check. It could be that the apk is being rejected by your handling of it. Compare both versions by 7zip lz4 without extracting. Try and use the best tools during the process.
Also more than likely you're conflicting with a service or permission that a perfect apk can't fix.
Have you tried a search in your ROM to see if any files might be associated with the result you want?
Stuff like...
com.android.location.provider.jar
com.android.location.provider.odex
com.android.location.provider.xml
Try doing all the work from your phone without any windows apps. FX explorer and symlink the apk.
Now that everything I said was probably wrong, someone else can tell you how. I'd try fx and symlink, though. It may just align the planets for you
I'm only modifying one XML resource file, but I don't know what else apktool is doing to the apk.
I'm replacing the original framework-res.apk from TWRP, by cat-ing the modified apk over the original, and I've double checked that the ownership and permissions are unchanged.
I guess I can try using another unpack/repack tool and see if it turns out any better, but I've been told that apktool is as good as it gets.
Perhaps it's because the ROM expects the apk to be signed with a certain key? I don't suppose that the key used by Samsung is available somewhere inside the ROM is it?
​
wirespot said:
I'm only modifying one XML resource file, but I don't know what else apktool is doing to the apk.
I'm replacing the original framework-res.apk from TWRP, by cat-ing the modified apk over the original, and I've double checked that the ownership and permissions are unchanged.
I guess I can try using another unpack/repack tool and see if it turns out any better, but I've been told that apktool is as good as it gets.
Perhaps it's because the ROM expects the apk to be signed with a certain key? I don't suppose that the key used by Samsung is available somewhere inside the ROM is it?
Click to expand...
Click to collapse
@wirespot - Did you ever solve the problem you described in this thread?
Not really. My last attempt was to use Runtime Resource Overlays (RROs) to override certain framework values in order to allow org.microg.nlp to run side by side with Google's service.
I will provide them below but it ultimately didn't work. The RRO apk was installed correctly, I could access the NLP settings in the system settings but the main app still could not detect or connect to the service and none of the apps that use location would work.
If anybody else wants to build or use the RRO apk I'm attaching the relevant files as well as the apk. Please note that the built apk only has "org.microg.nlp" as service in arrays.xml (but I provide an arrays.xml with all three services).
apktool.yml is provided as txt file because it wouldn't let me upload it otherwise, remove the .txt. It's used if you build the package with apktool. Remember that you'll also have to generate your own certificate and sign the package in order to install it.
Also some links that may help:
https://forum.xda-developers.com/t/guide-how-to-make-gsis-overlay-file-for-your-phone.3878974/
https://github.com/ReinhardStrauch/framework-res-overlay-sample
https://android.stackexchange.com/questions/110927/how-to-mount-system-rewritable-or-read-only-rw-ro
https://source.android.com/devices/architecture/rros#configuring-overlays
https://source.android.com/devices/automotive/hmi/car_ui/appendix
https://source.android.com/devices/automotive/hmi/car_ui/rro#step_6_dump_the_idmap
https://dzone.com/articles/customizing-android-devices-using-the-runtime-reso
https://dzone.com/articles/android-solution-install-parse-1
https://stackoverflow.com/questions...s-not-recognized-internal-or-external-command
https://github.com/lineageos4microg/android_prebuilts_prebuiltapks/issues/22
wirespot said:
I guess I can try using another unpack/repack tool and see if it turns out any better, but I've been told that apktool is as good as it gets.
Click to expand...
Click to collapse
For decompiling and building Android Oreo, I prefer version 2.3.1 of APKTool to other versions of APKTools.
wirespot said:
I'm only modifying one XML resource file, but I don't know what else apktool is doing to the apk.
...
Perhaps it's because the ROM expects the apk to be signed with a certain key? I don't suppose that the key used by Samsung is available somewhere inside the ROM is it?
Click to expand...
Click to collapse
wirespot said:
Hi, I'm trying to modify /system/framework/framework-res.apk (on the stock Samsung Oreo ROM), more exactly config_locationProviderPackageNames in res/values/arrays.xml so that I can add org.microg.nlp as location provider.
What else do I need to do to make it accept the modified framework?
Click to expand...
Click to collapse
I have not tried modifying framework-res.apk of a Samsung Android Oreo nor have I particularly tried the location services mod you are attempting (though I might get around to trying it someday) and do not know if it is valid to to accomplish what you want with it, but believe that the process should be similar to modding the file on LG Android Oreo. I shall try to guide you to how to prepare a framework-res.apk that is proper.
To answer your question about expecting a certain key. The answer to that is that that is usually the case. The signing scheme checks on system apps; however is usually not as thorough as non-system apps. framework-res.apk is also special in that it is not a running app and is instead used as a cache of system resources and system meta information. In the past, before Android Oreo, a rebuilt framework-res.apk may be made to work simply by including original signature files (META-INF) and corresponding AndroidManfest.xml file from the original framework-res.apk into the rebuilt fraemwork-res.apk file. The system would evaluate these files, and pass a check for valid platform signature. With Android Oreo, it appears that there is an additional check that was not present in the past; my best guess is that the system is checking for the V2 signing scheme signing block within the V2 Signing Scheme APK file structure. The check does not, however, thoroughly validate the signing block information.
Your mod seems rather simple and, given your previous posts, would only involve a modification to framework-res.apk "resources.arsc" member file (which contains the compiled "res/values/arrays.xml" file). If the rebuilt "resources.arsc" can be used to update ("Update" is an actual ZIP archive operation) the original framework-res.apk's member file, the updated framework-res.apk should work (and remained zip-aligned if originally zip-aligned), so long as the packed file size of the updated member file is less than or equal to the packed size of the original member file, plus up to 4 bytes depending on proximity to the next member file data if original framework-res.apk is zip-aligned as expected. If the packed modified member file(s) are larger, the original APK file structure would likely not be preserved, and a different method might have to be used. Also note that 7-Zip is not reasonable software to use for this, despite it being included with many tools on XDA to modify APK files; the software has had a history of rearranging unnecessarily zip file table entries when a change is made to an archive. Use a different tool that does not do this, such as WinRAR (I have tested version 5.61).
For normal apps, one may not copy over "resources.arsc" or resources from two different app builds and have things work correctly when the app runs; one would also need to make corresponding changes in the *.dex APK member files. framework-res.apk, not being an app the runs, has no corresponding *.dex files, and one need not worry about corrupting the relationship between the *.dex files and the resource files because none exists to corrupt.

Categories

Resources