-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error installing deb package #1
Comments
Sounds like a general problem with your Termux installation. |
I reinstalled Termux, now that issue is gone but I'm facing another one. |
What does it return for android-svc list-packages ? |
|
That looks alright. |
Yes: |
Does
produce the same error for you? What does
return for you? |
No, it's a different error:
|
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" |
Hope it helps: |
Weird. Your "g_aidlFileList" is full of globs like "media/java/**/*.aidl" instead of complete paths like "media/java/android/media/IAudioService.aidl". Maybe the source code repo for your Android version has significant changes to the Android versions I tested against. source "${PREFIX}/lib/android-svc-lib.sh"
Init
echo "$g_repoUrl" to retrieve it? |
Here it is: |
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 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. |
No worries. Thanks for being so responsive. Hope you can figure something out and I'll be ready to give it another shot. |
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. |
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 |
That's a very difficult question. android-svc/android-svc-lib.sh Line 268 in 3aaf17f
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: 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. |
Hi, when trying to install on Termux, running
apt install ./android-svc_0.1.0_all.deb
I'm facing the following:Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'android-svc' instead of './android-svc_0.1.0_all.deb' The following additional packages will be installed: git libuuid pcre2 vim vim-runtime wget The following NEW packages will be installed: android-svc git libuuid pcre2 vim vim-runtime wget 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 9155 kB/9161 kB of archives. After this operation, 44.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 /storage/emulated/0/Download/android-svc_0.1.0_all.deb android-svc all 0.1.0 [5856 B] Err:2 https://termux.org/packages stable/main aarch64 pcre2 aarch64 10.36 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] Err:3 https://termux.org/packages stable/main aarch64 git aarch64 2.29.2 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] Err:4 https://termux.org/packages stable/main aarch64 libuuid aarch64 1.0.3-4 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] Err:5 https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx stable/main aarch64 wget aarch64 1.20.3-3 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443] Err:6 https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx stable/main aarch64 vim-runtime all 8.2.2100 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443] Err:7 https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx stable/main aarch64 vim aarch64 8.2.2100 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443] E: Failed to fetch https://termux.org/packages/aarch64/pcre2_10.36_aarch64.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] E: Failed to fetch https://termux.org/packages/aarch64/git_2.29.2_aarch64.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] E: Failed to fetch https://termux.org/packages/aarch64/libuuid_1.0.3-4_aarch64.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.39 443] E: Failed to fetch https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx/aarch64/wget_1.20.3-3_aarch64.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443] E: Failed to fetch https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx/all/vim-runtime_8.2.2100_all.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443] E: Failed to fetch https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx/aarch64/vim_8.2.2100_aarch64.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 172.64.81.200 443]
The text was updated successfully, but these errors were encountered: