Compare commits

..

No commits in common. "4211abe679ea4cd1e3e19368d2289ba777f6398b" and "a1fca9a8332cc0747d2c489e359cf97b4cb3692a" have entirely different histories.

22 changed files with 59 additions and 498 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

View File

@ -4,9 +4,10 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<list size="1">
@ -6,7 +5,7 @@
</list>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="zulu-17" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@ -11,99 +11,10 @@ android {
minSdk 21
targetSdk 34
versionCode 1
versionName "2.2.19-config-lora"
versionName "2.2.18-Y-lora"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
// buildTypes {
// release {
// minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// }
// }
signingConfigs {
config { //
keyAlias 'xy'
keyPassword '111111'
storeFile file('D:/zp/Android/GitConn/xy_keystore')
//storeFile file('/home/yzd/work/sign/xy_keystore')
storePassword '111111'
}
M {// //A7
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/XixunSoftware/ZP/conn/xixun-m.keystore')
storePassword '123456'
}
Y5a { //A9
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/zp/Android/GitConn/xixun-c.keystore')
storePassword '123456'
}
D { //A11 --+android.uid.system =
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/zp/Android/GitConn/xixun-d.keystore')
storePassword '123456'
}
D_3576 { //A11 - 3576 3566
keyAlias 'platform'
keyPassword 'youngfeel'
storeFile file('D:/zp/Android/GitConn/yf356x_android11_system.jks')
storePassword 'youngfeel'
}
Y33 { //
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/XixunSoftware/ZP/conn/xixun-x.keystore')
storePassword '123456'
}
D_3568 {//3568 //3568
keyAlias 'systemkey'
keyPassword '123456'
storeFile file('D:/zp/Android/GitConn/platform.jks')
storePassword '123456'
}
D_gt {//3568 //
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('D:/zp/Android/GitConn/platform.keystore')
storePassword 'android'
}
a133 {// a133
keyAlias 'platform'
keyPassword 'youngfeel'
storeFile file('D:/zp/Android/GitConn/android11_system.jks')
storePassword 'youngfeel'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.D
}
debug {
signingConfig signingConfigs.D
}
}
buildFeatures {
aidl true
}
@ -112,15 +23,61 @@ android {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
signingConfigs {
X {//4418
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-x.keystore')
storePassword '123456'
}
Y {//210
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-y.keystore')
storePassword '123456'
}
D_3568a {//3568a
keyAlias 'keystore'
keyPassword 'android'
storeFile file('D:/develop/xixun/signedFile/keystore/keystore.jks')
storePassword 'android'
}
D_3568N {//3568
keyAlias 'systemkey'
keyPassword '123456'
storeFile file('D:/_docs/comp/android/keystore/3568D恩泰世 123456.jks')
storePassword '123456'
}
D_YF {//3566 YF
keyAlias 'platform'
keyPassword 'youngfeel'
storeFile file('D:/_docs/comp/android/keystore/yf356x_android11_system.jks')
storePassword 'youngfeel'
}
}
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.D_3568N
}
debug {
signingConfig signingConfigs.D_3568N
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
implementation 'com.aliyun:imageaudit20191230:2.0.6'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.19'
implementation files('libs/gnph.jar')
implementation files('libs/zip4j-2.10.0.jar')
implementation files('libs/xixun_card_settings_1.2.4.jar')

View File

@ -1,102 +0,0 @@
plugins {
id 'com.android.application'
}
android {
namespace 'com.xixun.xixunplayer'
compileSdk 34
defaultConfig {
applicationId "com.xixun.xixunplayer"
minSdk 21
targetSdk 34
versionCode 1
versionName "2.2.19-Y-lora"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
aidl true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
signingConfigs {
X {//4418
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-x.keystore')
storePassword '123456'
}
Y {//210
keyAlias 'xixun'
keyPassword '123456'
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-y.keystore')
storePassword '123456'
}
D_3568a {//3568a
keyAlias 'keystore'
keyPassword 'android'
storeFile file('D:/develop/xixun/signedFile/keystore/keystore.jks')
storePassword 'android'
}
D_3568N {//3568
keyAlias 'systemkey'
keyPassword '123456'
storeFile file('D:/_docs/comp/android/keystore/3568D恩泰世 123456.jks')
storePassword '123456'
}
D_YF {//3566 YF
keyAlias 'platform'
keyPassword 'youngfeel'
storeFile file('D:/_docs/comp/android/keystore/yf356x_android11_system.jks')
storePassword 'youngfeel'
}
}
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.D_3568N
}
debug {
signingConfig signingConfigs.D_3568N
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
implementation 'com.aliyun:imageaudit20191230:2.0.6'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.19'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.19'
implementation files('libs/gnph.jar')
implementation files('libs/zip4j-2.10.0.jar')
implementation files('libs/xixun_card_settings_1.2.4.jar')
implementation files('libs/ijkplayer-java-0.8.8.aar')
implementation files('libs/ijkplayer-armv7a-0.8.8.aar')
implementation files('libs/ijkplayer-arm64-0.8.8.aar')
implementation files('libs/connService2.jar')
}
def getAppName() {
def stringsFile = android.sourceSets.main.res.sourceFiles.find { it.name.equals 'strings.xml' }
String s = new XmlParser().parse(stringsFile).string.find { it.@name.equals 'app_name' }.text();
return s.replaceAll("\"", "");
}
// Apk
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
def fileName = "${getAppName()}-${versionName}.apk"
outputFileName = fileName
}
}

View File

@ -2,9 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="android.uid.system">
<!-- android:sharedUserId="android.uid.system"-->
<!-- android:sharedUserMaxSdkVersion="32">-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

View File

@ -1,175 +0,0 @@
package com.xixun.xixunplayer;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.IBinder;
import android.util.Log;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class AidlUtil {
// static final String ACTION_CONN ="xixun.intent.action.CONNECTION_INFO";
static final String ACTION_PLAYER ="com.xixun.action.PlayerInfo";
static final String ACTION_CARD_SYSTEM ="com.xixun.joey.aidlset.SettingsService";
static final String ACTION_LIVE ="xixun.intent.action.Live";
static final String ACTION_UPDATE ="xixun.intent.action.UPDATE_APK";
static final String ACTION_JIESHUN ="com.xixun.xy.conn.JieShun";
static final String ACTION_TaxiAppServer ="com.xixun.xy.conn.aidl.TaxiAppServer";
static final String ACTION_CustomServer ="com.xixun.xy.conn.aidl.CustomService";
static final String ACTION_ConnServer ="com.xixun.xy.conn.aidl.ConnService";
static final String ACTION_AiServer ="com.sysolution.ai.AiAvatarService";
public static final String PACKAGE_PLAYER="com.xixun.xixunplayer";
public static final String PACKAGE_CARD_SYSTEM="com.xixun.joey.cardsystem";
public static final String PACKAGE_LIVE="com.xixun.xy.live";
public static final String PACKAGE_UPDATE="com.xixun.xy.update";
public static final String PACKAGE_TAXIAPP = "net.sysolution.taxiapp";
public static final String PACKAGE_CUSTOMAPP = "com.xixun.xixunledplayer";
public static final String PACKAGE_BASICAPP = "net.sysolution.basicapp";
public static final String PACKAGE_STARTER = "net.sysolution.starter";
public static final String PACKAGE_DISPLAY = "com.xixun.display";
public static final String PACKAGE_ORDER_VIDEO = "add.xixun.com.ordervideo";
public static final String PACKAGE_JIESHUN = "com.xixun.stopguide";
public static final String PACKAGE_TAXIAPP88 = "cn.trans88.taxiappkotlin";
public static final String PACKAGE_AI = "com.sysolution.ai";
public static final String PACKAGE_CONN = "com.xixun.xy.conn";
public static Intent newConnIntent(){
Intent intent = new Intent(ACTION_ConnServer);
intent.setPackage(PACKAGE_CONN);
return intent;
}
public static Intent newAiIntent(){
Intent intent = new Intent(ACTION_AiServer);
intent.setPackage(PACKAGE_AI);
return intent;
}
public static Intent newCustomIntent(){
Intent intent = new Intent(ACTION_CustomServer);
intent.setPackage(PACKAGE_CUSTOMAPP);
return intent;
}
public static Intent newTaxiAppIntent(){
Intent intent = new Intent(ACTION_TaxiAppServer);
intent.setPackage(PACKAGE_TAXIAPP);
return intent;
}
public static Intent newPlayerIntent(){
Intent intent = new Intent(ACTION_PLAYER);
intent.setPackage(PACKAGE_PLAYER);
return intent;
}
public static Intent newCardSystemIntent(){
Intent intent = new Intent(ACTION_CARD_SYSTEM);
intent.setPackage(PACKAGE_CARD_SYSTEM);
return intent;
}
public static Intent newLiveIntent(){
Intent intent = new Intent(ACTION_LIVE);
intent.setPackage(PACKAGE_LIVE);
return intent;
}
public static Intent newUpdateIntent(){
Intent intent = new Intent(ACTION_UPDATE);
intent.setPackage(PACKAGE_UPDATE);
return intent;
}
public static Intent newJieShunIntent(){
Intent intent = new Intent(ACTION_JIESHUN);
intent.setPackage(PACKAGE_JIESHUN);
return intent;
}
CountDownLatch latch = new CountDownLatch(1);
IBinder binder = null;
private Intent intent;
private Context ctx;
private int timeout;
private IBinder[] container = new IBinder[1];
private ServiceConnection conn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
binder =service;
ctx.unbindService(this);
latch.countDown();
}
@Override
public void onServiceDisconnected(ComponentName name) {
Log.i("yzd", "aidl disconnected");
}
};
public AidlUtil(Context context, Intent intent, int timeout) {
ctx = context;
this.intent =intent;
this.timeout = timeout;
}
public AidlUtil(Context context, Intent intent) {
this(context, intent, 3000);
}
static int rate =200;
public IBinder getIBinder() {
ctx.bindService(intent, conn,
Context.BIND_AUTO_CREATE);
try {
latch.await(timeout, TimeUnit.MILLISECONDS);
}catch(Exception e){
e.printStackTrace();
}
if(binder==null) {
System.out.println("AIDL通讯建立失败");
}
return binder;
}
/***
* Android L (lollipop, API 21) introduced a new problem when trying to invoke implicit intent,
* "java.lang.IllegalArgumentException: Service Intent must be explicit"
*
* If you are using an implicit intent, and know only 1 target would answer this intent,
* This method will help you turn the implicit intent into the explicit form.
*
* Inspired from SO answer: http://stackoverflow.com/a/26318757/1446466
* @param context
* @param implicitIntent - The original implicit intent
* @return Explicit Intent created from the implicit original intent
*/
public static Intent createExplicitFromImplicitIntent(Context context, Intent implicitIntent) {
// Retrieve all services that can match the given intent
PackageManager pm = context.getPackageManager();
List<ResolveInfo> resolveInfo = pm.queryIntentServices(implicitIntent, 0);
// Make sure only one match was found
if (resolveInfo == null || resolveInfo.size() != 1) {
return null;
}
// Get component info and create ComponentName
ResolveInfo serviceInfo = resolveInfo.get(0);
String packageName = serviceInfo.serviceInfo.packageName;
String className = serviceInfo.serviceInfo.name;
ComponentName component = new ComponentName(packageName, className);
// Create a new intent. Use the old one for extras and such reuse
Intent explicitIntent = new Intent(implicitIntent);
// Set the component to be explicit
explicitIntent.setComponent(component);
return explicitIntent;
}
}

View File

@ -30,8 +30,6 @@ import androidx.core.content.ContextCompat;
import com.xixun.joey.aidlset.CardService;
import com.xixun.xy.conn.aidl.ConnService;
import org.json.JSONObject;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
@ -193,7 +191,7 @@ public class MainActivity extends Activity implements Choreographer.FrameCallbac
state = 8;
}
static CardService serviCard;
CardService serviCard;
ConnService serviXy;
Intent intenCard;
ServiceConnection connCard;
@ -318,7 +316,6 @@ public class MainActivity extends Activity implements Choreographer.FrameCallbac
Util.isScreenOn = serviCard.isScreenOpen();
Util.screenWidth = serviCard.getScreenWidth();
Util.screenHeight = serviCard.getScreenHeight();
Util.println(" IsScreenOn: "+Util.isScreenOn+" screen: "+Util.screenWidth+" x "+Util.screenHeight);
backView.invalidate();
if(Util.isScreenOn) initProg();
@ -338,7 +335,6 @@ public class MainActivity extends Activity implements Choreographer.FrameCallbac
bindService(intenCard, connCard, Context.BIND_AUTO_CREATE);
services.add(connCard);
var connXy = new ServiceConnection() {
public void onServiceDisconnected(ComponentName name) {
serviXy = null;

View File

@ -7,23 +7,15 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import com.xixun.xy.conn.aidl.ConnService;
import net.lingala.zip4j.ZipFile;
import org.json.JSONObject;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.Comparator;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import gnph.util.IOs;
import gnph.util.JSList;
@ -64,36 +56,7 @@ public class MainService extends Service {
new Thread(()->{
try {
if(Util.custom == Util.Custom.LoRa) {
System.out.println("周鹏测试");
JSONObject jo = new JSONObject();
jo.put("_id","123456");
jo.put("_type","GetCardAlias");
String alias = MainActivity.serviCard.executeJsonCommand(jo.toString());
JSONObject js = new JSONObject(alias);
// 1. JSONObject 中获取待解码的原始字符串替换为你的 js.getString("alias")
String rawBase64Str = js.getString("alias");
// 2. 关键Base64 字符串预处理解决大部分格式非法问题
String processedBase64Str = preprocessBase64(rawBase64Str);
// 3. 后续正常解码使用预处理后的字符串
byte[] decodeBytes = Base64.getDecoder().decode(processedBase64Str);
String originalStr = new String(decodeBytes, StandardCharsets.UTF_8);
System.out.println("周鹏获取别名"+originalStr);
Util.downId = 0;
var ok = new AtomicBoolean(false);
if(MainActivity.ins!=null) {
var latch = new CountDownLatch(1);
MainActivity.ins.runOnUiThread(() -> {
ok.set(MainActivity.ins.delProgFile());
latch.countDown();
});
try {
latch.await();
} catch (InterruptedException ignored) {}
}
// var id = Util.getCardId();
var id = originalStr;
var id = Util.getCardId();
var dir = new File(path+"/"+id);
if(! dir.isDirectory()) {
Util.println("MEDIA_MOUNTED can't find "+id);
@ -246,34 +209,4 @@ public class MainService extends Service {
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
}
/**
* Base64 字符串预处理清洗非法内容补全合法格式
* @param rawStr 原始待解码的 Base64 字符串
* @return 符合标准 Base64 格式的预处理字符串
*/
private static String preprocessBase64(String rawStr) {
if (rawStr == null || rawStr.trim().isEmpty()) {
throw new IllegalArgumentException("待解码的 Base64 字符串不能为空");
}
// 步骤1剔除所有不可见字符空格换行制表符等
String cleanStr = rawStr.replaceAll("\\s+", "");
// 步骤2剔除 Base64 标准字符之外的非法字符仅保留 A-Za-z0-9+/=
cleanStr = cleanStr.replaceAll("[^A-Za-z0-9+/=]", "");
// 步骤3补全格式使字符串长度为 4 的整数倍不足补 =最多补 3 实际只会补 0/1/2
int remainder = cleanStr.length() % 4;
if (remainder != 0) {
int padLength = 4 - remainder;
StringBuilder sb = new StringBuilder(cleanStr);
for (int i = 0; i < padLength; i++) {
sb.append('=');
}
cleanStr = sb.toString();
}
return cleanStr;
}
}

View File

@ -3,7 +3,6 @@ package com.xixun.xixunplayer;
import static android.view.View.VISIBLE;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
@ -153,11 +152,10 @@ public class TCPThread extends Thread {
MainService.ins.startActivity(intent);
}
}
if(MainService.ins!=null) { //周鹏注释
if(MainService.ins!=null) {
var intent = new Intent("com.xixun.AccessibilityService");
intent.putExtra("newProgram", "TCP");
MainService.ins.sendBroadcast(intent);
}
}
} else if("playZipTask".equals(_type)) {

View File

@ -1,6 +1,6 @@
#Fri Aug 22 14:42:52 CST 2025
#Wed Oct 11 11:55:49 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip

Binary file not shown.