diff --git a/blog/2023-02-27-checkin/readme.md b/blog/2023-02-27-checkin/readme.md new file mode 100644 index 0000000..9728870 --- /dev/null +++ b/blog/2023-02-27-checkin/readme.md @@ -0,0 +1,49 @@ +# Checkin + +where do these names come from? + +~~~go +req_body := protobuf.Message{ + 4: protobuf.Message{ // checkin + 1: protobuf.Message{ // build + // sdkVersion + // multiple APK valid range 14 - 0x7FFF_FFFF + // single APK valid range 14 - 28 + 10: protobuf.Varint(28), + }, + 18: protobuf.Varint(1), // voiceCapable + }, + // version + // valid range 2 - 3 + 14: protobuf.Varint(3), + 18: protobuf.Message{ // deviceConfiguration + 1: protobuf.Varint(c.Touch_Screen), + 2: protobuf.Varint(c.Keyboard), + 3: protobuf.Varint(c.Navigation), + 4: protobuf.Varint(c.Screen_Layout), + 5: protobuf.Varint(c.Has_Hard_Keyboard), + 6: protobuf.Varint(c.Has_Five_Way_Navigation), + 7: protobuf.Varint(c.Screen_Density), + 8: protobuf.Varint(c.GL_ES_Version), + 11: protobuf.String(native_platform), + }, +} +for _, library := range c.System_Shared_Library { + // .deviceConfiguration.systemSharedLibrary + req_body.Get(18).Add_String(9, library) +} +for _, extension := range c.GL_Extension { + // .deviceConfiguration.glExtension + req_body.Get(18).Add_String(15, extension) +} +for _, name := range c.New_System_Available_Feature { + // .deviceConfiguration.newSystemAvailableFeature + req_body.Get(18).Add(26, protobuf.Message{ + 1: protobuf.String(name), + }) +} +req, err := http.NewRequest( + "POST", "https://android.googleapis.com/checkin", + bytes.NewReader(req_body.Marshal()), +) +~~~ diff --git a/blog/go.mod b/blog/go.mod deleted file mode 100644 index 9c323af..0000000 --- a/blog/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module blog - -go 1.20