Giter VIP home page Giter VIP logo

Comments (17)

T-vK avatar T-vK commented on August 26, 2024

Sounds like a general problem with your Termux installation.
Maybe running apt update would fix your certificate issues.
What happens if you install one of the dependencies manually? E.g.
apt install git

from android-svc.

harphere avatar harphere commented on August 26, 2024

I reinstalled Termux, now that issue is gone but I'm facing another one.
When I run android-svc list-methods android.media.IAudioService, it returns File was not provided in GetSourceFile

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

What does it return for

android-svc list-packages

?

from android-svc.

harphere avatar harphere commented on August 26, 2024

android.ui.ISurfaceComposer android.view.accessibility.IAccessibilityManager android.accounts.IAccountManager android.app.IActivityManager android.app.IActivityTaskManager android.debug.IAdbManager android.app.IAlarmManager android.hardware.identity.IIdentityCredentialStore android.hardware.power.IPower android.hardware.rebootescrow.IRebootEscrow android.hardware.vibrator.IVibrator android.os.IUpdateEngine android.security.identity.ICredentialStoreFactory android.security.keystore.IKeystoreService android.service.gatekeeper.IGateKeeperService android.content.integrity.IAppIntegrityManager com.android.internal.app.IAppOpsService com.android.internal.appwidget.IAppWidgetService android.media.IAudioService android.hardware.biometrics.IAuthService android.view.autofill.IAutoFillManager android.app.backup.IBackupManager android.os.IBatteryPropertiesRegistrar com.android.internal.app.IBatteryStats android.hardware.biometrics.IBiometricService android.app.blob.IBlobStoreManager android.bluetooth.IBluetoothManager android.os.IDumpstate com.android.internal.telephony.ICarrierConfigLoader android.content.IClipboard android.hardware.display.IColorDisplayManager com.google.hardware.pixel.display.IDisplay android.companion.ICompanionDeviceManager android.net.IConnectivityManager android.net.IIpConnectivityMetrics android.hardware.IConsumerIrService android.content.IContentService android.hardware.location.IContextHubService android.location.ICountryDetector android.content.pm.ICrossProfileApps android.content.pm.IDataLoaderManager android.os.IDeviceIdentifiersPolicyService android.app.admin.IDevicePolicyManager android.os.IDeviceIdleController android.hardware.display.IDisplayManager android.net.IDnsResolver android.service.dreams.IDreamManager drm.IDrmManagerService com.android.internal.os.IDropBoxManagerService android.os.image.IDynamicSystemService com.android.internal.telephony.euicc.IEuiccController android.net.IEthernetManager com.android.internal.telephony.euicc.IEuiccCardController android.os.IExternalVibratorService android.security.IFileIntegrityService android.hardware.fingerprint.IFingerprintService android.graphicsenv.IGpuService android.view.IGraphicsStats android.os.IHardwarePropertiesManager com.android.internal.telephony.IMms android.os.IIncidentManager android.os.IIncidentCompanion android.os.incremental.IIncrementalService android.hardware.input.IInputManager com.android.internal.view.IInputMethodManager android.input.IInputFlinger android.os.IInstalld com.android.internal.telephony.IOns com.google.android.startop.iorap.IIorap com.android.internal.telephony.IPhoneSubInfo android.net.IIpSecService com.android.internal.telephony.ISms com.android.internal.telephony.ISub android.app.job.IJobScheduler android.content.pm.ILauncherApps android.hardware.lights.ILightsManager android.location.ILocationManager com.android.internal.widget.ILockSettings android.os.IServiceManager IAAudioService android.media.IAudioFlinger android.media.IAudioPolicyService android.hardware.ICameraService android.hardware.ICameraServiceProxy android.IMediaExtractorService android.media.IMediaMetricsService android.media.IMediaPlayerService android.media.IResourceManagerService android.media.projection.IMediaProjectionManager android.media.IMediaResourceMonitor android.media.IMediaRouterService android.media.session.ISessionManager android.media.midi.IMidiManager android.os.storage.IStorageManager android.net.INetd android.net.metrics.INetdEventListener android.net.INetworkPolicyManager android.net.INetworkStatsService android.os.INetworkManagementService android.net.INetworkScoreService android.net.INetworkStackConnector com.android.internal.net.INetworkWatchlistManager android.nfc.INfcAdapter android.app.INotificationManager android.service.oemlock.IOemLockService android.content.pm.IOtaDexopt android.content.om.IOverlayManager android.content.pm.IPackageManager android.content.pm.IPackageManagerNative android.os.IPermissionController android.permission.IPermissionManager android.service.persistentdata.IPersistentDataBlockService com.android.internal.telephony.ITelephony com.android.internal.compat.IPlatformCompat com.android.internal.compat.IPlatformCompatNative android.os.IPowerManager android.print.IPrintManager android.os.IProcessInfoService com.android.internal.app.procstats.IProcessStats com.qualcomm.qcrilmsgtunnel.IQcrilMsgTunnel com.android.ims.internal.IRcsService android.os.IRecoverySystem android.content.IRestrictionsManager android.app.role.IRoleManager android.content.rollback.IRollbackManager android.os.ISchedulingPolicyService android.app.ISearchManager android.security.keymaster.IKeyAttestationApplicationIdProvider android.se.omapi.ISecureElementService android.hardware.ISensorPrivacyManager android.gui.SensorServer android.hardware.ISerialManager android.net.nsd.INsdManager android.content.pm.IShortcutService com.android.internal.telephony.IIccPhoneBook android.net.sip.ISipService android.app.slice.ISliceManager com.android.internal.app.ISoundTriggerService android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService android.os.IStatsd android.os.IStatsCompanionService android.os.IStatsManagerService com.android.internal.statusbar.IStatusBarService android.os.IStoraged android.os.storaged.IStoragedPrivate android.app.usage.IStorageStatsManager android.system.suspend.ISuspendControlService android.os.ISystemConfig android.os.ISystemUpdateManager com.android.internal.telecom.ITelecomService com.android.internal.telephony.ITelephonyRegistry android.telephony.ims.aidl.IImsRcsController android.net.ITetheringConnector android.service.textclassifier.ITextClassifierService com.android.internal.textservice.ITextServicesManager android.os.IThermalService android.app.timedetector.ITimeDetectorService android.app.timezonedetector.ITimeZoneDetectorService android.app.trust.ITrustManager com.android.ims.internal.uce.uceservice.IUceService android.app.IUiModeManager android.os.IUpdateLock android.app.IUriGrantsManager android.app.usage.IUsageStatsManager android.hardware.usb.IUsbManager android.os.IUserManager android.os.IVibratorService com.android.internal.app.IVoiceInteractionManagerService android.os.IVold android.app.IWallpaperManager android.webkit.IWebViewUpdateService android.net.wifi.IWifiManager android.net.wifi.aware.IWifiAwareManager android.net.wifi.nl80211.IWificond android.net.wifi.p2p.IWifiP2pManager android.net.wifi.rtt.IWifiRttManager android.net.wifi.IWifiScanner android.view.IWindowManager

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

That looks alright.
Does android-svc download work?

from android-svc.

harphere avatar harphere commented on August 26, 2024

Yes:
Skipping 'core/java/**/*.aidl' (already exists) Skipping 'core/java/android/app/IApplicationThread.aidl' (already exists) Skipping 'core/java/android/app/IServiceConnection.aidl' (already exists) Skipping 'core/java/android/content/pm/DataLoaderParamsParcel.aidl' (already exists) Skipping 'core/java/android/content/pm/DataLoaderType.aidl' (already exists) Skipping 'core/java/android/content/pm/FileSystemControlParcel.aidl' (already exists) Skipping 'core/java/android/content/pm/IDataLoader.aidl' (already exists) Skipping 'core/java/android/content/pm/IDataLoaderManager.aidl' (already exists) Skipping 'core/java/android/content/pm/IDataLoaderStatusListener.aidl' (already exists) Skipping 'core/java/android/content/pm/IPackageDataObserver.aidl' (already exists) Skipping 'core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl' (already exists) Skipping 'core/java/android/content/pm/InstallationFileLocation.aidl' (already exists) Skipping 'core/java/android/content/pm/InstallationFileParcel.aidl' (already exists) Skipping 'core/java/android/os/CoolingDevice.aidl' (already exists) Skipping 'core/java/android/os/IExternalVibrationController.aidl' (already exists) Skipping 'core/java/android/os/IExternalVibratorService.aidl' (already exists) Skipping 'core/java/android/os/IIncidentDumpCallback.aidl' (already exists) Skipping 'core/java/android/os/IIncidentManager.aidl' (already exists) Skipping 'core/java/android/os/IIncidentReportStatusListener.aidl' (already exists) Skipping 'core/java/android/os/IThermalEventListener.aidl' (already exists) Skipping 'core/java/android/os/IThermalService.aidl' (already exists) Skipping 'core/java/android/os/IThermalStatusListener.aidl' (already exists) Skipping 'core/java/android/os/Temperature.aidl' (already exists) Skipping 'core/java/android/os/incremental/IIncrementalService.aidl' (already exists) Skipping 'core/java/android/os/incremental/IIncrementalServiceConnector.aidl' (already exists) Skipping 'core/java/android/os/incremental/IStorageHealthListener.aidl' (already exists) Skipping 'core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl' (already exists) Skipping 'core/java/android/os/incremental/IncrementalNewFileParams.aidl' (already exists) Skipping 'core/java/android/os/incremental/StorageHealthCheckParams.aidl' (already exists) Skipping 'graphics/java/**/*.aidl' (already exists) Skipping 'keystore/java/**/*.aidl' (already exists) Skipping 'location/java/**/*.aidl' (already exists) Skipping 'lowpan/java/**/*.aidl' (already exists) Skipping 'media/java/**/*.aidl' (already exists) Skipping 'mms/java/**/*.aidl' (already exists) Skipping 'telecomm/java/**/*.aidl' (already exists) Skipping 'telephony/java/**/*.aidl' (already exists)

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

Does

android-svc list-methods audio

produce the same error for you?

What does

su -c "service list" 

return for you?

from android-svc.

harphere avatar harphere commented on August 26, 2024

No, it's a different error:
$ android-svc list-methods audio
Service name was not provided in GetServicePackageName

$ su -c "service list"
Found 198 services: 0 DockObserver: [] 1 SurfaceFlinger: [android.ui.ISurfaceComposer] 2 accessibility: [android.view.accessibility.IAccessibilityManager] 3 account: [android.accounts.IAccountManager] 4 activity: [android.app.IActivityManager] 5 activity_task: [android.app.IActivityTaskManager] 6 adb: [android.debug.IAdbManager] 7 alarm: [android.app.IAlarmManager] 8 android.hardware.identity.IIdentityCredentialStore/default: [android.hardware.identity.IIdentityCredentialStore] 9 android.hardware.power.IPower/default: [android.hardware.power.IPower] 10 android.hardware.rebootescrow.IRebootEscrow/default: [android.hardware.rebootescrow.IRebootEscrow] 11 android.hardware.vibrator.IVibrator/default: [android.hardware.vibrator.IVibrator] 12 android.os.UpdateEngineService: [android.os.IUpdateEngine] 13 android.security.identity: [android.security.identity.ICredentialStoreFactory] 14 android.security.keystore: [android.security.keystore.IKeystoreService] 15 android.service.gatekeeper.IGateKeeperService: [android.service.gatekeeper.IGateKeeperService] 16 app_binding: [] 17 app_integrity: [android.content.integrity.IAppIntegrityManager] 18 appops: [com.android.internal.app.IAppOpsService] 19 appwidget: [com.android.internal.appwidget.IAppWidgetService] 20 attention: [] 21 audio: [android.media.IAudioService] 22 auth: [android.hardware.biometrics.IAuthService] 23 autofill: [android.view.autofill.IAutoFillManager] 24 backup: [android.app.backup.IBackupManager] 25 battery: [] 26 batteryproperties: [android.os.IBatteryPropertiesRegistrar] 27 batterystats: [com.android.internal.app.IBatteryStats] 28 binder_calls_stats: [] 29 biometric: [android.hardware.biometrics.IBiometricService] 30 blob_store: [android.app.blob.IBlobStoreManager] 31 bluetooth_manager: [android.bluetooth.IBluetoothManager] 32 bugreport: [android.os.IDumpstate] 33 cacheinfo: [] 34 carrier_config: [com.android.internal.telephony.ICarrierConfigLoader] 35 clipboard: [android.content.IClipboard] 36 color_display: [android.hardware.display.IColorDisplayManager] 37 com.google.hardware.pixel.display.IDisplay/default: [com.google.hardware.pixel.display.IDisplay] 38 companiondevice: [android.companion.ICompanionDeviceManager] 39 connectivity: [android.net.IConnectivityManager] 40 connmetrics: [android.net.IIpConnectivityMetrics] 41 consumer_ir: [android.hardware.IConsumerIrService] 42 content: [android.content.IContentService] 43 contexthub: [android.hardware.location.IContextHubService] 44 country_detector: [android.location.ICountryDetector] 45 cpuinfo: [] 46 crossprofileapps: [android.content.pm.ICrossProfileApps] 47 dataloader_manager: [android.content.pm.IDataLoaderManager] 48 dbinfo: [] 49 device_config: [] 50 device_identifiers: [android.os.IDeviceIdentifiersPolicyService] 51 device_policy: [android.app.admin.IDevicePolicyManager] 52 deviceidle: [android.os.IDeviceIdleController] 53 devicestoragemonitor: [] 54 diskstats: [] 55 display: [android.hardware.display.IDisplayManager] 56 dnsresolver: [android.net.IDnsResolver] 57 dreams: [android.service.dreams.IDreamManager] 58 drm.drmManager: [drm.IDrmManagerService] 59 dropbox: [com.android.internal.os.IDropBoxManagerService] 60 dynamic_system: [android.os.image.IDynamicSystemService] 61 econtroller: [com.android.internal.telephony.euicc.IEuiccController] 62 emergency_affordance: [] 63 ethernet: [android.net.IEthernetManager] 64 euicc_card_controller: [com.android.internal.telephony.euicc.IEuiccCardController] 65 external_vibrator_service: [android.os.IExternalVibratorService] 66 file_integrity: [android.security.IFileIntegrityService] 67 fingerprint: [android.hardware.fingerprint.IFingerprintService] 68 gfxinfo: [] 69 gpu: [android.graphicsenv.IGpuService] 70 graphicsstats: [android.view.IGraphicsStats] 71 hardware_properties: [android.os.IHardwarePropertiesManager] 72 imms: [com.android.internal.telephony.IMms] 73 incident: [android.os.IIncidentManager] 74 incidentcompanion: [android.os.IIncidentCompanion] 75 incremental: [android.os.incremental.IIncrementalService] 76 input: [android.hardware.input.IInputManager] 77 input_method: [com.android.internal.view.IInputMethodManager] 78 inputflinger: [android.input.IInputFlinger] 79 installd: [android.os.IInstalld] 80 ions: [com.android.internal.telephony.IOns] 81 iorapd: [com.google.android.startop.iorap.IIorap] 82 iphonesubinfo: [com.android.internal.telephony.IPhoneSubInfo] 83 ipsec: [android.net.IIpSecService] 84 isms: [com.android.internal.telephony.ISms] 85 isub: [com.android.internal.telephony.ISub] 86 jobscheduler: [android.app.job.IJobScheduler] 87 launcherapps: [android.content.pm.ILauncherApps] 88 lights: [android.hardware.lights.ILightsManager] 89 location: [android.location.ILocationManager] 90 lock_settings: [com.android.internal.widget.ILockSettings] 91 looper_stats: [] 92 manager: [android.os.IServiceManager] 93 media.aaudio: [IAAudioService] 94 media.audio_flinger: [android.media.IAudioFlinger] 95 media.audio_policy: [android.media.IAudioPolicyService] 96 media.camera: [android.hardware.ICameraService] 97 media.camera.proxy: [android.hardware.ICameraServiceProxy] 98 media.extractor: [android.IMediaExtractorService] 99 media.metrics: [android.media.IMediaMetricsService] 100 media.player: [android.media.IMediaPlayerService] 101 media.resource_manager: [android.media.IResourceManagerService] 102 media_projection: [android.media.projection.IMediaProjectionManager] 103 media_resource_monitor: [android.media.IMediaResourceMonitor] 104 media_router: [android.media.IMediaRouterService] 105 media_session: [android.media.session.ISessionManager] 106 meminfo: [] 107 midi: [android.media.midi.IMidiManager] 108 mount: [android.os.storage.IStorageManager] 109 netd: [android.net.INetd] 110 netd_listener: [android.net.metrics.INetdEventListener] 111 netpolicy: [android.net.INetworkPolicyManager] 112 netstats: [android.net.INetworkStatsService] 113 network_management: [android.os.INetworkManagementService] 114 network_score: [android.net.INetworkScoreService] 115 network_stack: [android.net.INetworkStackConnector] 116 network_time_update_service: [] 117 network_watchlist: [com.android.internal.net.INetworkWatchlistManager] 118 nfc: [android.nfc.INfcAdapter] 119 notification: [android.app.INotificationManager] 120 oem_lock: [android.service.oemlock.IOemLockService] 121 otadexopt: [android.content.pm.IOtaDexopt] 122 overlay: [android.content.om.IOverlayManager] 123 package: [android.content.pm.IPackageManager] 124 package_native: [android.content.pm.IPackageManagerNative] 125 permission: [android.os.IPermissionController] 126 permissionmgr: [android.permission.IPermissionManager] 127 persistent_data_block: [android.service.persistentdata.IPersistentDataBlockService] 128 phone: [com.android.internal.telephony.ITelephony] 129 pinner: [] 130 platform_compat: [com.android.internal.compat.IPlatformCompat] 131 platform_compat_native: [com.android.internal.compat.IPlatformCompatNative] 132 power: [android.os.IPowerManager] 133 print: [android.print.IPrintManager] 134 processinfo: [android.os.IProcessInfoService] 135 procstats: [com.android.internal.app.procstats.IProcessStats] 136 qchook: [com.qualcomm.qcrilmsgtunnel.IQcrilMsgTunnel] 137 rcs: [com.android.ims.internal.IRcsService] 138 recovery: [android.os.IRecoverySystem] 139 restrictions: [android.content.IRestrictionsManager] 140 role: [android.app.role.IRoleManager] 141 rollback: [android.content.rollback.IRollbackManager] 142 runtime: [] 143 scheduling_policy: [android.os.ISchedulingPolicyService] 144 search: [android.app.ISearchManager] 145 sec_key_att_app_id_provider: [android.security.keymaster.IKeyAttestationApplicationIdProvider] 146 secure_element: [android.se.omapi.ISecureElementService] 147 sensor_privacy: [android.hardware.ISensorPrivacyManager] 148 sensorservice: [android.gui.SensorServer] 149 serial: [android.hardware.ISerialManager] 150 servicediscovery: [android.net.nsd.INsdManager] 151 settings: [] 152 shortcut: [android.content.pm.IShortcutService] 153 simphonebook: [com.android.internal.telephony.IIccPhoneBook] 154 sip: [android.net.sip.ISipService] 155 slice: [android.app.slice.ISliceManager] 156 soundtrigger: [com.android.internal.app.ISoundTriggerService] 157 soundtrigger_middleware: [android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService] 158 stats: [android.os.IStatsd] 159 statscompanion: [android.os.IStatsCompanionService] 160 statsmanager: [android.os.IStatsManagerService] 161 statusbar: [com.android.internal.statusbar.IStatusBarService] 162 storaged: [android.os.IStoraged] 163 storaged_pri: [android.os.storaged.IStoragedPrivate] 164 storagestats: [android.app.usage.IStorageStatsManager] 165 suspend_control: [android.system.suspend.ISuspendControlService] 166 system_config: [android.os.ISystemConfig] 167 system_update: [android.os.ISystemUpdateManager] 168 telecom: [com.android.internal.telecom.ITelecomService] 169 telephony.registry: [com.android.internal.telephony.ITelephonyRegistry] 170 telephony_ims: [android.telephony.ims.aidl.IImsRcsController] 171 testharness: [] 172 tethering: [android.net.ITetheringConnector] 173 textclassification: [android.service.textclassifier.ITextClassifierService] 174 textservices: [com.android.internal.textservice.ITextServicesManager] 175 thermalservice: [android.os.IThermalService] 176 time_detector: [android.app.timedetector.ITimeDetectorService] 177 time_zone_detector: [android.app.timezonedetector.ITimeZoneDetectorService] 178 trust: [android.app.trust.ITrustManager] 179 uce: [com.android.ims.internal.uce.uceservice.IUceService] 180 uimode: [android.app.IUiModeManager] 181 updatelock: [android.os.IUpdateLock] 182 uri_grants: [android.app.IUriGrantsManager] 183 usagestats: [android.app.usage.IUsageStatsManager] 184 usb: [android.hardware.usb.IUsbManager] 185 user: [android.os.IUserManager] 186 vibrator: [android.os.IVibratorService] 187 voiceinteraction: [com.android.internal.app.IVoiceInteractionManagerService] 188 vold: [android.os.IVold] 189 wallpaper: [android.app.IWallpaperManager] 190 webviewupdate: [android.webkit.IWebViewUpdateService] 191 wifi: [android.net.wifi.IWifiManager] 192 wifiaware: [android.net.wifi.aware.IWifiAwareManager] 193 wifinl80211: [android.net.wifi.nl80211.IWificond] 194 wifip2p: [android.net.wifi.p2p.IWifiP2pManager] 195 wifirtt: [android.net.wifi.rtt.IWifiRttManager] 196 wifiscanner: [android.net.wifi.IWifiScanner] 197 window: [android.view.IWindowManager]

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

Okay, looking at the source code, it seems most likely that the "g_aidlFileList" variable is corrupt:

GetSourceFile () {
    l_file="${1-}"
    # THIS IS WHERE IT FAILS BECAUSE THE l_file PARAMETER IS EMPTY
    [ -n "$l_file" ] || Exit 1 "File was not provided in GetSourceFile"
    wget -qO - "$g_repoUrl/$l_file"
}

# GetSourceFile gets called by GetMethodSignaturesForPackage

GetMethodSignaturesForPackage () {
    ...
    # "l_packageName" CONTAINS "android.media.IAudioService" IN OUR CASE
    l_packageFilePath="$(echo "$l_packageName" | tr '.' '/')\.aidl"
    # "packageFilePath" SHOULD NOW CONTAIN THE PATH "android/media/IAudioService.aidl"
    l_servicePath="$(echo "$g_aidlFileList" | grep -m 1 "$l_packageFilePath\$")"
    # WE KNOW THAT "l_servicePath" IS EMPTY BECAUSE OF THE GetSourceFile ERROR
    # THIS COULD BE BECAUSE "g_aidlFileList" OR "l_packageFilePath" ARE CORRUPT. 

    # WE KNOW THAT "l_servicePath" IS EMPTY
    # "l_servicePath" IS SUPPOSED TO CONTAIN A PATH TO A FILE
    # SINCE IT'S EMPTY WE GO INTO THE "ELSE" OF THE FOLLOWING IF STATEMENT
    if [ -f "$l_servicePath" ]; then
        l_serviceSource="$(cat "${g_cacheDir}/${l_servicePath}")"
    else
        # WE KNOW TAHT "l_servicePath" IS EMPTY; THUS WE PASS AN EMPTY PARAMETER TO "GetSourceFile"
        l_serviceSource="$(GetSourceFile "$l_servicePath")"
    fi

    ...
}

Please try this, so we can figure out what "g_aidlFileList" contains:

source "${PREFIX}/lib/android-svc-lib.sh"
Init
echo "$g_aidlFileList"

from android-svc.

harphere avatar harphere commented on August 26, 2024

Hope it helps:
~ $ source "${PREFIX}/lib/android-svc-lib.sh"
~ $ Init
~ $ echo "$g_aidlFileList"
core/java/**/*.aidl core/java/android/app/IApplicationThread.aidl core/java/android/app/IServiceConnection.aidl core/java/android/content/pm/DataLoaderParamsParcel.aidl core/java/android/content/pm/DataLoaderType.aidl core/java/android/content/pm/FileSystemControlParcel.aidl core/java/android/content/pm/IDataLoader.aidl core/java/android/content/pm/IDataLoaderManager.aidl core/java/android/content/pm/IDataLoaderStatusListener.aidl core/java/android/content/pm/IPackageDataObserver.aidl core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl core/java/android/content/pm/InstallationFileLocation.aidl core/java/android/content/pm/InstallationFileParcel.aidl core/java/android/os/CoolingDevice.aidl core/java/android/os/IExternalVibrationController.aidl core/java/android/os/IExternalVibratorService.aidl core/java/android/os/IIncidentDumpCallback.aidl core/java/android/os/IIncidentManager.aidl core/java/android/os/IIncidentReportStatusListener.aidl core/java/android/os/IThermalEventListener.aidl core/java/android/os/IThermalService.aidl core/java/android/os/IThermalStatusListener.aidl core/java/android/os/Temperature.aidl core/java/android/os/incremental/IIncrementalService.aidl core/java/android/os/incremental/IIncrementalServiceConnector.aidl core/java/android/os/incremental/IStorageHealthListener.aidl core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl core/java/android/os/incremental/IncrementalNewFileParams.aidl core/java/android/os/incremental/StorageHealthCheckParams.aidl graphics/java/**/*.aidl keystore/java/**/*.aidl location/java/**/*.aidl lowpan/java/**/*.aidl media/java/**/*.aidl mms/java/**/*.aidl telecomm/java/**/*.aidl telephony/java/**/*.aidl

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

Weird. Your "g_aidlFileList" is full of globs like "media/java/**/*.aidl" instead of complete paths like "media/java/android/media/IAudioService.aidl".
Not sure why this is happening for you.

Maybe the source code repo for your Android version has significant changes to the Android versions I tested against.
I'll have to check the repository. I just need the url from you.
You can run:

source "${PREFIX}/lib/android-svc-lib.sh"
Init
echo "$g_repoUrl"

to retrieve it?

from android-svc.

harphere avatar harphere commented on August 26, 2024

Here it is:
https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-11.0.0_r33

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

Okay the changes between 10 and 11 are kinda drastic.

https://github.com/aosp-mirror/platform_frameworks_base/blob/android-11.0.0_r33/Android.bp
vs
https://github.com/aosp-mirror/platform_frameworks_base/blob/android-10.0.0_r47/Android.bp

I used to rely on the paths of all .aidl files to be in Android.bp. For Android 11 I'll have to find another way.

Sorry for all the trouble you've been going through. For now I think it's safe to say that abdroid-svc is not compatible with Android 11 until I find a good way to get all the aidl file paths.
Maybe I can clone the whole pmatform_ftameworks_base repo as a workaround for now or something like that.

from android-svc.

harphere avatar harphere commented on August 26, 2024

No worries. Thanks for being so responsive. Hope you can figure something out and I'll be ready to give it another shot.

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

I hope I fixed it in the new release. https://github.com/T-vK/android-svc/releases/tag/0.2.0b

Feedback would be appreciated.

from android-svc.

harphere avatar harphere commented on August 26, 2024

Thanks for the work on this. I can now call methods successfully. My intention in using your tool is to set speakerphone on but I'm having some trouble with the arguments. The method I'm looking at is void setSpeakerphoneOn(IBinder cb, boolean on);. Boolean is easy enough but what to pass for the first argument? Feel free to close this issue if you like since it is resolved and I'll open another one with my new question.

from android-svc.

T-vK avatar T-vK commented on August 26, 2024

That's a very difficult question.
I haven't been able to convert all the data types yet:

ConvertDataType () {

You might get away with passing a 0 as the first argument to your function. But IBinder generally is a very complex Object data type:
https://developer.android.com/reference/android/os/IBinder
I definitely need some help from very knowledgable people to figure out if this can be implemented in Bash. But since all arguments are internally passed as strings to androids service utility and strings cannot contain null bytes, it may not be possible without modifying and recompiling the service utility. Which is not to say that this is impossible.

The recompiling can be done like this:

# Download required source code
git clone https://android.googlesource.com/platform/superproject
cd superproject
git submodule init
git submodule update frameworks/native
git submodule update system/libbase
git submodule update system/core
git submodule update system/logging
git submodule update bionic
# Set required include directories in CPATH
export CPATH="./frameworks/native/include:./system/libbase/include:./system/core/libcutils/include:./system/core/libutils/include:./system/logging/liblog/include:./system/core/libsystem/include:./frameworks/native/libs/binder/include:./bionic/libc/include"
# Build
g++ -DXP_UNIX -Wall -Werror -o service ./frameworks/native/cmds/service/service.cpp

So we could probably add a way to receive binary input without too much trouble, but still creating an IBinder object in Bash is a tough nut to crack. Maybe someone who understands how Java code is translated into machine code could help me out with this.

I will close the issue as it is solved now. But feel free to continue the discussion.

from android-svc.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.