hi, this is my first post here on XDA. i've surfed this site for quite a while as an guest and i love the work that's been done here. I am not new to the field of reverse engineering but most of my time has been spent on the x86 world (Windbloze)
my curiosity grew in the reversing of android applications. I've modded a few apps from the Android Market but now i'm wanting to modify my Phone.apk to get rid of a feature i find 'stupid'
every time i make a call the phone vibrates when it connects, and for me that's annoying because i have all features of my phone set to vibrate and i find myself looking at the phone to see if it was a text or something lol.
I am not asking for someone to do this for me, i will post below what i have done and what i've tried to do to get it working and hope someone can guide me along my way.
Pulled Phone.apk from /system/app
Pulled HTC Framework (com.htc.resources.apk) from /system/resources
Installed framework with apktool
decompiled phone.apk
found offending code that causes the vibrate on connect, deleted it
recompiled APK with apktool
resigned it with testsign.jar
pushed to phone using
adb shell stop
adb push
adb shell start
Click to expand...
Click to collapse
Phone.apk crashes and i get no service
now as far as troubleshooting goes i've done a few logcats on startup to see where it's failing
this line appeared intersting to me:
Package com.android.phone has no signatures that match those in shared user android.uid.phone; ignoring!
Click to expand...
Click to collapse
as suggested by another thread (over on modaco) i removed the following bolded portions of the androidmanifest.xml file
android:sharedUserId="(Text removed to obey outside link filter)"
android:sharedUserLabel="(Text removed to obey outside link filter)"
Click to expand...
Click to collapse
trying yet again with the above pushing method i then shutdown the phone and started another logcat... this time i noticed that it changed the Phone.apk's UID from 1001 to some other number and later on in the logcat i see that the package manager is refusing to give the requested permissions to Phone.apk
so starting all over i tried again with the original AndroidManifest.xml I found a thread here on XDA that states that FieldTest.apk and Telephony.apk might need to be signed with the same cert as Phone.apk so I pulled and resigned with testsign (i'm assuming it uses the same key to sign all apks) the TelephonyProvider.apk and FieldTest.apk files along with Phone.apk, pushed them all to the phone and now i'm getting all kinds of FC's...
So here I am, after hours of fighting with my phone asking for some help... if anyone could guide me to the correct way of modifying my Phone.apk file and still maintain service i would be very appreciative.
EDIT: I've also read somewhere that the framework might need to be resigned, but frankly i'm not sure how that could fix the problem, sounds to me it would cause a lot more problems...also i'm aware that there is a cutom Phone.apk v30.x but it specifically states it's not compatible with the HTC Hero
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
Hi everyone
I was getting some queries from Arabic, Vietnamese, Portuguese, Turkish and other languages speakers who wish to have their own loacalized SGH-T959V ROM.
So, here is what we did on HebrewValhalla ROM (Gingerbread BML) :
1. We took Valhalla Final as a basic ROM to be translated.
2. We found an SGS i9000 ROM already localized to the language we want.
3. We decompiled all Valhalla Final necessary APKs to be translated.
4. We decompiled all SGS i9000 necessary APKs to take their translations.
5. We recompiled all Valhalla Final APKs with the the new translations.
6. Pushed one APK at a time with language locality selected. verified and moved on. Finally did it for framework-res and chose language.
7. Minor adjustments, packing and publication.
Explanations :
1. First decide what is your ROM to be translated. download it and save it on a PC.
2. Find and download an SGS i9000 localized ROM. If there isn't such you're in trouble.
3. Download APKTOOL read this. Define the base ROM framework according to instructions and decompile all necessary APKs. save them all locally.
4. In a separate folder use another instance of APKTOOL and define the SGS i9000 ROM framework and decompile the corresponding APKs.
5. Find out what is your language 2 chars lang code (English=EN, Hebrew=IW).
Take out all the APKs Resource\values-XX and layout-XX and place them in the destination ROM corresponding APKs resources. for example :
SGSi9000ROM\APKTOOL\Projects\Camera\Resources\Values-XX should be copied to
ValFnl\APKTOOL\Projects\Camera\Resources\Values-XX
Compile all these APKs (take them from "modded apk") and remove the "signed" from the filenames.
6. Install a locality app like "MoreLocale2" with your selected or manually added language (for Hebrew it was IW, Hebrew) and check your APKs translations.
Once you finish compiling framework-res (and push it to framework folder - preferably through flashable zip or ADB) it will have your language inside and you could uninstall the locality app and choose it in the settings.
This will give you full framework UI support.
7.Take all files and put them in the original ROM location.
A) list of needed APKs on BML ROMs can be found here :
Need to take translations to
system apps:
AccountAndSyncSettings
Browser
Contacts
JobManager
MediaProvider
PackageInstaller
PhoneSetupWizard
SamsungApps
SamsungAppsUNA
SamsungWidget_ProgramMonitor
Settings
SnsAccount
SystemUI
TouchWizCalculator
TSMParts
TW4Launcher
Phone
Camera
TouchWiz30Launcher
TouchWizCalendar
Mms
framework:
framework-res.apk
Working directly from SGSi9000
system apps :
Talk
Street
ClockPackage
Music
Gallery3D
MusicPlayer
VideoPlayer
VoiceRecorder
MyFiles
AxT9IME
CallSetting
DialerTabActivity
Email
Gmail
Memo
B) Most of APKs are in system\app but for full UI you also need to handle the Framework\framework-res.apk
C) If you want to add tweaks and stuff : study how to make recovery flashables - search the web and examine tweaks and bootanimations and how their commands are written.
Now you can install your localized ROM.
Good luck!
(P.S - it took us 2 people about 10 days to release the first version).
Right to left languages (Arabic, Hebrew...) will additionally require RTL tweak - read this
You may need to also copy the fonts from SGS i9000 ROM.
Great
Oh great, man...I'm very pleased helping you with vietnamese yay (just tell me what to do ...and thanx for including Vietnamese :x
I just did...
Please follow instructions very carefully, ask me if you don't understand anything and do it yourself according to the GUIDE.
okay, I'll try my best to start something the next two week (have to finish the next exam week @@)...thanx for your guil...oooh and btw, can you give me any basic links as google is very wide that I don't know where to start with build.prop or framework lines...
You're running too fast. Work according to this with a lot of trial and error and then carry on by searching the xda forums. 99.99% of your questions were probably already asked and answered.
Sent from my SGH-T959V using XDA
By the way, even if there is no SGS i9000 ROM for your lanhuage you can still create the translated strings XMLs, it will just take you much much longer. Probably will need to spread the work with other teammates.
Sent from my SGH-T959V using xda premium
Hi Guys
This method is good for translating ICS ROMs as well.
I use it for HebMIUI.
The only thing changed is the version of APKtool to use and the system and framework apps to translate - this is a post I just sent Mataflikas :
Hi Amigo
To be able to translate Erik's MIUI ROM to Spanish,
What you need to do is go to miuiandroid site and download the SGS i9000 Spanish MIUI ROM.
Than download Erik's ROM. Download APKmanager/ APKtool for ICS and aapt ver. 1.5.0 and place aapt in the 'other' folder of apktool in your pc.
Now you need to copy framework-res.apk & framework-miui-res.apk from the Spanish ROM to the 'other' folder. Register both framework files by running in command line '..\other\apktool if framework-res.apk'
& '\other\apktool if framework-miui-res.apk'. Copy all system\app APKs as well as both framework files to the 'files to be modified' folder.
run the apktool batch script.
Decompile all the apks by selecting (option 22) & decompiling (9) one at a time.
Now go to each apk project folder (located in the projects folder) and enter the 'res' (resources) folder. I assume 'es' is the shortcut for Spanish locale - verigy that!
You need to take all the 'values-es', 'layout-es', 'raw-es' etc. These are the Spanish translations. Now repeat this for all the apks. Make a saparated apktool folder for Erik's ROM, register his own frameworks and decompile the same apks there. When you're done, throw every apk translation to the 'res' folder of the same app in Erik's ROM. When done, run script on Erik's and select (22) and compile (11) is this a system app? Choose YES, let me delete only changed data? Choose YES. Then it will make a 'keep' folder, go there and delete 'resources.arsc' file. Press any key and you have a new file 'unsignedAPKNAME' in the 'files to be modified' folder. Done with all apks you can replace them in the ROM zip and try to flash it. If framework-miui-res.apk is not valid you will enter a bootloop so leave it for the end. I didn't even recompile it on HebMIUI. Last things - you can change default locale & region in system\build.prop and change your gps location by changing the system\etc\gps.conf to the one of your country (google it). Good luck and let me know if you have a question.
And If you want to publish your result - talk to Erik first !
sent from me
The complete detailed guide for enabling Hebrew and RTL on CM7/CM9/AOKP based ROMs
Hi all,
i am trying to recompile the Phone.apk for our phone of CM7 by using the mmm command (without changing the existing code).
After I replace the Phone.apk on the phone using adb push , the phone starts to FCs ( I have set the proper permissions as well).
I tried to reboot it but still the FCs are present and the phone application does not work.
I am able to recompile the complete ROM and flash it through Recovery successfully.
I need to mention that the Phone.apk created with mmm is around 2MB whereas the one included in the recompiled rom is around 1.1 MB.
Does anyone have any idea what I an doing wrong ? Is it logical that the two apks have different sizes?
Thanks
Chris
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