com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest Java Examples

The following examples show how to use com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CheckinForm.java    From dummydroid with Apache License 2.0 6 votes vote down vote up
@Override
public void edit(FormData formData) {
	super.edit(formData);
	backwardAction.setEnabled(true);
	forwardAction.setEnabled(false);
	AndroidCheckinRequest acr = formData.assemble();

	// Don't needlessly request new GSF IDs if nothing has changed.
	String tmp = acr.toString();
	if (!tmp.equals(cached)) {
		progress.setVisible(true);
		result.setText("");
		new CheckinWorker(this, formData).execute();
		cached = tmp;
	}
}
 
Example #2
Source File: GooglePlayAPI.java    From dummydroid with Apache License 2.0 6 votes vote down vote up
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 *
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 *
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils.generateAndroidCheckinRequest()
			.toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getAndroidId()).toString(16).toUpperCase());
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken()).toString(16)));

	String c2dmAuth = loginAC2DM();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest.newBuilder(Utils
			.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth).build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
Example #3
Source File: Utils.java    From dummydroid with Apache License 2.0 6 votes vote down vote up
/**
    * Generates android checkin request with properties of "Galaxy S3".
    *
    * <a href=
    * "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system"
    * > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung
    * +GT-I9300+Galaxy+S+III&testgroup=system </a>
    */
   public static AndroidCheckinRequest generateAndroidCheckinRequest() {

return AndroidCheckinRequest
	.newBuilder()
	.setId(0)
	.setCheckin(
		AndroidCheckinProto
			.newBuilder()
			.setBuild(
				AndroidBuildProto.newBuilder()
					.setId("google/angler/angler:6.0.1/MTC19T/2741993:user/release-keys")
					.setProduct("angler").setCarrier("Google").setRadio("angler-03.61")
					.setBootloader("angler-03.51").setClient("android-google")
					.setTimestamp(new Date().getTime() / 1000).setGoogleServices(16).setDevice("angler")
					.setSdkVersion(23).setModel("angler").setManufacturer("Huawei")
					.setBuildProduct("angler").setOtaInstalled(false)).setLastCheckinMsec(0)
			.setCellOperator("310260").setSimOperator("310260").setRoaming("mobile-notroaming")
			.setUserNumber(0)).setLocale("en_US").setTimeZone("Europe/Amsterdam").setVersion(3)
	.setDeviceConfiguration(getDeviceConfigurationProto()).setFragment(0).build();
   }
 
Example #4
Source File: GooglePlayAPI.java    From raccoon4 with Apache License 2.0 6 votes vote down vote up
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 * 
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 * 
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils
			.generateAndroidCheckinRequest().toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getGsfId()).toString(
			16));
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken())
			.toString(16)));

	String c2dmAuth = loginAC2DM();
	// login();
	// String c2dmAuth= getToken();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest
			.newBuilder(Utils.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth)
			.build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
Example #5
Source File: Utils.java    From raccoon4 with Apache License 2.0 6 votes vote down vote up
/**
    * Generates android checkin request with properties of "Galaxy S3".
    * 
    * <a href=
    * "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system"
    * > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung
    * +GT-I9300+Galaxy+S+III&testgroup=system </a>
    */
   public static AndroidCheckinRequest generateAndroidCheckinRequest() {

return AndroidCheckinRequest
	.newBuilder()
	.setId(0)
	.setCheckin(
		AndroidCheckinProto
			.newBuilder()
			.setBuild(
				AndroidBuildProto.newBuilder()
					.setId("samsung/dream2ltexx/dream2lte:7.0/NRD90M/G955FXXU1AQGB:user/release-keys")
					.setProduct("dream2ltexx").setCarrier("Google").setRadio("I9300XXALF2")
					.setBootloader("PRIMELA03").setClient("android-google")
					.setTimestamp(new Date().getTime() / 1000).setGoogleServices(16).setDevice("dream2lte")
					.setSdkVersion(26).setModel("SM-G955F").setManufacturer("Samsung")
					.setBuildProduct("dream2ltexx").setOtaInstalled(false)).setLastCheckinMsec(0)
			.setCellOperator("310260").setSimOperator("310260").setRoaming("mobile-notroaming")
			.setUserNumber(0)).setLocale("en_US").setTimeZone("Europe/Berlin").setVersion(3)
	.setDeviceConfiguration(getDeviceConfigurationProto()).setFragment(0).build();
   }
 
Example #6
Source File: GooglePlayAPI.java    From Raccoon with Apache License 2.0 6 votes vote down vote up
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 * 
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 * 
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils.generateAndroidCheckinRequest()
			.toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getAndroidId()).toString(16));
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken()).toString(16)));

	String c2dmAuth = loginAC2DM();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest.newBuilder(Utils
			.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth).build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
Example #7
Source File: Utils.java    From Raccoon with Apache License 2.0 6 votes vote down vote up
/**
    * Generates android checkin request with properties of "Galaxy S3".
    * 
    * <a href=
    * "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system"
    * > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung
    * +GT-I9300+Galaxy+S+III&testgroup=system </a>
    */
   public static AndroidCheckinRequest generateAndroidCheckinRequest() {

return AndroidCheckinRequest
	.newBuilder()
	.setId(0)
	.setCheckin(
		AndroidCheckinProto
			.newBuilder()
			.setBuild(
				AndroidBuildProto.newBuilder()
					.setId("samsung/nobleltejv/noblelte:6.0.1/MMB29K/N920CXXU2BPD6:user/release-keys")
					.setProduct("noblelte").setCarrier("Google").setRadio("I9300XXALF2")
					.setBootloader("PRIMELA03").setClient("android-google")
					.setTimestamp(new Date().getTime() / 1000).setGoogleServices(16).setDevice("noblelte")
					.setSdkVersion(23).setModel("SM-N920C").setManufacturer("Samsung")
					.setBuildProduct("noblelte").setOtaInstalled(false)).setLastCheckinMsec(0)
			.setCellOperator("310260").setSimOperator("310260").setRoaming("mobile-notroaming")
			.setUserNumber(0)).setLocale("en_US").setTimeZone("Europe/Berlin").setVersion(3)
	.setDeviceConfiguration(getDeviceConfigurationProto()).setFragment(0).build();
   }
 
Example #8
Source File: FormData.java    From dummydroid with Apache License 2.0 5 votes vote down vote up
public AndroidCheckinRequest assemble() {
	getAndroidBuildProtoBuilder();
	getAndroidCheckinProtoBuilder();
	getAndroidCheckinRequestBuilder();
	return androidCheckinRequestBuilder
			.setCheckin(androidCheckinProtoBuilder.setBuild(androidBuildProtoBuilder))
			.setDeviceConfiguration(getDeviceConfigurationProtoBuilder()).setFragment(0).build();
}
 
Example #9
Source File: FormData.java    From dummydroid with Apache License 2.0 5 votes vote down vote up
/**
 * @return the androidCheckinRequestBuilder
 */
public AndroidCheckinRequest.Builder getAndroidCheckinRequestBuilder() {
	if (androidCheckinRequestBuilder == null) {
		String tz = TimeZone.getDefault().getID();
		androidCheckinRequestBuilder = AndroidCheckinRequest.newBuilder().setId(0).setVersion(3)
				.setTimeZone(tz);
	}
	return androidCheckinRequestBuilder;
}
 
Example #10
Source File: FormData.java    From dummydroid with Apache License 2.0 4 votes vote down vote up
/**
 * @param androidCheckinRequestBuilder
 *          the androidCheckinRequestBuilder to set
 */
public void setAndroidCheckinRequestBuilder(
		AndroidCheckinRequest.Builder androidCheckinRequestBuilder) {
	this.androidCheckinRequestBuilder = androidCheckinRequestBuilder;
}