Constructing an OTA from source? - G1 Android Development

Is it possible to generate an OTA like signed-kila-ota-126986.f6469a1e.zip from source?
I got as far as building Android for the HTC Dream as per "Building for Dream". I see from "Building the Android source and Deploying it to your G1 or Dev Phone" how to install it. But is possible to generate an OTA from source?

Not entirely, as many parts of the Dream software stack can't be distributed under the Android project's licenses (Apache and some GPL). Of course you can pull the required components out of an official update package. However, yeah, the entire update cannot be made from source. In addition to the binary-only components in the official updates, the official updates are also built from internal codebases that aren't synced well with the open source codebase.
By the way, as you are not receiving it 'over the air', it is not technically an 'OTA'.

jashsu said:
Not entirely, as many parts of the Dream software stack can't be distributed under the Android project's licenses (Apache and some GPL). Of course you can pull the required components out of an official update package. However, yeah, the entire update cannot be made from source. In addition to the binary-only components in the official updates, the official updates are also built from internal codebases that aren't synced well with the open source codebase.
Click to expand...
Click to collapse
Part of the official build process for the HTC Dream involves pulling a collection of proprietary files from the phone. But you're saying there's no known way to build an OTA style update package. (Aside from hacking together one on your own and crossing your fingers.)
jashsu said:
By the way, as you are not receiving it 'over the air', it is not technically an 'OTA'.
Click to expand...
Click to collapse
Yeah, I was hoping to avoid confusion. Did you have better or more appropriate terminology?

Ouroborus said:
Part of the official build process for the HTC Dream involves pulling a collection of proprietary files from the phone. But you're saying there's no known way to build an OTA style update package. (Aside from hacking together one on your own and crossing your fingers.)
Click to expand...
Click to collapse
Oh no, you misunderstood me. You can build an OTA-style update package from the open source codebase. However even if you extracted the wlan driver and the other binary-only files, it still wouldn't be identical to any released official updates. The official updates are built from Google's internal codebase that isn't synced often with the public one. This should change after 1.5 is released (or so they say). Of course if you aren't concerned with being bit-for-bit identical then that's not a problem.

jashsu said:
Oh no, you misunderstood me. You can build an OTA-style update package from the open source codebase.
Click to expand...
Click to collapse
Do you happen to know how to go about doing this or can maybe point me in the right direction?
jashsu said:
The official updates are built from Google's internal codebase that isn't synced often with the public one. This should change after 1.5 is released (or so they say). Of course if you aren't concerned with being bit-for-bit identical then that's not a problem.
Click to expand...
Click to collapse
I would prefer a bit-for-bit replica. I kinda need things like Market that don't appear to be available from the source. Sounds like that will eventually be possible though.

Related

seems like a whole lot of intense hacking for 'opensource'

Being a fan of Linux, and an Ubuntu user, I guess I thought Android was going to be a lot more openly tweakable, but from looking over these threads it looks like it's actually not that easy to do things that I would have assumed would be easily accessible tweaks... like theme/appearance/fonts/icons, etc... In fact it looks like some pretty intense hacking is going on with slow progress in bypassing , etc...
Maybe I'm not understanding correctly. I don't have the G1, but my girlfriend does and I've been enjoying it from over her shoulder... I guess I just expected something more 'open' along the lines of what I've become used to with Ubuntu.
I kind thought Android would be to iPhone, what Linux OS is to Apple OS, but it definitely doesn't seem like that's the case. It seems like Android is just as locked down as iPhone but with fewer apps and not-as-slick interface for the same price as an iPhone.
I had been thinking about getting this phone... maybe I just need to wait for more apps to come out?
Any thoughts?
As of right now we do have a little more opensource than anything else. And like all new software it will take time to learn what to do. Obviously people didn't get Mac OS 3 and immediatly know how to hack it so they could do things they weren't meant to do. And of course same goes with mobile phones. When WM5 came out they had to learn about the new OS and it takes awhile.
So far the freedom we have already surpasses that of any other. We have internet sharing (for those with root) that is far better than the old USB or BluetoothPAN method(which btw is going to be a new profile, it is in the source)
I am willing to bet that as soon as it hits 1.0 that we will see it go entirely open with the ability to flash the rom and all.
That makes sense... I just have to be patient Thanks for the reply!
Open source != open system.
Open source means just that... you can see the source code. That's it. It doesn't imply or confer any other right of access, and with most open source licenses the licensor (Google & HTC) is free to build closed systems just as locked down as one based on proprietary code. Many commercial systems (Android included) are underpinned by open source code for cost savings or stability/security reasons.
Edit:
what Linux OS is to Apple OS
Click to expand...
Click to collapse
That's comparing apples to oranges. Linux is not an operating system; it is an open source kernel on which an operating system can be built.
Fact of the matter is, OS X's Mach kernel is partially descendant from BSD, so you could say the center of OS X is open source as well. More info at wikipedia's Darwin entry. For being a "fan of Linux" you don't seem to understand some of the core principles.
If I am not mistaken Mac's are unix based right? many the kernel is similar to linux... which is why the filesystem structure is similar as well.
But you are correct open source means you can see the source... but usually when someone can see the source they find a way to get around security holes that lock down the system.
With open source and developers an open system is possible. And we already know we can do it because we have modified the updates that are sent which change the system files. so all you need to do is put a new boot.img and a new recovery.img and replace the root system directory... before you know it you can have this running any version of android and/or anything else that will run on an ARM6 device.
Don't make it so complex. It's meaningless to play the words game.
To make it simple:
As a developer, on G1, we are not able to do what we can do on a linux PC, and that was my understanding about the open source smartphone OS.
To be practical, for the same project I ported for Android, Windows Mobile and iPhone, I would say: Windows Mobile is the most open one (friendly) for developer. You can even make your own driver on it. So I would say Windows Mobile = smart version of Windows Desktop. But I cannot say Android = smart version of linux.
I really hope Google can push a little bit to the carriers to open the root for us. Android really needs to be more developer friendly. Otherwise, it is hard to compete with iPhone, since the key part of Andorid was "openess".
jashsu said:
Open source != open system.
Open source means just that... you can see the source code. That's it. It doesn't imply or confer any other right of access, and with most open source licenses the licensor (Google & HTC) is free to build closed systems just as locked down as one based on proprietary code. Many commercial systems (Android included) are underpinned by open source code for cost savings or stability/security reasons.
Edit: That's comparing apples to oranges. Linux is not an operating system; it is an open source kernel on which an operating system can be built.
Fact of the matter is, OS X's Mach kernel is partially descendant from BSD, so you could say the center of OS X is open source as well. More info at wikipedia's Darwin entry. For being a "fan of Linux" you don't seem to understand some of the core principles.
Click to expand...
Click to collapse
As a developer, on G1, we are not able to do what we can do on a linux PC, and that was my understanding about the open source smartphone OS.
Click to expand...
Click to collapse
It's like you've never even heard of embedded linux before. Show me where on the G1 advertising or packaging it claims to be a Linux PC.
To be practical, for the same project I ported for Android, Windows Mobile and iPhone, I would say: Windows Mobile is the most open one (friendly) for developer. You can even make your own driver on it. So I would say Windows Mobile = smart version of Windows Desktop. But I cannot say Android = smart version of linux.
Click to expand...
Click to collapse
WM gives the developer deeper system access. That's awesome for developers maybe, but calling it a "smart" is probably going a bit too far.
I really hope Google can push a little bit to the carriers to open the root for us. Android really needs to be more developer friendly. Otherwise, it is hard to compete with iPhone, since the key part of Andorid was "openess".
Click to expand...
Click to collapse
Android's security framework design is solely Google's responsibility. Tmo doesn't even remotely factor into it. If you don't like the default Android system lockdown then download the codebase and compile it yourself without the security settings. Security is there to prevent neophytes from opening shell and f__king their phones up.
jashsu said:
Android's security framework design is solely Google's responsibility. Tmo doesn't even remotely factor into it. If you don't like the default Android system lockdown then download the codebase and compile it yourself without the security settings. Security is there to prevent neophytes from opening shell and f__king their phones up.
Click to expand...
Click to collapse
And run it, how?
From my understanding, the only way to get a firmware onto the phone ATM is from the recovery menu, which will only install signed updates from Google. Yes, we've got a way around that for now, but it requires root access.
How would you install a self compiled version of Android onto the G1 on the official RC30?
Gary13579 said:
And run it, how?
From my understanding, the only way to get a firmware onto the phone ATM is from the recovery menu, which will only install signed updates from Google. Yes, we've got a way around that for now, but it requires root access.
How would you install a self compiled version of Android onto the G1 on the official RC30?
Click to expand...
Click to collapse
No clue. I'd probably do it with a Freerunner or something that is specifically designed as an open system. The recovery menu is not the only way to write to internal memory; i'm sure the HTC bootloader has some provision for usb access.
You have all of the Android operating system at your disposal in the form of source code (provided you agree to the license). If you want to write/port low level drivers for it go right ahead. You just can't run it on the G1. They chose to lock down the Android implementation on G1 and you're dissatisfied with that. That's like being dissatisfied that a house has locks on it when the architect gave away the blueprints and floor plans for free.
jashsu said:
That's like being dissatisfied that a house has locks on it when the architect gave away the blueprints and floor plans for free.
Click to expand...
Click to collapse
Except when you buy a house, they generally give you the keys.
Gary13579 said:
Except when you buy a house, they generally give you the keys.
Click to expand...
Click to collapse
Yeah I know, it's a flawed analogy.
If you want to have free reign over your Android, I suggest you get a Neo Freerunner to play with. I say play because the open source portion of Android is missing a lot of closed source Google added value apps (Maps, Gmail, etc) that define the G1. Also the porting process is still ongoing.
Android's security framework design is solely Google's responsibility. Tmo doesn't even remotely factor into it. If you don't like the default Android system lockdown then download the codebase and compile it yourself without the security settings. Security is there to prevent neophytes from opening shell and f__king their phones up.[/QUOTE said:
Stop playing the work game and understand the simple Thing that Developers want full Access to device in order to build Software Beyond Generalised Application, like bluetooth drivers, codecs, themes, different home shell the way we do in Windows Mobile
You said take OpenSource and Customise the OS by bypassing some security for shell access. Now Lets understand 98 % device get automatically f**ked with RC30 and there is no Reversal!!! If you can build any Customised Android Package which can bypasss Security for shell access and also Bypass Signature checking just do it for me so i can Revert to Shell Access from f**king RC30.
Click to expand...
Click to collapse
hetaldp said:
Stop playing the work game and understand the simple Thing that Developers want full Access to device in order to build Software Beyond Generalised Application, like bluetooth drivers, codecs, themes, different home shell the way we do in Windows Mobile
You said take OpenSource and Customise the OS by bypassing some security for shell access. Now Lets understand 98 % device get automatically f**ked with RC30 and there is no Reversal!!! If you can build any Customised Android Package which can bypasss Security for shell access and also Bypass Signature checking just do it for me so i can Revert to Shell Access from f**king RC30.
Click to expand...
Click to collapse
98% of G1s might get derooted with RC30, but guess what? 99% of users don't need root or don't care. Tmo and HTC didn't build the G1 as a device for devs to hack and play with. That's why its a subsidized $179 phone and your unlimited dataplan is $25.
99% Percent people dont want it but if we develop some Application which is beyond the SDK thing we must have to have root access to all device in order to Install it.
Adobe is releasing Flash Plugins for Browser lets see they can do it by just releasing APK Package in Market or a Pushed OTA Update. If Adobe requires OTA Update then Smaller Company and Developers see hard time to develop such Extension without Googles Permission.
Just make your Science clear before commenting it
hetaldp said:
99% Percent people dont want it but if we develop some Application which is beyond the SDK thing we must have to have root access to all device in order to Install it.
Click to expand...
Click to collapse
Of course. I am just saying that there is a sense among some people that they are entitled to root access simply because G1 is built on Linux. You are not entitled to anything of the sort. If root is important to you then sell your G1 to someone who doesn't care about root (there are a lot of these people) and buy a Freerunner.
Every OpenMoko phone I have seen looks like they are competing for ugliest phone ever. I know the G1 isn't that pretty, but oh my god, I would be embarassed to carry that in my pocket.
I already own more then 6 Smartphone. And i don't use G1 also becuase of Microsoft Exchange things. I dont have any Complaint for Exchange Connectivity.
Here the Question is how can i develop some more powerful Application / extension / core Part and Distribute it across all G1 users the way we do it in Windows.
This means my core Application can run in free Runner (OpenMoko) but it will not be available in G1 user group. There will be handfull user who may use free Runner but its not my Market. I require bigger community to sell the Software buddy.
Here the Question is how can i develop some more powerful Application / extension / core Part and Distribute it across all G1 users the way we do it in Windows.
Click to expand...
Click to collapse
If you need to get below the VM on stock ota G1 then most likely your product will need to become a part of the Android platform (meaning open sourcing). The integrity of the os and user data is one of the main reasons the Android sdk only supports the VM.
I'll be interested to see how Adobe's flash implementation for G1 works. Flash is closed source, and Google has explicitly stated that the entire Android platform is open source. My guess is they will patch the Browser to accept signed binary plugins. Perhaps Google's signature will require a peek at the source. I'm only speculating though...
Yeah using SDK we can only Develop Application which run itself in the Sandbox cna they can communication with other Application using intents, you can share Data using content Provider, share the Setting using Preference. We can develop some services in apps to handle Asynchronous process.
We we ca not do is recompile the Whole Modded Source, replace or test drivers, codec, low level binaries.
The SDK is fairly powerful out off the Box for Standalone things. !
Thats why i have made a different demand to google in this thread
http://forum.xda-developers.com/showthread.php?t=444893
The only thing tmobile is worried is tethering, as they give unlock code after every 90% day Subsidized Handset unlocking is not a big worry for them.
Just think If you want to develop On Screen keyboard it require more powerful access to core system and its beyond Google Sandbox approach.
jashsu said:
It's like you've never even heard of embedded linux before. Show me where on the G1 advertising or packaging it claims to be a Linux PC..
Click to expand...
Click to collapse
Show me where did I say Android = a linux pc. Same, I didn't say Windows Mobile = Windows XP/Vista.
I hate to play the word game.
jashsu said:
WM gives the developer deeper system access. That's awesome for developers maybe, but calling it a "smart" is probably going a bit too far..
Click to expand...
Click to collapse
That's why I thought very high with Android. But the limited development access makes it worse than WM.
jashsu said:
Android's security framework design is solely Google's responsibility. Tmo doesn't even remotely factor into it. If you don't like the default Android system lockdown then download the codebase and compile it yourself without the security settings. Security is there to prevent neophytes from opening shell and f__king their phones up.
Click to expand...
Click to collapse
Could you please show us how to get the root from the f__king rc30?
Do you rebuild the whole linux on your pc if you just want to make a simple application?

Please help editing android source apk

I've been searching for about an hour now and haven't found a thing. I think I'm missing something extremely obvious but I'm completely stumped. I'm trying to simply create a new android project in eclipse from an existing source, the Launcher found in the android 2.0 source. It creates the new project with no problems and everything looks like it is supposed to look except I have about 74 errors among various different classes. I've looked through some of the errors and many are variables that haven't been declared and others are references to classes that don't exist. I've tried numerous times with several different app sources with the same problem in every single app. I've even tried downloading the source for separate apks and the same thing happens. What am I missing?!
I'm pretty new to coding android apps but decent with java. My biggest problem is just getting the apps to compile without even making any modifications yet! Any help is appreciated
matt_stang said:
...I'm trying to simply create a new android project in eclipse from an existing source, the Launcher found in the android 2.0 source...except I have about 74 errors among various different classes.
Click to expand...
Click to collapse
The android.jar which is linked in to the project by ADT only exposes the public Android API (as seen in the official documentation.) Launcher, and other "system" apps included with the platform, almost invariably access a number of private APIs which are not exposed in the SDK, and cannot be built with ADT--at least, not easily.
As it turns out, android.jar can be edited to expose all those private APIs, which is something Brut.all has worked on as part of apktool, but he hasn't done this for an entire android.jar.
Your other alternative--and practically speaking, the only current alternative--is to build it the official way, by compiling a complete platform on Linux using the full Android build process, and including your Launcher customizations. After building the whole system once you can build just the desired APK, as I understand.
olearyp said:
The android.jar which is linked in to the project by ADT only exposes the public Android API (as seen in the official documentation.) Launcher, and other "system" apps included with the platform, almost invariably access a number of private APIs which are not exposed in the SDK, and cannot be built with ADT--at least, not easily.
As it turns out, android.jar can be edited to expose all those private APIs, which is something Brut.all has worked on as part of apktool, but he hasn't done this for an entire android.jar.
Your other alternative--and practically speaking, the only current alternative--is to build it the official way, by compiling a complete platform on Linux using the full Android build process, and including your Launcher customizations. After building the whole system once you can build just the desired APK, as I understand.
Click to expand...
Click to collapse
But I already have the whole system built on my mac.. so maybe is it a matter of pointing the project to the right directory for the private APIs? Or importing a android.jar from the built source to the project..? I'm very confused
matt_stang said:
But I already have the whole system built on my mac.. so maybe is it a matter of pointing the project to the right directory for the private APIs? Or importing a android.jar from the built source to the project..? I'm very confused
Click to expand...
Click to collapse
There is no android.jar with what you're looking for. If you already have the entire platform--either http://android.git.kernel.org/ or the CM source repository--just modify that, then build from the command line. AFAIK, you have to build from the command line, though, using `make'.
olearyp said:
There is no android.jar with what you're looking for. If you already have the entire platform--either http://android.git.kernel.org/ or the CM source repository--just modify that, then build from the command line. AFAIK, you have to build from the command line, though, using `make'.
Click to expand...
Click to collapse
That makes a lot more sense. Thanks

Get ready for Google's proprietary Android. It's coming – analyst

Does anyone think this will happen? I hope not. The main reason I use Android is it's open source nature. And what about custom roms? What will happen to them?
Google is preparing to seize control of Android with its own proprietary closed-source version of the mobile operating system, an analyst claims.
Technology analyst Richard Windsor says that a highly confidential internal project is underway to rewrite the ART runtime, removing any lingering dependencies from the freely downloadable open source AOSP (Android Open Source Project) code base.
Click to expand...
Click to collapse
Full story: http://www.theregister.co.uk/2016/06/08/google_is_taking_android_proprietary_heres_how/
It will happen, there are too many risks now with un-patched OS versions
While Google are promptly releasing fixes, the OEM's are not pushing them out.
(They claim testing/compatibility issues, but really mean, we want you to buy a new phone)
Why should I have to pay ~£500 every year for a phone with the latest OS just to stay safe.
I have a 2010 HTC Desire HD running MM perfectly happily (thanks to XDA developers), it just goes to show it can be done !
Even flagship models are slow to receive latest updates while OEM's re-tweak all their 'crapware' to work with the updates.
The only way Google can force updates out is to lock down the underlying OS so that it removes the OEM's excuses.
Its a shame that OEM's laziness/greediness is going to ruin it for all.
Unfortunately closed-source = death of custom ROMS :crying::crying::crying:

Newbie question: From where to get device specific, proprietary stuff

I have the plan to get my fingers dirty with building Android ROMs for some older devices to provide them with security fixes and maybe new functions.
After looking around in XDA and AOSP, I think, I'll get a grip on the build process. However, I'm absolutely not clear what it means, if the device vendor has discontinued software updating and proprietary elements are available from an older version only. The example is the Nexus 5, where Google stopped software maintenance with Android 6. Would those older modules be still usable? Am I thinking too complicated?
Instead of upgrading the device to a new Android version, which apparently can bump into limitations like memory etc., would security fixes be backported to older Android versions?

How to immortalize your phone and get upgrades forever

Mainline it to the main Linux repo
Use mobian END or
If you want android Get the upgraded LOS port to your device and port it to AOSP using the android mainline kernel (now with the last Linux you can use any android version you want), with mainline drivers like freedreno etc... (You can use drm-hwcomposer) END or
If you want your stock rom like OxygenOS extract the GSI of the newer model of your phone, decompile apks, edit files etc... To match your hardware and reenable lost features or disable feature with hardware requirements. To make sure everything is working fork LOS and call it, merge it with the prebuilt GSI and modify it to work lawless with stuff like enforced selinux.
I'm doing this with my OnePlus 6T, my hope is to have the last OxygenOS that work flawlessly on mainline kernel and upgrade it until the hardware is not good enough, then I'll just use mobian or buy a new phone.
Given that Android is comprised of multiple disjoint components, about two dozen of which are encompassed in Project Mainline/Treble/Google Play system updates/etc., now mostly simply referred to as "Google System updates"...
"One of Google's biggest efforts for Android in recent years is to make updating parts of the operating system easier, cutting out the middlemen wherever possible to deliver updates directly to customers. Originally referred to as Project Mainline, the system is now called "Google Play system updates" or sometimes "Google System updates."
These updates are downloaded and installed automatically by the Play Store, with the installation finalizing whenever you decide to reboot your phone. Generally speaking, the system is designed to go unnoticed, a goal that Google has achieved with relative success."
Click to expand...
Click to collapse
I have asked this key pertinent question of everyone I can ever since project Mainline/Treble had been announced way back for Android 10 and have yet to get _any_ answer whatsoever that has any basis in published facts from Google.
The question...
For the two dozen core modules covered in project Mainline, for how long does Google update them over Google Play Update services on Android 10+ phones?
The answer...
Is it finite?
Is it forever?
Is it arbitrarily finite?
For how long are the two dozen core modules updated over Google Play for any given Android X+ device?
GalaxyA325G said:
Given that Android is comprised of multiple disjoint components, about two dozen of which are encompassed in Project Mainline/Treble/Google Play system updates/etc., now mostly simply referred to as "Google System updates"...
I have asked this key pertinent question of everyone I can ever since project Mainline/Treble had been announced way back for Android 10 and have yet to get _any_ answer whatsoever that has any basis in published facts from Google.
The question...
For the two dozen core modules covered in project Mainline, for how long does Google update them over Google Play Update services on Android X+ phones?
The answer...
Is it finite?
Is it forever?
Is it arbitrarily finite?
For how long are the two dozen core modules updated over Google Play for any given Android X+ device?
Click to expand...
Click to collapse
The "project mainline" is misleading. Here when I tak about mainlining I'm talking about running android with a generic Linux kernel instead of the fork. So you can basically update the kernel to infinity and so port every android version you like.
So basically now I'm porting the OnePlus 6t to aosp using android-mainline as kernel with drm-hwcomposer. So anything forked or something.

Categories

Resources