-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add android browser (can receive viewonce) #2201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for opening this pull request and contributing to the project! The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch. In the meantime, anyone in the community is encouraged to test this pull request and provide feedback. ✅ How to confirm it worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
d049364 to
38f35fa
Compare
|
sir i got this error TypeError: Browsers.android is not a function Node.js v24.11.1 my package json {
"dependencies": {
"@cacheable/node-cache": "^1.7.4",
"@whiskeysockets/baileys": "github:WhiskeySockets/Baileys#android-browser",
"baileys": "github:WhiskeySockets/Baileys",
"pino": "^9.14.0"
},
"name": "bot_wa",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "node --inspect --expose-gc index.js",
"start": "node index.js"
},
"keywords": [
"baileys",
"whatsapp",
"bot"
],
"author": "wolep",
"license": "MIT",
"type": "module"
}my config sock = makeWASocket({
version,
auth: {
creds: state.creds,
/** caching makes the store faster to send/recv messages */
keys: makeCacheableSignalKeyStore(state.keys, logger),
},
browser: Browsers.android('13'), // here,
msgRetryCounterCache,
cachedGroupMetadata: store.getGroupMetadata,
logger,
patchMessageBeforeSending,
syncFullHistory: false,
shouldSyncHistoryMessage: msg => {
console.log("should sycn history message", msg)
return false
},
});i did delete node_modules and package-lock.json, and then hit npm i |
You didn't even use the pr? The code is not pushed into main. |
damn... i wasnt notice my package.json 😭😭.. brb testing. sorry i was sleepy lol xD |
| const getPlatformType = (platform: string): proto.DeviceProps.PlatformType => { | ||
| const platformType = platform.toUpperCase() | ||
| if (platformType === 'ANDROID') { | ||
| return proto.DeviceProps.PlatformType.ANDROID_PHONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting. Is this the only thing for companion devices? Can you try ipad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also try enum IPHONE
|
Tested and working |
|
Crazy workaround fix 🙌 amazing job |
|
Good fix but we need to insure full support for companion devices @jlucaso1 could you use frida perhaps to pin the android companion mode to bartender? |
|
Here I can't connect WhatsApp Business, it only connects normally. It works but had this problem |
i found this when i was reversing companion mode, if you guys want i have ~90% reversed (CRSC v2/v3) |
try changing from platform: config.browser[1].toLocaleLowerCase().includes('android')
? proto.ClientPayload.UserAgent.Platform.ANDROID
: proto.ClientPayload.UserAgent.Platform.WEB,to platform: config.browser[1].toLocaleLowerCase().includes('android')
? proto.ClientPayload.UserAgent.Platform.SMB_ANDROID
: proto.ClientPayload.UserAgent.Platform.WEB, |
This needs to be handled with code rather than posting comments on fixes. Anyways, the reason this has not gotten an immediate approval from me is due to the lack of safeguards or testing for this in regards to incomplete companion mode support which could increase attack vectors due to lack of implementation |
|
update : i cant use pairing code with this pr.. qr havent tested yet. |
|
Tested and working ✅ Edit: Pairing code doesn’t work properly. |
does it work with pairing code? |
|
This PR is stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 14 days |

how to use