making a usable cupcake build - G1 Android Development

The cupcake build instructions doesn't include few Google specific applications
It says "Note that this does not have Gmail, YouTube, Market, or IM."
Getting apks from the rooted device is st forward, Is there a way to make those applications work on the cupcake ?

Those are closed source apps so you can't compile them yourself. Fortunately, the htc magic os was leaked which includes android 1.5 (ie cupcake) with working gmail, youtube, etc. So if you want cupcake + closed source apps, I suggest you head over to the "HTC Sapphire/Vodafone Magic G1 Port" thread. Hope I understood your question.

I am going to try it .. here is what i want ..
Extract the apks from that build and use in my custom cupcake build ..
I am hoping just pulling the apks from \system\app
and use install them, Will this suffice or do any .so and jars need to be pulled from that build as well ?

Yeah you need additional jars and kernel level stuff (not sure what). You might want to ask this guy how he did it so far as he's trying something similar.
http://andblogs.net/2009/03/want-your-cupcake-and-your-gmail/

Related

[Windows] Make update.zip of Google apps from NAND dump! Works w/ 1.6 and new Market!

GApps2zip
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update. If it doesn't work even if you have Java, you may have to reinstall Java as it is not in your PATH variable for whatever reason.
UPDATE: Updated and, as far as I know, should now work fine with the 1.6 developer images from HTC as well as personal NANDroid backups of most all 1.6 Android ROMs.
INSTRUCTIONS
1) Either do a or b. It is advised to use a personal NANDroid backup (b) as it does not violate any licenses, but it has not been testeda) Google for the file "signed-dream_devphone_userdebug-img-14721.zip" It should be on the HTC support page for the ADP 1, but it wont be the first result in Google. It is not advised to use this method as you need to agree to a license prohibiting modification of the file in order to download it. Rename the file to "backup.zip"​b) Restore to a regular build that has all of the Google Apps (like the regular OTA cupcake update) and then run a NANDroid backup. Then make a zip file that only has the system.img file from the NANDroid dump and name the zip "backup.zip"​2) If you haven't already, unzip the entire contents of the gapps2zip.zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "backup.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it or unzip it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the backup.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Great job unk!
amgupt01 said:
GApps2zip - Created by Ankush Gupta (twitter.com/unkzdomain and unkzdomain.com)
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update.
This script does NOT work on a build that includes the new market as there are some incompatibilities with the files for it and the ones provided by HTC (namely the MarketUpdater.apk for the new market). This is pretty much doesn't matter however, because all AOSP builds will not include ANY Android market anyways.
INSTRUCTIONS
1) Google for the file "signed-dream_devphone_userdebug-img-150275.zip" (It should be on the HTC support page for the ADP 1, but it wont be the first result in Google)
2) If you haven't already, unzip the entire contents of this zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "signed-dream_devphone_userdebug-img-150275.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the signed-dream_devphone_userdebug-img-150275.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Click to expand...
Click to collapse
when it asks u to replace system.img, do you click yes or no?
Looks interesting ill test it out later
Guyver75 said:
when it asks u to replace system.img, do you click yes or no?
Click to expand...
Click to collapse
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Looks interesting ill test it out later
amgupt01 said:
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Click to expand...
Click to collapse
oh ok, oops. i clicked no. guess ill have to redo it
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
xile6 said:
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
Click to expand...
Click to collapse
Exactly. The only thing is that since this uses an official, legal source, it doesn't include the new market and stuff...
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
amgupt01 said:
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1.
Click to expand...
Click to collapse
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
xile6 said:
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
Click to expand...
Click to collapse
Well, provided that HTC distributes ADP 1.6 the same way as they are 1.5 and that the file dependencies for closed-source apps are similar, we could just reuse this same script with maybe a few minor modifications.
ytj87 said:
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
Click to expand...
Click to collapse
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
@ amgupt01
Thanx now all we got to do is let the builds continue.
great job mr. sophomore, you should get together with cyanogen on this although i'm sure he's probably going to do something similar.
is it safe to sign in to google with the newly created update_gapps2zip?
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
I think the issue is that Google doesnt want its closed source apps put on non google-experience phones. This guy's method allows just that.
Cyanogen's method (from what I can gather) is to run an app on your phone that backs up the apps that you have on your phone (presumably licensed copies that you acquired when you purchased your phone, or during an OTA update), and then restores them after you run his barebones ROM. In this manner, you are only using backed up copies of software you are entitled to use.
I read somewhere (maybe in Google's C&D? I'm to lazy to go look) that Google does not allow these applications to be copied or extracted or something to that affect.
Honestly, why on earth would we expect them to react any differently?! This is a growing pain. We will all be better for it when its passed.
Here's how I'm planning on riding this out:
1. When Cyanogen releases 4.2, I will unroot my phone, and get the most recent OTA update from Tmobile.
1. Install Cyanogen's 4.2 ROM, using whatever method of installation is required to back up my closed source applications and restore them.
2. Continue to update Cyanogens ROMs this way until we discover that our old closed source apps are no longer compatible with our state of the art ROM.
3. Begin to seek out alternative apps, or check progress of the new "Open Android Alliance" or whatever those guys are calling themselves since this whole fiasco started, to see how feasible that option is.
4. Buy a new phone? I mean, how far down the road are we talking here?! And yes, when the time comes, assuming Google doesn't do something completely draconian that makes us pine for the good old days when they sent a C&D to Cyanogen, it will be another Android phone (subsequently rooted, of course)
I don't really see another legal option.
Code:
Cyanogen on twitter
So I think I've come up with a solution that should work and not violate any licenses. Just need to polish it up a bit.about 14 hours ago from twidroid
Thanks for this script.. i am amazed of how fast the community is getting up from the C&D .... Open Android Alliance is kicking off, Maxima is already out with a NO Google ROM, and this script, to get google's apps... wonderful...
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
amg, I'm worried on two fronts.
1, HTC is redist'ing Goog bits. They may very well get a c&d. I can't imagine HTC has a license to freely distribute them to anyone and everyone. I have to believe the license is for use on HTC hardware, not any user worldwide as download and extraction would allow.
2, you are aiding in the grabbing of those bits that a user may not have license to.
Granted, I know the vast majority of us have license. But there a few non-Goog experience phone owners around here. I suspect the mods will lock down.
But again... I think that would be wrong. We have license to the bits and grabbing them from HTC is not a violation IMO. But we'll see.
Thank you.
amg,
From the HTC license page when you download:
-----
You may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Google Software or any part of the Google Software. You may only load the Google Software onto the Android Developer Phone 1, and except in conjunction with third party software that makes up the Android system image, you may not combine any part of the Google Software with other software, or distribute any software or device incorporating a part of the Google Software.
-----
So it's clear this is illegal. I think HTC will have to pull this down sooner or later as widespread extraction starts.
btw, I think you're fine. HTC will hear from Goog and this thread will be locked. But otherwise don't worry.

Tattoo Port 10.16.09 Qtek is my hero

This is still not a bootable build
update 10/16/09 ------
Qteknology has got it booting to splash screen but its in a bootloop
this amazing progress
everything i do will be based off this work from here on out thans so much Qtek!
ill need to get some information on what exactly he changed but i know
modified build.prop
modified hw folder
modified bootscreen (tattoo one wouldnt play right)
still wont boot all the way waiting to work out a few things before i post a link i also wanna ask him if its ok for me to post a link
THIS BUILD WILL NOT BE FLASHABLE YET IT IS SPECIFICALLY FOR INPUT/Developement ONLY!
Code:
*****!!!!!! DISCLAIMER!!!!!!!*******
This is still not a bootable build
i am not responsible if you try to flash these roms
for any damage that may occur to your device
these are not finished and are not bootable
still in EARLY EARLY EARLY BETA!
This is about where im at right now
closed-10.07.09
Tattoo Only from the WWE 1.65.405.1 build
Merged lib and hw (for sensors) folders with 1.6 doughnut for magic 10/13/09 will try new lib folder idea tonight and report back with logcat and DDMS report
Specific items will be listed later today when i can think of everything
added some stuff in system/bin (super user access etc)
cyanogens 4.1.11.1 kernel and corresponding wlan.ko added (Thank you so much jubeh for the boot.img)
update-script should be super barebones... really just hoping for a boot right now
______________________________________
Update 10/07/09
so Jubeh might be my saviour He packed the Tattooboot.img with cyanogens kernel
A big thanks to: Jubeh(wouldve never got this far without his knowledge),Nk02(for dump used), Drizzy Drake Rogers(is my personal htc hero),Qteknology (you rock man), Jac, Haykuro, Cyanogen, ccyrowski,JF,twizzzzzzted and any others I forgot to mention you guys are great lets keep building a better bot
you cant mixe 2 different builds together, rosie is tied to many apps, so if you were to only try and port the rosie onto a hero build already out, then rosie wont load just your regular laucher!
mixing builds is bad, especially if they are odex!
Drizzy~
I have a night job and I'm getting ready to sleep. Sorry I didn't reply to your last PMs, but the questions are a little involved and I'm very very sleepy. When I have time (maybe later today, or tomorrow, or could be the weekend) I'll try to get a very simple (no a2sd, no compcache, no nonsense, no nothing, just tattoo and root) build working so that people can take it and mod it as they wish. I won't promise anything though, I'm a known procrastinator.
jubeh said:
I have a night job and I'm getting ready to sleep. Sorry I didn't reply to your last PMs, but the questions are a little involved and I'm very very sleepy. When I have time (maybe later today, or tomorrow, or could be the weekend) I'll try to get a very simple (no a2sd, no compcache, no nonsense, no nothing, just tattoo and root) build working so that people can take it and mod it as they wish. I won't promise anything though, I'm a known procrastinator.
Click to expand...
Click to collapse
Id feel alot more accomplished if i can make it work with a small ammount of direction (ill try not to ask REALLY stupid questions hahaha OMFG I BRICKED
coding makes all kinds of sense to me I jsut need to know what points where and where the system starts the read from
starts at kernel and kernel on firstboot compiles my libs and runs scripts once the environment is built from kernel loads framework and apps stuff like that
once that happens you have live system
Drizzy Drake Rogers said:
you cant mixe 2 different builds together, rosie is tied to many apps, so if you were to only try and port the rosie onto a hero build already out, then rosie wont load just your regular laucher!
mixing builds is bad, especially if they are odex!
Drizzy~
Click to expand...
Click to collapse
i knew about the odex thing becuase the odex is SPECIFIC to the build correct? when you add it i think youll get a error like doesnt match stored signature no signature on file ignoring in logcat
i need a NON Odex'd hero like haykuro's and update it all with tattoo stuff and the newest hero apps to fill in where tattoo doesnt cut it
I know rosie is tied in with alot of stuff and when you just try to merge rosie it wont parse properly because it needs the sdk4 to parse the package
THEREFORE! haha i want to make basically 1.6 Rosie with hero apps filling in for the tattoo ones that i dont wanna edit all the drawables in
i want functionality of 1.6 speed of the dumbed down rosie for tattoo and apps from hero i know ill have to cook this and in no way am i asking someone to "just make update.zip so i can flash"
lets limit me to 1 n00b question a day and after a week or so of patience ill prolly have it done
Question of the day: Can I Un ODEX builds or do the ODEX's directly correspond with the apk and are necesary for the apk's functionality i know that dexopt will run at firstboot on odex'd builds but the odex's exist before the dexopt runs right?
yes you can unodex. http://jf.andblogs.net/2009/09/10/slay-those-pesky-odex-files/#more-153
alritewhadeva said:
yes you can unodex. http://jf.andblogs.net/2009/09/10/slay-those-pesky-odex-files/#more-153
Click to expand...
Click to collapse
then ill see if unodex'd tattoo and unodex'd TwiztedZero6.14r3 can play nicely together :-D
sounds like a headache to unodex the whole build
*shoots self in head* this will take almost a week man i need my own computer
the classes.dex items go back into the apks right? (sorry that makes 2 stupid n00b questions today
NEVER MIND SCRATCH THIS WHOLE ENTRY
per mister drakes words
dont mix builds its bad!
so build off this droid i will
ok so last night i compiled the two different ideas weve had
1) Mashed Tattoo's APP/framework and merged the lib folder with TwiztedZerox6.14
2)Tattoo Alone with Cyanogens kernel and bin xbin folders and some build.prop changes for LCD DPI density changed from 120 back to default
On test flash i get the same message from both update scripts
(the update scripts had been pulled from the latest cyanogen update to be used in my build)
problem line 64 Chown perm *some numbers* bin:reboot
on both update zips tried editing the update-script and it still has issues
any ideas anyone?
Zarboz said:
ok so last night i compiled the two different ideas weve had
1) Mashed Tattoo's APP/framework and merged the lib folder with TwiztedZerox6.14
2)Tattoo Alone with Cyanogens kernel and bin xbin folders and some build.prop changes for LCD DPI density changed from 120 back to default
On test flash i get the same message from both update scripts
(the update scripts had been pulled from the latest cyanogen update to be used in my build)
problem line 64 Chown perm *some numbers* bin:reboot
on both update zips tried editing the update-script and it still has issues
any ideas anyone?
Click to expand...
Click to collapse
in /system/bin from system.img there is a toolbox symlink "reboot" ? if there is, you have to remove it (because all symlink must be create during installation, as write in update-script)
its actually easy to edit the script ... check every line and try to see! what it is doing , you shouldn need xbin at all, remove all lines about it for now, no busybox nothing
as nk02 said remove all links (do you use linux ?) and then your script hould copy system and data , make a symlink for app_s and change some permissisons that's it.
so clean upp the script , and make your own. I will pst one for you here , make sure you have all files in your system ...
shwan_3 said:
its actually easy to edit the script ... check every line and try to see! what it is doing , you shouldn need xbin at all, remove all lines about it for now, no busybox nothing
as nk02 said remove all links (do you use linux ?) and then your script hould copy system and data , make a symlink for app_s and change some permissisons that's it.
so clean upp the script , and make your own. I will pst one for you here , make sure you have all files in your system ...
Click to expand...
Click to collapse
thanks started using textpa and now my update scripts are fine got the hero+tatto mashup to boot but its giving me all kinds of odex issues
im gunna have to find a UN odex'd hero to mash it with and un odex the tattoo build
havent worked on the ONLY tattoo with cyanogens kernel yet i got busy and i dont have a tester phone just my mytouch and i cant go more than 3 hours with out being able to use it haha
no im not on a linux machine i am still getting comfortable with command line functions and have been doing nothing but reading the android developers page and anything linux related on the internet
my betas are uploading right now neither will boot one boots enough to get into logcat but because i mashed the odex'd builds together i know i know im a bum and i didnt wanna deodexarnt the whole thing (take time to do it right and never do it twice)
next on my list of things to try
get unodex'd hero build and unodex tattoo then mash
see if i cant just get straight tatoo to boot then trim the resolutions of the rom to fit on our 32b devices
any input is greatly appreciated
Zarboz said:
thanks started using textpa and now my update scripts are fine got the hero+tatto mashup to boot but its giving me all kinds of odex issues
im gunna have to find a UN odex'd hero to mash it with and un odex the tattoo build
havent worked on the ONLY tattoo with cyanogens kernel yet i got busy and i dont have a tester phone just my mytouch and i cant go more than 3 hours with out being able to use it haha
Click to expand...
Click to collapse
You can use my Hero build, it's unodexed.
maxisma said:
You can use my Hero build, it's unodexed.
Click to expand...
Click to collapse
wouldnt i need to unodex tattoo as well to ensure that they will work together?
i assume yes since the whole build would be unodexed
**edit**
wich one your new drizzy stuff or the old one thats in sapphire forums
yes would be need to unodexed too.
Can anyone deodexerant the tattoo dump I have no Linux machine
Zarboz said:
Can anyone deodexerant the tattoo dump I have no Linux machine
Click to expand...
Click to collapse
virtualbox ?
Help!
I am willing to help with the Deodex if I can, I already started doing something similar to you but against the latest Cyanogen experimental build which is already Donut.
I am trying to Deodex Tattoo but am struggling, I am trying to get my head round what we need to do to deodex it.
According to the readme of deodex you need to have the phone running the exact firmware you want to deodex (I don't have a Tatoo or know anybody who does), or use a CH Root environment to do it.
This is where I get stuck, are they on about a CH root environment on our phones or within my Unbuntu environment (it is not very clear)? Can somebody give me a clue or even better instructions on the CH root process required to use Deodex?
Thanks
James
james194zt said:
I am willing to help with the Deodex if I can, I already started doing something similar to you but against the latest Cyanogen experimental build which is already Donut.
I am trying to Deodex Tattoo but am struggling, I am trying to get my head round what we need to do to deodex it.
According to the readme of deodex you need to have the phone running the exact firmware you want to deodex (I don't have a Tatoo or know anybody who does), or use a CH Root environment to do it.
This is where I get stuck, are they on about a CH root environment on our phones or within my Unbuntu environment (it is not very clear)? Can somebody give me a clue or even better instructions on the CH root process required to use Deodex?
Thanks
James
Click to expand...
Click to collapse
take my tattoo only build unzip it and take the update script delete the line about system:xbin save and resign then flash this will load the android environment through cyanogens shell for the tattoo i just dont know if it will display anything on the phone itll probably have a bunch of errors in logcat
i just havent gotten this far yet because i dont have a phone that i can flash just to test stuff all i have is my mytouch and i cant afford to be without it for very long and i dont know how to boot custom roms on emulator nor do i think we can boot this due to htc parts missing from the SDK
next on my list to try....
*****************
-get virtualbox up and going and deodexarnt the tattoo build (i think itll boot enough to get dalvik manager to run so we can deodex it)
-once deodexed i would like to see if i can get this thing to boot standalone (if the standalone i have now will boot {not been able to test yet like ive said no device to test with} if the standalone is being a big pain in the [email protected]# and not booting properly or we have issues with screen size differences ill have to stop because my knowledge of these things is limited..)
we cant deodex tattoo without being booted into tattoo
so
oh well for that
lets work on getting original tattoo to boot so we can deodex and build off it
if anyone has started to do these things or is already in the process of doing these things please let me know
Zarboz said:
next on my list to try....
*****************
-get virtualbox up and going and deodexarnt the tattoo build (i think itll boot enough to get dalvik manager to run so we can deodex it)
-once deodexed i would like to see if i can get this thing to boot standalone (if the standalone i have now will boot {not been able to test yet like ive said no device to test with} if the standalone is being a big pain in the [email protected]# and not booting properly or we have issues with screen size differences ill have to stop because my knowledge of these things is limited..)
we cant deodex tattoo without being booted into tattoo
so
oh well for that
lets work on getting original tattoo to boot so we can deodex and build off it
if anyone has started to do these things or is already in the process of doing these things please let me know
Click to expand...
Click to collapse
went through about 15 flashes last night
none booted
the furthest i got the logcat is posted on the OP
i have two more ideas but i need someone to pack my boot.img for me for one of them (i know i should have my own linux machine but im not about to download anything over 100 megs on my tether SLOW!)
and the other ill work on tonight and see if i cant get it to work
So I have a bootable Tattoo build. is that all you need? Different phone but I don't see why it matters. I can unodex but I don't see the point... Tattoo and Hero share a lot of apps and functionality. All I see are cosmetic changes, which I'm working on as well. But, if you tell me what to run I can have it posted within the hour.
I'm not sure what you're really trying to do by backporting to Cupcake based Hero. I can unpack the boot.img, unodex Tattoo, whatever but I don't see what you want to accomplish with this. I don't have your phone so I can't test whether the kernel would work if I mod boot.img for you but it doesn't sound hard. Got the tools in my PATH.

Relationship between Android and kernel

Hi all,
Looking to build my first custom Rom and had some queries terminology-wise.
What is the relationship between the kernel and Google's android platform? For instance, is froyo tied to a specific kernel and is this in the source tree?
Second q: HTC release their kernel sources. Say I wanted to get a froyo build up for a device that currently only has eclair, would the procedure be to diff the HTC modifications against the vanilla version and then make the appropriate changes to froyo?
Third q: what makes a Rom specific to a device? Probably linked to first question...
Many thanks,
Martin
Sent from my HTC Wildfire using XDA App
The kernel is basically just a linux kernel with device specific drivers and such added. I've done a 'diff' between the Eris 2.6.29 kernel from HTC and the 'generic' 2.6.29 kernel from kernel.org. It's kind of neat to see the difference. I highly recommend you do that.
There are also device specific drivers in the file structure that the ROM needs in order to function.
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
Also in my sig is the SgtShultz ROM where I tried to make a usable ROM from as close to source as possible. You might get some ideas from there. I still haven't figured out how to get the audio to work. If I get that worked out, I'll actually start using the ROM daily and work out the rest!
Froyo seems to work with kernel versions 2.6.29+, btw.
Many thanks for this; it's given me a good set of places to start reading.
Just pulling down all the AOSP source as we speak, with the hopes of getting a basic build up in the near future
gnarlyc said:
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
[...]
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
[...]
Froyo seems to work with kernel versions 2.6.29+, btw.
Click to expand...
Click to collapse
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
MartinEve said:
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
Click to expand...
Click to collapse
For the most part, any Eclair drivers seem to work. At least that's what I have used for the Eris. 2.1 -> 2.2 isn't too big of a jump. I used drivers from a stock 2.1 ROM.
Look up vendor tree, vendor config, and 'extract-files.sh'. You'll see what people with other devices have done. I have yet to quite get the whole vendor tree thing worked out, but others have. You can just come up with a list of needed drivers to add to the 'extract-files.sh' script and just copy those files in manually. (That's what I have done.) This will get pretty close to making an AOSP build complete. However, it appears that actually using the vendor tree setup while compiling will get things 'right'. There appear to be some libs that will compile differently for different devices.
So, basically, if you compile AOSP without a vendor tree for your device, the build will be located in out/target/product/generic. (And, you can copy drivers in later while using the kitchen, but you might miss out on some AOSP stuff with device-specific changes.) If you use the vendor tree, it will be in /out/target/product/buzz and will contain the drivers that the 'extract-files.sh' script grabbed from your device along with custom compiled libs.
If you are able to get a working vendor tree for your device, it will be helpful to the entire community. They'll all be able to use it for their builds. I highly recommend doing that. Most groups use github or something similar to post the code.
I still have much to learn myself, and you are starting to reach my limit! Good stuff.
Hi,
Many thanks for your reply; to a degree, it's about knowing the terms to search for -- the extract-files.sh is a godsend for information that I would have otherwise missed.
Anyway, onwards to build a usable vendor tree
Best,
Martin

[Q] Creating Custom ROM

Hello, I'm new to all this Android stuff (I don't even have a phone yet, but its on it way)
I have been reading up on custom ROM creation but there are some things I don't quite understand.
Let's say I have a phone in Android 2.3. I want to create an Android 4.0 ROM to put on the phone.
Now... to compile Android 4.0 I need the drivers for my phone (which I doubt I will ever have access too since its only a cheap Android with a MediaTek CPU)
So I have a 2.3 ROM that contains all the compiled drivers and the Android 4.0 source code.
Is it possible to compile 4.0 and replace the zImage (if I'm correct) with the 2.3 zImage. From what I have read, that's where all the drivers are stored.
I guess its not that simple since I also think the zImage contains the OS. If so, is it then possible to extract the zImage and replace the invalid driver files in 4.0 with the correct drivers from 2.3?
Also, I think my phone will arrive with an annoying UI, is it possible to just get any 2.3 ROM (that doesn't have an annoying UI and shares the same CPU as my phone) and replace the zImage in that with my phones 2.3 zImage?
Sorry, if my questions are stupid but this is all new to me. I've tryed to read up on this but nothing is straight to the point.
Thanks
Anyone there?
try out some roms first. see what you like and dont like. it'll probably give you a better idea for how you would make your own rom.
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Kailkti said:
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Click to expand...
Click to collapse
Yeh, but my problem is I don't have the drivers for the phone. I just have the stock ROM that come with it.
Is not that simple. I am 99% sure that you can't do that.
The phone I'm getting has a horrible theme on it. Its running Android 2.3
I have the ROM for a very similar phone (also using Android 2.3), uses the exact same CPU so it should be compiled using the correct platform.
Is it possible to use that phones ROM but replace it with my phones Kernel and .prop (so it has all my phones drivers and settings etc...)?
the hard work required in making a custom rom
I think you can take from the stock rom and compared with existing custom rom
but some sources are not shared freely as an example Tegra
CMIIW
I will mess about with the ROM when I get my phone. Hopefully I wont brick it...
I too am fairly new to android. I spent a couple weeks reading and watching TONS of youtube videos on how to ROOT and Unlock my bootloader. My best advice from one n00b to another would be to do the same. In particular...research how to do it on YOUR phone. Also, Roms are device specific. I recommend you finding the forum here on XDA for your phone and read up on whatever ROMS are available here. This might not be the ONLY place to find ROMS, but this place simply rocks! Once you get your device rooted and if necessary, your bootloader unlocked...you can easily try out any ROM without much fear. Just make a good backup...make sure you also have a factory recovery image too...just in case. For backups...if you install and use Clockwork Mod (CWM) you can use the nandroid backup it offers. I bought Titanium backup from the market and used it to do a full backup before I started...it backs up to dropbox even, which was a nice feature for me. Extra safety so incase I hosed my external SD card which had my backups...I could easily retrieve a backup ANY place that had internet access. Lastly...get ready to have some FUN! Flashing ROMs is VERY addictive!! :-D
Ok, Thanks. I will see what I can do then.

[Q] Compiling package from source, won't run on custom ROM?

I'm sure I'm making some sort of rookie mistake here, but I'm currently running a custom ROM (4.0.3-based) on my device. I wanted to add some functionality to one of the system packages (Exchange.apk) and rather than hacking up smali, I downloaded the AOSP 4.0.3 source and modified the code for the Exchange package directly and compiled (which compiles fine) -- however, I can't seem to actually use the compiled/output Exchange.apk on the device.
I'm assuming it has something to do with system signatures, but everywhere I read said you do not sign system APKs. Soo...
What am I missing?

Categories

Resources