Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,424 Members 36,690 Now Online
XDA Developers Android and Mobile Development Forum

recompile framework-res.apk always failed

Tip us?
 
ChikeD
Old
#11  
Senior Member
Thanks Meter 465
Posts: 1,607
Join Date: Jun 2013
Quote:
Originally Posted by arffrhn View Post
Well it may be signed or it may not be signed at all, but what's important it works and this is by far the easiest. Many have used this way to recompile framework-res or systemui. My modded apk.

Here: http://forum.xda-developers.com/show....php?t=2203166
Here: http://androidforums.com/boost-mobil...k-res-apk.html
Here: http://forum.xda-developers.com/show...54&postcount=5
Here: http://www.androidgamehacks.net/foru....php?tid=18297 (this is the same except he change the files to be copied into)

This method like I said, doesn't sign it but rather keeping the original signature for the newly modified apk. Maybe what I wrote before is not really accurate and it cause confusion and for that I am sorry. Well it's up to you, there are many ways and this is one of them. Just telling.
Use whichever method you want
This is "jarsigner -verify -verbose " log for your apk
Code:
jarsigner: java.lang.SecurityException: SHA1 digest error for res/anim/accelerate_decelerate_interpolator.xml
And this for stock apk
Code:
sm      5306 Fri Nov 30 00:00:00 IST 1979 assets/images/android-logo-mask.png
sm       641 Fri Nov 30 00:00:00 IST 1979 assets/images/android-logo-shine.png
sm     79471 Fri Nov 30 00:00:00 IST 1979 assets/sounds/bootanim0.raw
...
sm       635 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW/loaderror.html
sm       859 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW/nodomain.html
sm       959 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW-xlarge/incognito_mode_start_page.html
s     334202 Fri Nov 30 00:00:00 IST 1979 META-INF/MANIFEST.MF
      334255 Fri Nov 30 00:00:00 IST 1979 META-INF/SONY-ERICSSON-E-PLATFORM-SIGNING-LIVE-864F-3.SF
        1375 Fri Nov 30 00:00:00 IST 1979 META-INF/SONY-ERICSSON-E-PLATFORM-SIGNING-LIVE-864F-3.RSA

  s = signature was verified 
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

Warning: 
This jar contains entries whose certificate chain is not validated.
This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2035-01-01) or after any future revocation date.

Re-run with the -verbose and -certs options for more details.
Se is it signed?

I don't know what must be signed and what is not, and you probably can trick it to have untouched resources signed. but anything you change will not be signed.
 
yajoz31
Old
#12  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Dec 2012
Thank you all, I've tried, but still can not,, is there any other solution,, please,,
 
arffrhn
Old
#13  
arffrhn's Avatar
Senior Member
Thanks Meter 721
Posts: 1,514
Join Date: Mar 2013
Location: Kuala Lumpur
Quote:
Originally Posted by yajoz31 View Post
Thank you all, I've tried, but still can not,, is there any other solution,, please,,
What error did you encounter? It's easier if you put the output you get during recompiling.

Quote:
Originally Posted by ChikeD View Post
Use whichever method you want
This is "jarsigner -verify -verbose " log for your apk
Code:
jarsigner: java.lang.SecurityException: SHA1 digest error for res/anim/accelerate_decelerate_interpolator.xml
And this for stock apk
Code:
sm      5306 Fri Nov 30 00:00:00 IST 1979 assets/images/android-logo-mask.png
sm       641 Fri Nov 30 00:00:00 IST 1979 assets/images/android-logo-shine.png
sm     79471 Fri Nov 30 00:00:00 IST 1979 assets/sounds/bootanim0.raw
...
sm       635 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW/loaderror.html
sm       859 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW/nodomain.html
sm       959 Fri Nov 30 00:00:00 IST 1979 res/raw-zh-TW-xlarge/incognito_mode_start_page.html
s     334202 Fri Nov 30 00:00:00 IST 1979 META-INF/MANIFEST.MF
      334255 Fri Nov 30 00:00:00 IST 1979 META-INF/SONY-ERICSSON-E-PLATFORM-SIGNING-LIVE-864F-3.SF
        1375 Fri Nov 30 00:00:00 IST 1979 META-INF/SONY-ERICSSON-E-PLATFORM-SIGNING-LIVE-864F-3.RSA

  s = signature was verified 
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

Warning: 
This jar contains entries whose certificate chain is not validated.
This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2035-01-01) or after any future revocation date.

Re-run with the -verbose and -certs options for more details.
Se is it signed?

I don't know what must be signed and what is not, and you probably can trick it to have untouched resources signed. but anything you change will not be signed.
Well tbh, I don't really know. However, for system apks you don't need to sign it as it may cause incompatibility. Even in the guide which cascabel put on the previous page, the OP suggested to not sign the apks but instead just copy both meta-inf and android manifest into the newly modded apk and recompile again. Check this here. Read the posts on that page. If you have any knowledge about it, do enlighten me.
Samsung Galaxy S Advance i9070 || ROM: HarshJelly || Kernel: Cocore

Google Nexus 4 || ROM: Mahdi-Rom || Kernel: hells-Core // AK POSEIDON series || Recovery: TWRP 2.7.0.0
 
yajoz31
Old
#14  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Dec 2012
problem as in the picture in the attachment .. recompile every process always says "could not find sources" but the dist folder there is a framework-res.apk that already completed in recompile. and after that I followed the advice you give, then I signapk and I push into the system, but bootlop,, what should I do,,??
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	34
Size:	212.0 KB
ID:	2537819  
 
arffrhn
Old
#15  
arffrhn's Avatar
Senior Member
Thanks Meter 721
Posts: 1,514
Join Date: Mar 2013
Location: Kuala Lumpur
Quote:
Originally Posted by yajoz31 View Post
problem as in the picture in the attachment .. recompile every process always says "could not find sources" but the dist folder there is a framework-res.apk that already completed in recompile. and after that I followed the advice you give, then I signapk and I push into the system, but bootlop,, what should I do,,??
The apk in the dist folder is your modded. You don't have to sign it. Just unpack your original framework apk using 7zip and copy meta inf and android manifest file into build folder.

When you recompile the first time, there are build and dist folders created. Take meta inf and android manifest from original apk and copy into build (well, into apk folder in that build folder where you can find res, resource arsc, and android manifest). Just copy these and recompile it again. Then zipalign. No need to sign, that's all you have to do. Your final apk is in dist folder.

Sent from my Nexus 4 using xda premium
Samsung Galaxy S Advance i9070 || ROM: HarshJelly || Kernel: Cocore

Google Nexus 4 || ROM: Mahdi-Rom || Kernel: hells-Core // AK POSEIDON series || Recovery: TWRP 2.7.0.0
 
yajoz31
Old
#16  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Dec 2012
so it says "could not find sources" in cmd it means what?? whether it is a problem when recompile the framework-res ??
 
bharathbondfire
Old
#17  
Senior Member
Thanks Meter 127
Posts: 363
Join Date: Jul 2013
Location: bangalore
[QUOTE=yajoz31;49746521]so it says "could not find sources" in cmd it means what?? whether it is a problem when recompile the framework-res ??[/QUOTE

use super apktool it is very easier with it
 
arffrhn
Old
#18  
arffrhn's Avatar
Senior Member
Thanks Meter 721
Posts: 1,514
Join Date: Mar 2013
Location: Kuala Lumpur
Quote:
Originally Posted by yajoz31 View Post
so it says "could not find sources" in cmd it means what?? whether it is a problem when recompile the framework-res ??
It always says that when you recompile.

Sent from my Nexus 4 using xda premium
Samsung Galaxy S Advance i9070 || ROM: HarshJelly || Kernel: Cocore

Google Nexus 4 || ROM: Mahdi-Rom || Kernel: hells-Core // AK POSEIDON series || Recovery: TWRP 2.7.0.0
 
yajoz31
Old
#19  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Dec 2012
okay, I first try,,, thanks for teaching me brother,,
 
ChikeD
Old
#20  
Senior Member
Thanks Meter 465
Posts: 1,607
Join Date: Jun 2013
Quote:
Originally Posted by yajoz31 View Post
so it says "could not find sources" in cmd it means what?? whether it is a problem when recompile the framework-res ??
It's just a warning not an error, meaning some string(s) are not translated (their value is missing in values-??) so they will show in whatever is in values no matter hwat system language is, but it does not stop the apk from being built.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Flyme OS Finds Its Way to the Google Nexus 5

Flyme OS is a heavily modified Android variantdeveloped by the Meizu team for their MX … more

MultiROM Makes Its Way to the LG G2

Over the last few weeks, we’ve seen quite a fewflagship (and former flagship) devicesget to … more

Jair Player with a Major Update–Here’s What’s New!

Back in May, we talked a bit aboutJair Player, a nice looking music … more