[原创]一方免注册服务的ipc进程通讯方法

2024-05-04 10:48

本文主要是介绍[原创]一方免注册服务的ipc进程通讯方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这种场景很多,只是你想不到,如果你逆向一个程序,需要在这个程序里面植入一个交互功能,

或者 你希望你的软件能够调用QQ,那么你机器人软件自身声明了服务,那么QQ没有这样的服务,怎么办。

那么 在机器人软件上声明aidl文件

// GeneralBinder .aidl
package cn.qssq666;interface GeneralBinder {void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,double aDouble, String aString);void clearCallBack( );boolean isTaskRunning();void stopRunningTask();String queryConfig1(int flag,int what,in String[] arg);String queryConfig2(int flag,int what,in String[] arg);String queryConfig3(int flag,int what,in String[] arg);boolean queryEnable1(int flag,int what,in String[] arg);boolean queryEnable2(int flag,int what,in String[] arg);boolean queryEnable3(int flag,int what,in String[] arg);List queryData(int action,boolean flag1,String flag2);List queryDataStr(int action,boolean flag1,in String[] flag);Map queryMapData(int action,boolean flag1,String flag2);String queryDataByMap(int flag,int what,in String[] arg,in int[] intarg,in Map map);Map queryData2Map(int flag,int what,in String[] arg,in int[] intarg);List queryData2List(int flag,int what,in String[] arg,in int[] intarg,in boolean[] boolflag);int getInt();int getIntVargs(int arg,int arg2,int arg3,int arg4);String getStr();String getStrVars(String arg,String arg1,String arg2,String Arg3);void setIntVargs(int arg,int arg2,int arg3,int arg4);String setStrVars(String arg,String arg1,String arg2,String Arg3);}

其实aidl只是一个声明文件,编译后自动生成代码.

/** This file is auto-generated.  DO NOT MODIFY.*/
package cn.qssq666;
public interface GeneralBinder extends android.os.IInterface
{/** Default implementation for GeneralBinder. */public static class Default implements cn.qssq666.GeneralBinder{@Override public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, java.lang.String aString) throws android.os.RemoteException{}@Override public void clearCallBack() throws android.os.RemoteException{}@Override public boolean isTaskRunning() throws android.os.RemoteException{return false;}@Override public void stopRunningTask() throws android.os.RemoteException{}@Override public java.lang.String queryConfig1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return null;}@Override public java.lang.String queryConfig2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return null;}@Override public java.lang.String queryConfig3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return null;}@Override public boolean queryEnable1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return false;}@Override public boolean queryEnable2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return false;}@Override public boolean queryEnable3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{return false;}@Override public java.util.List queryData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException{return null;}@Override public java.util.List queryDataStr(int action, boolean flag1, java.lang.String[] flag) throws android.os.RemoteException{return null;}@Override public java.util.Map queryMapData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException{return null;}@Override public java.lang.String queryDataByMap(int flag, int what, java.lang.String[] arg, int[] intarg, java.util.Map map) throws android.os.RemoteException{return null;}@Override public java.util.Map queryData2Map(int flag, int what, java.lang.String[] arg, int[] intarg) throws android.os.RemoteException{return null;}@Override public java.util.List queryData2List(int flag, int what, java.lang.String[] arg, int[] intarg, boolean[] boolflag) throws android.os.RemoteException{return null;}@Override public int getInt() throws android.os.RemoteException{return 0;}@Override public int getIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException{return 0;}@Override public java.lang.String getStr() throws android.os.RemoteException{return null;}@Override public java.lang.String getStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException{return null;}@Override public void setIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException{}@Override public java.lang.String setStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException{return null;}@Overridepublic android.os.IBinder asBinder() {return null;}}/** Local-side IPC implementation stub class. */public static abstract class Stub extends android.os.Binder implements cn.qssq666.GeneralBinder{private static final java.lang.String DESCRIPTOR = "cn.qssq666.GeneralBinder";/** Construct the stub at attach it to the interface. */public Stub(){this.attachInterface(this, DESCRIPTOR);}/*** Cast an IBinder object into an cn.qssq666.GeneralBinder interface,* generating a proxy if needed.*/public static cn.qssq666.GeneralBinder asInterface(android.os.IBinder obj){if ((obj==null)) {return null;}android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);if (((iin!=null)&&(iin instanceof cn.qssq666.GeneralBinder))) {return ((cn.qssq666.GeneralBinder)iin);}return new cn.qssq666.GeneralBinder.Stub.Proxy(obj);}@Override public android.os.IBinder asBinder(){return this;}@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException{java.lang.String descriptor = DESCRIPTOR;switch (code){case INTERFACE_TRANSACTION:{reply.writeString(descriptor);return true;}case TRANSACTION_basicTypes:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();long _arg1;_arg1 = data.readLong();boolean _arg2;_arg2 = (0!=data.readInt());float _arg3;_arg3 = data.readFloat();double _arg4;_arg4 = data.readDouble();java.lang.String _arg5;_arg5 = data.readString();this.basicTypes(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5);reply.writeNoException();return true;}case TRANSACTION_clearCallBack:{data.enforceInterface(descriptor);this.clearCallBack();reply.writeNoException();return true;}case TRANSACTION_isTaskRunning:{data.enforceInterface(descriptor);boolean _result = this.isTaskRunning();reply.writeNoException();reply.writeInt(((_result)?(1):(0)));return true;}case TRANSACTION_stopRunningTask:{data.enforceInterface(descriptor);this.stopRunningTask();reply.writeNoException();return true;}case TRANSACTION_queryConfig1:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();java.lang.String _result = this.queryConfig1(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_queryConfig2:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();java.lang.String _result = this.queryConfig2(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_queryConfig3:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();java.lang.String _result = this.queryConfig3(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_queryEnable1:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();boolean _result = this.queryEnable1(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeInt(((_result)?(1):(0)));return true;}case TRANSACTION_queryEnable2:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();boolean _result = this.queryEnable2(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeInt(((_result)?(1):(0)));return true;}case TRANSACTION_queryEnable3:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();boolean _result = this.queryEnable3(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeInt(((_result)?(1):(0)));return true;}case TRANSACTION_queryData:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();boolean _arg1;_arg1 = (0!=data.readInt());java.lang.String _arg2;_arg2 = data.readString();java.util.List _result = this.queryData(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeList(_result);return true;}case TRANSACTION_queryDataStr:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();boolean _arg1;_arg1 = (0!=data.readInt());java.lang.String[] _arg2;_arg2 = data.createStringArray();java.util.List _result = this.queryDataStr(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeList(_result);return true;}case TRANSACTION_queryMapData:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();boolean _arg1;_arg1 = (0!=data.readInt());java.lang.String _arg2;_arg2 = data.readString();java.util.Map _result = this.queryMapData(_arg0, _arg1, _arg2);reply.writeNoException();reply.writeMap(_result);return true;}case TRANSACTION_queryDataByMap:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();int[] _arg3;_arg3 = data.createIntArray();java.util.Map _arg4;java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_arg4 = data.readHashMap(cl);java.lang.String _result = this.queryDataByMap(_arg0, _arg1, _arg2, _arg3, _arg4);reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_queryData2Map:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();int[] _arg3;_arg3 = data.createIntArray();java.util.Map _result = this.queryData2Map(_arg0, _arg1, _arg2, _arg3);reply.writeNoException();reply.writeMap(_result);return true;}case TRANSACTION_queryData2List:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();java.lang.String[] _arg2;_arg2 = data.createStringArray();int[] _arg3;_arg3 = data.createIntArray();boolean[] _arg4;_arg4 = data.createBooleanArray();java.util.List _result = this.queryData2List(_arg0, _arg1, _arg2, _arg3, _arg4);reply.writeNoException();reply.writeList(_result);return true;}case TRANSACTION_getInt:{data.enforceInterface(descriptor);int _result = this.getInt();reply.writeNoException();reply.writeInt(_result);return true;}case TRANSACTION_getIntVargs:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();int _arg2;_arg2 = data.readInt();int _arg3;_arg3 = data.readInt();int _result = this.getIntVargs(_arg0, _arg1, _arg2, _arg3);reply.writeNoException();reply.writeInt(_result);return true;}case TRANSACTION_getStr:{data.enforceInterface(descriptor);java.lang.String _result = this.getStr();reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_getStrVars:{data.enforceInterface(descriptor);java.lang.String _arg0;_arg0 = data.readString();java.lang.String _arg1;_arg1 = data.readString();java.lang.String _arg2;_arg2 = data.readString();java.lang.String _arg3;_arg3 = data.readString();java.lang.String _result = this.getStrVars(_arg0, _arg1, _arg2, _arg3);reply.writeNoException();reply.writeString(_result);return true;}case TRANSACTION_setIntVargs:{data.enforceInterface(descriptor);int _arg0;_arg0 = data.readInt();int _arg1;_arg1 = data.readInt();int _arg2;_arg2 = data.readInt();int _arg3;_arg3 = data.readInt();this.setIntVargs(_arg0, _arg1, _arg2, _arg3);reply.writeNoException();return true;}case TRANSACTION_setStrVars:{data.enforceInterface(descriptor);java.lang.String _arg0;_arg0 = data.readString();java.lang.String _arg1;_arg1 = data.readString();java.lang.String _arg2;_arg2 = data.readString();java.lang.String _arg3;_arg3 = data.readString();java.lang.String _result = this.setStrVars(_arg0, _arg1, _arg2, _arg3);reply.writeNoException();reply.writeString(_result);return true;}default:{return super.onTransact(code, data, reply, flags);}}}private static class Proxy implements cn.qssq666.GeneralBinder{private android.os.IBinder mRemote;Proxy(android.os.IBinder remote){mRemote = remote;}@Override public android.os.IBinder asBinder(){return mRemote;}public java.lang.String getInterfaceDescriptor(){return DESCRIPTOR;}@Override public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, java.lang.String aString) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(anInt);_data.writeLong(aLong);_data.writeInt(((aBoolean)?(1):(0)));_data.writeFloat(aFloat);_data.writeDouble(aDouble);_data.writeString(aString);boolean _status = mRemote.transact(Stub.TRANSACTION_basicTypes, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {getDefaultImpl().basicTypes(anInt, aLong, aBoolean, aFloat, aDouble, aString);return;}_reply.readException();}finally {_reply.recycle();_data.recycle();}}@Override public void clearCallBack() throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();try {_data.writeInterfaceToken(DESCRIPTOR);boolean _status = mRemote.transact(Stub.TRANSACTION_clearCallBack, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {getDefaultImpl().clearCallBack();return;}_reply.readException();}finally {_reply.recycle();_data.recycle();}}@Override public boolean isTaskRunning() throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();boolean _result;try {_data.writeInterfaceToken(DESCRIPTOR);boolean _status = mRemote.transact(Stub.TRANSACTION_isTaskRunning, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().isTaskRunning();}_reply.readException();_result = (0!=_reply.readInt());}finally {_reply.recycle();_data.recycle();}return _result;}@Override public void stopRunningTask() throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();try {_data.writeInterfaceToken(DESCRIPTOR);boolean _status = mRemote.transact(Stub.TRANSACTION_stopRunningTask, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {getDefaultImpl().stopRunningTask();return;}_reply.readException();}finally {_reply.recycle();_data.recycle();}}@Override public java.lang.String queryConfig1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryConfig1, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryConfig1(flag, what, arg);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.lang.String queryConfig2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryConfig2, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryConfig2(flag, what, arg);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.lang.String queryConfig3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryConfig3, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryConfig3(flag, what, arg);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public boolean queryEnable1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();boolean _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryEnable1, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryEnable1(flag, what, arg);}_reply.readException();_result = (0!=_reply.readInt());}finally {_reply.recycle();_data.recycle();}return _result;}@Override public boolean queryEnable2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();boolean _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryEnable2, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryEnable2(flag, what, arg);}_reply.readException();_result = (0!=_reply.readInt());}finally {_reply.recycle();_data.recycle();}return _result;}@Override public boolean queryEnable3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();boolean _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryEnable3, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryEnable3(flag, what, arg);}_reply.readException();_result = (0!=_reply.readInt());}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.util.List queryData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.util.List _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(action);_data.writeInt(((flag1)?(1):(0)));_data.writeString(flag2);boolean _status = mRemote.transact(Stub.TRANSACTION_queryData, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryData(action, flag1, flag2);}_reply.readException();java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_result = _reply.readArrayList(cl);}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.util.List queryDataStr(int action, boolean flag1, java.lang.String[] flag) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.util.List _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(action);_data.writeInt(((flag1)?(1):(0)));_data.writeStringArray(flag);boolean _status = mRemote.transact(Stub.TRANSACTION_queryDataStr, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryDataStr(action, flag1, flag);}_reply.readException();java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_result = _reply.readArrayList(cl);}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.util.Map queryMapData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.util.Map _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(action);_data.writeInt(((flag1)?(1):(0)));_data.writeString(flag2);boolean _status = mRemote.transact(Stub.TRANSACTION_queryMapData, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryMapData(action, flag1, flag2);}_reply.readException();java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_result = _reply.readHashMap(cl);}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.lang.String queryDataByMap(int flag, int what, java.lang.String[] arg, int[] intarg, java.util.Map map) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);_data.writeIntArray(intarg);_data.writeMap(map);boolean _status = mRemote.transact(Stub.TRANSACTION_queryDataByMap, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryDataByMap(flag, what, arg, intarg, map);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.util.Map queryData2Map(int flag, int what, java.lang.String[] arg, int[] intarg) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.util.Map _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);_data.writeIntArray(intarg);boolean _status = mRemote.transact(Stub.TRANSACTION_queryData2Map, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryData2Map(flag, what, arg, intarg);}_reply.readException();java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_result = _reply.readHashMap(cl);}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.util.List queryData2List(int flag, int what, java.lang.String[] arg, int[] intarg, boolean[] boolflag) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.util.List _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(flag);_data.writeInt(what);_data.writeStringArray(arg);_data.writeIntArray(intarg);_data.writeBooleanArray(boolflag);boolean _status = mRemote.transact(Stub.TRANSACTION_queryData2List, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().queryData2List(flag, what, arg, intarg, boolflag);}_reply.readException();java.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();_result = _reply.readArrayList(cl);}finally {_reply.recycle();_data.recycle();}return _result;}@Override public int getInt() throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();int _result;try {_data.writeInterfaceToken(DESCRIPTOR);boolean _status = mRemote.transact(Stub.TRANSACTION_getInt, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().getInt();}_reply.readException();_result = _reply.readInt();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public int getIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();int _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(arg);_data.writeInt(arg2);_data.writeInt(arg3);_data.writeInt(arg4);boolean _status = mRemote.transact(Stub.TRANSACTION_getIntVargs, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().getIntVargs(arg, arg2, arg3, arg4);}_reply.readException();_result = _reply.readInt();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.lang.String getStr() throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);boolean _status = mRemote.transact(Stub.TRANSACTION_getStr, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().getStr();}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public java.lang.String getStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeString(arg);_data.writeString(arg1);_data.writeString(arg2);_data.writeString(Arg3);boolean _status = mRemote.transact(Stub.TRANSACTION_getStrVars, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().getStrVars(arg, arg1, arg2, Arg3);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}@Override public void setIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeInt(arg);_data.writeInt(arg2);_data.writeInt(arg3);_data.writeInt(arg4);boolean _status = mRemote.transact(Stub.TRANSACTION_setIntVargs, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {getDefaultImpl().setIntVargs(arg, arg2, arg3, arg4);return;}_reply.readException();}finally {_reply.recycle();_data.recycle();}}@Override public java.lang.String setStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException{android.os.Parcel _data = android.os.Parcel.obtain();android.os.Parcel _reply = android.os.Parcel.obtain();java.lang.String _result;try {_data.writeInterfaceToken(DESCRIPTOR);_data.writeString(arg);_data.writeString(arg1);_data.writeString(arg2);_data.writeString(Arg3);boolean _status = mRemote.transact(Stub.TRANSACTION_setStrVars, _data, _reply, 0);if (!_status && getDefaultImpl() != null) {return getDefaultImpl().setStrVars(arg, arg1, arg2, Arg3);}_reply.readException();_result = _reply.readString();}finally {_reply.recycle();_data.recycle();}return _result;}public static cn.qssq666.GeneralBinder sDefaultImpl;}static final int TRANSACTION_basicTypes = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);static final int TRANSACTION_clearCallBack = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);static final int TRANSACTION_isTaskRunning = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);static final int TRANSACTION_stopRunningTask = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);static final int TRANSACTION_queryConfig1 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);static final int TRANSACTION_queryConfig2 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);static final int TRANSACTION_queryConfig3 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6);static final int TRANSACTION_queryEnable1 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7);static final int TRANSACTION_queryEnable2 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8);static final int TRANSACTION_queryEnable3 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 9);static final int TRANSACTION_queryData = (android.os.IBinder.FIRST_CALL_TRANSACTION + 10);static final int TRANSACTION_queryDataStr = (android.os.IBinder.FIRST_CALL_TRANSACTION + 11);static final int TRANSACTION_queryMapData = (android.os.IBinder.FIRST_CALL_TRANSACTION + 12);static final int TRANSACTION_queryDataByMap = (android.os.IBinder.FIRST_CALL_TRANSACTION + 13);static final int TRANSACTION_queryData2Map = (android.os.IBinder.FIRST_CALL_TRANSACTION + 14);static final int TRANSACTION_queryData2List = (android.os.IBinder.FIRST_CALL_TRANSACTION + 15);static final int TRANSACTION_getInt = (android.os.IBinder.FIRST_CALL_TRANSACTION + 16);static final int TRANSACTION_getIntVargs = (android.os.IBinder.FIRST_CALL_TRANSACTION + 17);static final int TRANSACTION_getStr = (android.os.IBinder.FIRST_CALL_TRANSACTION + 18);static final int TRANSACTION_getStrVars = (android.os.IBinder.FIRST_CALL_TRANSACTION + 19);static final int TRANSACTION_setIntVargs = (android.os.IBinder.FIRST_CALL_TRANSACTION + 20);static final int TRANSACTION_setStrVars = (android.os.IBinder.FIRST_CALL_TRANSACTION + 21);public static boolean setDefaultImpl(cn.qssq666.GeneralBinder impl) {// Only one user of this interface can use this function// at a time. This is a heuristic to detect if two different// users in the same process use this function.if (Stub.Proxy.sDefaultImpl != null) {throw new IllegalStateException("setDefaultImpl() called twice");}if (impl != null) {Stub.Proxy.sDefaultImpl = impl;return true;}return false;}public static cn.qssq666.GeneralBinder getDefaultImpl() {return Stub.Proxy.sDefaultImpl;}}public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, java.lang.String aString) throws android.os.RemoteException;public void clearCallBack() throws android.os.RemoteException;public boolean isTaskRunning() throws android.os.RemoteException;public void stopRunningTask() throws android.os.RemoteException;public java.lang.String queryConfig1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public java.lang.String queryConfig2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public java.lang.String queryConfig3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public boolean queryEnable1(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public boolean queryEnable2(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public boolean queryEnable3(int flag, int what, java.lang.String[] arg) throws android.os.RemoteException;public java.util.List queryData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException;public java.util.List queryDataStr(int action, boolean flag1, java.lang.String[] flag) throws android.os.RemoteException;public java.util.Map queryMapData(int action, boolean flag1, java.lang.String flag2) throws android.os.RemoteException;public java.lang.String queryDataByMap(int flag, int what, java.lang.String[] arg, int[] intarg, java.util.Map map) throws android.os.RemoteException;public java.util.Map queryData2Map(int flag, int what, java.lang.String[] arg, int[] intarg) throws android.os.RemoteException;public java.util.List queryData2List(int flag, int what, java.lang.String[] arg, int[] intarg, boolean[] boolflag) throws android.os.RemoteException;public int getInt() throws android.os.RemoteException;public int getIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException;public java.lang.String getStr() throws android.os.RemoteException;public java.lang.String getStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException;public void setIntVargs(int arg, int arg2, int arg3, int arg4) throws android.os.RemoteException;public java.lang.String setStrVars(java.lang.String arg, java.lang.String arg1, java.lang.String arg2, java.lang.String Arg3) throws android.os.RemoteException;
}

把机器人作为服务端,
把这个java文件写入到客户端,方法就是xposed插件

然后利用xposed插件注入 ,也就是没有办法注册服务的进程,这里举例为QQ,
使其绑定到qq机器人的进程即可。

我的机器人就是这样做的,这样的话,可以扩展,除了qq,其它应用都可以用。。

这篇关于[原创]一方免注册服务的ipc进程通讯方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/959023

相关文章

Linux换行符的使用方法详解

《Linux换行符的使用方法详解》本文介绍了Linux中常用的换行符LF及其在文件中的表示,展示了如何使用sed命令替换换行符,并列举了与换行符处理相关的Linux命令,通过代码讲解的非常详细,需要的... 目录简介检测文件中的换行符使用 cat -A 查看换行符使用 od -c 检查字符换行符格式转换将

SpringBoot实现数据库读写分离的3种方法小结

《SpringBoot实现数据库读写分离的3种方法小结》为了提高系统的读写性能和可用性,读写分离是一种经典的数据库架构模式,在SpringBoot应用中,有多种方式可以实现数据库读写分离,本文将介绍三... 目录一、数据库读写分离概述二、方案一:基于AbstractRoutingDataSource实现动态

Java中的String.valueOf()和toString()方法区别小结

《Java中的String.valueOf()和toString()方法区别小结》字符串操作是开发者日常编程任务中不可或缺的一部分,转换为字符串是一种常见需求,其中最常见的就是String.value... 目录String.valueOf()方法方法定义方法实现使用示例使用场景toString()方法方法

Java中List的contains()方法的使用小结

《Java中List的contains()方法的使用小结》List的contains()方法用于检查列表中是否包含指定的元素,借助equals()方法进行判断,下面就来介绍Java中List的c... 目录详细展开1. 方法签名2. 工作原理3. 使用示例4. 注意事项总结结论:List 的 contain

macOS无效Launchpad图标轻松删除的4 种实用方法

《macOS无效Launchpad图标轻松删除的4种实用方法》mac中不在appstore上下载的应用经常在删除后它的图标还残留在launchpad中,并且长按图标也不会出现删除符号,下面解决这个问... 在 MACOS 上,Launchpad(也就是「启动台」)是一个便捷的 App 启动工具。但有时候,应

SpringBoot日志配置SLF4J和Logback的方法实现

《SpringBoot日志配置SLF4J和Logback的方法实现》日志记录是不可或缺的一部分,本文主要介绍了SpringBoot日志配置SLF4J和Logback的方法实现,文中通过示例代码介绍的非... 目录一、前言二、案例一:初识日志三、案例二:使用Lombok输出日志四、案例三:配置Logback一

Python实现无痛修改第三方库源码的方法详解

《Python实现无痛修改第三方库源码的方法详解》很多时候,我们下载的第三方库是不会有需求不满足的情况,但也有极少的情况,第三方库没有兼顾到需求,本文将介绍几个修改源码的操作,大家可以根据需求进行选择... 目录需求不符合模拟示例 1. 修改源文件2. 继承修改3. 猴子补丁4. 追踪局部变量需求不符合很

mysql出现ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)的解决方法

《mysql出现ERROR2003(HY000):Can‘tconnecttoMySQLserveron‘localhost‘(10061)的解决方法》本文主要介绍了mysql出现... 目录前言:第一步:第二步:第三步:总结:前言:当你想通过命令窗口想打开mysql时候发现提http://www.cpp

Mysql删除几亿条数据表中的部分数据的方法实现

《Mysql删除几亿条数据表中的部分数据的方法实现》在MySQL中删除一个大表中的数据时,需要特别注意操作的性能和对系统的影响,本文主要介绍了Mysql删除几亿条数据表中的部分数据的方法实现,具有一定... 目录1、需求2、方案1. 使用 DELETE 语句分批删除2. 使用 INPLACE ALTER T

MySQL INSERT语句实现当记录不存在时插入的几种方法

《MySQLINSERT语句实现当记录不存在时插入的几种方法》MySQL的INSERT语句是用于向数据库表中插入新记录的关键命令,下面:本文主要介绍MySQLINSERT语句实现当记录不存在时... 目录使用 INSERT IGNORE使用 ON DUPLICATE KEY UPDATE使用 REPLACE