Replies: 3 comments
-
|
Rooted Android does not automatically make a packaged Flet app run as a privileged process. The Python code still runs inside the app sandbox, so I would first test the exact Scapy operation outside Flet: adb shell su -c 'python -c "from scapy.all import IP, Ether; print(Ether()/IP(dst="8.8.8.8"))"'If that fails, Flet cannot bypass it. If it works, keep Flet as the UI and call a small rooted helper with If that clears it up, marking the answer would help others with the same Android/root question. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! Iv already tested that, and managed to create and even emit custom packet via external wifi card which supports monitor mode. And frankly, that's how my app works right now - it uses termux as a root backend. But it's a crutch. :) |
Beta Was this translation helpful? Give feedback.
-
|
That result actually confirms the boundary: the working part is not "Python can do this on Android", it is "Termux is running the operation in a root-capable shell context". A packaged Flet APK will still be an Android app process with its own UID, SELinux/app sandbox rules, and no direct access to Termux's root session. So I would treat Termux as the prototype backend, not as evidence that the Flet process can be made privileged. The cleaner production shape is usually a small rooted helper/service that owns the packet operation, with the Flet app calling it through a narrow command/API. That keeps the UI unprivileged and limits the root surface area to the exact operation that needs it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hi! Id like to form packets with scapy, but on android cant even
import scapy.all- it saysPermission denied.How can we bypass that? My phone has root access, but cant understand: how to run flet app with root.
Code sample
Error message
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions