Skip to content

Commit 87f3f42

Browse files
committed
publish mod 26.10
1 parent e85c26a commit 87f3f42

2,520 files changed

Lines changed: 880590 additions & 20496 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

6 KB
Binary file not shown.

CMakeLists.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
cmake_minimum_required (VERSION 2.6)
1+
cmake_minimum_required (VERSION 2.6...4.0)
22

3-
project(mcpelauncherupdates LANGUAGES CXX)
3+
project(mcpelauncher-updates LANGUAGES CXX)
44

5-
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD 20)
66

77
find_library(log-lib log)
88

9-
add_subdirectory(libjnivm)
10-
add_subdirectory(Webserver)
11-
add_subdirectory(Google-Play-API)
12-
add_library(mcpelauncherupdates SHARED src/main.cpp)
13-
target_link_libraries(mcpelauncherupdates PUBLIC jnivm gplayapi ${log-lib})
9+
set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
10+
set(protobuf_BUILD_CONFORMANCE OFF CACHE BOOL "" FORCE)
11+
set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
12+
set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "" FORCE)
13+
set(protobuf_BUILD_LIBPROTOC OFF CACHE BOOL "" FORCE)
14+
set(protobuf_DISABLE_RTTI ON CACHE BOOL "" FORCE)
15+
add_subdirectory(protobuf)
16+
add_subdirectory(google-play-api)
17+
add_library(mcpelauncher-updates SHARED src/main.cpp)
18+
target_compile_definitions(mcpelauncher-updates PRIVATE ENABLE_VALIDATION)
19+
target_link_libraries(mcpelauncher-updates PUBLIC libprotobuf gplayapi)

Google-Play-API/CMakeLists.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.5...4.0.0)
22
project(gplaydl)
33

4-
set(CMAKE_CXX_STANDARD 11)
4+
# protobuf now requires c++17
5+
set(CMAKE_CXX_STANDARD 17)
6+
7+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
58

69
find_package(Threads REQUIRED)
710
find_package(ZLIB REQUIRED)
8-
find_package(Protobuf REQUIRED)
9-
10-
if (NOT DEFINED Protobuf_LIBRARIES)
11-
set(Protobuf_LIBRARIES ${PROTOBUF_LIBRARIES})
12-
set(Protobuf_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS})
13-
endif()
11+
#find_package(CURL REQUIRED)
12+
find_package(Protobuf)
1413

1514
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS proto/gsf.proto proto/play_common.proto proto/play_document.proto proto/play_respone.proto proto/play_settings.proto proto/play_toc.proto proto/play_download.proto proto/play_filter_rules.proto proto/play_ownership.proto proto/play_containers.proto proto/play_link.proto proto/play_device_config.proto proto/play_search.proto proto/play_browse.proto proto/play_details.proto)
1615

1716
set(LIB_UTIL_SOURCE_FILES lib/playapi/util/http.cpp include/playapi/util/http.h lib/playapi/util/config.cpp include/playapi/util/config.h lib/playapi/util/rand.cpp include/playapi/util/rand.h lib/playapi/util/base64.cpp include/playapi/util/base64.h)
1817
set(LIB_SOURCE_FILES lib/playapi/login.cpp include/playapi/login.h lib/playapi/device_info.cpp include/playapi/device_info.h lib/playapi/checkin.cpp include/playapi/checkin.h include/playapi/api.h lib/playapi/api.cpp lib/playapi/experiments.cpp include/playapi/experiments.h include/playapi/login_cache.h include/playapi/file_login_cache.h lib/playapi/file_login_cache.cpp include/playapi/task.h include/playapi/http_task.h)
1918
add_library(gplayapi STATIC ${LIB_SOURCE_FILES} ${LIB_UTIL_SOURCE_FILES} ${PROTO_SRCS})
20-
target_link_libraries(gplayapi ${ZLIB_LIBRARIES} ${Protobuf_LIBRARIES} Net)
21-
target_include_directories(gplayapi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${ZLIB_INCLUDE_DIRS} ${Protobuf_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
19+
target_link_libraries(gplayapi libprotobuf Threads::Threads)
20+
if (ABSEIL)
21+
target_link_libraries(gplayapi absl::log_internal_check_op)
22+
endif()
23+
target_include_directories(gplayapi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/../include ${CMAKE_CURRENT_BINARY_DIR})
2224

23-
add_executable(gplaydl src/gplaydl.cpp src/common.cpp src/config.cpp src/config.h)
24-
target_link_libraries(gplaydl gplayapi)
25-
target_include_directories(gplaydl PUBLIC ${ZLIB_INCLUDE_DIRS})
25+
# add_executable(gplaydl src/gplaydl.cpp src/common.cpp src/config.cpp src/config.h)
26+
# target_link_libraries(gplaydl gplayapi)
27+
# #target_include_directories(gplaydl PUBLIC ${CURL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
2628

27-
add_executable(gplayver src/gplayver.cpp src/common.cpp src/config.cpp src/config.h)
28-
target_link_libraries(gplayver gplayapi)
29-
target_include_directories(gplayver PUBLIC ${ZLIB_INCLUDE_DIRS})
29+
# add_executable(gplayver src/gplayver.cpp src/common.cpp src/config.cpp src/config.h)
30+
# target_link_libraries(gplayver gplayapi)
31+
#target_include_directories(gplayver PUBLIC ${CURL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})

Google-Play-API/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# google-play-api
2+
3+
## Features
4+
- gplayver Query play store apk version code
5+
- gplaydl Download play store apk
6+
7+
## Usage
8+
9+
### Device Configs
10+
11+
By default the x86 32bit apk is downloaded. Use a `device.conf` to change device properties.
12+
```
13+
config.native_platforms = [
14+
armeabi-v7a
15+
]
16+
```
17+
```
18+
config.native_platforms = [
19+
arm64-v8a
20+
]
21+
```
22+
```
23+
config.native_platforms = [
24+
x86
25+
]
26+
```
27+
```
28+
config.native_platforms = [
29+
x86_64
30+
]
31+
```
32+
33+
### Authenticate
34+
35+
- Build https://github.com/minecraft-linux/playdl-signin-ui-qt then run it to login.
36+
- playdl-signin-ui-qt
37+
- ```
38+
gplaydl --interactive --device device.conf --save-auth --accept-tos
39+
We haven't authorized you yet. Please select your preferred login method:
40+
1. via login and password
41+
2. via access token
42+
3. via master token
43+
Please type the selected number and press enter: 2
44+
Please enter your access token: oauth2_4/...
45+
```
46+
47+
### gplayver
48+
49+
```shell
50+
gplayver --device device.conf --app com.mojang.minecraftpe --accept-tos
51+
```
52+
53+
### gplaydl
54+
55+
```shell
56+
gplaydl --device device.conf --app com.mojang.minecraftpe --accept-tos
57+
```

Google-Play-API/include/playapi/device_info.h

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,33 @@ struct device_info {
5454
std::string build_bootloader = "unknown";
5555
std::string build_client = "android-google";
5656
long long build_timestamp = 1480546800;
57-
int build_google_services = 10084470;
57+
int build_google_services = 251333035;
58+
int vending_version = 84582130;
59+
std::string vending_version_string = "45.8.21-31 [0] [PR] 747433787";
5860
std::string build_device = "D001";
59-
int build_sdk_version = 23;
61+
int build_sdk_version = 36;
6062
std::string build_version_string = "6.0.1";
6163
std::string build_model = "DIY_D001";
6264
std::string build_manufacturer = "diy";
6365
std::string build_build_product = "desktop";
6466
bool build_ota_installed = false;
6567
std::vector<std::pair<std::string, int>> build_google_packages;
66-
std::string build_security_patch = "2019-01-05";
68+
std::string build_security_patch = "";
6769

6870
device_touch_screen config_touch_screen = device_touch_screen::finger;
6971
device_keyboard config_keyboard = device_keyboard::qwerty;
7072
device_navigation config_navigation = device_navigation::nonav;
7173
device_screen_layout config_screen_layout = device_screen_layout::xlarge;
7274
bool config_has_hard_keyboard = false;
7375
bool config_has_five_way_navig = false;
74-
int config_screen_density = 120;
75-
int config_gles_version = 0x30000;
76-
std::vector<std::string> config_system_shared_libraries = {"android.test.runner",
77-
"com.android.future.usb.accessory",
78-
"com.android.location.provider",
79-
"com.google.android.gms", "javax.obex",
80-
"org.apache.http.legacy"};
76+
int config_screen_density = 420;
77+
int config_gles_version = 0x30002;
78+
std::vector<std::string> config_system_shared_libraries = {"android.test.base", "android.test.mock", "com.vzw.apnlib", "android.hidl.manager-V1.0-java", "com.android.hotwordenrollment.common.util", "com.google.pixel.camera.services.cameraidremapper", "google-ril", "libedgetpu_client.google.so", "libOpenCL.so", "libedgetpu_util.so", "android.telephony.satellite", "com.google.android.camera.experimental2024_system", "com.google.pixel.camera.connectivity", "com.android.omadm.radioconfig", "android.hidl.base-V1.0-java", "com.google.pixel.camera.services.lyricconfigprovider", "lib_jpg_encoder.so", "com.google.android.camera.experimental2024", "libOpenCL-pixel.so", "com.android.location.provider", "androidx.window.extensions", "libedgetpu_dba.google.so", "com.google.pixel.camera.connectivity.impl", "oemrilhook", "com.google.pixel.camera.services.cameraidremapper.impl", "android.net.ipsec.ike", "com.android.future.usb.accessory", "com.google.pixel.camera.services.lyricconfigprovider.impl", "androidx.camera.extensions.impl", "android.ext.shared", "javax.obex", "com.google.android.gms", "lib_aion_buffer.so", "libgxp.so", "libedgetpu_tachyon.google.so", "android.test.runner", "com.google.android.dialer.support", "org.apache.http.legacy", "com.google.android.camera.extensions", "com.google.android.hardwareinfo", "com.android.cts.ctsshim.shared_library", "com.android.nfc_extras", "com.android.media.remotedisplay", "com.google.android.camerax.extensions", "com.android.mediadrm.signer", "androidx.window.sidecar"};
8179
std::vector<std::pair<std::string, int>> config_system_features; // this will be initialized in the constructor
8280
std::vector<std::string> config_native_platforms = {"x86", "armeabi-x7a", "armeabi"};
83-
int config_screen_width = 1920;
84-
int config_screen_height = 1080;
85-
std::vector<std::string> config_system_supported_locales = {"en", "en-US"};
81+
int config_screen_width = 1080;
82+
int config_screen_height = 2424;
83+
std::vector<std::string> config_system_supported_locales = {"af", "af_ZA", "am", "am_ET", "ar", "ar_EG", "ar_XB", "as", "ast", "az", "be", "bg", "bg_BG", "bn", "bs", "ca", "ca_ES", "cs", "cs_CZ", "da", "da_DK", "de", "de_DE", "el", "el_GR", "en", "en_AU", "en_CA", "en_GB", "en_IN", "en_US", "en_XA", "en_XC", "eo", "es", "es_419", "es_ES", "es_US", "et", "et_EE", "eu", "fa", "fa_IR", "fi", "fi_FI", "fil", "fil_PH", "fr", "fr_CA", "fr_FR", "gl", "gu", "he", "hi", "hi_IN", "hr", "hr_HR", "hu", "hu_HU", "hy", "ia", "in", "in_ID", "is", "it", "it_IT", "iw", "iw_IL", "ja", "ja_JP", "ka", "kk", "km", "kmr", "kn", "ko", "ko_KR", "ky", "lo", "lt", "lt_LT", "lv", "lv_LV", "mk", "ml", "mn", "mr", "ms", "ms_MY", "my", "nb", "nb_NO", "ne", "nl", "nl_NL", "or", "pa", "pl", "pl_PL", "pt", "pt_BR", "pt_PT", "ro", "ro_RO", "ru", "ru_RU", "sc", "si", "sk", "sk_SK", "sl", "sl_SI", "so", "sq", "sr", "sr_Latn", "sr_RS", "sv", "sv_SE", "sw", "sw_TZ", "ta", "te", "th", "th_TH", "tr", "tr_TR", "uk", "uk_UA", "ur", "uz", "vi", "vi_VN", "yue", "zh_CN", "zh_HK", "zh_TW", "zu", "zu_ZA"};
8684
std::vector<std::string> config_gl_extensions;
8785
int config_smallest_screen_width_dp = 1080;
8886
bool config_low_ram = false;

Google-Play-API/include/playapi/http_task.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class http_task : public task<http_response> {
1919

2020
void call(std::function<void (http_response&&)> success, std::function<void (std::exception_ptr)> error) override {
2121
req.perform([success, error](http_response resp) {
22-
try {
22+
// try {
2323
success(std::move(resp));
24-
} catch (std::exception& e) {
25-
error(std::current_exception());
26-
}
24+
// } catch (std::exception& e) {
25+
// error(std::current_exception());
26+
// }
2727
}, error);
2828
}
2929

Google-Play-API/include/playapi/task.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ class function_task<void, Args...> : public task<void, Args...> {
9898
}
9999

100100
void call(Args&&... args, std::function<void ()> success, std::function<void (std::exception_ptr)> error) override {
101-
try {
101+
// try {
102102
func(std::forward<Args...>(args)...);
103103
success();
104-
} catch (std::exception& e) {
105-
error(std::current_exception());
106-
}
104+
// } catch (std::exception& e) {
105+
// error(std::current_exception());
106+
// }
107107
}
108108

109109
void call(Args&&... args) override {
@@ -127,11 +127,11 @@ class function_task : public task<T, Args...> {
127127
}
128128

129129
void call(Args&&... args, std::function<void (T&&)> success, std::function<void (std::exception_ptr)> error) override {
130-
try {
130+
// try {
131131
success(func(std::forward<Args...>(args)...));
132-
} catch (std::exception& e) {
133-
error(std::current_exception());
134-
}
132+
// } catch (std::exception& e) {
133+
// error(std::current_exception());
134+
// }
135135
}
136136

137137
T call(Args&&... args) override {
@@ -156,14 +156,14 @@ class flat_function_task : public task<T, Args...> {
156156

157157
void call(Args&&... args, std::function<void (T&&)> success, std::function<void (std::exception_ptr)> error) override {
158158
task_ptr<T> ret;
159-
try {
159+
// try {
160160
ret = func(std::forward<Args...>(args)...);
161161
if (!ret)
162-
throw std::runtime_error("flat_function_task's function must return a valid pointer");
163-
} catch (std::exception& e) {
164-
error(std::current_exception());
165-
return;
166-
}
162+
{} // throw std::runtime_error("flat_function_task's function must return a valid pointer");
163+
// } catch (std::exception& e) {
164+
// error(std::current_exception());
165+
// return;
166+
// }
167167
ret->call(success, error);
168168
}
169169

Google-Play-API/lib/playapi/api.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ void api::set_checkin_data(const checkin_result& result) {
3737

3838
std::string api::build_user_agent() {
3939
std::stringstream ua;
40-
ua << "Android-Finsky/14.2.63-all [0] [PR] 240807813 (api=3,versionCode=81426300,";
40+
ua << "Android-Finsky/" << device.vending_version_string << " (api=3,";
41+
ua << "versionCode=" << device.vending_version << ",";
4142
ua << "sdk=" << device.build_sdk_version << ",";
4243
ua << "device=" << device.build_device << ",";
4344
ua << "hardware=" << device.build_product << ",";
@@ -94,15 +95,15 @@ api::request_task api::send_request(http_method method, const std::string& path,
9495
req.set_body(bin_data);
9596
return http_task::make(req)->then<ret_type>([this, method, path, bin_data, options](http_response&& resp) {
9697
if (!resp)
97-
throw std::runtime_error("Failed to send request");
98+
{} // throw std::runtime_error("Failed to send request");
9899
if (resp.get_status_code() == 401) {
99100
return invalidate_token()->then<ret_type>([this, method, path, bin_data, options]() {
100101
return send_request(method, path, bin_data, options);
101102
});
102103
}
103104
ret_type ret;
104105
if (!ret.ParseFromString(resp.get_body()))
105-
throw std::runtime_error("Failed to parse response");
106+
{} // throw std::runtime_error("Failed to parse response");
106107
#ifndef NDEBUG
107108
printf("api response body = %s\n", ret.DebugString().c_str());
108109
#endif

Google-Play-API/lib/playapi/checkin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ task_ptr<checkin_result> checkin_api::perform_checkin(const checkin_result& last
140140

141141
return http_task::make(http)->then<checkin_result>([](http_response&& http_resp) {
142142
if (!http_resp)
143-
throw std::runtime_error("Failed to send checkin");
143+
{} // throw std::runtime_error("Failed to send checkin");
144144

145145
proto::gsf::AndroidCheckinResponse resp;
146146
if (!resp.ParseFromString(http_resp.get_body()))
147-
throw std::runtime_error("Failed to parse checkin");
147+
{} // throw std::runtime_error("Failed to parse checkin");
148148
#ifndef NDEBUG
149149
printf("Checkin response: %s\n", resp.DebugString().c_str());
150150
#endif

0 commit comments

Comments
 (0)