Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2604] Android: All js files are visible in built apk

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-11-28T00:20:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, apk, build, distribution, js, package, triage
ReporterMartin Guillon
AssigneeShak Hossain
Created2012-11-14T07:38:58.000+0000
Updated2016-03-08T07:41:41.000+0000

Description

I realised a few days ago that when building an apk on android, everything is visible just as it is in the project directory. What it means is that anyone can take the apk, copy its content to a new project folder and simply copy your application!!!! This is really bad. I mean it s ok in some cases but most my client wouldn't like that at all! This is a critical bug. A solution needs to be find very quickly

Comments

  1. Martin Guillon 2012-11-21

    I am sorry to bump this so quickly. But this is a critical problem. I have a lot of clients who would just refuse to use Titanium just because of this!
  2. Daniel Sefton 2012-11-21

    This only happens with 3.1.0 master? What about other (stable) TiSDK versions?
  3. Martin Guillon 2012-11-22

    I just tested and i can confirm that it s the same on 2.1.4.GA You can create a simple project. Then build. Either look in the apk ->assets or in the build->android->bin->assets You can see your app.js in it.
  4. Daniel Sefton 2012-11-25

    Ok, thanks. I'd like to pinpoint where this changed, was it working as expected before? What about 2.1.3 GA, or 2.1.2 GA?
  5. Martin Guillon 2012-11-26

    Actually i discovered it recently. By that i mean that i never saw it working. I ll have to look at the builder.py but i dont remember seeing anything about compile js like i see in the ios builder.
  6. Daniel Sefton 2012-11-27

    I also tested and confirmed this on all SDK versions. However, I'm not sure if the same applies for the APK built for distribution. If you have android keystores to test this, it would help, if not I'll see if I can create a dummy keystore. Thanks.
  7. Natalie Huynh 2012-11-27

    Martin are you building to device/emulator or are you packaging. The .js file will be visible if you are building to device and emulator for test, but when you package the apk for distribution you should not see the .js file
  8. Max Stepanov 2012-11-28

    Cannot reproduce when packaging app with 2.1.4.GA 3.0.0.CI or 3.1.0.master As Natalie pointed out, emulator/device builds contain js files mainly for development purposes such as debugging.
  9. Martin Guillon 2012-11-29

    Wow, thanks a lot. Just tried with a keystore and i can confirm that it works. So i think we can close that bug. Sorry Yet i think it would be nice to be able to build in "distribution" mode without a keystore. The idea is that you can test the "compiled" js which can change a few things. Will look at it Thanks

JSON Source