step by step guide - Hero, G2 Touch Themes and Apps

hi, in very new to android and would like to change some things on the framework with my things. ive found out how to change the png files in the apk files but when im putting it back together its requiring a signature.
can someone help me with this one?

Hope this helps,...
Re-Sign APK after Customizing????

system files cannot be signed with testkeys. just put the pngs back in the apk, the signature is not checked for validity, only for existence...

kendong2 said:
system files cannot be signed with testkeys. just put the pngs back in the apk, the signature is not checked for validity, only for existence...
Click to expand...
Click to collapse
i didnt understand that 100 % so youre saying that i can't edit the png files in the system folder?

Svarstad2k said:
i didnt understand that 100 % so youre saying that i can't edit the png files in the system folder?
Click to expand...
Click to collapse
so what did you mean in your first post?
you get the png from the apk. you edit the png. you put the png back into the apk. do not extract the apk, do not resign the apk.
sry, can't say it simpler.

okay, with you now.
but then its a new question: how can i get out the png files without extract the apk file?

kendong2 said:
so what did you mean in your first post?
you get the png from the apk. you edit the png. you put the png back into the apk. do not extract the apk, do not resign the apk.
sry, can't say it simpler.
Click to expand...
Click to collapse
tried to just repack the apk file and install without resigning it.
Install from sdcard...
Finding update package...
Opening update package...
E:Can`t open /sdcard/update.zip
(bad)
Installation aborted.
any idea?

Related

Help. Turn Framework Folders into APK Files.

I'd hate to be that guy who starts a whole thread for something...but I've looked everywhere and can't find the answer.
I'm working on my first theme, and I unzipped the framework recourse apk files, made the changes to the files inside, and now I want to turn them back into apk format so I can make everything into a flashable update.
I can't figure out how to turn these framework recourse folders into framework recourse apk files! Can anyone help me!? Thanks! If all goes well, I'll have a new theme out for you guys by tonight.
Thanks in advance!
alexthearmo said:
I'd hate to be that guy who starts a whole thread for something...but I've looked everywhere and can't find the answer.
I'm working on my first theme, and I unzipped the framework recourse apk files, made the changes to the files inside, and now I want to turn them back into apk format so I can make everything into a flashable update.
I can't figure out how to turn these framework recourse folders into framework recourse apk files! Can anyone help me!? Thanks! If all goes well, I'll have a new theme out for you guys by tonight.
Thanks in advance!
Click to expand...
Click to collapse
http://www.4shared.com/file/1LIk07D5/Avabox.html
download for windows. it has auto sign. as for changing back to apk just change extension back to .apk
so...do i use that program to zip up the file, then just change the extension?
........................
alexthearmo said:
so...do i use that program to zip up the file, then just change the extension?
Click to expand...
Click to collapse
Yes. Zip up file, change .zip to .apk.
What? You dont need to resign .apk's. In fact, you're making too much work for yourself. Im sure you extracted the .apk to a folder. All you need to do is reopen that .apk with 7zip. Drag and drop your changes into the .apk and you're done. No need to resign or anything.
VinceOB said:
What? You dont need to resign .apk's. In fact, you're making too much work for yourself. Im sure you extracted the .apk to a folder. All you need to do is reopen that .apk with 7zip. Drag and drop your changes into the .apk and you're done. No need to resign or anything.
Click to expand...
Click to collapse
Thanks for your help guys. I ran into some trouble with all this, and even realized that I mistakenly used some of the wrong files (from a theme that I actually didn't want to use)...so I'm gonna have to spend more time working on this. Hopefully I can get it finished and uploaded tomorrow. But thank you for your help. Right now I got homework to do. bleh.
Thanks for the post. I've been looking all over for this answer.
sweet...........

Why does my apk signing not work?

I'm using the auto-sign here:
http://forum.xda-developers.com/showthread.php?t=646962&highlight=sign
I modified framework-res.apk (changed 3 png files), signed it, and replaced the apk in the update.zip from: http://forum.xda-developers.com/showthread.php?t=687935
I get the following error when flashing the zip:
Code:
Verifying update package...
E:Wrong digest:
system/framework/framework-res.apk
E:Verification failed
What am I doing wrong here?
delete the META-INF folder before signing.
arkavat said:
delete the META-INF folder before signing.
Click to expand...
Click to collapse
Tried it. Still no go. =\
I think the APK needs to use the same signature as the update.zip when signing... at least that's what I read from somewhere.
Hmm, well, sheet.
Q&A section Paul! cmon!
lol just busting your balls but that is strange... dxi's idea sounds correct though since there is a "verification" error
dsixda said:
I think the APK needs to use the same signature as the update.zip when signing... at least that's what I read from somewhere.
Click to expand...
Click to collapse
Nope... that's why a rom can contain signed files from many sources.
@Paul: did you decode -> replace -> encode -> sign or insert into zip -> resign?
Oh, and I assume is an Eclair version?
JHaste said:
Q&A section Paul! cmon!
lol just busting your balls but that is strange... dxi's idea sounds correct though since there is a "verification" error
Click to expand...
Click to collapse
I could have sworn I posted in the Themes & Apps section last night. But after it posted, I figured I'd leave it since I can't delete my posts anyway like on other boards.
djmcnz said:
Nope... that's why a rom can contain signed files from many sources.
@Paul: did you decode -> replace -> encode -> sign or insert into zip -> resign?
Oh, and I assume is an Eclair version?
Click to expand...
Click to collapse
Not sure what you mean by decode/encode. I replaced the png files, signed the framework apk, and replaced the framework apk in the update.zip from Docrambone.
Paul22000 said:
Not sure what you mean by decode/encode. I replaced the png files, signed the framework apk, and replaced the framework apk in the update.zip from Docrambone.
Click to expand...
Click to collapse
Did you re-sign the update.zip after adding the APK back to it?
dsixda said:
Did you re-sign the update.zip after adding the APK back to it?
Click to expand...
Click to collapse
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Paul22000 said:
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Click to expand...
Click to collapse
Hmmm ok, so now I am confused, I thought we had to sign the update.zip each time it changes.
If you can get it working, let us know what you did..
MOD EDIT - Moved to Q&A
Paul22000 said:
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Click to expand...
Click to collapse
Ahh... yes, you need to sign the zip as well...
Code:
java -jar signapk.jar <your_cert.x509.pem> <your_key.pk8> <input_file_name.zip> <output_file_name.zip>
If you're using test keys it will be...
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 <input_file_name.zip> <output_file_name.zip>
If you run this in the same directory that you ran signapk.bat in then this will work as well.
So your procedure:
Edit apk
Delete META-INF folder
Re-sign apk
Add re-signed apk to update.zip package
Sign update.zip package as above
EDIT: Oh, are you reusing an existing update.zip file?? No, don't do that. Perhaps reuse the script but just create a new zip and replicate the required directory structure, drop your files in (including the script) and sign it. If you must reuse the zip then delete all of the certificate files in the meta-inf directory but don't delete the folder structure where the update-script lives.
Paul22000 said:
I'm using the auto-sign here:
http://forum.xda-developers.com/showthread.php?t=646962&highlight=sign
I modified framework-res.apk (changed 3 png files), signed it, and replaced the apk in the update.zip from: http://forum.xda-developers.com/showthread.php?t=687935
I get the following error when flashing the zip:
Code:
Verifying update package...
E:Wrong digest:
system/framework/framework-res.apk
E:Verification failed
What am I doing wrong here?
Click to expand...
Click to collapse
i don't know if you figured it out yet...but send me your zip and I will take a look at it
ogdobber said:
i don't know if you figured it out yet...but send me your zip and I will take a look at it
Click to expand...
Click to collapse
Here's my non-working zip
Paul22000 said:
Here's my non-working zip
Click to expand...
Click to collapse
Insufficient build information in the update script file and a syntax error.
Try this:
Code:
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "passion" || getprop("ro.build.product") == "passion"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
djmcnz said:
Try this:
Click to expand...
Click to collapse
Try what? What do I do with that code?
If you want to cheat, here's a modified and signed version.
I can't test it because I'm not using Froyo but it all looks okay.
Paul22000 said:
Try what? What do I do with that code?
Click to expand...
Click to collapse
Insufficient build information in the update script file and a syntax error.
No?
I mean, you do recognise this line: copy_dir PACKAGE:system SYSTEM: from your update.zip? Or is that somebody else's original zip? It's a wonder it ever worked. Nevertheless, have a look inside the one I attached and you'll see what I mean... /META-INF/com/google/android/update-script
djmcnz said:
If you want to cheat, here's a modified and signed version.
I can't test it because I'm not using Froyo but it all looks okay.
Click to expand...
Click to collapse
Aren't the frameworks different from 2.1u1 to 2.2? I'm almost sure they'd be different with all the changes in FroYo.
djmcnz said:
Insufficient build information in the update script file and a syntax error.
No?
Click to expand...
Click to collapse
You're speaking Greek to me.

Editing PNG Files within APK --Help?

Hi guys, I'm trying to edit some .apk files.
I first extract the png file that I want to edit using 7zip.
I open up the file in photoshop, edit it, then save it as a file (interlaced and non interlaced.. i tried both).
I then dump the .png back into the apk.
When I try to install the file back onto my phone, I get "*Apk file* could not be installed on this phone"
Anyone want to help me out?
How do I edit the file without it giving me this error.
Ok based on ur status im assuming ur still new to the concept of apk editing.
Theres 2 types of apks.
1. System apks (/system/app) where once u edit them u dont have to resign them. You just PUSH it back to ur phone.
2. Data apks, (/data/app) where once u edit them u have to resign the apk and install them to ur phone.
If ur on a windows machine, download apk manager from my signature and it'll guide u through the process.
Daneshm90 said:
Ok based on ur status im assuming ur still new to the concept of apk editing.
Theres 2 types of apks.
1. System apks (/system/app) where once u edit them u dont have to resign them. You just PUSH it back to ur phone.
2. Data apks, (/data/app) where once u edit them u have to resign the apk and install them to ur phone.
If ur on a windows machine, download apk manager from my signature and it'll guide u through the process.
Click to expand...
Click to collapse
Thank you SOOOOOO much. Yes I'm pretty new.. I'm good at graphic designing but I have no clue about these apk files
Once again thank you

[Q] Bootloop after editing a few XMLs?

So after decompiling framework-res.apk and editing statusbar.xml, statusbarextended.xml, and statusbarlatesteventcontent.xml I get stuck in a bootloop right after installing the ROM fresh from stock and a MC. So what could be the problem? Why would changing the text color of the statusbar cause a bootloop?
ih4ckback said:
So after decompiling framework-res.apk and editing statusbar.xml, statusbarextended.xml, and statusbarlatesteventcontent.xml I get stuck in a bootloop right after installing the ROM fresh from stock and a MC. So what could be the problem? Why would changing the text color of the statusbar cause a bootloop?
Click to expand...
Click to collapse
How did you decompile/recompile? When you recompiled, did you use the same filestructure?
Ex: /framework-res/res/drawable-hdpi instead of /res/drawable-hdpi
Did you keep the same lines and just edit the color codes? You need to give more info to let us know what you did. Any tiny mistake in editing framework-res.apk will result in a bootloop, so your case isn't diagnosable unless you tell us what you did.
.Candy said:
How did you decompile/recompile? When you recompiled, did you use the same filestructure?
Ex: /framework-res/res/drawable-hdpi instead of /res/drawable-hdpi
Did you keep the same lines and just edit the color codes? You need to give more info to let us know what you did. Any tiny mistake in editing framework-res.apk will result in a bootloop, so your case isn't diagnosable unless you tell us what you did.
Click to expand...
Click to collapse
I used apkmanager, decompiled, edited color codes only, recompiled, installed, bootloop and yes the filestructure is the same.
ih4ckback said:
I used apkmanager, decompiled, edited color codes only, recompiled, installed, bootloop and yes the filestructure is the same.
Click to expand...
Click to collapse
How did you install it. Using APK Manager? If so, that's probably the issue. I don't trust certain APK Manager options. To be safe, in the future you should only use it for decompiling, recompiling, and signing if necessary, never for re-install the APK.
Anyway, did you attempt to sign the file? framework-res.apk doesn't need to be signed, and if you do sign it, I believe it will create a boot-loop.
Also, when you recompiled it, did you go through the step that creates the "keep" folder where you delete the files that you edited? If not, then that's probably the issue. If you don't do that step, then your edited file will only contain the files that you edited. At least that's what I understand from my experience.
I copied the apk to my /system/framework folder within my custom rom and flashed the zip. I did sign the file. I'll retry without signing it and yes I did the keep step.
ih4ckback said:
I copied the apk to my /system/framework folder within my custom rom and flashed the zip. I did sign the file. I'll retry without signing it and yes I did the keep step.
Click to expand...
Click to collapse
dont sign system apks
Pirateghost said:
dont sign system apks
Click to expand...
Click to collapse
thats a good tip lol thanks I'll remember that next time I do any modding.

[Q] Edit official icon pack apks

Hi im a total no0b to android dev and such..
what im trying to do is unzip an icon pack apk, change some pngs (keeping the same file name) and rezipping or pasting the files/folder back into the original zip and renaming file back to apk
i transfer it to my phone, i can see the apk has the official logo but when i try to install it on my phone (oneplus one) it just says "X App not installed."
can someone help me? or show me where i can find a tut to use some of the existing apk/or make my own?
i appreciate any help
romyrider said:
Hi im a total no0b to android dev and such..
what im trying to do is unzip an icon pack apk, change some pngs (keeping the same file name) and rezipping or pasting the files/folder back into the original zip and renaming file back to apk
i transfer it to my phone, i can see the apk has the official logo but when i try to install it on my phone (oneplus one) it just says "X App not installed."
can someone help me? or show me where i can find a tut to use some of the existing apk/or make my own?
i appreciate any help
Click to expand...
Click to collapse
You won't be able to do that with a signed apk. It might be possible to replace pngs without unzipping. Try opening the apk as an archive and dragging in the new pngs.
upndwn4par said:
You won't be able to do that with a signed apk. It might be possible to replace pngs without unzipping. Try opening the apk as an archive and dragging in the new pngs.
Click to expand...
Click to collapse
already did that and it didnt work aswell...
i dont have the time neither the knowledge to make and icon pack myself from scratch

Categories

Resources