You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pythonforandroid.recipe import RustCompiledComponentsRecipe
class Pyreqwest_impersonateRecipe(RustCompiledComponentsRecipe):
version = "v0.4.1"
url = "https://github.com/deedy5/pyreqwest_impersonate/archive/refs/tags/{version}.tar.gz"
use_maturin = True
hostpython_prerequisites = ["typing_extensions"]
site_packages_name = "pyreqwest_impersonate"
recipe = Pyreqwest_impersonateRecipe()
buildozer.spec
# (str) The directory in which python-for-android should look for your own build recipes (if any)
p4a.local_recipes = /home/odinson/PycharmProjects/OSINT/src/python-for-android/recipes/
Logs
File "/home/odinson/PycharmProjects/OSINT/src/python-for-android/recipes/pyreqwest_impersonate/__init__.py", line 1, in <module>
from pythonforandroid.recipe import RustCompiledComponentsRecipe
ImportError: cannot import name 'RustCompiledComponentsRecipe' from 'pythonforandroid.recipe' (/home/odinson/PycharmProjects/OSINT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py)
buildozer clean I did too. I did everything as required according to the documentation.
@T-Dynamos Thank you for efficiency. I appreciate it. So far I see the process going on. In a few minutes I’ll run a test on my smartphone, and if anything happens, I’ll write about it.
[INFO]: Building pyreqwest_impersonate for arm64-v8a
[INFO]: pyreqwest_impersonate apparently isn't already in site-packages
[ERROR]: `rustup` was not found on host system.Please install it using :
`curl https://sh.rustup.rs -sSf | sh`
Should I install this on my system, either on a virtual one, or on an android?
@T-Dynamos Is there any additional configuration required for rust? (that's what he suggested):
To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.
This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish" # For fish
Since he still writes:
[ERROR]: `rustup` was not found on host system.Please install it using :
`curl https://sh.rustup.rs -sSf | sh`
I'm sorry, I just want to do everything right.
If you need anything else, please tell me.
@krolaper What is your current shell? Check it using ps command. If it is bash you need to add a line in ~/.bashrc file: . "$HOME/.cargo/env" <-- This line
This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish" # For fish
@T-Dynamosodinson@PodinsonC:~$ ps PID TTY TIME CMD 62606 pts/1 00:00:00 bash 63470 pts/1 00:00:00 ps
i don't undestand )
i write - . "$HOME/.cargo/env"
same error, now I'll reboot the PC and try again
@T-Dynamos Help. I accidentally wrote this into the virtual environment I'm trying to package in. What needs to be written down to fix it back, otherwise he no longer knows the buildozer command
Compiling foreign-types v0.5.0 ] 101/201: boring-sys-imp(build.rs),...
error: failed to run custom build command for `boring-sys-imp v2.1.0`d), un...
Caused by:
process didn't exit successfully: `/home/odinson/PycharmProjects/OSINT/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pyreqwest_impersonate/arm64-v8a__ndk_target_21/pyreqwest_impersonate/target/debug/build/boring-sys-imp-395ee56c15761dd7/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=BORING_BSSL_PATH
cargo:rerun-if-env-changed=ANDROID_NDK_HOME
--- stderr
thread 'main' panicked at /home/odinson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/boring-sys-imp-2.1.0/build.rs:158:18:
Please set ANDROID_NDK_HOME for Android build: NotPresent
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
💥 maturin failed=========> ] 110/201: brotli
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/home/odinson/PycharmProjects/OSINT/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3.11" PYTHON_SYS_EXECUTABLE="/home/odinson/PycharmProjects/OSINT/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3.11" "cargo" "rustc" "--features" "pyo3/extension-module" "--target" "aarch64-linux-android" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/odinson/PycharmProjects/OSINT/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pyreqwest_impersonate/arm64-v8a__ndk_target_21/pyreqwest_impersonate/Cargo.toml" "--lib"`
I have Android ndk /home/odinson/.buildozer/android/platform/android-ndk-r25b/
How can I indicate the correct path to them, and what needs to be written down next, what does it require?
Compiling encoding_rs v0.8.34====> ] 189/201: mime_guess, pyo3
error[E0432]: unresolved import `simd_funcs`/201: encoding_rs, pyo3
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/x_user_defined.rs:16:13
|
16 | use simd_funcs::*;
| ^^^^^^^^^^ use of undeclared crate or module `simd_funcs`
error[E0412]: cannot find type `u16x8` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:129:40
|
129 | pub fn simd_at(&self, i: usize) -> u16x8 {
| ^^^^^ not found in this scope
|
help: consider importing this type alias
|
39 + use core::simd::u16x8;
|
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:131:21
|
131 | assert!(i + SIMD_STRIDE_SIZE / 2 <= self.len);
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:161:12
|
161 | if SIMD_STRIDE_SIZE / 2 <= self.len {
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:162:47
|
162 | let len_minus_stride = self.len - SIMD_STRIDE_SIZE / 2;
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:175:27
|
175 | offset += SIMD_STRIDE_SIZE / 2;
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:256:8
|
256 | if SIMD_STRIDE_SIZE <= len {
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:257:38
|
257 | let len_minus_stride = len - SIMD_STRIDE_SIZE;
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:260:52
|
260 | ...rc.simd_at(offset + (SIMD_STRIDE_SIZE / 2));
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find value `SIMD_STRIDE_SIZE` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:273:23
|
273 | offset += SIMD_STRIDE_SIZE;
| ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `ALU_STRIDE_SIZE`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:1323:9
|
1323 | pub const ALU_STRIDE_SIZE: usize = 8;
| ------------------------------------- similarly named constant `ALU_STRIDE_SIZE` defined here
error[E0425]: cannot find function `load16_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/x_user_defined.rs:125:34
|
125 | let input = unsafe { load16_unaligned(src_ptr.add(i * 16)) };
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `simd_unpack` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/x_user_defined.rs:126:35
|
126 | let (first, second) = simd_unpack(input);
| ^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `store8_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/x_user_defined.rs:129:17
|
129 | store8_unaligned(dst_ptr.add(i * 16), shift_upper(first));
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `store8_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/x_user_defined.rs:130:17
|
130 | ... store8_unaligned(dst_ptr.add((i * 16) + 8), shift_upper(second));
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `load16_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:137:31
|
137 | ... unsafe { to_u16_lanes(load16_unaligned(self.ptr.add(byte_index))) }
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `to_u16_lanes` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:137:18
|
137 | ... unsafe { to_u16_lanes(load16_unaligned(self.ptr.add(byte_index))) }
| ^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `simd_byte_swap` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:166:28
|
166 | simd = simd_byte_swap(simd);
| ^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `store8_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:170:21
|
170 | ... store8_unaligned(other.as_mut_ptr().add(offset), simd);
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `contains_surrogates` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:172:20
|
172 | if contains_surrogates(simd) {
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `simd_byte_swap` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:262:25
|
262 | first = simd_byte_swap(first);
| ^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `simd_byte_swap` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:263:26
|
263 | second = simd_byte_swap(second);
| ^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `simd_is_basic_latin` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:265:17
|
265 | if !simd_is_basic_latin(first | second) {
| ^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `ascii_to_basic_latin`
|
::: /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/ascii.rs:231:9
|
231 | / pub unsafe fn $name(
232 | | src: *const $src_unit,
233 | | dst: *mut $dst_unit,
234 | | len: usize,
... |
336 | | None
337 | | }
| |_________- similarly named function `ascii_to_basic_latin` defined here
error[E0425]: cannot find function `simd_pack` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:268:26
|
268 | let packed = simd_pack(first, second);
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `store16_unaligned` in this scope
--> /home/tdynamos/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.34/src/handles.rs:271:17
|
271 | store16_unaligned(dst.as_mut_ptr().add(offset), packed);
| ^^^^^^^^^^^^^^^^^ not found in this scope
Some errors have detailed explanations: E0412, E0425, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `encoding_rs` (lib) due to 24 previous errors
warning: build failed, waiting for other jobs to finish...
💥 maturin failed===================> ] 191/201: pyo3
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/tmp/build-env-c_wq7jrr/bin/python" PYTHON_SYS_EXECUTABLE="/tmp/build-env-c_wq7jrr/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--target" "armv7-linux-androideabi" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/tdynamos/Expreiments/PythonTest/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyreqwest_impersonate/armeabi-v7a__ndk_target_23/pyreqwest_impersonate/Cargo.toml" "--release" "--lib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/build-env-c_wq7jrr/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
ERROR Backend subprocess exited when trying to invoke build_wheel
@T-Dynamos I completed it #3012 (comment)
Compilation with rust was successful. I'm waiting for the full compilation to complete. And this is with version 0.4.1
I was happy early. Log:
Activity
T-Dynamos commentedon May 5, 2024
@krolaper I appreciate your efforts. You need to set
p4a.branchto develop.krolaper commentedon May 5, 2024
@T-Dynamos I just need to uncomment the line
#p4a.branch = masterinbuildozer.spec?T-Dynamos commentedon May 5, 2024
@krolaper Yes
krolaper commentedon May 5, 2024
@T-Dynamos Thank you for efficiency. I appreciate it. So far I see the process going on. In a few minutes I’ll run a test on my smartphone, and if anything happens, I’ll write about it.
krolaper commentedon May 5, 2024
@T-Dynamos During packing:
Should I install this on my system, either on a virtual one, or on an android?
T-Dynamos commentedon May 5, 2024
@krolaper On which you are building. In your case
Linux mint.krolaper commentedon May 5, 2024
@T-Dynamos Is there any additional configuration required for rust? (that's what he suggested):
Since he still writes:
I'm sorry, I just want to do everything right.
If you need anything else, please tell me.
T-Dynamos commentedon May 5, 2024
@krolaper What is your current shell? Check it using
pscommand. If it is bash you need to add a line in~/.bashrcfile:. "$HOME/.cargo/env"<-- This linekrolaper commentedon May 5, 2024
@T-Dynamos
odinson@PodinsonC:~$ ps PID TTY TIME CMD 62606 pts/1 00:00:00 bash 63470 pts/1 00:00:00 psi don't undestand )
i write -
. "$HOME/.cargo/env"same error, now I'll reboot the PC and try again
T-Dynamos commentedon May 5, 2024
@krolaper Yes it is bash.
Just run this command to auto add that line:
And restart your terminal.
krolaper commentedon May 5, 2024
@T-Dynamos Help. I accidentally wrote this into the virtual environment I'm trying to package in. What needs to be written down to fix it back, otherwise he no longer knows the buildozer command
T-Dynamos commentedon May 5, 2024
@krolaper Sorry I have no knowledge about venv.
krolaper commentedon May 5, 2024
@T-Dynamos I corrected my mistake, just went bash and deleted the unnecessary
krolaper commentedon May 5, 2024
@T-Dynamos log buildozer:
I have Android ndk
/home/odinson/.buildozer/android/platform/android-ndk-r25b/How can I indicate the correct path to them, and what needs to be written down next, what does it require?
T-Dynamos commentedon May 5, 2024
@krolaper Sorry for late:
Here you go:
krolaper commentedon May 5, 2024
@T-Dynamos log buildozer
T-Dynamos commentedon May 5, 2024
@krolaper Had some progress:
Before running buildozer do:
rustup default nightlythen:T-Dynamos commentedon May 5, 2024
@deedy5 Maybe you can help here:
deedy5 commentedon May 5, 2024
@T-Dynamos
Try it with version v0.4.0 for now.
krolaper commentedon May 5, 2024
@T-Dynamos I completed it #3012 (comment)
Compilation with rust was successful. I'm waiting for the full compilation to complete. And this is with version 0.4.1
I was happy early. Log:
Now I'll try with version 0.4.0
deedy5 commentedon May 5, 2024
With v0.4.0 use
rustup default stableT-Dynamos commentedon May 5, 2024
@deedy5 Thank you!. I will test this now.
T-Dynamos commentedon May 5, 2024
Final recipe:
I will add this to p4a later, and don't ask me why I have to set
ANDROID_NDK_HOMEtwice :)T-Dynamos commentedon May 5, 2024
@krolaper Please consider informing, if it worked on smartphone.
krolaper commentedon May 5, 2024
@T-Dynamos version 0.4.0:
Packing was successful.
Everything started on the smartphone too.
Thanks a lot.
deedy5 commentedon May 5, 2024
@T-Dynamos
Build with
v0.4.2(faster than 0.4.0)T-Dynamos commentedon May 5, 2024
@deedy5 Builds fine.
deedy5 commentedon Jul 29, 2024
@T-Dynamos
pyreqwest_impersonatehas been renamed toprimp