How to emulate Android on Whonix? Need to run Telegram

Hello, gentlemen.
I need run Telegram anonymously, so I’ve decided to use it inside Whonix.

But to run on a desktop client, Telegram needs to receive OTP on a mobile device first. That’s why I need Android emulator wrapped in Tor.

I’ve spent hours reading whonix wiki, dozens of forum discussions and user questions and there is still no working answer. Not among Whonix-related discussions, neither in a broadly Debian-related topics. I’m asking for understanding on this point.

As far as I managed to figure out is that the most preferred, still non-ideal way to emulate Android on Whonix is to run it with Anbox or Android-x86.

But the problem is that I can’t run these tools.

I am getting a lot of errors while trying to set it all up. And my knowledge on this topic is not enough to resolve them on my own. Below are the errors I get, please help me with this concern.

1. First of all, I used this guide
Anbox - Run Android Applications and Games
on the step C

sudo apt install --no-install-recommends linux-image-amd64 linux-headers-amd64 adb fastboot anbox

I am getting response

E: Unable to locate package anbox

I also cannot download Android image with the suggested command

scurl --tlsv1.2 --remote-name https://build.anbox.io/android-images/2018/07/19/android_amd64.img

getting “Couldn’t connect to server” error.
I assume this is because anbox.io is no longer exists, and redirects to Anbox github page instead. But yet I don’t know how to fix it.

2. Then I’ve tried Anbox official installation guide
docs/userguide/install.rst at master · anbox/docs · GitHub
Firstly it assumes some kernel modules installation , but it didn’t work for me. Probably because it is intended for Ubuntu, I don’t know.

I successfully executed Snap installation with

sudo snap install --devmode --beta anbox

then

snap info anbox

returns result on the screenshot

I have also successfully installed ADB using commands from here
docs/userguide/install_apps.rst at master · anbox/docs · GitHub

BUT I can’t see Anbox among the installed programms. I don’t know how to run it to see it’s GUI.
And if I try to install something like Telegram using command

adb install telegram.apk

I got the result

error: no devices/emulators found
Performing Push Install
adb: error: failed to get feature set: no devices/emulators found
zsh: exit 255 adb install telegram.apk

Here I stick to these two guides.
I have also tried several other guides, but ALL OF THEM returned errors of a different kind.

I desperately need your help, gentlemen, as I am nearly in desperation to find the answer myself, as I am not an experienced Linux user.

There is none i know at the moment:

  • Anbox dead
  • Waydroid dead

A ton of effort writing this forum post.

Best to read websites from top to bottom. On the top it says:

This page is archived.

https://anbox.io/ redirects to Anbox · GitHub which says it is deprecated.

So bothering with it a waste of time unless you are the one to Fork (software development) - Wikipedia it.

How come?

related:

(Whonix is based on Kicksecure.)

Well, Winamp is deprecated too, but it still can be used if you download it.
Anbox does not seems to me like a strongly online and update-dependent tool, isn’t it? What’s the difference here?

I will try Waydroid.

yeah sadly it is in similar loop of anbox, dead project just their devs didnt put it into words on their page.

  • Check this issue, is a main step into the installation of it, until now nothing been done to solve it:
  • Confusing bad development:
  • Not a Tor friendly anyway:

Please define “dead”.
I won’t be able to install and use it?

yes, should be obvious from the tickets i have added.

Unfortunately, it wasn’t that obvious for me since I am not a Linux-savvy user. But anyway, thank you.

1) So how do I run torified anonymous Telegram session then?
If both Anbox and Waydroid aren’t functional anymore as you say.

2) What about Custom Workstations for Whonix-Gateway?
Theoretically, I could use torified Windows Workstation to run Android emulator in it.
Anonymize Other Operating Systems
Is the information in the article is actual and up to date?
The short explanation on setting up does not include Windows 10. Is it the same process as for Windows 7?

TransparentProxyLeaks · Wiki · Legacy / Trac · GitLab
As I noticed, most of the transparent proxy leaks described above are based on the network usage.
What if I’ll set up a custom firewall with a whitelist to block all of the connections except the one I need (Telegram client and Android emulator)? Will it help to resolve these risks? And of course, under no circumstances will I run this VM untorified.

I’m sorry if it’s offtopic.

Dunno if Whonix-Android-Workstation would work.

Otherwise, there is no known functional solution.

Unspecific to Whonix.

You could attempt to research this as per:

This would be by looking for a solution that is compatible with Debian. If any exist, that would have high chance of being compatible with Whonix as well.

User Expectations - What Documentation Is and What It Is Not

There are no solutions to solve the issue of TransparentProxyLeaks and I doubt there ever will be. It’s a far too complex issue.

An application based firewall needs to run on the same operating system. This however requires trusting the operating system but in that threat model Windows is untrusted. Running a firewall in a different VM can only be IP / port based. Therefore never be complete. In short, no. There can be no shortcuts taming an untrustworthy operating system to make it trustworthy.

2 Likes

You could consider using a privacycoin like Monero to pay some sketchy person to give you an OTP code for a cell phone number that they control. You could look for a website like that which is accessible via tor. However, you would have to trust that person, and that person may or may not be able to recover the telegram account at any time to see your private messages (assuming you do not just get scammed).

Does telegram allow for voip number verification? I am not familiar with the program.

You might consider using something else to communicate anonymously on whonix. You can look into https://anonymousplanet.org/ to explore some ideas.

The Hitchhiker’s Guide to Online Anonymity | The Hitchhiker’s Guide to Online Anonymity has a subheader (under the whonix route header) that discusses using an android virtual machine. You could look into if this is suitable. The guide has not been updated since 2023, so it may or may not be current.