Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit device and device ID #3977

Closed
bash0r666 opened this issue Aug 15, 2016 · 10 comments
Closed

Edit device and device ID #3977

bash0r666 opened this issue Aug 15, 2016 · 10 comments

Comments

@bash0r666
Copy link

bash0r666 commented Aug 15, 2016

Can we set the device and/or device ID?

Is there a possibility to add a config for emulating the bot as your own android/iOS device?
the request of the bot are easy detectable cause everyone use the same fingerprint

@AcorpBG
Copy link
Contributor

AcorpBG commented Aug 15, 2016

you can edit the src/pgoapi/pgoapi to change deviceID but unless you know what you are doing I don't suggest it. I set my device to samsung and got that account banned. So I suggest you either mimick iPhone or not change it at all. Since android send alot more GPS info to niantic like how many satelites sensor see and so on.

@kesfaw
Copy link

kesfaw commented Aug 15, 2016

Default bot setting tells server that its device name is 'device_manufacturer'. I guess here is one of reasons they know we use a robot.

@fosspill
Copy link

Oh wow, that really needs to be changed.

@MZorzy
Copy link

MZorzy commented Aug 15, 2016

Link to git file where default deviceid is stored ?

@subzerofun
Copy link

@AcorpBG @bash0r666 do you know how to extract the device infos from an iphone? i have only seen android examples. tried to search on google, didn´t find a lead to get all the fields...

which file would i need to edit to put this infos in? are the default vaues always set for android?
how can i mimick an iphone?

i just found this in Signature.proto:

   message DeviceInfo {
        string device_id = 1; // Hex string
        string android_board_name = 2;
        string android_bootloader = 3;
        string device_brand = 4; // On Android: product.brand
        string device_model = 5; // On Android: product.device
        string device_model_identifier = 6; // Android only, build.display.id
        string device_model_boot = 7;  // On Android: boot.hardware
        string hardware_manufacturer = 8; // On Android: product.manufacturer
        string hardware_model = 9;  // On Android: product.model
        string firmware_brand = 10; // On Android: product.name, on iOS: "iPhone OS"
        string firmware_tags = 12; // Android only, build.tags
        string firmware_type = 13; // On Android: build.type, on iOS instead: iOS version
        string firmware_fingerprint = 14; // Android only, build.fingerprint
    }

another question :-). in
/PokemonGO-Bot/lib/python2.7(or 3.5)/site-packages/gpsoauth/__init__.py

i found two lines that are hardcoded for us / lang=en – does this mean every bot sends these infos?

line 28: service='ac2dm', device_country='us', operatorCountry='us',
line 70: device_country='us', operatorCountry='us', lang='en', sdk_version=17):

shouldn´t there be an option in the config file where we can put in all the device values? does the country info mentioned above also get send to the niantic servers?

hope that´s not too much for one message 😁

@Tych0n
Copy link

Tych0n commented Aug 15, 2016

We need some help here, may be @kesfaw or @douglascamata knows or could link to people, who can help.

@AcorpBG
Copy link
Contributor

AcorpBG commented Aug 15, 2016

Signature.proto is the structure of the signature that is used actual values are in Signature_pb2.py

('\n\x0fSignature.proto\"\xf6\r\n\tSignature\x12\x1d\n\x15timestamp_since_start\x18\x02 \x01(\x04\x12,\n\x0clocation_fix\x18\x04 \x03(\x0b\x32\x16.Signature.LocationFix\x12+\n\x08gps_info\x18\x05 \x01(\x0b\x32\x19.Signature.AndroidGpsInfo\x12*\n\x0bsensor_info\x18\x07 \x01(\x0b\x32\x15.Signature.SensorInfo\x12*\n\x0b\x64\x65vice_info\x18\x08 \x01(\x0b\x32\x15.Signature.DeviceInfo\x12\x32\n\x0f\x61\x63tivity_status\x18\t \x01(\x0b\x32\x19.Signature.ActivityStatus\x12\x16\n\x0elocation_hash1\x18\n \x01(\r\x12\x16\n\x0elocation_hash2\x18\x14 \x01(\r\x12\r\n\x05unk22\x18\x16 \x01(\x0c\x12\x11\n\ttimestamp\x18\x17 \x01(\x04\x12\x14\n\x0crequest_hash\x18\x18 \x03(\x04\x1a\xec\x01\n\x0bLocationFix\x12\x10\n\x08provider\x18\x01 \x01(\t\x12\x1d\n\x15timestamp_since_start\x18\x02 \x01(\x04\x12\x10\n\x08latitude\x18\r \x01(\x02\x12\x11\n\tlongitude\x18\x0e \x01(\x02\x12\x1b\n\x13horizontal_accuracy\x18\x14 \x01(\x02\x12\x10\n\x08\x61ltitude\x18\x15 \x01(\x02\x12\x19\n\x11vertical_accuracy\x18\x16 \x01(\x02\x12\x17\n\x0fprovider_status\x18\x1a \x01(\x04\x12\r\n\x05\x66loor\x18\x1b \x01(\r\x12\x15\n\rlocation_type\x18\x1c \x01(\x04\x1a\xaf\x01\n\x0e\x41ndroidGpsInfo\x12\x13\n\x0btime_to_fix\x18\x01 \x01(\x04\x12\x16\n\x0esatellites_prn\x18\x02 \x03(\x05\x12\x0b\n\x03snr\x18\x03 \x03(\x02\x12\x0f\n\x07\x61zimuth\x18\x04 \x03(\x02\x12\x11\n\televation\x18\x05 \x03(\x02\x12\x13\n\x0bhas_almanac\x18\x06 \x03(\x08\x12\x15\n\rhas_ephemeris\x18\x07 \x03(\x08\x12\x13\n\x0bused_in_fix\x18\x08 \x03(\x08\x1a\xbe\x03\n\nSensorInfo\x12\x1a\n\x12timestamp_snapshot\x18\x01 \x01(\x04\x12\x16\n\x0emagnetometer_x\x18\x03 \x01(\x01\x12\x16\n\x0emagnetometer_y\x18\x04 \x01(\x01\x12\x16\n\x0emagnetometer_z\x18\x05 \x01(\x01\x12\x1a\n\x12\x61ngle_normalized_x\x18\x06 \x01(\x01\x12\x1a\n\x12\x61ngle_normalized_y\x18\x07 \x01(\x01\x12\x1a\n\x12\x61ngle_normalized_z\x18\x08 \x01(\x01\x12\x13\n\x0b\x61\x63\x63\x65l_raw_x\x18\n \x01(\x01\x12\x13\n\x0b\x61\x63\x63\x65l_raw_y\x18\x0b \x01(\x01\x12\x13\n\x0b\x61\x63\x63\x65l_raw_z\x18\x0c \x01(\x01\x12\x17\n\x0fgyroscope_raw_x\x18\r \x01(\x01\x12\x17\n\x0fgyroscope_raw_y\x18\x0e \x01(\x01\x12\x17\n\x0fgyroscope_raw_z\x18\x0f \x01(\x01\x12\x1a\n\x12\x61\x63\x63\x65l_normalized_x\x18\x10 \x01(\x01\x12\x1a\n\x12\x61\x63\x63\x65l_normalized_y\x18\x11 \x01(\x01\x12\x1a\n\x12\x61\x63\x63\x65l_normalized_z\x18\x12 \x01(\x01\x12\x1a\n\x12\x61\x63\x63\x65lerometer_axes\x18\x13 \x01(\x04\x1a\xda\x02\n\nDeviceInfo\x12\x11\n\tdevice_id\x18\x01 \x01(\t\x12\x1a\n\x12\x61ndroid_board_name\x18\x02 \x01(\t\x12\x1a\n\x12\x61ndroid_bootloader\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x65vice_brand\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12\x1f\n\x17\x64\x65vice_model_identifier\x18\x06 \x01(\t\x12\x19\n\x11\x64\x65vice_model_boot\x18\x07 \x01(\t\x12\x1d\n\x15hardware_manufacturer\x18\x08 \x01(\t\x12\x16\n\x0ehardware_model\x18\t \x01(\t\x12\x16\n\x0e\x66irmware_brand\x18\n \x01(\t\x12\x15\n\rfirmware_tags\x18\x0c \x01(\t\x12\x15\n\rfirmware_type\x18\r \x01(\t\x12\x1c\n\x14\x66irmware_fingerprint\x18\x0e \x01(\t\x1a\xbb\x01\n\x0e\x41\x63tivityStatus\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x16\n\x0eunknown_status\x18\x02 \x01(\x08\x12\x0f\n\x07walking\x18\x03 \x01(\x08\x12\x0f\n\x07running\x18\x04 \x01(\x08\x12\x12\n\nstationary\x18\x05 \x01(\x08\x12\x12\n\nautomotive\x18\x06 \x01(\x08\x12\x0f\n\x07tilting\x18\x07 \x01(\x08\x12\x0f\n\x07\x63ycling\x18\x08 \x01(\x08\x12\x0e\n\x06status\x18\t \x01(\x0c\x62\x06proto3')

The dynamic fields for the signature like time/locationhashesh and unknown 22 are set in the rpc_api.py

I have no idea about iPhones at all and most of the signature is very confusing for me I wish I could help more.

@vosk
Copy link

vosk commented Aug 16, 2016

I think the api targets mimicing iphones because the android gps fields can be omitted then.

@subzerofun
Copy link

subzerofun commented Aug 16, 2016

OK just thought that it would be great if i could somehow extract all the device info values from my iphone and edit the relevant files so that when i´m switching to real app play the values from the phone and bot match as closely as possible.

@AcorpBG Is there some dev from the pogobot team who has experience on how to get device values from a specific phone and how to copy them to the relevant files? An option for customizing the values and an example in the config files would be great!

I´m trying to wrap my head around understanding the Signature_pb2.py file, but there is so much stuff going on in there...

Under _SIGNATURE_DEVICEINFO most of the values are coded with "android_(...)" strings. And the parts with _descriptor.FieldDescriptor only contain numbers (like number=1, type=9, cpp_type=9, label=1). So i guess this numbers are references to strings in another file – please correct me if i´m wrong 😕

Unfortunately i can´t really understand what (and where) the actual strings for e.g. Signature.DeviceInfo.device_id are. Shouldn´t they be stored as a string somewhere? I thought that the string for 'Signature.DeviceInfo.hardware_manufacturer' has to be stored somewhere as "Apple" or "Samsung", etc.
Sorry if i sound like an total amateur, i´m not that familiar with the API to understand how this values are generated (AND where they are stored AND how they get passed to other functions 😄 ).

@vosk Do you know what file(s) i should look at to get an idea about the way the api mimicks an iphone? I just saw all the Android descriptors/signatures.

If i repeat the same words too often please keep in mind that english is not my first language :-)

@jrjhealey
Copy link

Is this still required/wanted? This is the least recently updated thread and is 17 days old.

@TheSavior any thoughts on this implementation?

@k4n30 k4n30 closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants