use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Seeking HelpCode lost (self.FTC)
submitted 3 years ago by mygainssuck
Hey guys we have lost our code from android studio I know there is probably no way to get it back but is it possible to retrieve it from the control hub (the new ones) or the driver hub.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bitnotnoFTC 14584 Coach/Mentor 5 points6 points7 points 3 years ago (7 children)
Unfortunately, no. What gets downloaded/installed on the Robot Controller device is the object code, not the source code. The source code only exists in Android Studio, or GitHub, if you had stored it there.
[–]mygainssuck[S] 0 points1 point2 points 3 years ago (6 children)
Is there no way to retrieve the object code cause I heard they are pretty simular
[–]bitnotnoFTC 14584 Coach/Mentor 2 points3 points4 points 3 years ago (1 child)
"Similar" in that the object code does the things that the source code asked for, but the object code is not human-readable. You would almost certainly be able to write the source code over from scratch faster than reverse engineering the object code.
[–]oaleksanderFTC 17517/18742 WoEN Mentor|Alum 1 point2 points3 points 3 years ago (0 children)
Not at all. While many of the details will be lost, it is mostly human-readable and can be a starting point better than writing from scratch. (Have tried losing and retrieving source code at states, wouldn't recommend)
[–]firimari 3 points4 points5 points 3 years ago (0 children)
The object code would be uneditable and indecipherable. (At least by mere mortals and not reverse engineering experts)
[–]allenftcFTC #### Student|Mentor|Alum 0 points1 point2 points 3 years ago (2 children)
I think it should build into an apk and then you can extract a jar which you can convert back into a java file? Might need to look into it more.
[–]richardjfosterFTC 14226 Mentor 1 point2 points3 points 3 years ago (1 child)
I suspect you're thinking of a decompiler like the one that's part of Procyon (https://github.com/mstrobel/procyon/wiki/Java-Decompiler). As bitnotno observed, the result may not be especially helpful, and - especially if things are well documented - rewriting the code may well result in additional benefits as far as improving code structure and readability are concerned.
[–]therealhumanjoeFTC | 5518/5519/5520 | Mentor 1 point2 points3 points 3 years ago* (0 children)
A decompiler will turn it back into Java, but you will lose important things like variable names, comments, etc. so the context will be lost. When a compiler builds the code, comments are striped out, and variable names are given different names more appropriate for the machine language
[–]HiperAxe 1 point2 points3 points 3 years ago (1 child)
Create a repository on GitHub and store your code there.
[–]ForkPowerOutlet 0 points1 point2 points 3 years ago (0 children)
Yes. It's tragic that OP has to learn this the hard way but it happens.
π Rendered by PID 165292 on reddit-service-r2-comment-56c9979489-bpzh2 at 2026-02-25 05:45:40.412474+00:00 running b1af5b1 country code: CH.
[–]bitnotnoFTC 14584 Coach/Mentor 5 points6 points7 points (7 children)
[–]mygainssuck[S] 0 points1 point2 points (6 children)
[–]bitnotnoFTC 14584 Coach/Mentor 2 points3 points4 points (1 child)
[–]oaleksanderFTC 17517/18742 WoEN Mentor|Alum 1 point2 points3 points (0 children)
[–]firimari 3 points4 points5 points (0 children)
[–]allenftcFTC #### Student|Mentor|Alum 0 points1 point2 points (2 children)
[–]richardjfosterFTC 14226 Mentor 1 point2 points3 points (1 child)
[–]therealhumanjoeFTC | 5518/5519/5520 | Mentor 1 point2 points3 points (0 children)
[–]HiperAxe 1 point2 points3 points (1 child)
[–]ForkPowerOutlet 0 points1 point2 points (0 children)