[Q] Compiling package from source, won't run on custom ROM? - Android Software/Hacking General [Developers Only]

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?

Related

making a usable cupcake build

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/

Android Image Building

Hi. I am a developer interested in Android.
More specifically, I am interested in building a custom Android image, not just developing applications (i.e. I want to modify the OS/framework itself).
I was wondering, though, whether ppl who build custom ROMs (ION, HERO, etc) use and modify binary images or build their own custom ROMs from the source and potentially add some binary only stuff (e.g. HTC POP3/IMAP, HTC Pdf Reader,etc.) from the binary ROMs.
I don't know what is prevalent and why?
Another related question, where does one find directions to build and most importantly install a custom ROM on an Android device (mine is Magic). Google obviously has info on that, but I want to know if I'm going to have problems with differences between ADP1 (official guide) and my own device.

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] modifying AOSP Calendar issue

Hi, so I'm a student learning Android app development and trying to modify the AOSP calendar to fit my needs so I downloaded the source code from git and made a project with 2.2 FroYo as the basis through Eclipse with ADT and all but I ran into a problem. So I run into:
android.provider.Calendar cannot be resolved into a variable
I did some research and found that the SDK apparently does not have the calendar code nor the database which is why I am running into these issues. So I learned from here jimblackler[dot]net/blog/?p=151 all that. He does have a solution except I have no idea what he is saying. He posted a bunch of code but I have no idea where that code is supposed to go in and I dont understand what he is trying to do with "content://calendar/calendars"
So I just decided to ignore the errors and obviously I couldn't compile it through eclipse so I made an unsigned apk and tried to install it unto the Emulator via ADB but as an unsigned apk it would not let me install it I tried to sign it by going through google's developer site but I am at lost again. I'm a noob to these things unfortunately..
I was wondering if anybody could help me out and point me in a good direction, I would be eternally grateful. Thanks.
P.S. sorry if I was being vague about the google's developer site and source code site but as a newbie I can't post links properly

[Q] Need Help with Compiling AOSP Nougat - Proprietary Binaries

So I've decided to give building Android a go, considering we've recently obtained the source code for the device in question (R1 HD) and no one else has done this yet for this device. I've been following this guide, since all the other guides I've found assume there is already a GitHub repo for your device. There's literally NOTHING out there regarding this device, aside from the kernel source we've obtained in the form of a .zip archive.
I've done everything up to and including pulling the 7.0.0 r1 source with the reop sync command, and I am now stuck on the Preparing to Build section. The first thing it talks about at this point is implementing proprietary binaries into my source. I have no idea where to find proprietary binaries for my R1 HD, let alone if they even exist out there to be implemented. Literally all I have regarding this device is the kernel source in a zip file. I can't find anything else out there nor do I really know what to look for.
Can anyone tell me what to do here? I've never compiled Android or even a kernel before, and I'd really like to get something out there for this device that others can base their work off of.

Categories

Resources