Skip to content

Commit

Permalink
merge: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
std-microblock committed Sep 16, 2023
2 parents dd23dfb + 7280194 commit 7f620b9
Show file tree
Hide file tree
Showing 87 changed files with 3,944 additions and 1,103 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
CCACHE_BASEDIR: "${{ github.workspace }}"

steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: 'recursive'
fetch-depth: 0
Expand All @@ -40,7 +40,7 @@ jobs:
ccache -o compiler_check='%compiler% -dumpmachine; %compiler% -dumpversion'
ccache -zp
- name: Cache Native Build
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: |
~/.cache/ccache
Expand All @@ -55,7 +55,7 @@ jobs:
echo "sdk.dir=${ANDROID_HOME}" > local.properties
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.7.1
uses: gradle/gradle-build-action@v2.8.0

- name: Build with Gradle
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/push_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }} && success() && github.ref == 'refs/heads/main' }}

steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: 'recursive'
fetch-depth: 0
Expand All @@ -45,7 +45,7 @@ jobs:
ccache -o compiler_check='%compiler% -dumpmachine; %compiler% -dumpversion'
ccache -zp
- name: Cache Native Build
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: |
~/.cache/ccache
Expand All @@ -55,7 +55,7 @@ jobs:
restore-keys: native-cache-

- name: Setup Gradle
uses: gradle/gradle-build-action@v2.7.1
uses: gradle/gradle-build-action@v2.8.0

- name: Build with Gradle
run: |
Expand Down Expand Up @@ -177,14 +177,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Clone Telegram Bot API
run: |
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
git status telegram-bot-api >> telegram-bot-api-status
- name: Cache Bot API Binary
id: cache-bot-api
uses: actions/cache@v3.3.1
uses: actions/cache@v3.3.2
with:
path: telegram-bot-api-binary
key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.10...3.27)
project(qauxv)

find_library(ANDROID_LIBS log)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/cc/hicore/Env.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

package cc.hicore;

import cc.ioctl.util.HostInfo;

public class Env {
public static String app_save_path = "/sdcard/Android/data/com.tencent.mobileqq/files/.tool/";
public static String app_save_path = "/sdcard/Android/data/" + HostInfo.getPackageName() + "/files/.tool/";
}
18 changes: 8 additions & 10 deletions app/src/main/java/cc/hicore/QApp/QAppUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@

package cc.hicore.QApp;

import cc.hicore.ReflectUtil.MClass;
import cc.hicore.ReflectUtil.MMethod;
import cc.hicore.ReflectUtil.XClass;
import cc.hicore.ReflectUtil.XMethod;
import io.github.qauxv.util.Initiator;

public class QAppUtils {
public static long getServiceTime(){
try {
return MMethod.CallStaticMethod(MClass.loadClass("com.tencent.mobileqq.msf.core.NetConnInfoCenter"),"getServerTimeMillis",long.class);
return XMethod.clz("com.tencent.mobileqq.msf.core.NetConnInfoCenter").name("getServerTimeMillis").ret(long.class).invoke();
} catch (Exception e) {
return 0;
}
}
public static String UserUinToPeerID(String UserUin){
try {
Object convertHelper = MClass.NewInstance(MClass.loadClass("com.tencent.qqnt.kernel.api.impl.UixConvertAdapterApiImpl"));
return MMethod.CallMethod(convertHelper,"getUidFromUin",String.class,new Class[]{long.class},Long.parseLong(UserUin));
Object convertHelper = XClass.newInstance(Initiator.loadClass("com.tencent.qqnt.kernel.api.impl.UixConvertAdapterApiImpl"));
return XMethod.obj(convertHelper).name("getUidFromUin").ret(String.class).param(long.class).invoke(Long.parseLong(UserUin));
}catch (Exception e){
return "";
}
Expand All @@ -52,15 +52,13 @@ public static boolean isQQnt(){
public static String getCurrentUin(){
try {
Object AppRuntime = getAppRuntime();
return MMethod.CallMethodNoParam(AppRuntime, "getCurrentAccountUin", String.class);
return XMethod.obj(AppRuntime).name("getCurrentAccountUin").ret(String.class).invoke();
} catch (Exception e) {
return "";
}
}
public static Object getAppRuntime() throws Exception {
Object sApplication = MMethod.CallStaticMethod(MClass.loadClass("com.tencent.common.app.BaseApplicationImpl"),
"getApplication", MClass.loadClass("com.tencent.common.app.BaseApplicationImpl"));

return MMethod.CallMethodNoParam(sApplication, "getRuntime", MClass.loadClass("mqq.app.AppRuntime"));
Object sApplication = XMethod.clz("com.tencent.common.app.BaseApplicationImpl").name("getApplication").ret(Initiator.load("com.tencent.common.app.BaseApplicationImpl")).invoke();
return XMethod.obj(sApplication).name("getRuntime").ret(Initiator.loadClass("mqq.app.AppRuntime")).invoke();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package cc.hicore.QQDecodeUtils;

import android.os.Environment;
import cc.ioctl.util.HostInfo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
Expand All @@ -40,9 +41,9 @@ private static int conVertToInt(byte[] b){
private static final byte[] GIFMask = {0,1,0,1};
public static String decodeGifForLocalPath(int dwTabID,byte[] sbufID){
try{
String path = Environment.getExternalStorageDirectory()+"/Android/data/com.tencent.mobileqq/Tencent/MobileQQ/.emotionsm/"+dwTabID+"/"
String path = Environment.getExternalStorageDirectory()+"/Android/data/" + HostInfo.getPackageName() + "/Tencent/MobileQQ/.emotionsm/"+dwTabID+"/"
+bytesToHex(sbufID);
String cachePath = Environment.getExternalStorageDirectory()+"/Android/data/com.tencent.mobileqq/cache/" +bytesToHex(sbufID);
String cachePath = Environment.getExternalStorageDirectory()+"/Android/data/" + HostInfo.getPackageName() + "/cache/" +bytesToHex(sbufID);
decodeGif(path,cachePath);
return cachePath;
}catch (Exception e){
Expand Down
133 changes: 0 additions & 133 deletions app/src/main/java/cc/hicore/ReflectUtil/MClass.java

This file was deleted.

Loading

0 comments on commit 7f620b9

Please sign in to comment.