yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Tomoms:
Tutorial: patch Instagram by yourself

Hello. Here's how I create my patched Instagram apks.

What you need before we start: apktool, uber apk signer, jadx

Let's start!

Download the latest Instagram apk (e.g. from Apkmirror) and place it in a folder. Unpack it with

apktool d instagram.apk

and you'll end up with a folder called "instagram".

Download the Proxygen patch (linked in the first post) and place the two files in instagram/smail/com/facebook/proxygen, replacing the ones that already exist.

Download the Hooks zip (linked in the first post) and unpack it. You'll see a folder called "me" that contains a folder called "grishka". Take that "grishka" folder and paste it in instagram/smali_classes3/me.

Open the AndroidManifest.xml file in the instagram/ folder and remove every XML tag that contains the word "analytics", together with any inner tag it might have got. See this screenshot for an example.

Now comes the hardest part, enabling internal settings. Launch jadx-gui and open the official instagram.apk file. Wait for a few seconds until jadx loads it all, then click on this button in the jadx toolbar.

jadx will start decompiling the whole apk. It'll take a few minutes. You should see a progress bar in the bottom left corner. Wait for it to reach 100%.

Now in the search textbox type "public static boolean A00(". In a few seconds some results should come up, just like in this screenshot.

Look for a method that receives only one parameter called "AnonymousClass*** r1". You should find it easily. Here it is!

Double-click on it and you'll be taken to the java class that contains this metod. It should be full of short methods that return booleans, just like these.

Now look at the comment at the top at the class. It says "renamed from: X.0l9 ...". Close jadx and go back to the instagram/smali/X folder. Open the 0l9.smali file (this name will change from version to version, that's why we need to look at the comment to know which file to open!) with any text editor and search for the A00() method. It should be the first one. Now look for the line that shows:

const/4 v0, 0x0

in the body of that method.

It should be around line 19. Change the 0x0 to 0x1 (it should look like the line in this screenshot), and save the file.

Now run

apktool b instagram/

to rebuild the apk from the "instagram" folder. The build will fail with this error.

You need to open this file: instagram/res/values/styles.xml and delete the line 2441 (line number might change from version to version), because as you can see from the error message, line 2441 redefines a value already defined at line 2440. Now rebuild again and you'll get the final apk in the instagram/dist/ folder. Sign it using uber (instructions available at the link I added above) and you're ready to install it! You need to uninstall any version of the Instagram app present on your phone (no matter if it's the official one or another mod) before installing yours.
[Android Apps and Games] garyHal:
---------- Post added at 02:04 PM ---------- Previous post was at 01:23 PM ----------

[/COLOR]

I got 11 hits when searching for "AnonymousClass*** r1". How do I know which one to use?
[Android Apps and Games] Duplexliving:
Great app.

Thanks!
[Android Apps and Games] FunnyCOFE:
Instagram does not ban for such patches?
[Android Apps and Games] el_easy:
Thank you for such great tutorial.. can you patch Facebook app with the same method? thanks
[Android Apps and Games] matteo2:
Can you update the apk and solve issue with direct messages already read?

Thanks

Inviato dal mio SM-G950F utilizzando Tapatalk
[Android Apps and Games] Gilg@mesh:
it's not a bug, I think it's the feature of the privacy mod, if you go to the mods and check privacy mod, I think it's the second one (1.2 Hide seen in messages).
[Android Apps and Games] neo9596:
Thanks to show me how to fish!
[Android Apps and Games] thunderrrroad:
so sorry if this has been addressed/asked already, I'm getting ready for work (at home!) but with the mobile version (no custom modding done on my behalf, just downloaded the latest apk posted) ... but does anyone else have issues with DM's? they continue to show a new message is there but it just adds new message count based off how many messages have been sent (i.e. I send someone 4 messages, the app will show I have an unread messages with 4 new messages) ... I tried clearing cache, rebooting, uninstall and reinstall to no avail.... any solutions?
[Android Apps and Games] Tomoms:
You don't have to type that stuff in the search bar. You have to type

public static boolean A00(

and then scroll through the results, searching with your eye for one that takes only one parameter that looks like this:

AnonymousClass*** r1

where *** is a combo of letters and digits.

No, I'm not interested.
[Android Apps and Games] eurochild:
you can use this..

https://xdaforums.com/android/apps-games/bullshified-version-facebook-okay-to-t3586318
[Android Apps and Games] crazymika:
For me the const/4 v0, 0x0 is written in OOO.1.smali file, and under A01() method.

So if anyone doesn't found these settings you can look around .1 file and A01 method

also I delete the styles.xml with latter line cause that look more like the ig style instead of default one, but I didn't notice any difference between them.

I'm doing with v141 armv8 so maybe there're some differences

Thanks anyway this is a great tutorial.

anyone know which internal settings worth try?

I'm not very familiar with android apps.
[Android Apps and Games] Tomoms:
Thanks for the tip, it will be useful for those who will patch the armv8 apk.
[Android Apps and Games] GAURAV THAKKAR:
Hi is there a way by which I can sign with the key that the original apk( produced by Instagram the raw untouched one) came with?

I don't want to create a new key
[Android Apps and Games] Tomoms:
It's not possible. What's the problem with using uber's default key?
[Android Apps and Games] el_easy:
i was using that mod long time ago, but the lack of update made me to switch back to default FB
[Android Apps and Games] eurochild:
can someone here be kind and share his mod of latest modded apk?

i am away from my pc and i want to install it on a friends phone
[Android Apps and Games] waylo:
Frost is another FB app that may be worth looking at for your purposes. There's a forum here on XDA.
[Android Apps and Games] ngtmre:
Could you do one with the latest version?

I tried following your instructions, but I'm a noob
[Android Apps and Games] qazsparky:
There's a new update for briinstagram but no idea where to download it since the website doesn't work anymore. Here's a screenshot of the update notes translate to english

The new update for briinstagram was a private build where people got noticed for it for no reason.

"for people who appear to them update to version 0.66 just ignore that version is private and for the number of people that;'s why it shows as warning update continue to use the version 0.60"
[Android Apps and Games] fabrizioguess:
Is there someone ready to share it with us?

Inviato dal mio SM-G960F utilizzando Tapatalk
[Android Apps and Games] qazsparky:
seems it was a private build also i've updated my post with more details
[Android Apps and Games] lstwsdm:
v142 ads and analytics removed, internal settings enabled and signed

https://www36.zippyshare.com/v/xBPEzeRh/file.html
[Android Apps and Games] pratik_193:
https://aeroinsta.com/

Try aeroinsta. Its good with all features
[Android Apps and Games] t-ryder:
Aeroinsta comes with ads.
[Android Apps and Games] pratik_193:
Have been using it since 3 weeks, got zero ads till now
[Android Apps and Games] t-ryder:
That's a dead link

---------- Post added at 06:31 PM ---------- Previous post was at 06:30 PM ----------

I installed and opened it and the third post was a big fat ad. Uninstalled.
[Android Apps and Games] pratik_193:
Advanced settings- General mods-feed & stories settings - disable ads.

Thank me later. Found it better than most of the mods out there.

Try the blue version, I personally like it very much.
[Android Apps and Games] t-ryder:
Oh grumpy hasty me... Now we got it. Thanks, my good Sir. Dev should make this default, eh?
[Android Apps and Games] qorrymarzuki:
Got ads on home from you apk. Do I need to do anything to make it dissapear
[Android Apps and Games] lstwsdm:
you should force stop the application then open it again, ads should be gone
[Android Apps and Games] alekseyfil1998:
can you please make the latest version with the developer menu unlocked and ads removed for armv7 and Android 5.0 ?
[Android Apps and Games] lstwsdm:
v143.0.0.24.121 armv7a ads- analytics removed and signed

https://mediafire.com/file/4m88c3calaxik2s
[Android Apps and Games] jrg67:
Has anyone modified the latest version for newer phones? I think the latest one available for us using phones like the P4XL is 140. Is there anything in 143 that fixes or adds anything we would care about?
[Android Apps and Games] alekseyfil1998:
could you please add the settings to the developer and to remove ads?
[Android Apps and Games] lstwsdm:
ads are already removed, if you see any ad, simply force stop instagram and launch it again, ads should be gone.

---------- Post added at 07:24 PM ---------- Previous post was at 06:35 PM ----------

okay people version 143.0.0.24.121 arm7 with removed ads and analytics + dev mode enabled

https://mediafire.com/file/3ivxswgy3aj0x1m
[Android Apps and Games] Tomoms:
Thanks for releasing an up-to-date apk. I haven't got much time to patch it now, but I'll be back sooner or later.
[Android Apps and Games] thunderrrroad:
I'm really really sorry to be "that" guy (girl) .... but I've recently gotten into an accident that caused some memory loss (don't feel sorry for me) and I'm having an awful time trying to navigate around some things ... especially things due to technology... if anyone has any free time and wants to help me further set up the latest instagram apk I downloaded I would really appreciate it... I will even send some payment of sorts over via paypal or something.... if you're able to pm me on here go for it I really need some help and I think it might help with some memory coming back.. thanks dudes
[Android Apps and Games] alekseyfil1998:
Hello! Can someone please make a modification based on version 143.0.0.25.121 with removed ads and an unlocked developer menu ? I would leave Analytics, because statistics don't work without it

I will be very grateful!
[Android Apps and Games] tarroyo:
Good looks on this! Definitely gonna give it a try
[Android Apps and Games] fjoel:
No ads, working good so far.

I installed a old version in this forum, with download option. Can you put it back? Or any other 3dparty app that can do that?
[Android Apps and Games] skimminstones:
Thanks for this. I dont use Instagram much, just for browsing really but all the sponsored posts were annoying me so much. None have shown up since i installed this :)
[Android Apps and Games] kusarigama:
Someone did it ?

When I try to install it, I have this error on android : "Application not installed"

Is it possible to install withou a non root android with a app instagram pre install ?
[Android Apps and Games] frooss:
First uninstall official instagram
[Android Apps and Games] kusarigama:
Impossible without root, so not possible to use this without root ?
[Android Apps and Games] lstwsdm:
You just need to uninstall the current installed instagram app off your device, then install the latest provided link in this topic. Where is the root part exactly? You dont need a rooted device.
[Android Apps and Games] kusarigama:
I can't fully uninstall the app, I only can uninstall the latest update and then desactivate the app because it considered as a system app on galaxy s7.

Then when I try to install the latest provided link in this topic I have this error on android : "Application not installed".
[Android Apps and Games] lstwsdm:
Well its weird, never had a samsung device didnt knew that instagram part of a system. In this case you can install apk files through parallel space like apps. Else you need root.
[Android Apps and Games] matteo2:
I'm waiting for your update [MENTION=6014314]neekless[/MENTION]

Inviato dal mio SM-G950F utilizzando Tapatalk
[Android Apps and Games] joowdx:
Hi the link is dead. But is there any way to change the download directory?
[Android Apps and Games] frooss:
You can uninstall system apps using adb method without root (Google it)
[Android Apps and Games] kusarigama:
Thanks for your help I know that but this method allow you to disable it, not really uninstall.
[Android Apps and Games] lstwsdm:
always look for the latest link in the thread

https://mediafire.com/file/3ivxswgy3aj0x1m
[Android Apps and Games] Gilg@mesh:
new update, this is Instander 2.0, base 141 for now. to access mods, go to your profile, then menu up to the right and choose Instander settings.

https://drive.google.com/file/d/10nMX93u0AIxk_VaAuxLkA5oK0k-48xfu/view?usp=drivesdk
[Android Apps and Games] frooss:
https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/amp/
[Android Apps and Games] joowdx:
I'm not looking any builds for arm7. Thanks.

Wow thanks for this link man. I prefer using this over Bri. Much appreciated.
[Android Apps and Games] el_easy:
Keep it the Thanks rolling with InstAero v10.0.3 base 143.0.0.25.121 : https://whatsaero.com/InstAero/download-insta-aero/package-1/?lang=en
[Android Apps and Games] JoeFCaputo113:
What are the differences between these apps/mods to IG?! Thanks! :good:
[Android Apps and Games] el_easy:
they both have the same features, but InstAero has advance base 143.0.0.25.121 right now..
[Android Apps and Games] Ammar_buliwala:
Instagram

Am a download instagram and its don't install why........then i using sai apk to install but doesn't work how to install plz help
[Android Apps and Games] neekless:
https://www.androidfilehost.com/?fid=4349826312261826713

v144 arm64 nodpi analytics removed but

NO

hidden settings. I personally don't need the hidden settings and I only upload what I build for myself. If you need hidden settings I strongly suggest you patch it yourself.
[Android Apps and Games] matteo2:
I don't need hidden settings too, can you add only download feature?

Inviato dal mio SM-G950F utilizzando Tapatalk
[Android Apps and Games] fjoel:
In this mod, any hope to include download option? Like briinstagram
[Android Apps and Games] chrisdeger:
Amazing this stopped me from giving up on the Instagram platform thank
[Android Apps and Games] Gilg@mesh:
Instander 2.1 update

https://drive.google.com/file/d/11_dEtc8T3xc6WpkFeHZD6MGW-2eWjteu/view?usp=drivesdk
[Android Apps and Games] frooss:
Thank you for your work, but is it possible to remove ads from explore page? When I scroll through explore page I always get ads.

Thanks

https://m.imgur.com/a/1kMaDPD
[Android Apps and Games] Tomoms:
https://mega.nz/file/Z58nDBSJ#Y4emLFbr7IDreAFJObzfeMGcKaABngCvUaGcCjyO36k

v144 armv7 nodpi.

Patched + internal settings unlocked + analytics removed.
[Android Apps and Games] matteo2:
Is it the same of post #446?

It has the same base...

Inviato dal mio SM-G950F utilizzando Tapatalk
[Android Apps and Games] Gilg@mesh:
same base for now but updated.
[Android Apps and Games] Tomoms:
Instagram 145 armv7, nodpi.

https://mega.nz/file/MosHmb7S#117bKEMZxLzwBVxM3WZGjXg6DDDe8zhitpujrWd0UK4

Patched, analytics disabled, internal settings unlocked.
[Android Apps and Games] memocatcher:
Is it any bad if I use an armv7 build on an arm64 device? (OnePlus 7 Pro)

Btw thanks for sharing always :)
[Android Apps and Games] Tomoms:
It should work. Maybe, the app's performance will be a little worse.
[Android Apps and Games] Duplexliving:
Do you happen to have a link to Briinstagram floating about? Or would you say this is a better app?

Thanks!
[Android Apps and Games] Duplexliving:
This link seems to be down.

Can you repost it please?
[Android Apps and Games] Gilg@mesh:
I recommend using Instander now as they stopped updating BRIINSTAGRAM.

here is latest Instander version.

https://drive.google.com/file/d/134vxrhd45qiwK99tFZaRpm7oNZbgk80m/view?usp=drivesdk
[Android Apps and Games] el_easy:
or better: InstAero v 11.0.0 base 145.0.0.32.119 https://whatsaero.com/InstAero/?lang=en

with today update base and features are better than Instander..

Note: I only sharing and I don't have time to put the changelog, so find it yourself is on telegram group..
[Android Apps and Games] matteo2:
Which features better than Instander?

Inviato dal mio SM-G950F utilizzando Tapatalk
[Android Apps and Games] neekless:
https://www.androidfilehost.com/?fid=8889791610682872822

v146 arm64 nodpi analytics removed no hidden settings
[Android Apps and Games] ankurcshah:
Can this be used to download stories?
[Android Apps and Games] danbest82:
No. This just removes ads and/or unlocks hidden settings(which I don't use, so don't know what they are). There are apps in the play store that can do that, I think. Or xposed mods.
[Android Apps and Games] Gilg@mesh:
Instander 2.2, now with OTA updates.

https://drive.google.com/file/d/13WNsaQj6uj52dtL8Iavn4Ev73HYEG7M5/view?usp=drivesdk
[Android Apps and Games] JoeFCaputo113:
What's the difference between Instander and InstAero?
[Android Apps and Games] Thom2804:
Thanks alot, works fine here. Had 1 AD at first launch, after refresh was gone tho and in the explore tab they still exist...
[Android Apps and Games] adibagoesindrianto:
this apps remove ads? answer for link https://androidfilehost.com/?fid=8889791610682872822. thanks
[Android Apps and Games] IonutGherman:
New update please?
[Android Apps and Games] Tomoms:
Instagram v149, armv7, nodpi.

Ads blocked, analytics disabled, internal settings unlocked.

https://mega.nz/file/8t9CESLY#xHDJl9LK_g3d5czurS537pPZANRFPXlvyY6-ERI_bbs
[Android Apps and Games] remix96:
Error on android 10, clean installed but then the app crash at the start and i can't even login
[Android Apps and Games] Lupask:
not sure about apps but you can always use any web service such as www.storysaver.net and for private profiles I used instagram's own web page with element nuking to allow mp4 saving
[Android Apps and Games] Sunloft:
I will try this
[Android Apps and Games] jm-pistols:
Similarly on Android 6.0
[Android Apps and Games] Tomoms:
Provide logs please. It's working fine for me on Pie.
[Android Apps and Games] qorrymarzuki:
The one from tomoms, It gives me an error, crashed after opening the app. Can't even login. I'm on A10, oneplus 6t

---------- Post added at 09:39 AM ---------- Previous post was at 09:36 AM ----------

How?
[Android Apps and Games] JRJ442:
His is working fine for me on Android 10 as well. If you're running any kind of adblocker or theme, maybe you need to disable that first.
[Android Apps and Games] Om_ya:
Please add the latest version with insta reels. Can't view those vids.

Thanks
[Android Apps and Games] Tomoms:
You need to take a logcat. There's hundreds of howtos on the web and on xda to learn how to do that.

Yes, exactly. An outdated substratum theme could be the issue.
[Android Apps and Games] neekless:
Not sure if it's the same problem as them, but when I tried to patch it myself (without enabling internal settings), the resultant app crashes at some places along with weird sized icons in several places. Here's a log from one crash https://del.dog/ylyfiwereg.txt (this is from patching v150 so maybe the problem is different idk)

---------- Post added at 02:00 ---------- Previous post was at 01:56 ----------

https://www.androidfilehost.com/?fid=8889791610682893241

v150 arm64 nodpi analytics NOT removed no hidden settings

Analytics were not removed as doing so required decompiling resources which caused the final app to crash at some places and have weirdly sized icons in several places. I had to decompile the app without decompiling resources and manually copy in the raw resources after patching. This version should not crash. As always force stop after the first launch to remove the ads.
[Android Apps and Games] JRJ442:
Actually I have seen those weird sized icons mainly on profile pages, but I attributed that to my Swift substratum theme and had one crash when clicking on find my contacts or something. Thanks for your update.
[Android Apps and Games] qorrymarzuki:
Um, I don't even use substratum for instagram. Just clean instagram. I can get the splash screen but then it crashed. If it was a substratum problem, it would crash but i won't get into the splash screen first
[Android Apps and Games] JRJ442:
Um, well when I update Instagram without updating the subs theme, that's exactly what happens. It goes to the splash screen then crashes. Now that we know you're not using subs, what about an adblocker? If you're using one did you disable that then try to login? Or try using version 150 a few posts above and see if you can log into that one.
[Android Apps and Games] qorrymarzuki:
Here's my logcat. https://drive.google.com/file/d/1FVOucipp9z3s8I9Bqj30bpFK9STvSJ25/view?usp=drivesdk
[Android Apps and Games] qorrymarzuki:
I'm using adblocker. But using normal instagram from playstore seems fine. The 150 from neekles also crashed for me.
[Android Apps and Games] qorrymarzuki:
I'm sorry for my stupidity. Is there anyone that can help give me detailed guide how to do this myself? I'm not really pro in modding and the guide from Grishka doesn't really help me. Like what app should I use and how to operate that app? I found apktool on the internet it's just like command prompt and I don't know how to use it.
[Android Apps and Games] Thom2804:
I have also issues on android 10 when trying to open the app, here is the log: https://del.dog/unuberuthy
[Android Apps and Games] EfimPumPum:
Question

Is it legal? Will I be blocked?
[Android Apps and Games] neekless:
Your error looks like the one I got when I decompiled resources. Did you try v150 that I posted? That one was done without decompiling resources and it didn't crash for me. Please try that and see if it crashes for you. Try a clean install (uninstall previous version before installing mine) just to be safe.

---------- Post added at 17:24 ---------- Previous post was at 17:17 ----------

Are you sure mine also crashed? Please try uninstalling the previous version before installing mine. From your logcat your error also seems to be the same as what I got when I decompiled resources. The v150 I posted was done without decompiling resources and I didn't get the crash anymore.
[Android Apps and Games] IonutGherman:
For me, neekless version works fine. No crashes at all.
[Android Apps and Games] Thom2804:
I see I missed out somehow on the V150, I will make sure to give it a try aswell

Ok so V150 fixed the issue I had, but I got 1 thing that keeps happening and that are the sponsored posts keep showing up I didn't had that until yesterday, I tried older versions as far as v144 which I used and did work before but for whatever reason it just keeps coming back now.
[Android Apps and Games] neekless:
Just force stop the app when you see them. They should stop appearing after force stopping once when you first install it. (btw sponsored posts in the explore page are not removed. The patch wasn't created by me, nothing I can do)
[Android Apps and Games] Thom2804:
Just gave that a try, but still once I opened the app the second post is sponsored and other ones keep popping up to...

One weird thing I found tho is when you go to settings and then ad activity, that doesn't load, so it looks like it's blocking tho, but they somehow still come up on home screen
[Android Apps and Games] dcandal:
v150 is working fine for me, but filters do not work. Anybody else having this issue?
[Android Apps and Games] Tomoms:
v151, armv7 nodpi: https://mega.nz/file/lxk3zKhT#VN3eu2kJdyvihKuB7Dpe7CohsxhmMHTGoEMsdqAm6KA

Patched, analytics removed, internal settings unlocked.
[Android Apps and Games] lgalkis:
I just install the 151 version and I got strange visual glitches. The phone is completely stock no root
[Android Apps and Games] danial.aw:
V150 started having problems for me where a bunch of the posts wouldn't load just show a black screen and I couldn't seem unfollow anyone ... Tried clearing cache to see if that fixed it but nope so went to original app

V151 same visual glitches as the poster above me