yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] :
by download you mean installing the app?

and then using total commander to grab the apk, then patch it back on computer?

is there any alternative beside total commander? like root file manager or es file manager?

thanks in advance.
[Android Apps and Games] lorantm:
Yes, you should:

- Install it from play store and save it

- patch it and copy to your device

- uninstall official apk and install the patched one

I use Total Commander but you can find many apps that can save installed apks.
[Android Apps and Games] :
okay, i got it, and now running the patch. if you don't mind, can you put that note on x86 devices at OP when this one working x86?

just a little request, so everyone else running x86 wouldn't have the same issues as mine. :o
[Android Apps and Games] lorantm:
I thought this was evident: one should not install apks whose target architecture differs from the device's.

Like Android version, dpi and such, this one is also mentioned at each downloadable apk for a good reason.
[Android Apps and Games] BooBzi:
Works very well for me with "Facebook 78.0.0.3.67 beta" on my Moto X Style.

Only bug that I noticed on message screen is that left top "back" arrow doesn't work, but you can go to message list with your devices back button, also right top info button doesn't work, but I really don't know why you need it.

So thanks for sharing this out!
[Android Apps and Games] :
indeed it is, but all x86 devices can run arm based apps using arm translation, which is why it's still loading the app, but can't pass through the loading screen. and both in apkmirror and apkpure doesn't provide x86 version, so yeah.

anyway thanks for your patch, some bugs are tolerable. pretty much satisfied.
[Android Apps and Games] raptorddd:
To make back ups of installed apps i use, assistant for android its small size.
[Android Apps and Games] wolfballz:
You can also use a file browser and navigate to where the app installed and copy the apk file instead of installing and using another app to do it. Personal preference.
[Android Apps and Games] iscaela:
Just stumbled on this project and found it fascinating that Messenger code and resources were still present in the Facebook app. I was also curious about why your patcher runs "offline" (my guess was that this was the better option for non-rooted users) and checked the thread, and found this answer.

Having done lot of Dalvik disassembly and messing with apps before things like Lucky Patcher existed, I don't believe the person asking the original question was trying to belittle the amount of work involved in reverse-engineering the app internals, but rather is just accustomed to a different user experience for applying patches. I don't think that expectation is entirely unreasonable either, but there are clear technical challenges, as you've encountered and documented.

Some suggestions if you ever want to try again, though:

* It is possible to make the dedexer/disassembler not dump all of the classes but just the subset of fields, methods etc. associated with the classes you need to modify, and then reassemble and inject your modified bytecode, passing through the existing data and fixing up sizes and offsets.

* Runtime patching with Xposed would be relatively painless for both the developer and the user, though it requires root. The Facebook app is... unique in its construction and has a history of messing with VM internals so I'm not sure how well it plays with Xposed.
[Android Apps and Games] wolfballz:
I personally prefer this patching method. I am rooted but don't use xposed and wouldn't want to have to install xposed just to patch something. To each their own. (was not knocking what you said, just stating my preference)
[Android Apps and Games] Lubovic:
I finally rooted my phone to debloat the old facebook app.

Now I'm using your patch and its amazing, thanks!
[Android Apps and Games] lorantm:
Thanks for your suggestion.

Although I'm not familiar with Xposed and I don't plan to do mods for it.
[Android Apps and Games] lorantm:
Version 1.6, 05-20-2016

● Support for latest versions (tested up to 79.0.0.0.39 alpha)

● Basketball game re-fix

● Much faster and error-free patching

● APK verification

● Reduced size (removed apktool, wrote own manifest hacking routine)

● Improved cleanup method - requires less free space

UPDATE: Version 1.7, 05-21-2016

● Support for latest versions (tested up to 79.0.0.0.52 alpha)

[actually it was just a quick fix :)]

See OP!
[Android Apps and Games] apung:
last update from GP FB version 78.0.0.13.67 :

FBPATCHER EASY STARTER SCRIPT BY LORANTM

--------------------------------------------------

Please place the Facebook apk in this directory,

renamed to 'fb.apk' and press any key to continue.

--------------------------------------------------

Press any key to continue . . .

*** RUNNING FBPATCHER VERSION 1.7 BY LORANTM ***

Performing cleanup... done!

Extracting patching tools... done!

Detected Facebook version 78.0.0.13.67, which is supported.

Extracting dex files... done!

Relevant classes found in classes2.dex:

Fragment

GatekeeperWriter

ForceMessenger

FacebookActivityDelegateImpl

Relevant classes found in classes10.dex:

MuteThreadWarningNotification

BballView.3

MessagesVideoConfigModule

Relevant classes found in classes11.dex:

MessengerMSiteUriIntentBuilder

DiodeMessengerActivity

ThreadListFragment

Patching manifest... done!

Disassembling classes2.dex... done!

Disabling Messenger forcer... done!

Patching FacebookActivityDelegate... done!

Assembling classes2.dex... done!

Disassembling classes10.dex... done!

Patching MuteThreadWarningNotification... done!

Patching basketball game... done!

Enabling video sending from gallery... done!

Assembling classes10.dex... done!

Disassembling classes11.dex... done!

Creating entry points for Messenger code... done!

Adding Messenger thread list... Failed to add Messenger thread list! Exiting (102)...

null

--------------------------------------------------

If there were no errors, you should now have a

file 'fb-patched.apk' in this directory.

Press any key to quit.

--------------------------------------------------

Press any key to continue . . .

any solution ?
[Android Apps and Games] fijasko:
On the latest 79.0.0.0.52 alpha, I can see the thread list in the Messages window, but I can't actually open any conversation.

The previous build (79.0.0.0.39 alpha) works fine.

Maybe Facebook messed up something?

I guess we'll see when the next alpha is up.
[Android Apps and Games] lorantm:
This has just been fixed in 1.7.
[Android Apps and Games] lorantm:
Is 78.0.0.13.67 an existing version? Google didn't find it.

Use 77.0.0.20.66 (latest stable) or 79.0.0.0.52 (latest alpha).
[Android Apps and Games] apung:
okay. i back to fb 77.0.0.20.66

thanks ...
[Android Apps and Games] lorantm:
It seems it was rolled out for you earlier. Play store offers 77.0.0.20.66 for me as the latest version.

If someone uploads that apk anywhere, I'll investigate the issue.

Anyways, it's strange since the latest alpha works perfectly.

Update: no need to upload it anywhere: same with 78.0.0.7.67 beta

The problem is the following: classes2.dex contains Fragment from which a method name should be extracted in order to add the thread list properly.

It is evident that classes2.dex should be disassembled before the dex that contains DiodeMessengerActivity, but that's not the case here as classes10/11.dex are disassembled first (because of alphabetical order). So there is no Fragment class extracted, trying to patch Diode results in a nice NullPointerException. I'll come up with a solution today.

Update2: The problem is more serious than I thought. I was able to patch the beta but neither the tread list, nor the conversation window works. You'll have to use alphas until I find a way to fix this.

The root of the problem: DiodeMessengerActivity and MSiteUrlUtils were modified by Facebook.
[Android Apps and Games] apung:
sorry long time ... very bad internet connection mobile in indonesian :D

this link GP FB 78.0.0.13.67 https://cloud.mail.ru/public/2LAy/v718Kew6A
[Android Apps and Games] lorantm:
Version 1.8 is out, problem solved.
[Android Apps and Games] DaveX2012:
[MENTION=7414440]lorantm[/MENTION] one thing I wish you can add is that New Message option.
[Android Apps and Games] lorantm:
You can send messages to people you have never written to before, just go to their profile and click Message.

Only group messages can't be created right now but I'll see what I can do to add that feature.
[Android Apps and Games] Einwod:
Worked like a charm. Thank goodness no more bloated messenger. Excellent work.
[Android Apps and Games] subscope:
Right now used 1.8 to patch last stable version and so far so good! Increadible stability! Thank you dude for your incredible work ;)
[Android Apps and Games] DaveX2012:
Yeah I know but if you can create like native messager it would be awesome. Plus ➕ sign in the button.

I'm having problems with notification. When you received notification you can't open by tapping notification.
[Android Apps and Games] lorantm:
To do this, a new layout should be added so I would have to add apktool again and patching would be slower.

I can easily add a title bar back button that could function as a new message button.

I don't have any problems with notifications.
[Android Apps and Games] DaveX2012:
Cool.... That's weird... Can't open notification.
[Android Apps and Games] lorantm:
Which version is that?

Does clicking a contact in the right side chat bar work?

It should generate the same Intent as the notification.
[Android Apps and Games] DaveX2012:
Yeah.. But not notification
[Android Apps and Games] lorantm:
It's strange.

I'm on the latest stable (78.0.0.13.67) and it works.

Update: just tested 79.0.0.0.52 on an LG G2, the message notification took me to ThreadViewActivity so it worked well.
[Android Apps and Games] DaveX2012:
can you provide apk link. Can't find in apk mirror.
[Android Apps and Games] lorantm:
https://cloud.mail.ru/public/2LAy/v718Kew6A

Update: don't use 79.0.0.0.52 alpha as it crashes while trying to use the search feature. The patcher has nothing to do with it since the bug is in the official version, I tried.
[Android Apps and Games] mahaseno:
please..

can we replace the old version of messenger in the latest version of facebook apk ?
[Android Apps and Games] eragonshurtugal:
Waow the whole patching process took 10 mins. Can't wait to try.
[Android Apps and Games] thiron03:
Last update Ver 78.0.0.16.67 work for asus zen 4 Lollipop
[Android Apps and Games] lorantm:
Sorry guys, but it's over.

Facebook has fully obfuscated resource names in v80 alpha so resource lookup (which was needed) is no longer possible. The patcher won't work anymore. :(
[Android Apps and Games] zacshawn:
Sadly to hear that. Hopefully in future you can find another way to patch it again, cause i really love your patcher. Anyway thanks for your hard work. Great jobs!
[Android Apps and Games] vodailam:
You have worked hard someday. Thank you so much and expecting your new patch at future, lorantm! :)
[Android Apps and Games] a.broken.star:
You are one of the most patient listener i have found here. You listen and reply to almost all of the problems even if they are stupid. I'll stay with the last FB version that supports your patcher.. Thanx a lot bro for your work...
[Android Apps and Games] thereassaad:
Could u check this version of fb v80.0.0.0.18 its patched but only bug with messenger when i tap on it its just restarting fc , so its same as some old versions u can check ,

http://www.apkmirror.com/apk/facebook-2/facebook/facebook-80-0-0-0-18-release/
[Android Apps and Games] lorantm:
Okay.

It's strange as resource names aren't obfuscated in this version, unlike in the previous alpha.

I'll see what can I do.

Update: I made it working. A single line had to be deleted (a method in ThreadListFragment tried to write a value to a non-static member of an uninstantiated class that resulted in a NullPointerException). I'll release the new version in the evening because currently I'm at work.

Update2: resource name obfuscation is no longer a problem. I implemented a new resource name lookup method that doesn't even need aapt and works for the latest versions. Of course there will be a fallback to the old lookup method in case of earlier versions that don't have resource names within the primary dex.
[Android Apps and Games] lorantm:
1.9 is out!

Latest alphas are now patchable, even 80.0.0.0.9 which has obfuscated resource names. :)
[Android Apps and Games] wolfballz:
Talk about being on top of it! Good work man. Keep it up.
[Android Apps and Games] DaveX2012:
Awesome. Hopefully you can implement New Message options in coming version.
[Android Apps and Games] imbonfi:
How can download the fb patched apk?? i can't replace because i don't have apk

If there were no errors, you should now have a

file 'fb-patched.apk' in this directory.

Press any key to quit.
[Android Apps and Games] lorantm:
Download the official apk from apkmirror, rename it to fb.apk, put it in the same directory with fbpatcher and run the bat file.

You'll get the patched apk when it's done.
[Android Apps and Games] imbonfi:
i have done but say:

Input file does not exist: fb.apk

--------------------------------------------------

If there were no errors, you should now have a

file 'fb-patched.apk' in this directory.

Press any key to quit.
[Android Apps and Games] lorantm:
It's clear that the apk file isn't there...

It should be renamed to fb.apk and placed next to the patcher.

Maybe your OS hides known file extensions and '.apk' is one of them, so you may have double extension on the file ('fb.apk.apk', but you see it as 'fb.apk' because the extension is hidden).
[Android Apps and Games] imbonfi:
[IMG="screen"]http://i.imgur.com/wz1cttQ.png[/IMG]
[Android Apps and Games] lorantm:
Just as I thought: apk files are associated with BlueStacks in your case. That file is actually named 'fb.apk.apk' but you don't see the last extension.

What you should do is remove the extra extension so you should only see 'fb'. It will work.
[Android Apps and Games] Cpt.Nevr:
Can someone please upload patched fb.apk?

running 64bit Win7, latest java update, but processing more than 30 minutes and stucking at "disassembling classes9.dex" or classes8, 11...

Tried FB version 80 (both) and 78

Thanks
[Android Apps and Games] lorantm:
I tested it on Linux and Win7 x64, worked well.

You should kill all Java processes in task manager and try again.

Edit: even for a 5 years old 1st gen i5 notebook, the whole process took 7 mins.
[Android Apps and Games] imbonfi:
Thanks :laugh:
[Android Apps and Games] Cpt.Nevr:
I belive you :)

But restarted computer, proces is quite fast, but now (again) 27 minutes stucking at "disassembling classes11.dex" ...

:rolleyes:

So if someone can please send me patched fb.apk
[Android Apps and Games] DaveX2012:
No...
[Android Apps and Games] Cpt.Nevr:
Dave2012X: You are such a kind man. Thinking about hitting the thanks button for your post...
[Android Apps and Games] wolfballz:
Did you try killing all Java processes like [MENTION=7414440]lorantm[/MENTION] said?
[Android Apps and Games] lorantm:
I've just released v2.0.

It has the long-awaited 'New message' option: you should simply tap the Back button on the thread list's title bar to start composing a new message. You can even create group messages!

Although the latest alpha (80.0.0.0.27) can be patched, I don't recommend using it. Even the official unpatched version has a serious bug that makes viewing people's profiles impossible as the app always crashes then.
[Android Apps and Games] apung:
nice option FBpa.tcher v2.0 ... "New message" working latest FB v79.0.0.7.71 stable on GP
[Android Apps and Games] ulanbukas:
thank you for the continous update sir
[Android Apps and Games] Cpt.Nevr:
Of course, but I have no luck. Today v2.0 and 90 minutes at "disassembling classes10.dex" so I have give it up..

I will try tomorrow on another computer :)

Advantage -nice battery life now on my Z1C without facebook.apk :)
[Android Apps and Games] Minski256:
Latest Facebook v74.0.0.21.69 not working correctly, version 73.0.0.18.66 is OK :good:
[Android Apps and Games] lorantm:
Just tested 74.0.0.21.69, working fine. Maybe you have downloaded a corrupted apk? Try at apkmirror.
[Android Apps and Games] Minski256:
When I open my friend without any message window is still loading
[Android Apps and Games] lorantm:
I tested it. Just a little bug, send the message, go back and open the conversation again. I did not know that because I usually chat with the same people and don't start new conversations so often.
[Android Apps and Games] Minski256:
Probably at version 74.0.0.21.69 not read (load) this
[Android Apps and Games] lorantm:
This is officially called a conversation starter item.

It was not visible at first on v74, but after sending a message, going back and opening the conversation again, it appeared with the previously sent message.

Mod: It is working perfectly on v76 alpha. According to Google, this v74 is a beta version. Alphas and betas may have bugs. Not to mention that the built-in Messenger is not even tested by Facebook since originally it's just dead code within the main app which I made accessible with some tricks.
[Android Apps and Games] Minski256:
It would make fbpatcher for earlier versions? (for example v44) it was my favorite version ;)
[Android Apps and Games] lorantm:
Versions up to v55 don't need patching, they use the built-in Messenger code and you can even make phone calls.

Just install v44 and Messenger 1.0 (it's about 2MB and will not even start, but it's needed to avoid the installation of the new Messenger and you can use the in-app messaging feature).
[Android Apps and Games] jineshpatel30:
if you are using Voice call much on Messenger then it's better for you to use official FB messenger bcz this hack focus on ppl who don't use FB messenger much and still they have to install it due f**king FB's forcing policy.
[Android Apps and Games] Kordius:
Can anyone upload patched alpha fb ?
[Android Apps and Games] Jrhoop:
74.0.0.21.69 working just great.

Thank you massively for your hard work! :good:
[Android Apps and Games] bariotic:
Thanks working for me too
[Android Apps and Games] puturaya20:
why not running?

i'm use w7 32 bit ultimate
[Android Apps and Games] jineshpatel30:
hold Shift and right click on empty space, then select open command prompt here in empty space of your folder that contains FB.apk & fbpatcher..No need to copy cmd.exe at that folder...this method will open your system inbuild cmd

uploaded cmd.exe is from windows7 64bit so i guess it won't work on other windows.

I'm also changing Guide to avoid this confusion anymore
[Android Apps and Games] Loknic4:
Can someone upload latest patched Facebook for us. Don't have PC :(
[Android Apps and Games] jineshpatel30:
i found one thing to look-into for you.

There is ester egg game of basket ball which opens on long clicking basketball emoji sent to anyone, this may be messenger specific but it actully opens in Patched FB messengers conversation also. problem is when to try to play it'll restart conversation when ball is about to get into basket (No FC).

there is good chances that it's messenger specific but if can do something for this give it a try..No urgency & not that much important, just a thing i notice and keeping you updated. ;)
[Android Apps and Games] raptorddd:
how this works i installed and it take me to othe page not like in the picture OP posted?

if i get a new message.? what to do

i i want to send message? what to do

how do you go from message to post.?:confused:
[Android Apps and Games] Kordius:
Win 7 HP x64 :(

apk's from apkmirror
[Android Apps and Games] puturaya20:
okay :good:
[Android Apps and Games] lorantm:
It's easy to fix, I already did it but the patcher can't do it yet.

But even if it's fixed, score cannot be submitted to the thread so it does not have much sense.
[Android Apps and Games] jineshpatel30:
keep rocking man ! :D
[Android Apps and Games] wolfballz:
I'm guessing you have the latest java version installed also?
[Android Apps and Games] thiron03:
Work for 77.0.0.20.66 & 78.0.0.16.67

Zen 4 lollipop
[Android Apps and Games] lorantm:
80.0.0.0.37 alpha is not patchable!
[Android Apps and Games] jonsky2016:
same here i got the latest 80.0.0.0.37 alpha, patch is not working :)
[Android Apps and Games] lorantm:
I'll wait for the next alpha.

This version's dex storage method is different, resource names are obfuscated and they can't be found in the primary dex either. There isn't much to do with this.
[Android Apps and Games] c0diac:
Hy

i have patched and all went ok i got fb patched apk but i cant install it have anyone got that problem? i tried three version of facebook apps and i patched them but cant install them on phone.

tried to force freeze facebook and then to install but no luck... it only says app not installed
[Android Apps and Games] Minski256:
Uninstall facebook not freeze!!!
[Android Apps and Games] jiojio:
Every one frequently download latest fb from apkmirror.com & then

use this method to patch the fb for own use...

If u get success..

Please frequently upload the latest "fb-patched" apk in this threads..

This avoid unwanted question & help full for mobile data saving users, non technical people..
[Android Apps and Games] ashish1989:
But where are the patching instructions for android mobile

Is it for pc only?
[Android Apps and Games] raptorddd:
it would take along time.. so only pc.

---------- Post added at 01:44 PM ---------- Previous post was at 01:43 PM ----------

guys i have a dumb question.... if i use old version like 76 or 68.. would i benefit to patcj again with 2.0?
[Android Apps and Games] lorantm:
You'll get the new message feature.
[Android Apps and Games] ashish1989:
Any other way to enable built in chat

I was using v8.0.026.3 bcoz of inbuilt chat

But facebook is forcing me to use messenger

Any other method to enable built in chat in previous versions or new version
[Android Apps and Games] raptorddd:
you need to read first post.. its in there.. wich version you should use and wich you should use with this patch..
[Android Apps and Games] kurtextrem:
80.0.0.0.41 alpha is out. Is that one any different?

Edit: Also throws errors: http://prntscr.com/b9dfli
[Android Apps and Games] surVfate:
Working flawlessly with v76.0.0.24.67 stable on Pantech Sky Vega Racer 2 IM-A830L, v78 stable having a bit of problem with the layout of the message activity but this not occur on v76. Thanks a tons for doing this.
[Android Apps and Games] wolfballz:
Or you could just read the OP and patch it. It really is not difficult and you don't need to be that tech savvy to do it. No one is going to constantly patch and upload after every release considering in the OP it states why he isn't just doing that.
[Android Apps and Games] khaisilk1910:
For you : https://goo.gl/gOcaKB
[Android Apps and Games] lorantm:
Version 2.1, 05-30-2016

● Support for latest versions (tested up to 80.0.0.0.44 alpha)

● Much faster patching (dex files are assembled in memory)
[Android Apps and Games] Tomi_Ohl:
This version is really very fast! Thanks! :)
[Android Apps and Games] wolfballz:
Super fast now. On an old work pc (lenovo still running XP) it took less than 4 minutes.

---------- Post added at 08:38 AM ---------- Previous post was at 07:43 AM ----------

Since a lot of people are asking for the patched apk I created a thread for patched versions. Latest alpha is up and will be adding other versions as I go along. http://xdaforums.com/android/apps-games/patched-facebook-separate-messenger-t3389145
[Android Apps and Games] lorantm:
Now that the patcher assembles dex files in the memory, I tried to run it on Android again and it's still very slow. So don't expect an Android version of the patcher. :(
[Android Apps and Games] wolfballz:
81.0.0.0.17 alpha is patched and available. Check link in OP or go to http://xdaforums.com/android/apps-games/patched-facebook-separate-messenger-t3389145 and click on download link.