Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,489 Members 45,371 Now Online
XDA Developers Android and Mobile Development Forum

[Extension] Updated version of the APK Downloader Chrome Extension

Tip us?
 
Bexton
Old
(Last edited by Bexton; 30th August 2012 at 01:20 AM.) Reason: Added version 1.3.4
#1  
Bexton's Avatar
Recognized Contributor - OP
Thanks Meter 1101
Posts: 608
Join Date: Sep 2011
Location: 50 56' 33" 6 57' 32"
Default [Extension] Updated version of the APK Downloader Chrome Extension

What is it?

This is an updated (and slightly modified) version of redphx's awesome Google Chrome extension APK Downloader.
It allows you to download APKs from the Play Store webpage via your desktop browser directly onto your computer.

The original version stopped working as of Google Chrome version 20+ because starting with this Chrome version, all Google Chrome extension require to use the manifest version 2. When I noticed, I checked the author's page for any updates. But there were no updates on that.

Update: Earlier, I said that the original APK Downloader extension stopped working because it uses Manifest version 1 and that Google Chrome dropped support for all extensions that use Manifest version 1.

However, gt573 noted that he can still use the original extension (v1.2.1) with Chrome 21.

So, I checked again the Manifest version 1 support schedule and I found that I was wrong there. Manifest version 1 was announced deprecated with the release of Chrome 18, but will be partitially supported until "early 2013".

Nethertheless, the original APK Downloader (v1.2.1) does not work for me since my Chrome was update to 21.0.1180.60 m. The extension constantly throws content security policy exceptions when trying to download any App, which prevents the extension from working at all. Additionally, this is the error message I get on the extension page:



And according to the recent comments on the author's webpage, there's a bunch of other users who have/had the same problem with v1.2.1 within the last days. (For a detailed explanation of manifest version changes in Chrome and what that means for the original APK Downloader, click here to read the full story.)

So: If APK Downloader v1.2.1 stopped working for you, feel free to use this updated version.
What was changed?

So.. Basically, this is the original APK Downloader v1.2.1 extension for the Google Chrome browser, downloaded from the author's - redphx - webpage. However, these are the changes that I made:

As of version 1.3.0
  • Updated the extension manifest version from 1 to 2
  • Replaced deprecated functions in JavaScript and references in manifest.json
  • Changed JavaScript formatting from compressed to "Pretty Print" (so that the source code is readable for everybody)
  • Removed Google Analytics Code (Sorry redphx, all credits to you! But using GA for this, without even anonymizing the User IPs, is a No-Go as I think).
  • Changed the download redirect Url (when clicking the icon in the Url bar) from the author's webpage to a local domain "http://localhost/[..]".
  • Removed all other "extra" code, that was not used for the actual functionality.
  • Replaced extension icons.

As of version 1.3.1
  • Changed the download redirect Url (when clicking the icon in the Url bar) from"http://localhost/[..]" to this thread's URL, because v1.3.0 required a local web server to be running for the extension in order to function.

As of version 1.3.2
  • Changed the download redirect Url (when clicking the icon in the Url bar). Instead of open a new tab, as of version 1.3.2 it will simply reload the current Play Store URL and start the download!

As of version 1.3.3
  • Fixed redirect bug, introduced in version 1.3.2
  • Major code clean up (reduced number of files from 16 to 12).

As of version 1.3.4
  • Improved new reload function to support Play Store URLs that contain a hash key already.
Get Started - Download
To install the extension the steps are as follows: download and extract the following zip archive to your computer.

Direct download link:
apkdownloader-1.3.1.zip
apkdownloader-1.3.2.zip
apkdownloader-1.3.3.zip
apkdownloader-1.3.4.zip
How to set up?

After you extracted the downloaded zip file to your computer, open Google Chrome and go to the extension page; you can copy and paste into the Url bar: chrome://chrome/extensions/

Load it

Now, enable "Developer mode" and load the "APK Downloader"-extension from the directory where you extracted it to.


Set it up - Google-Account

To be able to download from the Play Store, you need to authenticate all requests. Therefore you need to "log in to your Google Account" at the extension's option page.


On the extension's options page, log in with your Google-Account (email-address and password) - the same Account that you used with your device! Also, you will need your Android Device-Id (which is part of the algorithm to generate a valid request key).

Note: Basically this is not a "login" in the common sense. Your credentials are stored safely in Chrome's local data storage - on your own computer!!!

Set it up - Android Device-Id

To get your Android Device-Id, type in the dialer of your phone...
Code:
*#*#8255#*#*
*#*#TALK*#*#
... and you will get the "GTalk Service Monitor" screen like the following. Search for "DEVICE-ID:". Everything that comes after "android-", that is your Device-Id.



OR

Use my App "Android Device-ID"



(Almost) Done



The extension is now available and ready set up. However, you need to follow 1 more step to actually use it; you need to disable SSL warnings. Therefore please read on at the original APK Downloader page at: http://codekiem.com/2012/02/24/apk-downloader/
Credits
All credits for the extension goes to redphoenix89 (or redphx @xda)! It's his code - I did only cosmetics.
Legal Note / Disclaimer
Finally, please note that the use of this Chrome extension is violating Google's Play Store TOS! You've been warned.
Attached Files
File Type: zip apkdownloader-1.3.0.zip - [Click for QR Code] (42.7 KB, 3131 views)
File Type: zip apkdownloader-1.3.1.zip - [Click for QR Code] (42.7 KB, 28947 views)

Google/LG Nexus 5 (32GB, Black) - Android 4.4.2 / KOT49H - Stock 3.4.0 Kernel - HHZ11k - Radio M8974-1.0.25.0.23
Google/LG Nexus 4 (16GB) - Android 4.4 / KRT16O - 3.4.67 ~AK.106.KK - MAKOZ30d - Radio 2.0.1700.97
Google/HTC Nexus One PVT ENG S-OFF - Android 4.2.2 / JDQ39 - Evervolv Perdo 3.2.0 - 2.6.38.8-evervolv-perdo-jellybean 8x50 - HBOOT-7.35.5117 (BlackRose) - Radio 5.12.00.08
Samsung Galaxy Tab 2 GT-P5110 - Android 4.2.2 / JDQ39E - CM 10.1.1 - 3.0.31 - MAKOZ10o - Radio 2.0.1700.48
// My Threads | My GitHub | My Google+
The Following 64 Users Say Thank You to Bexton For This Useful Post: [ Click to Expand ]
 
Bexton
Old
#2  
Bexton's Avatar
Recognized Contributor - OP
Thanks Meter 1101
Posts: 608
Join Date: Sep 2011
Location: 50 56' 33" 6 57' 32"
As Wesnam pointed out the version 1.3.0 requires a local webserver to be running in order for the extension to work. I fixed that, so everybody can use it. Please download version 1.3.1 (click here).

Google/LG Nexus 5 (32GB, Black) - Android 4.4.2 / KOT49H - Stock 3.4.0 Kernel - HHZ11k - Radio M8974-1.0.25.0.23
Google/LG Nexus 4 (16GB) - Android 4.4 / KRT16O - 3.4.67 ~AK.106.KK - MAKOZ30d - Radio 2.0.1700.97
Google/HTC Nexus One PVT ENG S-OFF - Android 4.2.2 / JDQ39 - Evervolv Perdo 3.2.0 - 2.6.38.8-evervolv-perdo-jellybean 8x50 - HBOOT-7.35.5117 (BlackRose) - Radio 5.12.00.08
Samsung Galaxy Tab 2 GT-P5110 - Android 4.2.2 / JDQ39E - CM 10.1.1 - 3.0.31 - MAKOZ10o - Radio 2.0.1700.48
// My Threads | My GitHub | My Google+
The Following 2 Users Say Thank You to Bexton For This Useful Post: [ Click to Expand ]
 
gt573
Old
#3  
Junior Member
Thanks Meter 3
Posts: 12
Join Date: Feb 2010
APK downloader 1.2.1 seemed to work just as well on google chrome 21 as your 1.3.1. Neither will download the IBM think tablet app, which is a free app. I get an error with both extensions. Any idea if there is a fix?
 
XlAfbk
Old
#4  
XlAfbk's Avatar
Senior Member
Thanks Meter 254
Posts: 1,203
Join Date: Aug 2010
Looks good, thx. Was always a bit worried about it using his server.

To everyone: I checked the code and there's no suspicious stuff in there, just what's expected to be there (a number of calls to the Market). 100% legit.
maguro (GNex), mako (N4), manta (N10), all on CM11 nightlies, faux m kernel.
The Following User Says Thank You to XlAfbk For This Useful Post: [ Click to Expand ]
 
Bexton
Old
#5  
Bexton's Avatar
Recognized Contributor - OP
Thanks Meter 1101
Posts: 608
Join Date: Sep 2011
Location: 50 56' 33" 6 57' 32"
Quote:
Originally Posted by gt573 View Post
APK downloader 1.2.1 seemed to work just as well on google chrome 21 as your 1.3.1. Neither will download the IBM think tablet app, which is a free app. I get an error with both extensions. Any idea if there is a fix?
There's a difference in the way they do not work. Original APK Downloader (v1.2.1) doesn't work at all. Mine doesn't work if there're server-side validations to be passed, such as country limitation, device limitation or screen size limitation (and of course you can download only free apps). For the IBM app there's a limit for the screen resolution. So you need to have a device registered with the same email address you use for the extension, that is compatible with the app's screen resolution minimum: A screen width of 800 pixels or more and screens classified as Xlarge. Do you match these criteria?

Google/LG Nexus 5 (32GB, Black) - Android 4.4.2 / KOT49H - Stock 3.4.0 Kernel - HHZ11k - Radio M8974-1.0.25.0.23
Google/LG Nexus 4 (16GB) - Android 4.4 / KRT16O - 3.4.67 ~AK.106.KK - MAKOZ30d - Radio 2.0.1700.97
Google/HTC Nexus One PVT ENG S-OFF - Android 4.2.2 / JDQ39 - Evervolv Perdo 3.2.0 - 2.6.38.8-evervolv-perdo-jellybean 8x50 - HBOOT-7.35.5117 (BlackRose) - Radio 5.12.00.08
Samsung Galaxy Tab 2 GT-P5110 - Android 4.2.2 / JDQ39E - CM 10.1.1 - 3.0.31 - MAKOZ10o - Radio 2.0.1700.48
// My Threads | My GitHub | My Google+
The Following User Says Thank You to Bexton For This Useful Post: [ Click to Expand ]
 
gt573
Old
#6  
Junior Member
Thanks Meter 3
Posts: 12
Join Date: Feb 2010
I just installed v1.2.1 last night and a quick test verified that it was able to download apps with my current version of google chrome (21). I only downloaded one app and it was one by the extension developer, I don't know if that makes a difference. Anyway, it wouldn't download the app I was after (IBM think) which is what brought me here. I was able to download another tablet app with your extension that the market tells me is not compatible with my device so I thought it would bypass the device and screen limitations. My device(Galaxy note sgh-i717) has 800 x 1280 resolution. It is running android 4.0.4. I changed the dpi to 160 in build.prop to match xlarge, still no go. Just for full disclosure (not asking for build.prop help here) I have tried modifying my build.prop to make my sgh-i717 appear as a Tab 10.1, but it didn't work, it still show as an sgh-i717 in the market.

Quote:
Originally Posted by Bexton View Post
There's a difference in the way they do not work. Original APK Downloader (v1.2.1) doesn't work at all. Mine doesn't work if there're server-side validations to be passed, such as country limitation, device limitation or screen size limitation (and of course you can download only free apps). For the IBM app there's a limit for the screen resolution. So you need to have a device registered with the same email address you use for the extension, that is compatible with the app's screen resolution minimum: A screen width of 800 pixels or more and screens classified as Xlarge. Do you match these criteria?
The Following User Says Thank You to gt573 For This Useful Post: [ Click to Expand ]
 
Bexton
Old
(Last edited by Bexton; 3rd August 2012 at 11:45 PM.)
#7  
Bexton's Avatar
Recognized Contributor - OP
Thanks Meter 1101
Posts: 608
Join Date: Sep 2011
Location: 50 56' 33" 6 57' 32"
Quote:
Originally Posted by gt573 View Post
I just installed v1.2.1 last night and a quick test verified that it was able to download apps with my current version of google chrome (21).
That's odd. But I checked back and according to the Manifest version 1 support schedule, the support for v1 extensions is not yet dropped - unlike I said in OP. According to the schedule the support will be dropped in "early 2013". Thus, APK Downloader v1.2.1 should still work as it did all the time; also with the latest Chrome versions. Now, to explain you why I said/thought it was:

The thing is that I used v1.2.1 almost every day and I never had problems to download Apps, except for a few that were labeled as non-compatible with my devices in the play store. (I will come back on that later..) Then, a few days ago, the extension just stopped working without me making any changes. So I opened Chrome's developer console and saw that the extension threw some content security policy errors fired by the extension's Javascript code.

Then I checked the author's website and saw a lot of recent comments by users having the same issue - that the extension just stopped working for them.

Since I've developed a few Chrome extensions myself, I remembered that the changelog between Manifest 1 and 2 includes a new content security policy and also that Manifest 1 was announced deprecated in Chrome 18.

So I checked my Chrome version and saw that it was updated just that morning (from 20.x to 21.0.1180.60 m). Hence, I thought that the exceptions, thrown by the extension, were due to the "fact" that the old content security policy, which was used before Manifest version 2, was unsupported with that Chrome-Update.

So I updated the extension's source code to use Manifest version 2. Finally, I had no more content security policy exceptions in the dev console and the downloads worked again.

And because there was no update by redphx and I've seen a lot of users had the same issue, I thought I'd share it here.

To cut a long story short:
  • I was wrong in saying that the original extension stopped as of Chrome 20+ due to missing support by Chrome.
  • However, for me v1.2.1 constantly throws content security policy exceptions in Chrome which prevent it from working at all. And as you can see from the comments on redphx's website it stopped working for others, too (whatever else the reason is..!?).
  • Also, as you can see from the schedule, v1.2.1 will stop working in the not-too-far-away future (unless redphx will release an update), whereas mine is "future-proof" (as far as it concerns Chrome).
  • Finally, my version does not include Analytics code, nor does it redirect you to a site which can not be verified to be safe (it should be, though).

Quote:
Originally Posted by gt573 View Post
I only downloaded one app and it was one by the extension developer, I don't know if that makes a difference.
No, the developer should be irrelevant.

Quote:
Originally Posted by gt573 View Post
Anyway, it wouldn't download the app I was after (IBM think) which is what brought me here. I was able to download another tablet app with your extension that the market tells me is not compatible with my device so I thought it would bypass the device and screen limitations.
Now, as I said earlier:

"I used v1.2.1 almost every day and I never had problems to download Apps, except for a few that were labeled as incompatible with my devices in the play store."

However, this was not true for all Apps that were labeled as incompatible. Some work, most do not. I'm not really sure how the checks work at this point. I know that there exist options for developers to restrict access to downloads by some "more advanced" parameters (apart from payment, obviously). And I think that the the device compatibility check for the In-App-Listings and the Play Store Website is separated from the logic that is used for those "advanced" restrictions (and no, I'm not talking about the basic country-limit here).

As another weird example take the new chameleon launcher beta. The Play Store says it would be compatible with my device. However, I can not download it. Neither through the Play Store, nor with the extension. Why not? Because, as you can read on the developer's website, your Emailaddress for Play Store must be paired with the Emailaddress that I/someone used in the developer's beta signup form that was on the website a few weeks ago. Means: eventhough it is a free App and labeled as compatible in Play Store, I can not download it because the developer needs to specifically allow my Account. As you can see, there're lots of possible and not always understandable reasons why somebody can download some apps while others can't.

Quote:
Originally Posted by gt573 View Post
My device(Galaxy note sgh-i717) has 800 x 1280 resolution. It is running android 4.0.4. I changed the dpi to 160 in build.prop to match xlarge, still no go. Just for full disclosure (not asking for build.prop help here) I have tried modifying my build.prop to make my sgh-i717 appear as a Tab 10.1, but it didn't work, it still show as an sgh-i717 in the market.
I don't think that editing the build.prop file will help with that at all. Even if I change everything in my build.prop, the Useragent that is send by the Play Store App still uses/reveals the real device info. No matter what I change, it always sends: "AndroidDownloadManager/4.1.1 (Linux; U; Android 4.1.1; Nexus One Build/JRO03H)".

Google/LG Nexus 5 (32GB, Black) - Android 4.4.2 / KOT49H - Stock 3.4.0 Kernel - HHZ11k - Radio M8974-1.0.25.0.23
Google/LG Nexus 4 (16GB) - Android 4.4 / KRT16O - 3.4.67 ~AK.106.KK - MAKOZ30d - Radio 2.0.1700.97
Google/HTC Nexus One PVT ENG S-OFF - Android 4.2.2 / JDQ39 - Evervolv Perdo 3.2.0 - 2.6.38.8-evervolv-perdo-jellybean 8x50 - HBOOT-7.35.5117 (BlackRose) - Radio 5.12.00.08
Samsung Galaxy Tab 2 GT-P5110 - Android 4.2.2 / JDQ39E - CM 10.1.1 - 3.0.31 - MAKOZ10o - Radio 2.0.1700.48
// My Threads | My GitHub | My Google+
 
prodigy7
Old
#8  
Junior Member
Thanks Meter 0
Posts: 16
Join Date: Jan 2007
Hey bexton, thank u very much for your modded extension! I installed it because I get with the previous version the "ERROR: Cannot download this app!" message but with version I get the same message:

Chrome startup parameters: --ignore-certificate-errors --allow-running-insecure-content
Chrome Version: 21.0.1180.57
OS: Linux
 
kurtcl21
Old
#9  
kurtcl21's Avatar
Junior Member
Thanks Meter 2
Posts: 16
Join Date: Oct 2010
thankz!! but not working here

Chrome version: 22.0.1219.0 (148586)

maybe disable ssl warnings don't work i don't know
 
xriderx66
Old
#10  
xriderx66's Avatar
Senior Member
Thanks Meter 1507
Posts: 6,440
Join Date: Oct 2010
Location: Frisco, TX
Works for me. Is there a way to disable this page popping up everytime I download something?
LOLWUT
Still on Stock Android? I pity you. Get on MIUI.

Tags
apk downloader
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes