Open Doutuq opened 4 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
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.
Option 3 is the one you need, have you tried it? Does it not work?
Did you close Telegram before replacing files?
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.
In that case I would suggest you making sure that session you are trying to use is valid
Just delete all folders from /data/data/org.telegram.web and copy new session files made with AndroidTelePorter to this folder
Is there any way to ADD session? / Create multiple-session config with AndroidTelePorter
Do you mean a few sessions? Like when you open Telegram and there are a few sessions? Yes you can just look at how Telegram stores them and do the same thing, but there is no built-in function that will do that for you
If you read main.py in this repository there will be documentation on how sessions are stored in Telegram. You can just locate sessions this way and it should work, I might think about adding this feature in future though
might think about adding this feature in future though
I think it is more complicated. You can store multiple accounts in telegram desktop as well but nobody had written software to create "tdata" with multiple accounts afaik, It's sad
As you can see in main.py There are 4 locations of tgnet.dat file: /data/data/org.telegram.messenger.web/files/tgnet.dat /data/data/org.telegram.messenger.web/files/account1/tgnet.dat /data/data/org.telegram.messenger.web/files/account2/tgnet.dat /data/data/org.telegram.messenger.web/files/account3/tgnet.dat
and 4 locations of userconfing.xml file: /data/data/org.telegram.messenger.web/shared_prefs/userconfing.xml /data/data/org.telegram.messenger.web/shared_prefs/userconfig1.xml /data/data/org.telegram.messenger.web/shared_prefs/userconfig2.xml /data/data/org.telegram.messenger.web/shared_prefs/userconfig3.xml
These are locations you will have if you have 3 accounts.
/data/data/org.telegram.messenger.web/files/tgnet.dat and /data/data/org.telegram.messenger.web/shared_prefs/userconfing.xml are files of session that will be started when you open Telegram app, all other sessions (account1, account2, account3) are used when you switch to another session and they probable replace org.telegram.messenger.web/files/tgnet.dat and /data/data/org.telegram.messenger.web/shared_prefs/userconfing.xml the moment you switch between sessions, but I have not manually tried this but I am almost sure there is nothing else needed apart from these files
About tdata - you can create many sessions with opentele and that's exactly how AndroidTelePorter converts mobile session to tdata
do i need to create API_ID and API_Hash if I need to use .session file with telethon?
You can just use official ones
Or you can create yours But it will be suspicious for telegram that you changed your api_id and api_hash without changing actual session
Can you provide me official id and hash. Or where can I find them? I tried but couldn't find anywhere.
Can you provide me official id and hash. Or where can I find them? I tried but couldn't find anywhere.
Can you tell me please how to find official api_id and api_hash?
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?