batreller / AndroidTelePorter

Converts Android's telegram session into telethon / tdata session, can also be used to exctract any data from mobile session (auth key, dc id, user id and other)
MIT License
72 stars 23 forks source link

I can't log in using a mobile session #13

Open Doutuq opened 2 months ago

Doutuq commented 2 months ago

Hello and thanks for your work!

In your code I added my variables: user id, dc id, auth key. I received the file: tgnet.dat and then moved it to the Android emulator in the folder /data/data/org.telegram.messenger

But I didn’t get the authorization in telegram, tell me where the problem could be?

batreller commented 2 months ago

You need to replace all original files in that directory with all files that AndroidTelePorter created for you, not just tgnet

Just delete all folders from /data/data/org.telegram.web and copy new session files made with AndroidTelePorter to this folder

Doutuq commented 2 months ago

I tested the file placement options:

Added to /data/data/org.telegram.messenger

option 1: I immediately added the “tgnet” folder (in “tgnet” I have 2 folders “files” (here is the “tgnet” file) and “shared_prefs (here is the “userconfing” file”)

option 2: added only the "tgnet" and "userconfing" files

option 3: added two folders "files" and "shared_prefs" with files inside, respectively

Please tell me, did I get everything I needed from AndroidTelePorter? Perhaps there are some other details?

Thanks for the answer.

batreller commented 2 months ago

Option 3 is the one you need, have you tried it? Does it not work?

Did you close Telegram before replacing files?

Doutuq commented 2 months ago

image

Yes of course, I did everything right! Perhaps I should look towards converting TDATA into a mobile session? but I also entered all the variables correctly there.

I tested this on an Android emulator and on a physical device, no result.

batreller commented 2 months ago

In that case I would suggest you making sure that session you are trying to use is valid