Trox
Trox

Reputation: 349

APK bigger than 50 MB

The limitation of an APK's size on the Android Market is now 50mb. However I'm doing an application which is really bigger.

The size of my app is due to videos. However even if I don't now if I'll make a free or paid app, I don't want anyone to be able to copy/re-use my videos. So I can't upload my videos on Internet and just download them from my app to copy them to the phone or sd card. In this case everyone would have acces to the file with all the videos.

Can we ask Google to accept a bigger app (with extra-cost if needed) ? Is there other solutions ?

Upvotes: 1

Views: 1750

Answers (3)

Lie Ryan
Lie Ryan

Reputation: 64837

Unencrypted Video on APK

Here's what you're trying to do: you put an unencrypted video in your apk. Enlarging the size of the apk, and exceeding Google Market's limit.

How to beat the scheme: a rooted user need to extract the apk, unzip the apk, and post your video on Youtube for everyone to see.

Encrypted Video on Internet

Here is one encryption scheme that should be much more secure than just putting the video in the .apk. The scheme would require a public key encryption algorithm.

Your program should generate a pair of cryptographic key based on the device's unique ID, sends the public key to the server. The server will encrypt the content using this public key, and then send it to your program. This encrypted content can only be used on this particular device, since only this particular device has the matching private key to decrypt the encrypted content. You don't need to store the private key in the device, it can be generated on-the-fly everytime your program is started. The SD card will contain the encrypted content which can only be decrypted with this particular device.

The drawback of this scheme is you need an algorithm that is light enough for on-the-fly decryption while playing videos. Playing video, by itself, is resource heavy, and decryption is also resource heavy. Also, you need a server that is powerful enough to encrypt the video once each time people install your program.

How to beat the scheme: A rooted user would need to extract the .apk from your device, unzip the apk, reverse engineer the .dex files, then figure out the encryption algorithm, extract the private key, and decrypt the video. Alternatively, it is possible for rooted phones to spoof the device ID, which will lead your program to produce a matching private key; this requires unauthorized users to be rooted. This scheme is not fool proof, however unless your content is really that valuable, crackers probably would not go to the trouble of reverse engineering your apk.

Encrypted Codec

If you really need a truly secure scheme, you will want to use a codec that has built-in encryption. That way, crackers would need to reencode the video -- at the cost of quality loss -- or use a special player -- discouraging people from playing the video.

Upvotes: 3

Mark Byers
Mark Byers

Reputation: 838056

No, you can't do that. You should put your videos online somewhere. It doesn't have to be YouTube - it can be a service you host yourself.

Besides, even if you did put the videos inside your application it would still be very easy for your users to copy them and upload them to YouTube so you probably wouldn't gain anything anyway.

Upvotes: 7

Ljdawson
Ljdawson

Reputation: 12229

I would either obfuscate the address or make the videos only accessible after authentication.

Upvotes: 1

Related Questions