[MOD][Xposed]XInsta (2.0.4) - Download Images/Videos From Instagram

Search This thread

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
Would there be a possible feature to download all pictures from an account? I would absolutely love for this to be added as a feature.

In theory it is possible. However I would need to use the Instagram API to do this. The Instagram API for images doesn't affect any rate limits, but videos do. This has been requested before and I didn't have much luck implementing it. I could in theory just add an additional options titled "Download All' to the three dot menu, hook the username, and attempt to use the username to find all user media. I will see if maybe I can hook into Instagram's usage of their API. As always, no promises.
 
  • Like
Reactions: tehloxely

nostang3

Senior Member
Apr 1, 2011
200
69
Just an idea, but is it possible to have the option to download from the notification shade when instagram notifies me of a post?
 

tehloxely

Senior Member
Nov 9, 2010
380
40
In theory it is possible. However I would need to use the Instagram API to do this. The Instagram API for images doesn't affect any rate limits, but videos do. This has been requested before and I didn't have much luck implementing it. I could in theory just add an additional options titled "Download All' to the three dot menu, hook the username, and attempt to use the username to find all user media. I will see if maybe I can hook into Instagram's usage of their API. As always, no promises.

I'm glad that you are open to the idea. Perhaps try it out and see how it works?
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
Just an idea, but is it possible to have the option to download from the notification shade when instagram notifies me of a post?
I have been looking into something similar to this. A user requested the ability to auto-download where you enable the feature and every time you get a notification of a new post it auto-downloads. I have been trying to find where exactly this notification is called at in the Instagram code. I have no had much luck so far, but hopefully I will find it.
 

M7mD.Sa3eD

Senior Member
Nov 11, 2015
132
132
Instagram 7.19.0

20160315_142827 - XInsta Initialized
20160315_142827 - XInsta Version 1.5.5
20160315_142827 - Instagram Version Code: 25297122
20160315_142827 - Device Codename: SGH-I727
20160315_142827 - Android Version: 6.0.1
20160315_142827 - Instagram First Hook: com.instagram.android.feed.adapter.a.aj
20160315_142827 - Media Options Button Hook Failed - java.lang.NoSuchMethodError: com.instagram.android.feed.adapter.a.an#b()#exact
20160315_142827 - Like Hooks Failed - java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
20160315_142827 - Profile Icon Failed - java.lang.NoSuchMethodError: com.instagram.android.fragment.iu#b()#exact
20160315_142827 - Profile Icon Click Listener Failed - java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
20160315_142827 - Suggestion Hooks Failed - de.robv.android.xposed.XposedHelpers$ClassNotFoundError: java.lang.ClassNotFoundException: com.instagram.g.o



Sent from my SGH-I727 using Tapatalk
 

j1gga84

Senior Member
Jun 21, 2012
4,620
2,730
Bremen
www.android-hilfe.de
I was trying to download a video with newest hooks but it was saved as picture..

Log:

03-15 18:31:07.009 I/Xposed (21042): XInsta - Save Location: /storage/emulated/0
03-15 18:31:07.015 I/Xposed (21042): Info: Instagram
03-15 18:31:07.015 I/Xposed (21042): XInsta: XInsta Initialized
03-15 18:31:07.017 I/Xposed (21042): XInsta: Instagram Version Code: 25297122
03-15 18:31:07.019 I/Xposed (21042): XInsta: Device Codename: SM-G900F
03-15 18:31:07.020 I/Xposed (21042): XInsta: Android Version: 6.0.1
03-15 18:31:07.107 I/Xposed (21042): XInsta: Instagram First Hook: com.instagram.android.feed.adapter.a.al
03-15 18:31:18.859 I/Xposed (21042): XInsta: Switch Link - Different Media Type

Regards

Sent from my SM-G900F using german Tapatalk 4
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
Well, looks like the hooks are broken again or something. I just installed the module, rebooted and nothing. I just can't see a download option on IG. And, btw, if I try to send error logs, I get a no error logs notification.

I'll keep a close look on this thread to see what happens. ;)

Thanks for the good work!

Can you PM me your Xposed log (Xposed -> Logs)? You might also want to try opening XInsta -> Pastebin. It could be that GitHub (Default provider) is blocked by your ISP, firewall, or country.
 

j1gga84

Senior Member
Jun 21, 2012
4,620
2,730
Bremen
www.android-hilfe.de
I was trying to download a video with newest hooks but it was saved as picture..

Log:

03-15 18:31:07.009 I/Xposed (21042): XInsta - Save Location: /storage/emulated/0
03-15 18:31:07.015 I/Xposed (21042): Info: Instagram
03-15 18:31:07.015 I/Xposed (21042): XInsta: XInsta Initialized
03-15 18:31:07.017 I/Xposed (21042): XInsta: Instagram Version Code: 25297122
03-15 18:31:07.019 I/Xposed (21042): XInsta: Device Codename: SM-G900F
03-15 18:31:07.020 I/Xposed (21042): XInsta: Android Version: 6.0.1
03-15 18:31:07.107 I/Xposed (21042): XInsta: Instagram First Hook: com.instagram.android.feed.adapter.a.al
03-15 18:31:18.859 I/Xposed (21042): XInsta: Switch Link - Different Media Type

Regards

Sent from my SM-G900F using german Tapatalk 4

@iHelp101
You saw my log? I still can't DL videos..

regards
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
I just woke up to the beauty of fifty spam emails and I thought I would tell a fun story. It would appear that my XInsta@ihelp101.com email was scraped from somewhere. I'm assuming GitHub (Email is in source code). Either way I have fifty emails with each having either a zip file, PDF file, or hidden exe. A few of the emails even signed off "Sent from X Android Phone". I had a good laugh and I am back to working on the module. In terms of the next update I finally have Marshmallow SD external card support working for ROMs that removed the external SD card permission.

This is what was keeping the next update waiting. I am doing some bug testing and the update will be released.
 

nostang3

Senior Member
Apr 1, 2011
200
69
I'm running a LG V10 with 5.1.1 with Instagram 7.18.2(Doesn't have option to upgrade to 7.19 yet) and XInsta 1.5.5. I can't get it to show the download option. I've updated to latest hooks. I looked in the xposed log and it doesn't show anything. When I try to send error log, it says it's missing. I've read something about enabling instgram storage permissions in the thread but I don't have any options for that. When I check instagrams persmissions in a hidden menu on my phone all the permissions are checked but there is no option for storage. I've tried to take a picture so instagram saves it, which it did, but never prompted for storage access.

I'm happy to do anything needed. Been fighting with Xposed for the last 24hrs. Getting this and Snapprefs to work is all I have left.

Edit: I finally figured it out. I had to go in and rename the hooks.txt file to hooks.txtOLD and download the hooks again. I can now download from instagram.
 
Last edited:

Ashyford

Senior Member
Dec 19, 2010
235
24
I really enjoy using XInsta. Often, I'd like to copy a comment in order to quote it or grab a url. I used to be able to do this but I don't recall how. Is copying comments a previous or current feature of XInsta? If not, is it possible to add this feature or is there another way I can easily copy a comment? Thanks.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 224

    This module is based on MohammadAG's Instagram Downloader that is no longer supported.

    Download:
    The module is available on the Xposed Repo.

    Features:
    - Change Default Save Locations
    - Comment Copy Feature (Removed by Instagram)
    - Direct Share Downloading
    - Feed Downloading
    - Follow Color Indicator (Indicates when someone is following you)
    - Following/Follower Data To List (See all the users you are following)
    - Force Touch Downloading
    - Profile Icon Downloading
    - Stories Downloading
    - Stories Timer Removal
    - Unique Hook Updating

    Instructions:
    Once you have downloaded the module simply open the module via your App Drawer or Xposed (Xposed -> Module -> XInsta).
    Once the module has opened click update hooks and choose a source option (Some countries block Pastebin).
    This will fetch the latest hooks for Instagram and you will be ready to download image/video from Instagram.
    Please make to do the step detailed above before posting for help.

    To Do List (Request/Bugs):
    Resolve Remaining Broken Features

    Screenshots:
    K62oHVZ.png
    9FaavLz.png


    Source Code:
    GitHub - Link
    54
    XInsta 2.0.4. is now out! The first addition is some more translations along with some updated translations. In the past update I added a URL signature resolution bypass. As Instagram tweaks this more some devices don't need this fix, while others encounter issues with it. By default the feature will be off. If you notice post are now downloading in lower resolution (480x480, 640x640, 750x750) you will need to enable this feature. For most modern 1080P devices this bypass is not needed at all. DPI can cause a need for this bypass, but if you are using a Nexus 5 for example this bypass is not needed because Instagram already provides max resolution to you (1080x1080).

    Profile icons will once again download at max resolution if the user has the best quality uploaded (1080x1080). Due to the bypass you may notice an additional 1-3 second delay when downloading profile icons. I also fixed a rare filename issue that would cause a username to use a placeholder. In terms of people once again asking why an update is not released yet I based everything on EST (8:30 PM - Monday now). Every time I get ready to release an update I have someone report an issue or bug that I work to fix at the last minute. I also of course like most people work 8+ hours a day, so it is not like I have all day of free time to work on XInsta.

    Last, I would like to address the concerns regarding Instagram completely breaking XInsta. Eventually it will likely come. If Instagram rolls of unique URL signatures for every viewed post (Changes every time) XInsta would have a lot of issues. I will work on XInsta as long as I can, but if Instagram does decide to completely counter XInsta it has been a fun time. Enjoy the module!
    51
    I wanted to give an update on the matter since I have gotten quite a few messages and emails regarding this issue. The current fix is to use the original URL and be restricted to the devices sizes/DPI, which dictates the image/video size provides by Instagram. So instead of getting a full resolution (1080x1080) image/video you might get a 640x640 image/video. This is all done on Instagram's end with it's API. In terms of some proposed fixes they are not solutions. For example, the cache is going to have the same size image/video (Because I am getting the URL Instagram is using).

    Unofficial API options are not a solution for private accounts and due to Instagram new stance on unofficial API usage (Breaking things and preventing them). The goal/solution at the moment is to just hook Instagram and see if I can make Instagram request higher resolution image/video. This may be by making a device look like a tablet to Instagram's API request for example (Big screen - Higher Resolution Images/Videos). I will be releasing an update either way tonight with bug fixes. If I am able to find a solution I will implement it in the update. Otherwise I will be having XInsta download from original URLs (May be scaled depending on device).
    50
    XInsta 2.0.3 is now out! This updates resolves a lot of issues and bug. The first being direct message downloads. Direct messages that are not disappearing (In chat) had some issues downloading, but that is now resolved. We had some filename bugs as well that have been squashed. The main issue was when the "URL Format As Filename" option was enabled. Push notifications also had some issues due to some JSON changes. These are now resolved. The settings activity was having issues for a few users using Android 4.4 and lower. This is related to an older Android bug related to list that was resolved in recent versions.

    Lastly, I implemented a fix for the new URL signatures enforcement. All posts/downloads will take advantage of this besides profile icons. This is because profile icons are supposed to be small, so Instagram will only provide them as 150x150. URL signatures are an interesting obstacle Instagram has thrown at this module and other projects. We will have to wait and see Instagram's next step. Please let me know if you have any issues with downloads. I tried to test as many devices as I could, but I always wish I had more to test with. Enjoy the module!

    PS: I just want to remind everyone of the Xposed update bug that can cause Xposed to use a cached version of the module instead of the new APK. If this update does not fix your issue please uninstall XInsta, reboot, install XInsta, and reboot once more.
    50
    I figured I would address the current issues with XInsta directly on XDA for the users that don't monitor GitHub or email me. Instagram has been moving to obfuscation in alpha versions for a while. Last week they moved it to beta versions. Yesterday they moved it to a stable release in Instagram 52.0.0.8.83 (1159948). What does this mean for XInsta? It means XInsta requires a lot more manually work to get working for updates. When Instagram in the past released five versions in a day I could support them all because I could easily automatically get hooks. The easiest way to explain Instagram's obfuscation is they took almost all their files and threw them in one folder with random file names.

    So you have about 21,000 random Java files in one folder and you know 70 of them are class hooks for XInsta. To explain it further here is an example of XInsta's hooks for a pre-obfuscation version (1154583;com.instagram.feed.r.b.aj;com.instagram.feed.c.ax). The first item is the Instagram version code, second is the feed three dot icon download option inject class, and the third is the main feed that has all posts information. In a obfuscated version you have 1156850;X.4aY;X.1Ee. The folder X and then a random name for one of the 21,000+ files in there. This doesn't affect just affect classes. It affects methods and fields.

    It comes down to time. Can I get a automated solution working for this? Or am I going to have to dedicate two hours to every update? As I see more obfuscated versions I will see how far Instagram tends to go with it. I am working on adding hook support for the recent stable release. Alpha and beta releases for the time being may not be supported due to their frequency.