Software Archive
Read-only legacy content
17061 Discussions

Remove default Crosswalk permissions

klevis
Beginner
925 Views

Hi, 

I have been struggling on how to remove the default crosswalk permission when the application is built through intel xdk. 

If I just create a new project from scratch that uses HTML5+Cordova and without doing anything else I just build the project with Cordova CLI 4.1.2 and Crosswalk Runtime 14. Once the project is built, i download it and use apktool to decompile and check the AndroidManifest.xml. 

I see that these permissions are added by default from crosswalk. I am ok with the first 3 but i have a problem with WRITE_EXTERNAL_STORAGE.

 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
 <uses-permission android:name="android.permission.INTERNET"/>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

If I build the same blank project with CLI 5.1.1 and Crosswalk 15, then the WRITE_EXTERNAL_STORAGE has disappeared. Probably because people have already complained about it. 

On my real project i need to use CLI 4.1.2 because of some plugins not being compatible if i upgrade to CLI5.1.1

My question is, how do I remove that WRITE_EXTERNAL_STORAGE when the application is built?

Is there anything I can add to the intelxdk.config.additions.xml and remove the permission using xwalk-command-line ?

Some users have done the following, but that takes time and no point in building with intelxdk:

1. Export your Construct 2 via Intel XDK + Crosswalk as you did before
2. Unpack .apk into folder
3. Decompile AndroidManifest.xml
4. Change permissions
5. Recompile AndroidManifest.xml again. But now its not "signed" anymore, and won't install on mobiles.
6. Get it "signed"
7. Pack the files back into .apk again and get the .apk "Zipsigned". 

https://www.scirra.com/forum/crosswalk-intel-xdk-experiences_t101139?sid=540a7a2032a4562a3701055d7a1f836c&start=1160

Thanks

0 Kudos
1 Solution
PaulF_IntelCorp
Employee
925 Views

The process you found, which you described as not very appealing, is the one you have to use. The Crosswalk 14 library contains those extra permissions, so there is no other way to remove them. They were noted as excessive and we informed the Crosswalk project, that is why they have been removed from the Crosswalk 15 builds.

View solution in original post

0 Kudos
4 Replies
PaulF_IntelCorp
Employee
926 Views

The process you found, which you described as not very appealing, is the one you have to use. The Crosswalk 14 library contains those extra permissions, so there is no other way to remove them. They were noted as excessive and we informed the Crosswalk project, that is why they have been removed from the Crosswalk 15 builds.

0 Kudos
klevis
Beginner
925 Views

Thanks for the reply. I guess i have 2 choices. One would be to do the unappealing process and the other is to upgrade the plugins to Crosswalk 15. None of which I am looking forward to. 

0 Kudos
Swati_S_Intel1
Employee
925 Views

I would recommend upgrading the plugins, as Cordova CLI 4.1.2 build option will go away from Intel XDK in the next release. So, upgrading the plugin and moving onto CLI 5.1.1 would be a better option.

0 Kudos
klevis
Beginner
925 Views

Thanks for letting me know. We have already started using CLI 5.1.1 for our future releases.

0 Kudos
Reply