Building android: noob warning - G1 Android Development

Howdy,
I just built and installed android 1.1 on my dev w/o major problems. But how do you create an update.zip? I tried dumping system.img,userdata.img and root.img into a zip file, but it failed to verify with a signature error.
Thanks for any help!

Might sound like a silly question, but did you sign the update.zip?

Meltus said:
Might sound like a silly question, but did you sign the update.zip?
Click to expand...
Click to collapse
Nope. Is there a tutorial on how to sign? (btw, I'm on either OS X or Linux).
Thanks!

all u had to do is take a look over at the theme subforum and u would have found this:
http://forum.xda-developers.com/showthread.php?t=471586
it has apk signer and .zip signer as well

Thanks! I appreciate it

haitiankid4lyf said:
all u had to do is take a look over at the theme subforum and u would have found this:
http://forum.xda-developers.com/showthread.php?t=471586
it has apk signer and .zip signer as well
Click to expand...
Click to collapse
Ocalap2p said:
Nope. Is there a tutorial on how to sign? (btw, I'm on either OS X or Linux).
Click to expand...
Click to collapse
Never mind. It looks like the sdk has the java tools I'll need

reviving old thread, i searched and this is all i could find related to what i'm asking. I downloaded a system.img and boot.img that are very, very, very bare. They're almost stock android (nothing but the system, phone, camera, settings, calendar, calculator, and alarm). there aren't even any ringtones, notifications, ui sounds, or alarms. nothing. the thing is bare, i think even the drivers are broken because i can't end calls. anyway, this is perfect for me because i want to use it to study android and get more acquainted with it before i start actually building from source. I pretty much want to know what every single file does and what files apks depend on. Anyway, this rom is good for study, but i want to be able to make an update out of it once i start adding things, but how do i go about extracting all files from the system and boot imgs?

Related

How do i sign Zip Files?

That i wanna flash?
xda search function
feefeeboomboom said:
xda search function
Click to expand...
Click to collapse
Agree , but here it is http://forum.xda-developers.com/showthread.php?t=629151&highlight=sign+zip+files
derekstory said:
Agree , but here it is http://forum.xda-developers.com/showthread.php?t=629151&highlight=sign+zip+files
Click to expand...
Click to collapse
Tried no luck on finding it....but thanx! lol
rogerbean101 said:
Tried no luck on finding it....but thanx! lol
Click to expand...
Click to collapse
Q: How do I sign my zip or apk?
A: First you must have java installed on whatever OS you're running. Windows users download the Win-sign.zip attachment. Linux users download Linux-sign.zip attachment.
derekstory said:
Q: How do I sign my zip or apk?
A: First you must have java installed on whatever OS you're running. Windows users download the Win-sign.zip attachment. Linux users download Linux-sign.zip attachment.
Click to expand...
Click to collapse
What do i do next? lol im HELLA NOOB at all this
rogerbean101 said:
What do i do next? lol im HELLA NOOB at all this
Click to expand...
Click to collapse
unzip and read the text file for directions
derekstory said:
unzip and read the text file for directions
Click to expand...
Click to collapse
LMAO Still lost
rogerbean101 said:
LMAO Still lost
Click to expand...
Click to collapse
go to the link i posted. At the bottom of the post #1 there are 2 zip files. one for Windows and one for Linux, pick the one for your OS. After download double click then read the Readme.txt file and it will tell you what to do
derekstory said:
go to the link i posted. At the bottom of the post #1 there are 2 zip files. one for Windows and one for Linux, pick teh one for your OS. After download right double click then read the Readme.txt file and it will tell you what to do
Click to expand...
Click to collapse
i did that and all it says is
"SignApk.jar is a tool included with the Android platform source bundle.
testkey.pk8 is the private key that is compatible with the recovery image included in this zip file
testkey.x509.pem is the corresponding certificate/public key
Usage:
java -jar signapk.jar testkey.x509.pem testkey.pk8 update.zip update_signed.zip"
You must have the linux android sdk installed to use this.
Place the sign folder inside the android sdk tools folder so you have a path IE ~/android-sdk-linux/tools/sign
Place the androsign file the tools folder.
Open a terminal and cd into the android sdk tools folder
Type the following command to sign your .zip/.apk:
sudo androsign ~/folder_containing_zip/nameofzip.zip
This will output a file with original zip name plus -signed IE rom-signed.zip
Actually, I think it would be cool if we could have something like this on the "All Current Guides" wiki page or something. Trying to figure out how to do pretty minuscule stuff like signing a zip requires some pretty deep thread searching. Want to learn how to customize a ROM? Search the threads. Unfortunately, that thread will refer to another one. Only to have that one point to another.
It would be nice to have a How-To guide for things like rooting, signing zips, customizing, etc. I just think that a How-To wiki for all these things would reduce the number of threads like this. And I'm saying this as someone who knows how to do all those things. I just remember the confusion and frustration.
bigronaldo said:
Actually, I think it would be cool if we could have something like this on the "All Current Guides" wiki page or something. Trying to figure out how to do pretty minuscule stuff like signing a zip requires some pretty deep thread searching. Want to learn how to customize a ROM? Search the threads. Unfortunately, that thread will refer to another one. Only to have that one point to another.
It would be nice to have a How-To guide for things like rooting, signing zips, customizing, etc. I just think that a How-To wiki for all these things would reduce the number of threads like this. And I'm saying this as someone who knows how to do all those things. I just remember the confusion and frustration.
Click to expand...
Click to collapse
Yeaaa i Deff Agree cuz im beyond lost right now with this! lol Its nuts lol
you must be using windows. let me do some more resesarch. I will send a PM if I find out anything so we are not using up thread space.
derekstory said:
you must be using windows. let me do some more resesarch. I will send a PM if I find out anything so we are not using up thread space.
Click to expand...
Click to collapse
Yeaa windows xp! lmao Thanx!!

Old cooker want to cook something

After many many tweaking and cooking ROMs for WinMo I want to do same with Android. The reason I cooked for WinMo was speed, but since it is not an issue with mine Desire(but it can be better I want to customize ROM a little bit, so remove some stuff and later maybe add few apps. If this want be a problem I will try to tweak too.
However in WinMo I have always have served kitchen, I just tweaked removed and add few things and job done but here there are no kitchens..yet(I hope somebody will sooner or later post it
So is there anybody who can help to set up kitchen so that I can cook few roms for me and this community?
So if I understanded correctly I need following to start cooking
android sdk
java jdk
signing tool
stock ROM
I have downloaded them all, extracted SDK in D:\HTC Desire\Android SDK, installed Java JDK in C:\Program Files (x86)\Java and I don't know what to do next?
Extract ROM, where(?), extract system.img which is in rom.zip if yes how and where?
Thanks for your help
Benko, you can extract the ROM anywhere you want. But, you don't want images. You should look at Pauls rootedupdate.zip as a starting point. Unzip that.
eViL D: said:
Benko, you can extract the ROM anywhere you want. But, you don't want images. You should look at Pauls rootedupdate.zip as a starting point. Unzip that.
Click to expand...
Click to collapse
Ok extracted that rootedupdate.zip and found a lot of apks and obexes so after I delete those files that I dont want how to put that all back together to file that is flashable?
You'll have to resign the zip after removing stuff, otherwise it will give verification errors when trying to flash.
You need to remove the current certificates from the file, there are three files in the META-INF folder - delete those, but keep the update script (the COM folder inside), it's needed for flashing.
I use this little thingy for signatures: http://android-dls.com/wiki/index.php?title=Generating_Keys
Hope this helps!
PS-beware of any dependencies between the various apk's and any framework modding that might be needed, otherwise you'll get more fc's than you can carry; I know I did
PS2- if you want a served kitchen, you'll find one over at Modaco, for a CyanogenMod port (a link is posted in a thread here) - see if that suits you're needs.
PS3- check out the Chef Central sticky here, too - it should be easier to get quicker/more accurate info from the seasoned cooks there
benko286 said:
Ok extracted that rootedupdate.zip and found a lot of apks and obexes so after I delete those files that I dont want how to put that all back together to file that is flashable?
Click to expand...
Click to collapse
Rezip the folders: meta, system & boot.img.
Then resign them. You can then transfer it to sd and try to flash. If it doesn't boot, then you have to troubleshoot.
May I know that how to change layout of the home screen?
e.g. HTC sense has news/mail widget where first installed and booted.
Where can I change these settings?
Also , I want to know if I made my own rom, and updated to my desire.
If it doesn't boot or anything, can I updated the rootedupdate.zip from Paul to get the desire back working?
Thanks
eViL D: said:
Rezip the folders: meta, system & boot.img.
Then resign them. You can then transfer it to sd and try to flash. If it doesn't boot, then you have to troubleshoot.
Click to expand...
Click to collapse
kevin612 said:
May I know that how to change layout of the home screen?
e.g. HTC sense has news/mail widget where first installed and booted.
Where can I change these settings?
Also , I want to know if I made my own rom, and updated to my desire.
If it doesn't boot or anything, can I updated the rootedupdate.zip from Paul to get the desire back working?
Thanks
Click to expand...
Click to collapse
Ok zipped those folders(META-INF, system, boot.img) in rootedupdate.zip, used autosign.bat to manually sign that .zip and now it should be flashable?
@Kevin-yes if it is not bootable you can flash Pauls rom again
benko286 said:
Ok zipped those folders(META-INF, system, boot.img) in rootedupdate.zip, used autosign.bat to manually sign that .zip and now it should be flashable?
@Kevin-yes if it is not bootable you can flash Pauls rom again
Click to expand...
Click to collapse
Hopefully. After a few hundred times you'll get the hang of it. ;P
If it boot loops, it won't boot. Try again. Always remember what you're adding and subtracting. Maybe start out with only a couple things.
eViL D: said:
Hopefully. After a few hundred times you'll get the hang of it. ;P
Click to expand...
Click to collapse
OK Since I returned my device to my store because of warranty can you try that ROM, I will upload it for you ?
benko286 said:
OK Since I returned my device to my store because of warranty can you try that ROM, I will upload it for you ?
Click to expand...
Click to collapse
Sure, why did you return it?
Uploading it now
Some very very bad battery leaking...80% in one night and sync was off!
Thank you so much eViL D: and everybody else for help
Ok I also want to create my own rom but I don't know how to sign it..
Any help would be most appreciated.
ROM Link here
http://www.mediafire.com/?zt4ymz42jzj
I hope it works
So for now I even don't need Android SDK?
I downloaded the rom kitchen from Chef Central...Does the rom need to be sign after I built them out in Linux?
Also there are some folders I not understand yet....
Inside system folder - customize, etc, framework, usr and xbin I dont understand yet.
Cause looking at eVil D:'s rom and paul's rom is very different in those. And even paul's rom doesnt have customize folder.
Would like to understand all and see if I can make a rom out.
Thanks
Anybody tried my ROM ?
benko286 said:
Anybody tried my ROM ?
Click to expand...
Click to collapse
Got corrupted DL. Will have to try again.
kevin612 said:
I downloaded the rom kitchen from Chef Central...Does the rom need to be sign after I built them out in Linux?
Also there are some folders I not understand yet....
Inside system folder - customize, etc, framework, usr and xbin I dont understand yet.
Cause looking at eVil D:'s rom and paul's rom is very different in those. And even paul's rom doesnt have customize folder.
Would like to understand all and see if I can make a rom out.
Thanks
Click to expand...
Click to collapse
the kitchen signs the rom automatically. run the menu from terminal ( using linux) and u will see all the what the kitchen is doing.
do not try to compare custom roms ... they are different. some have extrafiles & folders depending on their customisations.
best thing is to compare with an original rom for the desire. and u see what has been added to get X and Y. involves a lot of trials and errors.
eViL D: said:
Got corrupted DL. Will have to try again.
Click to expand...
Click to collapse
I will try downloading too, if it wont work I will reupload it
I know that this can sound wierd but can anybody of you upload his kitchen?
Thank you all for help!
EDIT: File is corrupted, uploading again!
Reuploaded and tested, RAR file is ok
http://www.mediafire.com/?w5wommomzmk
Please somebody try ROM
Thanks
benko286 said:
Reuploaded and tested, RAR file is ok
http://www.mediafire.com/?w5wommomzmk
Please somebody try ROM
Thanks
Click to expand...
Click to collapse
Anybody tried ROM ?
P.S anybody has link to CyanogenMod port, anybody uses that kitchen?

Android Theme Creation Help!!!!!!!!!! Mac Users.

Im Posting Here Because I Need An App To Help Me Finalize My Theme. Something Like "7-Zip" But For Mac. I've Searched, Searched, And Searched.
So Basically Im Looking For An App For Mac OSX That Can Go Within An Archive And Change/Update Files Within It Without Extracting It.
I've Found "Better Zip" Which Claims I Can Edit/Update An Archive But I Have Not Been Able To Do So.
Thanks In Advance.
Rydah805 said:
Im Posting Here Because I Need An App To Help Me Finalize My Theme. Something Like "7-Zip" But For Mac. I've Searched, Searched, And Searched.
So Basically Im Looking For An App For Mac OSX That Can Go Within An Archive And Change/Update Files Within It Without Extracting It.
I've Found "Better Zip" Which Claims I Can Edit/Update An Archive But I Have Not Been Able To Do So.
Thanks In Advance.
Click to expand...
Click to collapse
Why did you.... Capitolize Every Word In Your Statement???
Anyway, regarding your app why don't you try http://gaygamer.net/images/grab_onto_your_ostrich_its_gon/ostrich_head.jpg
Its A Habbit. Lol ****. =[
Anyways, Try What?
Rydah805 said:
Its A Habbit. Lol ****. =[
Anyways, Try What?
Click to expand...
Click to collapse
Their You Go Again! Lol....
I know exactly what you need, but can't find it ATM. I will search for you. In the meantime after "try" in my last statement, highlight the white text copy/paste it and follow the link.
thanks, but are you really gonna help me or did you just want me to see that pic? lol i just cant find anything....
Rydah805 said:
thanks, but are you really gonna help me or did you just want me to see that pic? lol i just cant find anything....
Click to expand...
Click to collapse
Actually I am planning on helping, and good job not going all caps crazy
Do you have bootcamp?
cant you just..
1. extract
2. edit
3. pack
4. sign
5. ???
6. Profit!
PurpleSmurfLlama said:
Actually I am planning on helping, and good job not going all caps crazy
Do you have bootcamp?
Click to expand...
Click to collapse
Nope. Sorry. Well doesn't it come with mac OS x? Just without Windows?
And the solution posted above won't work. The files should not be extracted. Unless there's an app that will let you package a bundle of files into an .apk within a .zip file. Which would work but I can't find a .apk compressor.
Thanks so far guys.
ooor you could make it into a zip and rename it to .apk...
Ive tried that.
extract the .apk, edit what i want, zip it up then rename it to myfile.zip to myfile.apk right?
thanks again for the help so far guys.
ante0 said:
ooor you could make it into a zip and rename it to .apk...
Click to expand...
Click to collapse
This does not work.
Rydah805 said:
Ive tried that.
extract the .apk, edit what i want, zip it up then rename it to myfile.zip to myfile.apk right?
thanks again for the help so far guys.
Click to expand...
Click to collapse
If you can extract the files, it seems like you dont need 7zip/WinRAR... Just drag the files you have edited overtop of the window of whatever program you used to extract. No?
im not exactly sure what you mean but from what i think your saying, no i cant just drag a file into the apk like i can on 7-zip
Ah yea, sorry, I used APK builder in the sdk :/
If you can, you could run windows/linux in a vm, then you should be able to pack em correctly.
Or ask a friend if he/she can do it for you
Rydah805 said:
Nope. Sorry. Well doesn't it come with mac OS x? Just without Windows?
And the solution posted above won't work. The files should not be extracted. Unless there's an app that will let you package a bundle of files into an .apk within a .zip file. Which would work but I can't find a .apk compressor.
Thanks so far guys.
Click to expand...
Click to collapse
Well boot camp is free and included in Leopard/Snow Leopard but, you defenatelly have to buy Windows. I suggest going on ebay, buy a re-install dell disk for seven (they are around $20) and just temporaily use it for your needs until the 30 day trial expires. Or you can just buy it....
Purple Drama Llama said:
Well boot camp is free and included in Leopard/Snow Leopard but, you defenatelly have to buy Windows. I suggest going on ebay, buy a re-install dell disk for seven (they are around $20) and just temporaily use it for your needs until the 30 day trial expires. Or you can just buy it....
Click to expand...
Click to collapse
i have the disc. i came from windows about 7 mon. ago. horrible days but.....oh well.

PC script to auto remove apk's

Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
edcoppen said:
Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
Click to expand...
Click to collapse
Over what OS?
If in Windows (or any M$ OS, incl. DOS) you can make a batch file.
My file is adjunted as example (modify as you like, put in the root dir -obviously to the unzipped ROM- and run. Rezip and maybe re-sign)
salu2
Thank you. This is exactly the kind of thing I am after. If I had of been born just a few years earlier I would probably know all about batch scripts. Fortunately, I just missed the DOS days!
Anyway, I puzzled out / looked up the commands in the script you posted. Based on that I extracted the rom, then placed the batch file within it, so that the cd (current directory) command runs correctly.
Unfortunately this mucks up the signing on the rom. Do you re-sign your CM7 roms every time you do this or is there an easier way?
Edit: My PC is Win 7, 64bit, soon to be Win 8 Consumer Preview.
Edit: The roms do not need resigning.
I don't re-sign the ROM, simply flash again over Clockworkmod Recovery.. and work.
But, you can:
1) sign using Auto-Sign....
2) Click [Thanks]...
Salu2
__________________________________________________________________
I know, I know.... my english is ****ty... but my spanish is much better... ;-)
Big thank you. That's solved that one nicely for me!
You're welcome.
Updated zip in my first Post.
Salu2
Hey again. I was hoping to build on the script you kindly provided. At the moment I am using various alpha roms where the exact apk's present changes fairly often. It would be great if I could see the outcome of each action. This way I would know if the apk has had it's name changed or been removed. How would I enable this?

Editing APK files

Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
morgs640 said:
Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
Click to expand...
Click to collapse
Tried signing the file after modding it?
Sent from my GT-S5360 using xda premium
Hi thanks for your reply, yes i have and it still doesnt work unfortunately
Use apktool to extract the APK, you'll get .smali files instead of classes.dex (this is the decompiled version). Edit these files appropriately, then repack the APK with apktool and sign it. Should work.
Does apktool require command line? if so it is too complicated for me
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
morgs640 said:
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
Click to expand...
Click to collapse
If you wanna do basic stuff wid apktool then its a reaaly easy tool.. The commands are really very small!
Apktool d xxxx.apk for decompile
Apktool b xxxx for compiling n ur done!
Even the complex ones arent difficult! Only the installing of apktool takes time and its the hardest thing in the whole procedure
Sent from my GT-S5360 using XDA
in theory apktool is faily simple. but if you compile for android 4.0 better prepare yourself for huge headaches and a couple of white hairs as this thing wont work. i know two solutions, one consists of a really stupid juggling with two versions, one old which you can barely find, and one new, decompile with the old one, compile with the new one. some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. another problem was that aapt needs to be present in the same directory, error codes will just spew out a bunch of gibbersish and you will never know whats wrong so all thats left is trying. but once you got it working it is as easy as pie.
molesarecoming said:
some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. but once you got it working it is as easy as pie.
Click to expand...
Click to collapse
You mean this: http://forum.xda-developers.com/showthread.php?t=1551236 ? (It was about two threads below this one at the time I posted this )
nice! i made myself little batch files for this. i just go "apkd skype" to decompile skype.apk and apkb skype for building it, zipping it, signing it. didnt even know theres a guy out there now.
SifJar said:
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Click to expand...
Click to collapse
This program worked perfectly thank you so much

Categories

Resources