works now

This commit is contained in:
5ec1cff
2024-07-11 14:53:13 +08:00
parent f0eb0f2d92
commit d55dc13e87
31 changed files with 2084 additions and 23 deletions

1
stub/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

24
stub/build.gradle.kts Normal file
View File

@@ -0,0 +1,24 @@
plugins {
alias(libs.plugins.android.library)
}
android {
namespace = "io.github.a13e300.stub"
defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
}
dependencies {
compileOnly(libs.annotation)
}

0
stub/consumer-rules.pro Normal file
View File

21
stub/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest/>

View File

@@ -0,0 +1,13 @@
package android.content.pm;
import android.os.IBinder;
public interface IPackageManager {
String[] getPackagesForUid(int uid);
class Stub {
public static IPackageManager asInterface(IBinder binder) {
throw new RuntimeException("");
}
}
}

View File

@@ -0,0 +1,19 @@
package android.os;
public class ServiceManager {
public static IBinder getService(String name) {
throw new UnsupportedOperationException("STUB!");
}
public static void addService(String name, IBinder binder) {
throw new UnsupportedOperationException("STUB!");
}
public static IBinder checkService(String name) {
throw new UnsupportedOperationException("STUB!");
}
public static String[] listServices() {
throw new UnsupportedOperationException("STUB!");
}
}

View File

@@ -0,0 +1,9 @@
package android.system.keystore2;
public interface IKeystoreService {
String DESCRIPTOR = "android.system.keystore2.IKeystoreService";
class Stub {
}
}

View File

@@ -0,0 +1,39 @@
package android.system.keystore2;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
public class KeyDescriptor implements Parcelable {
public String alias;
public byte[] blob;
public int domain = 0;
public long nspace = 0;
protected KeyDescriptor(Parcel in) {
throw new RuntimeException("");
}
public static final Creator<KeyDescriptor> CREATOR = new Creator<KeyDescriptor>() {
@Override
public KeyDescriptor createFromParcel(Parcel in) {
return new KeyDescriptor(in);
}
@Override
public KeyDescriptor[] newArray(int size) {
return new KeyDescriptor[size];
}
};
@Override
public int describeContents() {
throw new RuntimeException("");
}
@Override
public void writeToParcel(@NonNull Parcel parcel, int i) {
throw new RuntimeException("");
}
}

View File

@@ -0,0 +1,37 @@
package android.system.keystore2;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
public class KeyEntryResponse implements Parcelable {
// public IKeystoreSecurityLevel iSecurityLevel;
public KeyMetadata metadata;
protected KeyEntryResponse(Parcel in) {
throw new RuntimeException("");
}
public static final Creator<KeyEntryResponse> CREATOR = new Creator<KeyEntryResponse>() {
@Override
public KeyEntryResponse createFromParcel(Parcel in) {
throw new RuntimeException("");
}
@Override
public KeyEntryResponse[] newArray(int size) {
throw new RuntimeException("");
}
};
@Override
public int describeContents() {
throw new RuntimeException("");
}
@Override
public void writeToParcel(@NonNull Parcel parcel, int i) {
throw new RuntimeException("");
}
}

View File

@@ -0,0 +1,41 @@
package android.system.keystore2;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
public class KeyMetadata implements Parcelable {
// public Authorization[] authorizations;
public byte[] certificate;
public byte[] certificateChain;
public KeyDescriptor key;
public int keySecurityLevel = 0;
public long modificationTimeMs = 0;
protected KeyMetadata(Parcel in) {
throw new RuntimeException("");
}
public static final Creator<KeyMetadata> CREATOR = new Creator<KeyMetadata>() {
@Override
public KeyMetadata createFromParcel(Parcel in) {
throw new RuntimeException("");
}
@Override
public KeyMetadata[] newArray(int size) {
throw new RuntimeException("");
}
};
@Override
public int describeContents() {
throw new RuntimeException("");
}
@Override
public void writeToParcel(@NonNull Parcel parcel, int i) {
throw new RuntimeException("");
}
}