Announcement

Collapse
No announcement yet.

Is there a plan to release Driver Station module source code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a plan to release Driver Station module source code?

    Hi,

    I am wondering if there is a plan to release DriverStation module source code? For example, for us to customize the app to suit our purpose and borrow the program listing and starting/stopping actions for some quick test/debug hooks on RobotController App. Thanks.

    Fang Wang
    Coach of FTC team #8565

  • #2
    Hi Fang,

    We've (engineering team and Game Design Committee) been discussing this. For now, we are only providing the Driver station as a binary, but we haven't ruled out distributing the Driver Station source code in the future.

    Tom

    Comment


    • #3
      If you want to, you can use apktool and try to see if it will work. you can get it here.

      Comment


      • #4
        Or just install Kali Linux for a ton of Java reverse-engineering tools.

        ~liam

        Comment


        • #5
          I just need to figure out how to reverse engineer the smali into Java, but I have already decomplied the binary to smali, but I guess I should see about Kali's tools to get something a tad more understandable. I do not see an explicit no reverse engineering warning in any documentation, yet. I just need to decompile xml to human readable form.

          Comment


          • #6
            Given that you can reverse engineer/decompile the SDK and the DriverStation / RobotControler Apps, the SDK and the Apps beg to be Open Source.

            FTC teams should have access to the App and SDK source repositories (git or svn), with the ability to submit patches to the same. FTC and the teams will benefit greatly from the open source model.

            Comment


            • #7
              Any reverse engineered copy will need to be patched up by humans for it compile and function correctly, the code could have many compiler optimizations changing what and how the code reads. I need to decompile the .jar archive to class files, and see what happens. All I know is that any reverse engineered copy will mostly likely be horrible to dig through, and I see it being pointless to have any proprietary code running the robot if it can be de-compiled to a state where it can pieced back together by something intelligent. If I remember correctly, somewhere someone has already put out there de-complied code on this forum.

              Submitting patches will never work, if FIRST does not want them. However if they do, life may be easier for their development, they just need to use and document a procedure for submitting them.

              Comment


              • #8
                Originally posted by dmssargent View Post
                Any reverse engineered copy will need to be patched up by humans for it compile and function correctly, ... If I remember correctly, somewhere someone has already put out there de-complied code on this forum.
                Exactly! If the SDK and the Apps are open source, then teams won't have to waste time doing this type of unnecessary (and imperfect) work, leaving teams with more time to do productive things, like making patches

                Originally posted by dmssargent View Post
                Submitting patches will never work, if FIRST does not want them. However if they do, life may be easier for their development, they just need to use and document a procedure for submitting them.
                If FIRST does not want any given patch, then they don't have to commit the patch. If the patch is useful for FIRST, then they will commit the patch. Patches are a feature of svn and git (no documentation is necessary).

                Comment


                • #9
                  Originally posted by dmssargent View Post
                  Any reverse engineered copy will need to be patched up by humans for it compile and function correctly, the code could have many compiler optimizations changing what and how the code reads. I need to decompile the .jar archive to class files, and see what happens. All I know is that any reverse engineered copy will mostly likely be horrible to dig through, and I see it being pointless to have any proprietary code running the robot if it can be de-compiled to a state where it can pieced back together by something intelligent. If I remember correctly, somewhere someone has already put out there de-complied code on this forum.

                  Submitting patches will never work, if FIRST does not want them. However if they do, life may be easier for their development, they just need to use and document a procedure for submitting them.
                  Qualcomm is obfuscating the code, so yes, it is harder to
                  dig through than necessary, although various tidbits can
                  be gleaned from the decompiled source.

                  Jonathan Berling however has effectively tried to dissuade
                  people from decompiling the jars.

                  http://ftcforum.usfirst.org/showthre...ll=1#post14013

                  I completely agree that providing this software in an
                  open fashion dovetails with FIRST's educational mission
                  and don't really understand why Qualcomm has the
                  obfuscate flag turned on when compiling their source, nor
                  why they don't just release source with the jars.

                  On the patches front, FIRST doesn't have to take anything
                  it doesn't want, but enabling teams to have the flexibility
                  to do what they want with the software would be awesome.

                  Eventually, the community would decide what is useful and
                  what is not.

                  Comment


                  • #10
                    I agree that the community can have its own patch system, but what I worried about is FIRST not taking patches, or just taking them and waiting season(s) to apply them upstream. As for the obsufacted code, I believe that is done automatically with the release option defaults in Android Studio. I can decompile almost the entire Driver Station APK (except the run methods in classes that inherit Runnable, one or two methods, the enums, and the FT_DEVICE class + some other).

                    An example fragment of de-complied code (ReadWriteRunnable.java):
                    Code:
                     public void blockUntilReady()
                        throws RobotCoreException, InterruptedException
                      {
                        try
                        {
                          this.blockingLock.lock();
                          while (this.blockingState == BlockingState.BLOCKING)
                          {
                            this.blockingCondition.await(100L, TimeUnit.MILLISECONDS);
                            if (this.shutdownComplete == true)
                            {
                              RobotLog.w("sync device block requested, but device is shut down - " + this.serialNumber);
                              RobotLog.setGlobalErrorMsg("There were problems communicating with a Modern Robotics USB device for an extended period of time.");
                              throw new RobotCoreException("cannot block, device is shut down");
                            }
                          }
                        }
                        finally
                        {
                          this.blockingLock.unlock();
                        }
                        this.blockingLock.unlock();
                      }
                    Also the public variables names are horrible in decompiled code (a, b, c ...), but that is to be expected. Something technical is that I can get rid of a lot of errors in the code when a reference the JAR file from the DEX that was used to build the Java source. Also, I have a feeling the someone from FIRST will comment on this.

                    Comment


                    • #11
                      Copyright Issue

                      Originally posted by skatefriday View Post
                      Qualcomm is obfuscating the code, so yes, it is harder to
                      dig through than necessary, although various tidbits can
                      be gleaned from the decompiled source.

                      Jonathan Berling however has effectively tried to dissuade
                      people from decompiling the jars.

                      http://ftcforum.usfirst.org/showthre...ll=1#post14013

                      I completely agree that providing this software in an
                      open fashion dovetails with FIRST's educational mission
                      and don't really understand why Qualcomm has the
                      obfuscate flag turned on when compiling their source, nor
                      why they don't just release source with the jars.

                      On the patches front, FIRST doesn't have to take anything
                      it doesn't want, but enabling teams to have the flexibility
                      to do what they want with the software would be awesome.

                      Eventually, the community would decide what is useful and
                      what is not.
                      If Qualcomm is obfuscating the code, it means they don’t want anyone decompiling their code.

                      Do FTC teams have permission from Qualcomm to decompile and publically post Qualcomm code?

                      Comment


                      • #12
                        If someone from wants to tell me where the terms of use or the official game manual where states that it is disallowed to decompile or reverse engineer Qualcomm's work, please do so. I just posted a fragment of decomplied code, how can I tell if that source actually matches what Qualcomm wrote? I can't tell. As far as I can tell, they may have forgotten to turn on ofsucation on their Driver Station app, since all I can see is de-compiled Android code with only small fragments of the entire framework failing, or at least did not put the obfuscation on max. Plus, all I can find is a warning on the forums about reading obfuscated code, not disallowing taking it apart. Though, I should probably still add that copyright disclaimer, and check to make sure that I don't need to add that in.

                        Comment


                        • #13
                          Originally posted by Alec View Post
                          If Qualcomm is obfuscating the code, it means they don’t want anyone decompiling their code.

                          Do FTC teams have permission from Qualcomm to decompile and publically post Qualcomm code?
                          I am going to say this is a good question to ask, and that it does need to be answered before I am willing to post any other fragments on the de-complied source. Also, I think I need to add that Qualcomm disclaimer to the source. I apologize in advance if this was not graciously professional, but the code is still there. Note that the APK file did not come from the Google Play Store.

                          Comment


                          • #14
                            Originally posted by Alec View Post
                            If Qualcomm is obfuscating the code, it means they don’t want anyone decompiling their code.

                            Do FTC teams have permission from Qualcomm to decompile and publically post Qualcomm code?
                            There are a large number of policy decisions that FIRST HQ has been
                            silent about surrounding the new platform.

                            But my view is that it really doesn't serve FIRST's educational
                            mission to restrict access to underlying source. So, if Qualcomm
                            wants to limit access to this software, they should have good
                            engineering and educational reasons for doing so and should publicize
                            those reasons.

                            In past years FCS source was kept tightly locked down and if
                            you asked, the official reason was concern for cheating via
                            hacking exploits. Fair enough. Although I don't see that being
                            a concern with the current wifi-direct implementation. And teams
                            that want to modify the controller app should be allowed to do
                            so as long as they understand that doing so is at their own
                            risk and the robot satisfies all aspects of the game rule book.

                            Comment


                            • #15
                              Originally posted by skatefriday View Post
                              There are a large number of policy decisions that FIRST HQ has been
                              silent about surrounding the new platform.

                              But my view is that it really doesn't serve FIRST's educational
                              mission to restrict access to underlying source. So, if Qualcomm
                              wants to limit access to this software, they should have good
                              engineering and educational reasons for doing so and should publicize
                              those reasons.

                              In past years FCS source was kept tightly locked down and if
                              you asked, the official reason was concern for cheating via
                              hacking exploits. Fair enough. Although I don't see that being
                              a concern with the current wifi-direct implementation. And teams
                              that want to modify the controller app should be allowed to do
                              so as long as they understand that doing so is at their own
                              risk and the robot satisfies all aspects of the game rule book.
                              The old platform is governed by the licensing agreement(s) between FIRST and the old vendors.

                              The new platform is governed by the licensing agreement(s) between FIRST and the new vendors.

                              In Qualcomm’s licensing agreement with FIRST, I would be very surprised if Qualcomm has granted FIRST and FTC teams permission to post Qualcomm code on the Internet (or even for teams to decompile Qualcomm code for personal use).

                              Comment

                              Working...
                              X