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.
Hi all,
I've got an HTC Magic from Rogers (EDI1 / 32A) and I've sucessfully loaded CyanogenMod on this unit. There are a few limitations with this ROM that I'd like to work around:
- No full exchange support
- Can't run other HTC apps like PDFViewer, teeter, etc...
Now from what I've read the HTC / Google stuff had to be stripped to avoid copyright infringment and that's fine. I'm just figuring since this phone came with these features I should be able to extract them from the stock ROM and apply them over the CyanogenMod ROM myself? Afterall these were licensed to this piece of hardware right?!? ;-)
I've started to figure my way around both fastboot and adb so I restored my original ROM and started pulling the apk files from that. Started with teeter and PDFViewer as a start... When running on the CyanogenMod ROM Teeter exits gracefully with a message telling me it only runs on an HTC, and PDFViewer dies and needs to be force closed. So there's obviously more than just the apk files for these apps that need to be moved.
So does anyone know what files need to be pulled from the stock ROM and copied to the CyanogenMod ROM to allow me to run the HTC stuff on there?
Also if anyone can point me to the files I need to transfer to restore the full exchange functionality that would be sweet!
I know the files had to be pulled out / replaced to meet legal requirements so someone must know which ones they are?!?
Oh and one issue I've been running into is that I obviously can't get root on the stock ROM so things like the data directory are off limits to me... But the system folder's accessible in a read only mode at least.
I'm also wondering which files actually make up the Android OS? Maybe it would be easier just to copy the 1.6 os files to the 1.5 stock image leaving the rest the same? So in a nut-shell trying to do HTC / Rogers' job for them as they are obviously not looking to get this done any time soon if at all by the looks of things...
Any insight would be greatly appreciated!
Sandy
Is there any way someone could explain what is the meaning of 'signed' update (for android) means?!
I know the meaning of a cryptographic signature, and I tend to confuse understanding whether this sort of images are digitally signed (by whom?) or just checked against a hash within the image, which means to protect the update against some sort of corruption along its transit (and not against unofficial distributions).
Appreciate your feedback.
There are different keys used to sign an update. Test keys are what rom updates are signed with because it's the most generic and doesn't require a developer account. When you sign-up with google to put a application on the market, they give you a developer key to sign your application with. Every developer key is unique and allows for authentic updates and not just someone with an application with the same name. You will get a key mismatch error or certificate error when you try to replace an application with one that is not signed with the same key as the one you have installed currently.
To my knowledge it does not provide any md5 verification features, unless the update has a corrupt signature.
Thanks for the educated answer!!!
If possible - I’d like to understand this a little bit more:
Can any developer sign ROMs (not just applications)?
How can I tell between images that signed with test keys and ones that are signed with individual keys? (Where is this information embedded?)
How do I associate between a ROM distribution and an individual?
Where is the root of trust that is made to validate these certificate (chains) ?
thanks
Anyone can sign roms. The custom recovery allows one to flash roms with test keys. The way to sign an apk/zip is just a java program, OS independant. Perhaps looking at the jar will give you a little more understanding of how it works against the zip/apk.
You can tell a factory rom from a custom rom from the build.prop file. The chances are slim that the factory rom would use a test key.
ie. "ro.build.fingerprint=google/passion/passion/mahimahi:2.2/FRF50/38042:user/release-keys" is in the FRF50 update.
The signature is stored in the META-INF directory in the zip file.
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
evilkorn said:
Anyone can sign roms. The custom recovery allows one to flash roms with test keys. The way to sign an apk/zip is just a java program, OS independant. Perhaps looking at the jar will give you a little more understanding of how it works against the zip/apk.
You can tell a factory rom from a custom rom from the build.prop file. The chances are slim that the factory rom would use a test key.
ie. "ro.build.fingerprint=google/passion/passion/mahimahi:2.2/FRF50/38042:user/release-keys" is in the FRF50 update.
The signature is stored in the META-INF directory in the zip file.
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
Click to expand...
Click to collapse
Do you know know many verification checks are needed for an update or ROM to be able to flash? Does the recovery just check the cert in the manifest/cert files? I think the image files are hashed, but are they also signed?
Also does the actual hardware have any keys installed or is all through software/firmware?
Signare
"-to sign"
v1.1
Having decided to completely rewrite my previous Sign & Aligner tool, I have come to the stage where it is ready for testing.
Version 1.1 Released
Added JDK 7 Install Path To USER PATH - Temporary Change, USER PATH Restored On Closure
Added Detection Of JDK Installation
Code Improvements
Features
Sign with Test Keys
Sign with Private Keys
Generate Your Own Private Key
ZipAlign your APKs
You can generate your own set of Private Keys to sign your own APKs. The keys generated are fully compliant with current Android Market requirements.
Prerequisites
Windows XP/Vista/7
Java JDK 7 MUST Be Installed
Instructions
Download
Extract
Copy Unsigned APKs Into Input
Open "Signare.exe" (Vista/Win7 - Open As Administrator)
Follow On-Screen Prompts
Thats It
Future Development
Eliminate Need For JDK Installation
Port To Linux - Currently Under Development
Port To Mac OS X
Code Improvements
Currently its bundled with a TestApk.apk (renamed Contacts.apk) so it can be tested straight away.
DOWNLOAD HERE - Download Statistics
Mirror
Please post your experience with this tool as I will fix any issues that people report.
Good work my friend, maybe you can make it for linux too
see ya
Good Stuff!!
thanks buddy, downloading now
thanks again m8,
take care
Whats the function of signing apk's?
Do android phone need sign apps too?
i thought only symbian requires signed apps since u'll get cert error if it isnt signed..
I dont have problem installing apk files on android b4
I'll bet other would have the same question
flawlessx92 said:
Whats the function of signing apk's?
Do android phone need sign apps too?
i thought only symbian requires signed apps since u'll get cert error if it isnt signed..
I dont have problem installing apk files on android b4
I'll bet other would have the same question
Click to expand...
Click to collapse
The Android OS will not install or run unsigned code.
If you create or modify any APK it will need to be signed before it can be installed.
If you publish to the Android Market, your APKs need to be signed to verify that they are indeed yours.
I'm assuming all the apps you have installed have previously been signed. Otherwise you wouldn't be able to use them.
Version 1.1 Released
Linux port is under development.
Support For This Tool Has Been Moved
Please Post Your Questions
HERE
Click to expand...
Click to collapse
While browsing for apps I came through a site called www.zuneboards.com and it had a program called Liberate for Zune HD. I downloaded the v1.6.2 zip and extracted it and copied to my HTC 7 Pro and tried to run the native executables. Most of them did not work but there was one named reboot.exe and when I tried to open it from the FileBrowser it actually asked if I wanted to reboot my phone and when I tapped on yes it did reboot.
There was another executable cabinstall.exe and when it was executed gave a message to double tap on the cab file which might mean that it we can open a cab file but need to set the correct registry path for the cabinstall.exe to be called when opening a cab file which I am not able to do.
Any help will be appreciated.
I am not sure what it means but is it now possible to make native executables run on windows phone 7? I am able to open Opera Mobile by ultrashot by directly running the executable instead of the opera launcher as well.
I have added the zip file which has the executables.
Are you on a custom ROM or a stock ROM? Native executables have been possible on custom ROMs for a long time, but if this works on a stock ROM... time to investigate.
EDIT: Your link is going to a 404 error page, not a ZIP file. Re-upload maybe?
GoodDayToDie said:
Are you on a custom ROM or a stock ROM? Native executables have been possible on custom ROMs for a long time, but if this works on a stock ROM... time to investigate.
EDIT: Your link is going to a 404 error page, not a ZIP file. Re-upload maybe?
Click to expand...
Click to collapse
I have updated the attachment. Should work now.
I am on a custom rom so I am not sure if it will work on a stock rom or not.
It uses executables built for WinCE 6.0. This is also a valid way to build native code on WP7 (WP7 uses a CE kernel version somewhere between 6.0 and 7.0) so it's no surprise that at least some of the apps will work.
Is there source code available for this hack? It would be interesting to see what they did. It's probably ZHD-specific (for the general unlock) but it *might* be useful for WP7 hacking too...
GoodDayToDie said:
Is there source code available for this hack? It would be interesting to see what they did. It's probably ZHD-specific (for the general unlock) but it *might* be useful for WP7 hacking too...
Click to expand...
Click to collapse
Source code is in the attachment.
404 error page again (WTF? Never seen that on anybody else's attachments!)
GoodDayToDie said:
404 error page again (WTF? Never seen that on anybody else's attachments!)
Click to expand...
Click to collapse
@GoodDayToDie I am not sure why the attachments are giving the 404 error.
Here is the link to mediafire http://www.mediafire.com/?4g82q2eoww16kgr
@GoodDaytoDie
Did you find anything interesting or useful in the source?
Not yet, but it was a busy weekend. I'm looking through a number of things at the same time and haven't dug into that one yet.
However, it's worth noting that the Zune HD uses a very different security model from WP7. I didn't do any ZHD dev or hacking, so I'm not entirely familiar with how its app model works.
Thanks for the source though! I'll dig into it further and let you know if I find anything. I may have to create an account on that other forum too; it looks like they're doing some WP7 hacking as well.
I tried sources in VS 2008. New project must be created from old source codes and main entry point must be added to properties/link/commandline option, or changed to wmain. See http://forum.xda-developers.com/showthread.php?p=33649737#post33649737 , download zip.