How to get a link to the apk in the Android Market


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
10 views
Hello!

Please tell me how to get this link market://search?q=pname:com.songbirdnest.the mediaplayer?
by | 10 views

2 Answers

0 like 0 dislike
I understand you need software download apk file. It is difficult but possible.
\r
Itself the downloading is done via a simple http request
\r$user_id = '0000000000000000';
$market_da = '0000000000000000000';
$device_id = '000000000000000000';
\r
$asset_id = '1234567';
\r
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://android.clients.google.com/market/download/Download?assetId=$asset_id&userId=$user_id&deviceId=$device_id");
\r
curl_setopt($ch, CURLOPT_COOKIE, "MarketDA=$market_da");
curl_setopt($ch, CURLOPT_USERAGENT, "AndroidDownloadManager");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Keep-Alive'));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
curl_setopt($ch, THIS, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 250);
\r
\r
$data = curl_exec($ch);
\r

\r
here asset_id is the internal ID of the entrepreneurs in the market. Variables market_da, user_id, device_id, as you can guess, identificeret user and the phone.
The only way I know to get them to do tcpdump a real phone when he shakes apk, and see what he sends.
\r
Get asset_id, you can use various unofficial API like
\rcode.google.com/p/android-market-api/ or
\rcode.google.com/p/android-market-api-php/
\r
with the API, do a search for package_name, get info about the program, including assetId (if I am not mistaken in the objects returned via the API this variable is called simply id).
\r
This method does not work for copy-protected programs (the phone shakes https and it is unclear what sends) and for programs not available in the market phone. Ie if the phone is Ukrainian, part prog in the market is not visible and for them, the script will return an error.
by
0 like 0 dislike
Find a program in the market, for example market.android.com/details?id=com.songbirdnest.mediaplayer and copy the package name com.songbirdnest.mediaplayer. Well, then substitute in your link after the pname parameter:
by

Related questions

110,608 questions
257,186 answers
0 comments
27,967 users