What am I doing wrong with framework-res.apk? - General Questions and Answers

So
I just want to play with translations for fun. I wanted to create somekind of pirate language.
So what I did.
I took framework-res.apk from ROM
Decompiled it using a apktool.
Copied string.xml from value folder to the values-nl folder
Translated some strings
Compiled folder
Signed apk (tried also without signing)
And I put apk to the ROM
And here comes a bootloop

Related

[Q] Issue decompiling apk with apk manager

I have apk manager 5.02 which I can de-compile framework and recompile with out any issues.
I downloaded the stock 2.08 sense 3.5 rom and used explore2fs to extract the contents of the system.img file. From there I then put htcdialer.apk file into apk manager to decompile it and I get the following errors:
See attached log file as it is too big to put into the forum.
Any ideas why the apk file is not decompiling?
I dont hink that apkmanager can correctly decompile sense 3.5 apks, I could be wrong but i could never get them to work properly
If APK Manager and Tool cant extract even GB ROM apks is there a way of extracting and editing xml files? I tried 7zip and I can edit images but XML's do not extract correctly
Really interested to see how to edit XML files if APK Manager and APK Tool cant decode the APK's.
Found out what I was doing wrong!! When decompiling the apk file I wasn't adding the dependancy. So for example when I was decompiling the systemui.apk, I was simply using option 9 to decompile which is not right!
What you need to do is copy the systemui.apk file in to place-apk-here-for-modding
Then find the dependency framework so for example the systemui.apk depends on com.htc.recources.apk. So pull this from your phone on to the desktop and then use option 10 to decompile. It will then prompt you for the dependancy apk file. Drag that on to the command window and press enter and it decompiles! It is easy when you know how
Also when you recompile you will probably get errors...You need to take the newly created classes.dex and drop it into the original apk then push to your phone
Where can I find the dependency file??
I got the same problem when I try to Decompile any system app, like "SystemUI.apk" or "Settings.apk" ...etc
Now I understand from you that I need a dependency file, Where can I get it??
I use Samsung Galaxy SL (I9003), Rooted and Deodxed
i use samsung galaxy mini. can i use apkmanager to decompile any apk for my device......by pressing 9 directly.....? i want to decompile settings.apk....thnx in advance......

[Q] Can't translate my ICS ROM

Hi there,
I decompiled all apk from the system/app/ folder of the original .zip of the ICS ROM I want to translate (MIUIv4 RD), I added in each of decomplation directory the correct values-*lang*/ folder, I recompliled everything (without any error, using a bit mooded version of apktool (else it fails)), I flashed every apk to my phone, but the new language won't appear in MIUI ICS menu. Is there any more file to edit so that it can use new languages values ?
Thanks for help. If it succeed, I promise I will upload my files .
Cheers,
KennyG9

[GUIDE] Creating a localized SGH-T959V ROM

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

Re-Compile Framework-res.apk = Bootloop

Helo, sry for noobish thread but i can's solve my problem. This method allways work for me using Zte blade. But now on Xperia Arc it doesn't.
Im trying to change somethink in framework (values) , but first i try to re-compile framework to check. And what ? i got bootloop.
Im using
ApkMultiTool 1.0.6
ApkManager 5.0.2
apktool.jar
signapk.jar
First i decompile this clean stock framework (o errors), then i try to compile (0 errors, no changes inside framework) and i got bootloop.I sign new framework and put it in my rom zip file. Then i try to make it manualy, so i run ms command line :
java -jar apktool.jar d framework-res.apk
java -jar apktool.jar b framework-res.apk
Then Sign manualy :
java -jar signapk.jar certificate.pem key.pk8 framework-res.apk signedframewok-res.apk
AND ? BOOTLOOP :////////////////////
same prob
OmenHTX said:
Helo, sry for noobish thread but i can's solve my problem. This method allways work for me using Zte blade. But now on Xperia Arc it doesn't.
Im trying to change somethink in framework (values) , but first i try to re-compile framework to check. And what ? i got bootloop.
Im using
ApkMultiTool 1.0.6
ApkManager 5.0.2
apktool.jar
signapk.jar
First i decompile this clean stock framework (o errors), then i try to compile (0 errors, no changes inside framework) and i got bootloop.I sign new framework and put it in my rom zip file. Then i try to make it manualy, so i run ms command line :
java -jar apktool.jar d framework-res.apk
java -jar apktool.jar b framework-res.apk
Then Sign manualy :
java -jar signapk.jar certificate.pem key.pk8 framework-res.apk signedframewok-res.apk
AND ? BOOTLOOP :////////////////////
Click to expand...
Click to collapse
same prob here too happening.....i cant able to change theme....!!
Before decompiling you mmust install the .apk use this command:
Cd C:/.. navigate to your framework-res.apk
Once you in the folder where it is located use this command to 1)install:
Apktool if framework-res.apk
2)Decompile:
Apktool d framework-res.apk
3)Recompile:
Apktool b framework-res
4) new .apk is in .../framework-res/dist/
I think you forgot to install the .apk
Sent from my GT-I9001 using xda app-developers app
Diablob555 said:
Before decompiling you mmust install the .apk use this command:
Cd C:/.. navigate to your framework-res.apk
Once you in the folder where it is located use this command to 1)install:
Apktool if framework-res.apk
2)Decompile:
Apktool d framework-res.apk
3)Recompile:
Apktool b framework-res
4) new .apk is in .../framework-res/dist/
I think you forgot to install the .apk
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
If he didn't install the apk, he wouldn't be able to not even decompile correctly.
OP: I also have this problem, but from what I read, after you recompile, you need to open the new and the old apk with WinRar or 7-Zip, copy the resources.src (or something like that) from the original framework-res.apk to the modified framework-res.apk. I read that this should do the job. I'm going to try that myself later when I get home. Good luck for you.
Sent from my LT26i with Tapatalk 2
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
This simple comment of yours gave peace to my soul... THANK YOU SO MUCH!!!!!!
:laugh::laugh::laugh::laugh::victory::victory::good::good::good:
Great solution !!!!
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
sorry for a 6 month later post, but i'm having the same problem and this solution isn't making sense to me..
edit: holy **** it worked
i compile first, I just drag them into the newly compiled apk
thank you!
eris72 said:
sorry for a 6 month later post, but i'm having the same problem and this solution isn't making sense to me..
edit: holy **** it worked
i compile first, I just drag them into the newly compiled apk
thank you!
Click to expand...
Click to collapse
For me it is not working. My phone keeps looping after rebooting it.
I tried with 7zip and winrar and it is not working.
1.- Decompile with apktool1.4.2
2.- Compile with apktool1.4.3 (in this step i was editing eri.xml I need to edit this file, but also without editing this file I have the same result)
3.- Drag the META-INF and AndroidManifest.xml from the original apk to the newly created one with 7zip(also tried with winrar)
4.- push the file to the phone (system/framework)
Actually right after pushing it I get an error message saying Unfortunately, C has stopped.
What am I missing?
Did you fix permissions before pushing back to system/framework
dutchmaster18 said:
Did you fix permissions before pushing back to system/framework
Click to expand...
Click to collapse
I decompiled and compiled, both processes with the latest version and that solved my problem
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
really thank you worked for me!!!!
Helped........
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Thank you...it helped me to overcome a problem i was unable to solve....thank u very much...:good::good::good::good::good::good:
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Four years later and you're still saving frustrated XDA'ers.
Thank you!
Five hours of Googling and I finally have success.
Anyone know of a quicker workaround?
framework-res re/compile, push to phone
Hi have the problem with bootloop after overwrite framework-res.apk to /system/framework
use apktool2.2.2
phone note 3 with phronesis rom
I made
1.apktool if framework-res.apk (0 error)
2. decompile apktool d framework-res.apk (0 errors)
3. changed color.xml and styles.xml (only changed color text)
4. from orginal framework-res.apk drag resources.arsc to decompiled folder
5.make re-compile (apktool b framework-res) (0 errors) after this, program created new folder BUILD and DIST, in /build/apk/is META-INF, android manifest,RES folder and resources.arsc
Now i tried ( with tutorials ) drag from orginal framework-res.apk, folder META-INF, AndroidManifest.xml to BUILD folder and recompile second time (0 errors) then, from DIST folder i took framework-res.apk and overwrite to phone/system/framework and reboot = bootloop
Also trying after 1st re-compile, drag META-INF and androidmanifest.xml from orginal framework-res to newly recomplied framework-res.apk in DIST folder, again overwrite in phone/system/framework but still bootloop
before overwrite make permission rw-r--r- the same permisson of orginal framework-res.apk
then overwrited my apps example touchwiz, google play has stopped, reboot but unfortunately booloop
Any solution? ^^ thx
DrMalaN said:
framework-res re/compile, push to phone
Hi have the problem with bootloop after overwrite framework-res.apk to /system/framework
use apktool2.2.2
phone note 3 with phronesis rom
I made
1.apktool if framework-res.apk (0 error)
2. decompile apktool d framework-res.apk (0 errors)
3. changed color.xml and styles.xml (only changed color text)
4. from orginal framework-res.apk drag resources.arsc to decompiled folder
5.make re-compile (apktool b framework-res) (0 errors) after this, program created new folder BUILD and DIST, in /build/apk/is META-INF, android manifest,RES folder and resources.arsc
Now i tried ( with tutorials ) drag from orginal framework-res.apk, folder META-INF, AndroidManifest.xml to BUILD folder and recompile second time (0 errors) then, from DIST folder i took framework-res.apk and overwrite to phone/system/framework and reboot = bootloop
Also trying after 1st re-compile, drag META-INF and androidmanifest.xml from orginal framework-res to newly recomplied framework-res.apk in DIST folder, again overwrite in phone/system/framework but still bootloop
before overwrite make permission rw-r--r- the same permisson of orginal framework-res.apk
then overwrited my apps example touchwiz, google play has stopped, reboot but unfortunately booloop
Any solution? ^^ thx
Click to expand...
Click to collapse
1. apktool if framework-res.apk
2. decompile apktool d framework-res.apk
3. change color.xml and styles.xml
4. apktool b framework-res
5. drag from the NEW (dist folder) framework-res.apk this files (with zip editor): -res folder, -resources.arsc, -classes.dex (if you edited the smali too) to the OLD framework-res.apk
6. Now you can use the 'old' framework-res.apk with your phone, but now with your modifications.
I hope its help you. Sorry for the long time delay, but i just find now this therad
Make sure that you put the original manifest and meta folder back into the apk before pushing it. There's no need to resign unless you modify the manifest, all you should have to do is open the newly compiled app with winrar and add the contents of the originals folder. (Which is the manifest and meta folder)
Sent from my KYOCERA-C6745 using Tapatalk
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
THANK YOU!!!
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Thanks... Your suggestion worked for me :good::good:
RealWelder said:
Make sure that you put the original manifest and meta folder back into the apk before pushing it. There's no need to resign unless you modify the manifest, all you should have to do is open the newly compiled app with winrar and add the contents of the originals folder. (Which is the manifest and meta folder)
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Well that didn't work for me , im still getting bootloop

Can't recompile settings.apk

Sorry if this is a duplicate or in the wrong place, but i cant find any solutions.
I am having trouble recompiling the settings.apk. I decompile it without problems but the apk can't recompile unless I paste in the .arsc file from the stock apk (by unziping). The problem is that when I edit the xml, it needs to make a new .arsc file since I edited xml within the layout folder.
I am using apktool and have had no problems with other apk files. This is on the Samsung galaxy player 5.0 USA.
Another note, if I decompile, put in the resources.arsc file, and recompile, the new apk file is smaller. In addition, if I unzip the recompiled apk I can edit the xml w/o a problem. This is weird because when I unzip the stock settings.apk the xml files are un-readable.
Any Ideas about what I am doing wrong?
Sorry for being a noob.
tchen510 said:
Sorry if this is a duplicate or in the wrong place, but i cant find any solutions.
I am having trouble recompiling the settings.apk. I decompile it without problems but the apk can't recompile unless I paste in the .arsc file from the stock apk (by unziping). The problem is that when I edit the xml, it needs to make a new .arsc file since I edited xml within the layout folder.
I am using apktool and have had no problems with other apk files. This is on the Samsung galaxy player 5.0 USA.
Another note, if I decompile, put in the resources.arsc file, and recompile, the new apk file is smaller. In addition, if I unzip the recompiled apk I can edit the xml w/o a problem. This is weird because when I unzip the stock settings.apk the xml files are un-readable.
Any Ideas about what I am doing wrong?
Sorry for being a noob.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2251719

Categories

Resources