yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] BoxyD:
My Opinion

Hey all,

I've mostly been a watcher here at XDA but I felt the need to make a comment. I'm not a lawyer but I am a developer on the application level. Anyways these are just my opinions and should be verified by legal counsel to hold merit :)

There's some good and viable ideas here for distributing modified Android ROM's w/o Google's proprietary apps. But rest assured any ideas which involve either distributing, installing, ripping, re-packaging, etc, any of Google's proprietary apps w/o their consent is ILLEGAL. That is what spawned off this whole rocus in the first place. Although I do applaud what Cyanogen is doing for the Android community... but I digress.

If Cyanogen or other devs can't workout a deal w/ Google, then the only LEGAL solution is to develop replacements for these proprietary apps. Lets keep in mind that the apps are what needs replacing, not the service that Google provides.

All these apps are replaceable, it will take some work but it is doable. The biggest hurdle, which Cyanogen made a comment about in this thread (http://xdaforums.com/showthread.php?t=564263) is the syncing process. I don't really know the amount of effort required to come up with a workaround for the sync process. My knowledge of Android is mostly on the framework level. :(

“The most successful people are those who are good at Plan B.”
[G1 Android Development] jubeh:
A build without google apps is a bit different from one with them.

imfloflo is dead on, without google apps, the phone won't work for phone calls (needs the SDKSetup package so that phone works), you lose contact syncing ability (so it depends on your SIM Contacts, therefore STK is a must). SDK Setup also interacts with ContactsProvider, and it would conflict if GoogleContactsProvider is also in the build, so the script would have to remove SDK setup and any other files meant to make the phone boot without the Google Apps.

This idea is dead on. When you buy the phone, you enter an end-user license, but we need to read the fine print to see if the license applies in a per-app and per-driver basis or if it only applies to the whole build, otherwise, it means we have to make TRULY custom roms (not a bad idea).

I could work a quick cupcake build that's based entirely on AOSP so you guys can see what it's like (it's not thaaaaat bad), but then there's the issue with the HTC proprietary files, since this event has raised that issue too. I guess I could toss in a script so that you guys have the files extracted on your sdcard and the script will copy them to the propper locations so that the phone can boot.
[G1 Android Development] jubeh:
1. It's redistribution that's illegal. If the app takes the existing program for which you already are licensed to use, then it's perfectly legal to 1. make a backup of that program and 2. re-install the program in the same environment provided that you're not using said backup application to restore the backup to more devices than which your license has allowed you to. If what you're saying were true, then there would be no backup programs. If you keep an image of the build with the programs you received, then it's basically the same as still having the installation medium, thus you can use this medium to restore your application, again, as long as it's done in a legal usage manner.

2. Making open-source alternatives to Google's apps would be great. We need to find out Google's API's for things such as contact sync, Maps (this is already part of the AOSP project), Market and YouTube, these are biggies, don't think there's an open API for them, for YouTube we could make an flv player based on an open-source player and then find out a way to force the video stream to be played, but without a legal API to stream YouTube content, it's still shakey ground.

3. I like your quote, I'm stealing it :D
[G1 Android Development] maxisma:
Ehh I think we CAN extract from the free downloadable package by HTC..

I don't think it's illegal, but it depends on where you live ;-)
[G1 Android Development] maxisma:
Legal

Source:

http://www.htc.com/www/support/android/adp.html#s3
[G1 Android Development] amiuhle:
I was thinking about something similar.

When you build the AOSP code from scratch for your G1, you first have to pull some files off the phone which are device-specific and Google/AOSP doesn't have the rights to distribute them. But everyone who has a G1 already has those files on the ROM that came with it, so he/she can build a new one.

As for the closed source Apps, they're already on the phone. If a user first switches from the official ROM to CM, the closed source apps will be on the phone already (if it's a "Google Experience" phone).

So I think all that has to be done is just not touching those apps when flashing the new ROM. Users who don't have those apps preinstalled could always install them manually once using adb.

Of course, this would mean that we don't get the newest closed source apps when upgrading to a new CM version (like the new Market right now). But that's something I can live with...
[G1 Android Development] jubeh:
Cyanogen is not HTC :p. HTC is licensed to re-distribute Google's work .

---edit---

OOOh, I see what you mean, yeah. This line is interersting:

If i'm reading it right, as long as you make your build "in conjunction with third party software that makes up the Android system" plus a few extras, you're legally allowed to load Goolge apps, but only for ADP1
[G1 Android Development] maxisma:
Jubeh, you didn't got what I wanted to say..

Cyan has to create a w/o google rom and a script to pull files from the official htc update and adb push it to the g1/magic.
[G1 Android Development] BoxyD:
#1 I agree with what you are saying. I guess I did a bad job at explaining my point. My explanation was in the context of what most of the suggestions were in the forum. Which is to extract the Google apps on a legitimate ROM/build and install them to a different ROM/build unapproved by Google. I would think Google would have a provision in their user license agreement against such practices.

#2 YouTube has an API. The Market will be a big problem. Although there are a couple of alternatives like slideme.org and andappstore.com

#3 I stole that quote too :D
[G1 Android Development] elegos:
Why don't you simply create a script of the update zip file like this?

copy SYSTEM:/data/app-s/blablabla.apk SYSTEM:/sdcard/closed/blablabla.apk

...

flash image

...

copy SYSTEM:/sdcard/closed/blablabla.apk SYSTEM:/data/app-s/blablabla.apk

?

In this way you'll allways use your APKs. In case of updates of those APKs you can allways import them once downloaded from HTC, google itself of whatever
[G1 Android Development] amiuhle:
Like I said, you can just not do anything with the closed source apps. Just leave them on the phone as they are. CM is already doing that to all other apps that are already installed, so why not do it with those too?

There are also Websites that list the contents of the Market, so I guess it would be possible to write an OpenSource Market App that uses the same data as AndroidMarket does.
[G1 Android Development] jubeh:
1. Again, I think the license says that as long as the apps are installed in a system composing a full (maybe "With Google") Android system, they can be installed into ADP 1, i'm sure other devices have the same license. This might be to prevent the apps to be installed and run alone in, say, an ubuntu variant of the dalvik vm

2. Yeah, I remembered about the YouTube API right after opening Totem :D
[G1 Android Development] BoxyD:
Lets also keep in mind that the applications in question were part of the ROM/build that Google/T-Mobile distributed. They are not available for purchase or download separately in the market (or anywhere for that matter). I don't even think you can backup these apps without admin privileges. This seems to imply Google meant for these apps to be a "packaged" solution with their distributed ROM/build or else we should be able to get these apps separately in the market (ie Google Maps).
[G1 Android Development] stellarman:
This would work. But, it seems to me you could also take a similar approach that works like this:

1) Strip the proprietary code out of the update before signing.

2) Sign and distribute the update.

3) People install the update and return to the recovery screen.

4) Drop into terminal mode and run a script that downloads and installs the missing proprietary code in the proper places (or grabs it from a repository on the SD card).

5) Reboot and enjoy.

Any reason that wouldn't work equally well?
[G1 Android Development] testing567:
This is a valid point. I just thought it would be more convenient for the devs if they could bundle there own script to do just this with their roms. It would allow them to choose which apps to install and where they want to install them to.
[G1 Android Development] oMszKikiIzWavyo:
Google we need CM, and their is probably people that work for google with their phones rooted using CM ROMS also. But please leave CM alone google
[G1 Android Development] jjcd51590:
im sure he appreciates the support but lets try to keep it on topic alright :)
[G1 Android Development] Wysie:
I think this idea is pretty good. Perhaps Google should consider adding their closed-source apps to the Android Market itself (Gmail, Calendar, etc.) :P. That way we only have to load the Market and then use it to get everything else...
[G1 Android Development] Zarboz:
double post my bad
[G1 Android Development] Zarboz:
that would require google cooperation........ wich... at this point.. i doubt we'd get.

i am really digging this idea of a script to install the signed pieces at firstboot

i was thinking it could be somethin like the a2sd that is run on every boot (to check versions and permissions and odex will run on first boot)

eg you can have a script on boot that would basically say

su

wget http://www.whereverwehostthisat.com/resources.zip /sdcard (optional completly)

unzip /sdcard/resources.zip

chown /sdcard/resources.zip

cp -a /sdcard/resources/app/* /system/sd/app

cp -a /sdcard/resources/app_s/* /data/app_s

(run fix_permissions script)

exit

(i know my coding skills are pretty n00bish but its the best way i can think to convey what im thinkin of here)

or you can set your update.zip like a no-wipe zip where youd have to be on like a ADP rom and update cyanogens rom it would be a nowipe install so the rom wouldnt touch your apps or install new apps

so that basically everything googles mad about is technically not getting touched but by applying the update.zip your merely changing framework.... not apps

eg the update.zip wont even contain /data/app

just the /system/ folder where the important innerworkings are stored this would be the open sourced part of the code that we are indeed modifying ...if thats correct... if not someone correct me

just throwing some ideas out there

kinda like themes are for specific roms.......and the theme doesnt effect the performance of the rom just the look...... so therefore you could write a update.zip for the system that would change scripts modules and libs and not apps

so you would have your baserom EG: HTC ADP1 Rom.zip this would be required in order to flash the new custom ROM your wanting because the ROM overlays and adds certain libs and modules in the adp1rom.zip it doesnt completly replace it

this would be another way to legally sidestep google
[G1 Android Development] testing567:
That's basically what I'm thinking, only without the wget. The reason why I suggested using the HTC official rom's direct from their site as the resource file is because it exposes us to less legal issues. Anyone hosting this file that's not a member of the Open Handset Alliance can be hit with a C&D. Also, the manual download of this file by the individual users is a MUST. That's the part that frees the rom devs from the legal responsibility. An automated download could be seen the same as supplying the closed source apps. I doubt the phone has a data connection that early on in the boot sequence anyway.
[G1 Android Development] Zarboz:
i know it doesnt on hero roms cuz on logcat radio doesnt boot till after the hero.gif thing plays then it takes a couple seconds to grab a signal and verify that with the phone

the wget was just a thought. I am still thinking about the script because it would have ALOT of variables and would constantly need updating

thats why i suggested the idea of the custom rom.zip only containing the /system folder and not containing apps that way whichever rom your wanting you would have to flash the ADP1 rom BEFORE FLASHING YOUR CUSTOM ROM.... that way when phone is installing update.zip it wont add any applications just the /system/ folder and then the script can be used to obtain the libs that would be copywritten
[G1 Android Development] mlevin:
I see this technique used a lot with open source download that rely on some closed source code. They usually say something like, "we can't legally distribute this library that is necessary to use our software, but all you have to do is install our software, then follow this link to download the missing piece from the official publisher."

Can't we do something like that?
[G1 Android Development] testing567:
+1

Great analogy. Do you mind if quote you in the first post?
[G1 Android Development] farmatito:
It seems to me that there are some issues in your logic:

1) at the moment there are NO donut ROMS

2) therefore all Google apps are from Cupcake branch

3) all Google apps from the cupcake branch are already on your phone

4) therefore we don't need to download them

5) we need just to create updates and update scripts that do not overwrite

them or delete them.

6) same thing applies to the closed source htc binaries.

7) this would be legally safe as nothing is redistributed.

8) the only alternative is to produce google free roms

but there are still the closed source htc binaries that are problematic

so the above solution solves 2 problems at once.

:D
[G1 Android Development] Chahk:
But we don't need to! Since we all have Magic or Dream phones with an official "Google Experience" image, we already have all of the proprietary software by definition. All that needs to happen is copying of the necessary files off to SD card, flashing the un-googlified AOSP ROM, and then copying the files back. No distribution would be happening in this case.

This of course would be a temporary work-around until open-source replacements are developed. If Google wants to remain as part of our experience, they should open up their closed-source components.
[G1 Android Development] mckoy1:
There is a lot feedback in this thread. Does anyone know the details of the letter Cyan received? I have a legal background and I may be able to help out.

I will try contact Cyan... or someone can ask him to contact me @lifewithjesse
[G1 Android Development] maxisma:
I diffed the system folders of an aosp build w/o google and cyans build..

I filtered out many things which I think aren't needed.

There may be are some unneeded apks/libs/etc, but this could be a start for a script.
[G1 Android Development] Zarboz:
thats basically what i was trying to explain thanks for making things a little more clear

would these be APKs and libs that are ALREADY included with the AOSP and our Google Branded phones

therefore these would be apks and libs that dont need to be in the custom rom image???

is that correct
[G1 Android Development] farmatito:
/system/lib/libcerttool_jni.so is needed for wifi if i recall correctly

EDIT: I checked and was wrong.
[G1 Android Development] cacahahacaca:
So did Google give back anything useful to the open source community? Or is all the useful stuff closed-source and only the barest core is open source?
[G1 Android Development] Chahk:
Thanks maxisma! Taking notes from userinit.sh and switchrom, would it be possible to dump these into a text file, and then TAR them to somewhere on /sdcard?
[G1 Android Development] farmatito:
I think so.
[G1 Android Development] maxisma:
Should be easy..

It's just busybox cp'ing them to the folders.

But I don't know if there is more.

This are just the files that are MISSING in the AOSP Rom w/o Google.

Maybe there is sth different in the framework, but I couldnt check because cyanogen did mod the framework too hard..

I would be happy if he would post something to this thread and help us helping him.
[G1 Android Development] Chahk:
Would that mean that the framework itself is open source? I know the reason Cyanogen was reluctant about pulling in Hero apps is precisely because HTC's framework is closed.
[G1 Android Development] maxisma:
Yeah you're right..

I don't think there is anymore.. So..

We should try it!

Someone please pull these files and push them into an AOSP build.

I'll maybe try it this night..
[G1 Android Development] farmatito:
HTC apps (gallery and camera) should be replaced by the the free counterparts

and Htc framework should be removed or the next c&d letter will be one from htc.
[G1 Android Development] maxisma:
I just pushed this system folder to the emulator and GMail etc. started correctly, but the SetupWizard hang, but this is normal on emulator..

But it IS a step forward!
[G1 Android Development] acejoker25000:
place holder

why cant devs just put n a placeholder file in your app part of the rom that way they aren't breaking any rules of distributing closed source apps!! the only apps u will have r the ones already on your phone! isn't that the same thing they do with the apps on the ext sections of your sdcard! Google couldn't say anything because the files were already on the phone so there is no redistributing of files! the only problem would be no updated apps such as the new market or any other core updates until officially updated and released! And if that is the case then people with the new market in theory could keep it because there is no app to replace it! this is in a sense what a few people were already saying i just thought that a placeholder file would be the best option to keep the stock apps without breaking the law!!
[G1 Android Development] farmatito:
Improved list for the backup and restore after flash or leave untouched strategies:

GOOGLE AND HTC STUFF (?)

/system/app/BugReport.apk

/system/app/checkin.apk

/system/app/Clicker.apk

/system/app/Gmail.apk

(easy to substitute with other mail client):

pop.gmail.com port 995 with SSL

smtp.gmail.com port 465 with SSL)

/system/app/GmailProvider.apk

/system/app/GoogleApps.apk

android/cupcake/packages/providers/GoogleContactsProvider is open source

/system/app/GoogleContactsProvider.apk

/system/app/GooglePartnerSetup.apk

/system/app/GoogleSettingsProvider.apk

android/cupcake/packages/providers/GoogleSubscribedFeedsProvider is open source

/system/app/GoogleSubscribedFeedsProvider.apk

/system/app/gtalkservice.apk

android/cupcake/packages/providers/ImProvider is open source

/system/app/ImProvider.apk

/system/app/MediaUploader.apk

/system/app/NetworkLocation.apk

/system/app/SetupWizard.apk

android/cupcake/packages/apps/Stk/src/com/android/stk is open source

/system/app/Stk.apk

/system/app/Street.apk

/system/app/Talk.apk

/system/app/TmoImPlugin.apk

/system/app/Vending.apk

android/cupcake/packages/apps/VoiceDialer is open source

/system/app/VoiceDialer.apk

/system/app/VoiceSearch.apk

/system/app/YouTube.apk

/system/etc/permissions/com.google.android.gtalkservice.xml

/system/etc/permissions/com.google.android.maps.xml

/system/framework/com.google.android.gtalkservice.jar

/system/framework/com.google.android.maps.jar

/system/framework/com.htc.framework.jar

/system/framework/com.htc.resources.apk

/system/lib/libcerttool_jni.so

Other closed source(?) files:

/system/bin/akmd

(/system/etc/AudioFilter.csv)

(/system/etc/AudioPara4.csv)

(/system/etc/AudioPreProcess.csv)

/system/etc/firmware/brf6300.bin

(/system/etc/gps.conf)

/system/etc/wifi/Fw1251r1c.bin

(/system/etc/wifi/tiwlan.ini)

/system/lib/libaudioeq.so

/system/lib/libgps.so

/system/lib/libhgl.so

/system/lib/libhtc_acoustic.so

/system/lib/libhtc_ril.so

/system/lib/libjni_pinyinime.so

/system/lib/libmm-adspsvc.so

/system/lib/libOmxCore.so

/system/lib/libOmxH264Dec.so

/system/lib/libOmxMpeg4Dec.so

/system/lib/libOmxVidEnc.so

/system/lib/libopencorehw.so

/system/lib/libpvasf.so

/system/lib/libpvasfreg.so

/system/lib/libqcamera.so

/system/lib/libspeech.so

/system/lib/hw/lights.goldfish.so

/system/lib/hw/lights.msm7k.so

/system/lib/hw/sensors.trout.so

WAREZ (?)

/system/app/HTC_IME.apk

/system/lib/libt9.so

/system/app/ PDFViewer.apk

/system/lib/libpdfreader.so

/data/app/Quickoffice_HTC_1.0.1.apk

/data/app/teeter.apk
[G1 Android Development] Mikey:
Anything that has/can be BOUGHT for the G1, regardless if it's free on any other phone, is considered warez.

Unless that app is on the market for free, then that free app can be used in a rom.

Example......QuickOffice in a rom is considered WAREZ. Even though HTC offered it for free in their Hero phones, The G1 users need to be it for their phone.
[G1 Android Development] testing567:
So are you saying we don't have to loose HTC_IME since it's not in the market?
[G1 Android Development] farmatito:
I think he is saying this cannot be redistributed, but if you can obtain it by other ways you can install it yourself. It just cannot be in the roms posted to

public download.
[G1 Android Development] Mikey:
Thank you for the clarification farmatito :)

Long day at work :(
[G1 Android Development] Aaron!:
So what we need, besides having a ROM stripped of closed-source apps (the ROM itself would then be 100% legal), is a legal distribution channel for the apps. Just to clarify, every G1 comes with a license to use the apps, to the legality of using them is not in question.

HTC is a good idea for now. How long before Google tells them to C&D from distributing the apps publicly? What's the longterm solution for end users to acquire the apps they paid to use (and why is Google making it difficult for us)?
[G1 Android Development] farmatito:
Users are ok as all the google apps are already preloaded on their phones, we just need to distribute roms cleaned up of the proprietary apps, files and warez

and reuse the ones on the user's phone.
[G1 Android Development] testing567:
As I said in the first post, I feel that this thread about eventually replacing all the Google closed apps is the long term solution. http://xdaforums.com/showthread.php?t=564263

I realize that my idea can only work for so long. It's the short term solution, as well as the alternative to other devs that wish to have Google apps in their roms.
[G1 Android Development] joshtheitguy:
Or why does Google not do something like what Adobe does with their Adobe Reader or Flash Player.

Even though those applications are not sold for a profit Adobe still has people like me whom distribute the player/reader sign up on their site for a free license to distribute the apps.

As in this case Google does not sell said apps for a profit therefore just have Cyanogen obtain a license to distribute for free, case closed. If they want him to pay I'll donate more towards the cause.
[G1 Android Development] amiuhle:
Did anyone read this?
[G1 Android Development] prince.siraj:
yes. and i have a question: if we're on the HTC Hero builds, then none of what Google said applies to us right? because Hero is not at all related to Google, only HTC right?
[G1 Android Development] schwiz:
pretty damn good idea :)
[G1 Android Development] shafty023:
We have to remember there's a big difference between a ROM cooker and a linux operating system developer. Google created the entire OS, infrastructure, and application server that our phones run on. Cooking a ROM and making small changes here and there, optimizing speed, etc are not on the same scale of what companies like Ubuntu, Fedora, Google have done.

I do agree Google's choice for the UI was pretty basic but their purpose was to build the OS and let everyone else make their own changes. I guess that didn't mean to include any closed source apps from them which doesn't help us since I don't believe Android will boot without their closed source apps. Unless of course we make some heavy changes to the source code to eliminate references to them