Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

recompile framework-res.apk always failed

OP yajoz31

25th January 2014, 05:39 AM   |  #11  
Senior Member
Thanks Meter: 469
 
1,623 posts
Join Date:Joined: Jun 2013
More
Quote:
Originally Posted by arffrhn

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.
25th January 2014, 07:40 AM   |  #12  
OP Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: Dec 2012
Unhappy
Thank you all, I've tried, but still can not,, is there any other solution,, please,,
25th January 2014, 08:57 AM   |  #13  
arffrhn's Avatar
Senior Member
Kuala Lumpur
Thanks Meter: 726
 
1,519 posts
Join Date:Joined: Mar 2013
Quote:
Originally Posted by yajoz31

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

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.
25th January 2014, 09:34 AM   |  #14  
OP Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: 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:	40
Size:	212.0 KB
ID:	2537819  
25th January 2014, 09:43 AM   |  #15  
arffrhn's Avatar
Senior Member
Kuala Lumpur
Thanks Meter: 726
 
1,519 posts
Join Date:Joined: Mar 2013
Quote:
Originally Posted by yajoz31

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
25th January 2014, 10:07 AM   |  #16  
OP Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: Dec 2012
so it says "could not find sources" in cmd it means what?? whether it is a problem when recompile the framework-res ??
25th January 2014, 10:12 AM   |  #17  
Senior Member
Flag bangalore
Thanks Meter: 128
 
386 posts
Join Date:Joined: Jul 2013
More
[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
25th January 2014, 10:19 AM   |  #18  
arffrhn's Avatar
Senior Member
Kuala Lumpur
Thanks Meter: 726
 
1,519 posts
Join Date:Joined: Mar 2013
Quote:
Originally Posted by yajoz31

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
25th January 2014, 10:22 AM   |  #19  
OP Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: Dec 2012
Talking
okay, I first try,,, thanks for teaching me brother,,
25th January 2014, 07:35 PM   |  #20  
Senior Member
Thanks Meter: 469
 
1,623 posts
Join Date:Joined: Jun 2013
More
Quote:
Originally Posted by yajoz31

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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes