#PMChallenge [UPDATE #2.5 with INTERACTIVE DEMO] App Revert: Revert apps to a previous version

  1. laiosg
    Gingerbread Feb 5, 2019

    laiosg , Feb 5, 2019 :

    UPDATE #2.5 - Finally, our second update is here, and it brought something MAJOR along: You will be able to find out what it is at the end of the post! Spoiler alert: It's an interactive DEMO! (What's the point of concealing it anyway if you've already seen the title? :rolleyes:)

    I also made the images a bit smaller to allow for better scrolling, because they were kind of... umm... TOO BIG. Also, I am planning to make some (aesthetic) changes to this post to make it look nicer and simpler, starting, well, now! :p
    Please tell me if you have any proposals!

    If you like this idea, please leave a like! Creating all this took A LOT of time, plus it would really help! Thanks in advance.

    Hi, everyone! This truly is a wonderful intitiative. I'm a former Samsung fan and I made an account here just so I could take part in this OxygenOS Feature Challenge, because I really am amazed by how loyal OnePlus stays to its customers.

    I had this idea a long time ago and thought: "Well why not submit it, it may help others, too!"
    Feel free to use it, if you like it! As a matter of fact, I'd be honoured if you did!
    So, here goes...


    1. Who are the users?
    Pretty much everyone can benefit from this easy-to-use feature, especially users who download a lot of apps from the Google Play Store and even those who side-load apps on their phone.

    2.What is the proposed function?
    The proposed function is the inclusion of a feature which will enable users to easily revert an application to a previous version if it starts "misbehaving" after an update.

    3. What is the user value?

    Such a feature would be highly benficial to users, since it would save them from the hassle of either having to wait for a developer to issue a fix for a bug that is plaguing the misbehaving app or having to search online for apk files to install a previous version of the app that isn't working properly. Given that many users are not familiar with the concept of apk files, such a feature would make downgrading apps accessible to them as well!

    4. If there are existing comparable functions in the smartphone industry, how is the proposed feature superior?
    To my knowledge, no phone manufacturer to date has included such a feature in their mobile OS, which means that OnePlus could be the first to do so, which would be great for the company's popularity.
    Think about how many times you've heard someone complain about an update which ruined their favourite app; about how many reviews you've read on Google Play complaining about a new update which ruined an app; about the times when you yourselves have been frustrated because an app got way worse after updating it.
    Such a tool would help a great amount of people fix this problem. And keep in mind that iOS users haven't even got the option to use apk files to fix it. They're just stuck with the faulty updated app, waiting for the developer to issue a fix. However, OnePlus is known for the freedom it gives to its customers. And such a feature would show just that, namely that OnePlus cares about their customers. I do believe that if OnePlus were to introduce such a feature, it could be a hit with the public if promoted the right way. It could even bring new customers to the company (including some of the aforementioned iOS users, but especially, Android users who currently don't own OnePlus phones).
    [EDIT:] Also, this feature isn't just a gimmick, like native screen recording, which is only useful to the few of us that actually stream content from their phone. App Revert is instead something meaningful and helpful that can be used by many people, as pretty much everyone uses apps and updates them! [END OF EDITED PART]

    5. The logic behind the idea and how it could be implemented

    I really tried to make this as detailed as possible!
    If someone has enabled the feature on their phone (it's optional, naturally, and can thus be disabled), the following would happen:
    As soon as the phone detects that a user is trying to update an app, i.e. as soon as it senses that an app package is about to be overwritten or something of the sort, the phone will automatically save a backup of the installed app's apk file before allowing the update to take place.
    Then, in case a user is dissatisfied with the updated app, they will be able to go to the device's settings, select the "App Revert" option, and, from there, revert the app to the previous version thanks to the aforementioned apk file backup.
    Of course, apk backups of all apps would take up a lot of space. As such, I propose that the following options also be included, so as to save space:
    -apk file backups will be kept only for a few days after the update and will then be deleted (the user can select after how many days they will expire)
    -It will be possible for the user to impose a limit on how much storage space these backups will be able to take. If this limit is exceeded, the apk files will NOT be backed up and the user will be warned about this fact before the update
    -It will be possible for the user to exclude apps from this feature, which means that these apps will be updated normally and that no backup files will be created
    -The user will be able to view all currently stored backup data and manage it from a sub-menu in the App Revert settings
    -If a user has version A of an app installed and updates it to version B with App Revert enabled, then version A's apk will be backed up. If they then update version B to version C with App Revert enabled, version A's apk will be overwritten by version B's apk, so as to save space

    I also created these mock-ups of how what it would look like. I tried to make them as realistic as possible, but I'm not the best at this sort of thing :p
    (sorry about the watermarks, but I had to, please try to ingore them)
    These may look different than what the interactive demo has to offer, and that's because the demo has been updated according to the comments made by other forum users!! I recommend checking it out as well, just to experience the latest UX state of App Revert yourselves!!

    The AppRevert settings menu, where you can enable/disable the feature and tweak other options:

    If you select "Retain app installation files for [x] days", you will be taken to this sub-menu, where you can select when the backups automatically expire:

    If you select "Stop storing installation files if stored backup installation data exceed [x] MB", you will be able to impose a limit on how much space the backups can occupy:

    You can also select "Excluded apps" to view and manage the applications that will be excluded from App Revert backups:

    You can also select "Managed currently stored installation files", where you can view and manage backup apk files stored on your device through App Revert:

    If you select "Revert an app to a previous version", you will be prompted to select which app you would like to revert to a previous version from a list of available apps with App Revert backups:
    (As you can see, the menu also shows which version of an app is currently installed as well as when the backup was made and which version the backup contains)
    FYI: Previously you saw that the expiry date for these backups had been set to 3 days after the update of the app. This means that the backup of app B, for example, which is three days old, will be deleted automatically soon!

    Select one of them for the process to begin:

    After confirming, you will be greeted by this screen: (yes, the blue thing is a loading bar, but for some reason my .gif got kind of broken so I uploaded a still image instead)

    If the operation is successful, you will see this:

    If the operation fails, you will see this, along with an explanation of what went wrong, if available:

    And a... badly made flowchart: (If it isn't clear enough, I have already explained all steps previously)



    NOTICE: As has been proven by Xiaomi's App Scan, it IS possible for phone manufacturers to get access to apks before they are installed on the device, but here this isn't even neccessary, since the apk files we will be backing up have already been installed and can thus be extracted from the respective apps before updating them. Also, sometimes downgrading apps is NOT possible due to certain Android app policies etc. This shouldn't be pose a threat to this feature, as it simply will not work in these cases, but will work in most other cases. Android supports this in general, as is proven by the fact that some Google Apps can have their updates manually uninstalled through the App Settings.

    6. Does it contribute to a burdenless experience?
    Indeed it does, not only for OnePlus, as it won't be that difficult to create such a function, but also for the users, as they often suffer because of faulty updates to apps they like using. This feature would allow users to fix this problem easily on their own, even if they've never tinkered with an apk file before, since AppRevert is easy-to-use, doesn't require any knowledge of apks and does not pose a serious threat to the user if used the wrong way. I believe this can easily be classified as a burdenless experience :D

    But developing this feature would prove to be a burdenless experience for OnePlus as well (hopefully) because of the following:
    I was informed about some people that a similar feature is planned for Android Q according to a leak (I will expand on this later as well, but a leak isn't necessarily true. But I figured: "What if they are?"... And then I thought that if this feature gets implemented in the next OnePlus phone anyway, which will probably (and hopefully lol) get Android Q in a future update, OnePlus will already have built the necessary infrastructure to support this Android Q feature when Android Q launches, which they will have to do either way if the leaks are true. That's good for them, I guess, since they would kill two birds with one stone.
    But even if the next OnePlus flagship does indeed ship with Android Q (which I doubt given that Q isn't finished yet), OnePlus could once again very easily implement this feature because in this case, the infrastructure will already be there for them to use.

    7. How will different parts of the existing OS interact with this new feature?
    Do correct me if I am wrong, but I think that this feature is a standalone feature and does not have to or need to interact a lot with other parts of the OS. Access to hidden storage space is required, though, and also the phone will have to be able to detect when an app is about to be updated and block the update until the apk is extracted and backed up. Oh, and the whole feature will have to be tied into the Settings menu.

    8. What will the user experience be like? Does the current flow result in the optimal user journey?
    I tried to show this in the attached mockups. I think the interface is simple and intuitive for anyone to use, without being convoluted or confusing. The feature itself will reside within the Settings Menu. When creating the designs, I tried to stick to your user interface, but naturally I couldn't do it extremely well. The UX/UI is entirely in your hands, as you know way better than me what is best for the users, but I think my proposal can do the trick, too!
    EDIT: Please feel free to take a look at the new interactive demo to check out the UX/UI for yourselves!

    Update #1
    (I will try to provide mock-up screens for anything suggested in here, too, but I didn’t have the time to make these yet)

    [Please keep in mind that this is just a suggestion, and thus I am not merging the post with it, instead I will simply add this part to the post.]

    It has been brought to my attention by several users of this amazing forum, which I want to thank individually, that issues might arise because of conflicting App Data. So, the question arises: What will happen with the app’s data? I thought this through a lot, and here’s the result of my brainstorming session:

    When reverting the app back to a previous version, the user could be given the following options:

    a) attempt to retain the app’s data from the newer version

    b) restore the data of the previous version of the app

    c) perform a clean install of the app (restore no data)

    Naturally, as is to be expected, some apps will not work with App Revert, as I have explained already pointed out, especially those who require users to keep them updated (a practice many online apps/games have embraced) and those who have something to do with DRM content (e.g. Spotify).

    Option (a) is simple enough to do (or at least so I think): Before reverting the app, the device will make a temporary copy of the app’s data and then overwrite the new app data that may have been created in the install directory with this backed up data, which will then be deleted to free up space. This option, however, may not work because updates may change an app’s “internal structure”, including the file saving system they use. Should that be the case, the app itself will usually create new data, or the user can manually do that instead.

    Option (c) is even easier, as it will essentially uninstall the app and install the older version, which is something very simple which is already being done by many users through manual apk file installations.

    The only option which might prove to be a challenge is option (b). For option (b) to be able to work, the phone will have to have (temporarily) backed up not only the app’s apk, but also the app’s data prior to the update. Now, as most of you realise, this could take up a lot of space, so this is why this option will be probably disabled by default but available for activation in case a user wishes to do so. We could also have a sub-menu where users will be able to select which apps this will be enabled for, so that data isn’t stored for every single app if they know that they are only going to be picking option (b) for select apps (mock-ups coming soon, hopefully). That way, space could be saved as well.

    Now, another problem brought to my attention is the following: Conflicting package names. If you’ve ever tried to downgrade or even sometimes update apps manually via apk files, you might have noticed several errors, such as conflicting package names and sometimes “destroyed” apk files which are actually perfectly fine but for some reason your devices just won’t accept them, usually because of a conflicting package or a dumb app installation policy or something. It has happened to me several times, and, as soon as I uninstalled the original app, the previously “faulty” apk would work just fine. So, what can be done about this pesky issue? Well, I certainly am no expert, but I do believe phone manufacturers such as OnePlus have control over this and can override this and overcome such limitations, especially in OxygenOS, which is what I would call a perfectly “tweak-able” OS. For example, many manufacturers offer a “Dual Apps”/“Parallel Apps” feature (and OxygenOS has this as well), which means they can resolve the issue of conflicting package names since this feature essentially installs the same package twice with no problem (probably by changing its name or something but I am not sure as to how exactly this works). This proves that it IS possible to achieve such a thing.

    Moreover, some people mentioned that App Revert will take up a lot of space because of big apps and games. That is true, as I explained myself, however I doubt that this is really going to pose much of an issue. OnePlus has decided to “amp up” storage space to 128 GB for the base models, which is a great move, if you ask me. This means that users already have a lot of space available. Combine that with the fact that this feature -IF, hopefully, implemented- will probably make its first appearance on the next OnePlus phone, which will also have a lot of storage from what I can tell, and you got yourself a much minor issue. Let us also not forget that saving files on the cloud is also a thing, and it could very well be a solution to the issue as well.But even if all this hasn’t convinced you, consider these things:

    a) Most users have only a few "big" games installed (of course there are exceptions, I definitely can't disagree with that)

    b) The backup data stored by App Revert will be temporary so as to not take up space forever, as I have explained. The chances of you using App Revert on two big apps almost simultaneously aren't that high. So there is a high probability that the data of these big apps will not co-exist at the same time, which means that your storage space won't be impacted that much.

    What’s more, a user who goes by the username @B_Wrath proposed the creation of a special partition so as to make sure that users will not be able to accidentally interfere with the App Revert storage space and that the phone will already have made sure to keep space free for app reverting purposes. I personally find this idea amazing, because it would mean that app backups will never be completed partially due to lack of space, which is something one of you correctly pointed out as a potential problem. And if the partition space runs out, more space could be assigned to it, or, if the user doesn’t want to do that, they will simply be warned that App Revert will not be able to back up the app’s files when they try to update an app.

    Last, but not least, it was brought to my attention (by @Dresa91 ) that Android Q may contain a similar feature. I had no idea, and quite frankly, I find this awesome, as the next OnePlus phone may very well get Android Q at some point or even come with it right out of the box (hopefully not the latter as it would mean the phone would be delayed, because Android Q still has time to spare before it is released). As such, OnePlus could potentially implement the infrastructure provided in Android Q and develop this feature much easier. However, they can even try to do it before Android Q and get a “boost”, if you catch my drift (Yes, I know they don’t usually do this but c’mon it WOULD be nice, wouldn’t it? :p )

    I hope I clarified many of the issues you raised, and I wish to thank you once again for pointing all this out. Just look how effective your comments were! Here’s everyone who commented meaningful things which helped me improve this entry: @D1549431653421 , @GopalB. (I want to say a big “thanks” to you, I hope I didn’t butcher your username this time), @B_Wrath , @Dresa91 , @RamQ , @toastytoast1234 , @Moin2200 (Moin as in the north German greeting “moin”? ), @Chuck_James, @Android450, @YRJ

    Thank you all very much, I hope I haven’t forgotten anyone :p

    UPDATE #2 - I really hope that this post isn't getting too complicated lol

    Hey, everyone!

    A NEW UPDATE! Finally!

    Sorry it took me this long to get back to you, but I’ve been working on something pretty major. It may not look like it, but trust me, it took me so much time to build…

    What is it, you ask? I’ll tell you. Just let me build some suspense first :D

    So, I had promised you that I’d make the new mockups (still haven’t but I will). At first I was thinking: Why stick to images? A video, or at least even a GIF, would portray the UX/UI of the proposed function way better than an image. And my goal here is that everyone clearly understands how App Revert would work.

    But then I remembered just how well this community took me in and treated me, providing helpful insights about my suggestion and being friendly to me throughout the process. So I thought that you guys deserve something better. And thus I put my heart and soul into creating something even better than a demonstrative video for you.

    Well, I probably shouldn’t make this any longer or you’ll get bored, so, without further ado, I present to you the *drum roll* APP REVERT INTERACTIVE DEMO!

    Yes, you read that correctly, it’s a fully functioning UX/UI demo of App Revert, aimed at showing just how such a feature could be incorporated into the device’s settings!

    I’m really excited about this! I hope it will prove to be useful :D

    Even OnePlus, if they decide to ever incorporate such a feature, could be helped from this… hopefully.

    Don’t expect anything breath-taking or anything. I just did the best I could.

    You can interact with it via your device right now, as a matter of fact – Here it is! I recommend using Mozilla Firefox or Google Chrome on a computer to ensure an optimal experience. I haven’t tested it on mobile devices, but it runs on HTML5 so it should work, theoretically.


    You may notice it is a little different than the mockups, and this is because I had some new ideas and was also influenced by your suggestions. Take a look and tell me what you think! For example, I have incorporated a feature some of you asked about in the comments: The option to backup your App Data as well because most apps will need them to revert properly.


    Especially those of you who have been helping with this project from the very beginning, namely @D1549431653421 , @GopalB. , @B_Wrath , @Dresa91 , @RamQ , @toastytoast1234 , @Moin2200 , @Chuck_James , @Android450 , @YRJ and more (Well, it is a long list!!), are kindly asked to leave their feedback once again because so far it has helped me a lot.
    Also, thank you a lot for your like, @dsmonteiro ! It really means a lot!
    Not to mention the comment of @Ruby G. !! Thank you so much!!

    The remaining mockups and a potential video are still on their way, though!! This demo might look simple, but I’ve spent the past three-and-a-half days on it! So please do try it out!

    I hope you enjoy tinkering around with the little demo – and if you like this idea, please like this thread! It would really help!

    Best regards,


    P.S. You guys are amazing and very friendly! Thank you for that!

    And as for you, @toastytoast1234 , I did happen to stumble across some of your comments, which you yourself described as being mean, and I just had to chuckle because of how funny they were. If being mean and being funny is the same to you, then I’ll gladly take that! :p

    The original size images, which I removed because they were too big to display properly, can be found here


    By laiosg

    Attached Files:

    Last edited: Feb 12, 2019

  2. D1549431653421
    Cupcake Feb 6, 2019

    D1549431653421 , Feb 6, 2019 :
    Wow, I'd love to see this implemented!!
    Also, how did you create the images they look so real?
    Last edited: Feb 6, 2019

  3. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Thank you so much, this really means a lot. Well, as far as the mock-ups you see are concerned, I created them in PowerPoint (not the best of tools, I know, but hey, as long as it works ;) )
    Last edited: Feb 6, 2019

  4. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    Damn!!! You created all that??? :eek:

    My only major concern is the storage utilization...
    There are games that are like 1~2 GBs and if I decide to keep the last update file in the system for those apps... I'm basically wasting that much storage...

    What happens to the app data from the current version after I revert???

    Also, lets assume some app went through some major update... And it was buggy, so I reverted to the previous version... Will the files from new update cause any issue???

  5. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :

    Hi, thank you for your feedback. This really poses an interesting question. The way I had thought all of this would work, is by simply reinstalling the older apk without messing with any app data (so in case a user is experienced enough to backup the app data that would be nice for them, yes ). But I think that also backing up app data would take up a lot of space, especially for big (offline) games, as you mentioned (online games will usually require you to update anyway so you can't do much about them via App Revert)
    Right now, when you downgrade an app using only an older apk, most of the data is not lost or corrupted because usually they don't change the "internal structure" of apps so much with updates. But perhaps backing up the previous app data and letting you restore that as well would be nice as an option to App Revert, too. You seem to be a user who knows a lot about phones as well, so let me ask you.. Do you think such an option ought to be included in App Revert?
    Thanks for your feedback once again!!

  6. B_Wrath
    Marshmallow Feb 6, 2019

    B_Wrath , Feb 6, 2019 :
    The thing is, like @GopalB. Has pointed out, this poses a difficulty in reverting apps which download the data package separately and the app itself separately.

    If you revert the app alone after a major update, the data package may become incompatible with the older version.
    This can be seen in few windows apps too.

    In this case, the feature must backup the existing data package too, which usually is more than 1GB for the big games. So what kind of limit is to be set for backing up the data package?

    General Geyuv, BeingIncog and laiosg like this.
  7. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    All I know is, If I try to downgrade an app with just the apk, the system will give me the warning, as the app is already installed...
    For that, I'll have to uninstall the app first... And that means loosing the data...
    So how can you revert without uninstalling???

    I'm talking about scenarios where major update was pushed...

    I do feel that when we think of some feature/app... We should think about all the bugs it can cause as well...

    Usually its easy, as not many think of something totally out of the box... But in your case... If you wanna win... You'll have to think of all possible bugs and loopholes...

  8. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Well I suppose you could have an option for that indeed, setting a maximum amount of app data that can be backed up as well.
    On the 6T for examples, which, if I'm not mistaken, comes with a minimum of 128 GB of storage space, I dont think storage space will be such a huge issue with App Revert mainly because:
    a) Most users have only a few "big" games installed (of course there are exceptions, I definitely can't disagree with that)
    b)The backup data stored by App Revert will be temporary so as to not take up space forever. The chances of you using App Revert on two big apps simultaneously aren't that high. So there is a probability that the data of these big apps will not co-exist at the same time, which means that your storage space won't be impacted that much.

    If you have any other solutions to this please let me know!!!

    Thank you both so much for raising this question, @GopalB. and @B_Wrath !!!

  9. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    True... But there are other stuffs that can use up those 128 GBs...

    Now can that cause problems??? What if only partial app data is stored because of this rule???

    My precious dot... :(

    BeingIncog, B_Wrath and laiosg like this.
  10. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Hahahaha sorry, fixed the issue of your precious dot

    Well, perhaps, before backing up app data the system could check if there is indeed enough "allowed" space to fully do so.
    I dont know to be honest, I wouldn't have thought about the app data so much because I was mostly targeting apps and not games, But of course you are correct. Idk but I think this workaround might indeed work (?)

  11. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Thank you very much, I will work on this and update the post soon. You've been a great help!
    The OnePlus community really is something else

    BeingIncog likes this.
  12. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    That's one of the nicest thing I've heard from someone in days... ;)
    Keep us updated... And hope you can join us with your own OnePlus device soon... :)

  13. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    What if we are talking about music/video streaming apps???
    If I've downloaded songs or videos via that app... What will happen when I revert???
    That data is stored in encrypted form too and can be in GBs...

    BeingIncog and laiosg like this.
  14. Dresa91
    Android Q Feb 6, 2019

    Dresa91 , Feb 6, 2019 :
    I think Google is planning such function with Android Q :)
    But nice idea :)

    omarmawal, BeingIncog and laiosg like this.
  15. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Really? Eat our dust, Google! We're gonna do it first! lol

    BeingIncog, GopalB. and Dresa91 like this.
  16. laiosg
    Gingerbread Feb 6, 2019

    laiosg , Feb 6, 2019 :
    Fair point. Well with DRM apps you can't do much, so as I said this feature will work for most apps but naturally not all. But hey, sometimes they might only issue small updates which will not affect the stored data.
    As such, downgrading Spotify, for example, doesn't mean that it wont be able to detect the songs that have been downloaded (both local detection as well as server side detection). Of course, if the update is a major one and changes the app's structure, there is a chance that, as you said, this might not work.
    But the users wil be warned about all of this before reverting, I guess ¯\_(ツ)_/¯
    I'll try my best to fix all of the loopholes here and update, as you suggested

  17. Dresa91
    Android Q Feb 6, 2019

  18. laiosg
    Gingerbread Feb 6, 2019

    Aashika_, BeingIncog and Dresa91 like this.
  19. GopalB.
    Nougat Feb 6, 2019

    GopalB. , Feb 6, 2019 :
    Another suggestion...
    Lesser the assumptions, better the product... ;)

    Shapeshift3r and BeingIncog like this.
  20. Dresa91
    Android Q Feb 6, 2019

    Dresa91 , Feb 6, 2019 :
    how did you mean it? :D

    BeingIncog and laiosg like this.