Purpose
To help you get the BVC (bundle version code) or a game that is live on the play store, so that you can put our new versions and rollback releases with proper BVCs.
Applicability
This is applicable to developers.
Written Instructions
A. Get latest version of game onto your phone.
B. Find the bundle identifier for your game. You can find it in the URL for the game in the google play store. (ex. com.freegamesstudio.copsvsrobbersjailbreak) {BUNDLEID}
C. Find out where your Android SDK is. {SDKPATH}
On Windows, go to Edit -> Preferences -> External Tools.
On Mac, go to Unity -> Preferences -> External Tools.
Under External Tools, you’ll see ‘Android’ and it’ll list your SDK path.
ex: C:/Users/Axel/AppData/Local/Android/sdk
ex: /Users/clinton/Library/Android/sdk
D. Plug your phone in with a USB cable.
E. Ask the device for the game’s BVC.
On Windows, start ‘Powershell’ or ‘cmd’. On a Mac, run ‘Terminal’.
You’ll want to enter a command similar to this:
~/Library/Android/sdk/platform-tools/adb shell dumpsys package com.freegamesstudio.copsvsrobbersjailbreak | grep version
C:/Users/Axel/AppData/Local/Android/sdk/platform-tools/adb shell dumpsys package com.freegamesstudio.thesurvivalhuntergames2 | findstr version
that is:
{SDKPATH}/platform-tools/adb shell dumpsys package {BUNDLEID} | {GREPTOOL} version
(Replace GREPTOOL with ‘grep’ or ‘findstr’ on Mac OS X and Windows, respectively.)
This command uses the android tool ‘adb’ to talk to your phone and ask for details about a specific installed program. It then filters the results for any lines that have the word ‘version’ in them.
You’ll get a result like this:
versionCode=15 targetSdk=17
versionName=C10.2
This let’s you know that the latest version of the game on the store has a BVC (bundle version code) of 15. {STOREBVC}
Your new work on the game will have a BVC of {STOREBVC} + 1. (15 + 1 = 16).
Your rollback version will be one more than that — {STOREBVC} + 2. (15 + 2 = 17).
