Updated Draft Guide: Install Google Play Services

Third-party apps, customisation, mods, development, custom kernels & ROMs

WARNING - Here be dragons!
If you don't entirely understand what you're doing, even following someone else's guide could end up with you bricking your Karoo, or leaving it in an unsupported state with no way to go back. By all means enter, read and learn, but undertake actions on your Karoo at your own risk!
Forum rules
Undertake any procedures at your own risk and make sure you know how to reverse any changes. You could brick your Karoo or at the very least put it into an unsupported configuration.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Updated Draft Guide: Install Google Play Services

Post by jhazelwd »

I've created a first draft of an install guide containing step by step instructions on adding Google Play Services to the Karoo.

BE WARNED, THUS COULD POTENTIALLY BRICK YOUR DEVICE AND I'M NOT RESPONSIBLE FOR YOU TRYING THIS OUT. But, with that disclaimer being called out, I've had issues where I've booted into black screen, reboot loops, etc and was able to easily resolve. As long as you unlock bootloader and enabled USB debugging you can always reflash a full ROM image, factory reset, and poof back in business.

This guide is an amendment to the guide on how to sideload 3rd party apps. Please try sideloading an app first before installing the Google Applications (GAPPS). Also, ensure you’ve sideloaded a secondary launcher (nova launcher is good, but there are plenty of launcher options for Android). You’ll need a secondary launcher to access Google Play once installed as well as other applications.

NOTE: DON'T RELOCK BOOTLOADER FOR ANY REASON ONCE UNLOCKED! Most problems can be fixed, but only if bootloader is unlocked.

Download required Files:
  1. Open GAPPS - https://opengapps.org/ - This includes a good set of the Google Play apps you’ll care about. Choose the following option (which is probably the best for the Karoo):
    - Arm / 6.0 / Nano
  2. Titanium Backup - https://www.androidapksfree.com/apk/tit ... -download/ - Other apps will work, I just used this one because I love the tool and it makes the one change easy.
  3. TWRP - viewtopic.php?f=10&t=74 - This version was built by one of the Karoo users. Be warned this version isn’t built with the correct device ID, it works beautifully but has a caveat I’ll discuss later.
  4. Magisk Manager - Installing this will give you Root access to the device.
    I’m not going to get into the technicals on this, so you can read about this tool here: https://forum.xda-developers.com/apps/m ... 6-t3618589
    Download this file: https://github.com/topjohnwu/Magisk/rel ... -v16.7.zip


Follow the following directions exactly so you don’t run into problems. Please note I have gotten this device into a state where it wouldn’t boot or would show just a black screen and have always been able to get it back. I’ll address how to get back from a bad place at the bottom of this guide.
  1. Setup Steps: (most can be found here: viewtopic.php?f=10&t=88 )
    - Follow Sections 1, 2, and 3 of the guide included in the link above.
    Create a folder and add all of the files above to that folder (most importantly the adb and fastboot tools).
    - Attach the Karoo to the computer (or Mac) with a USB cable. You should see the device show up in the file folder.
    - In Windows 10 click in the search box (left hand taskbar to the right of the windows logo) and type cmd and hit the enter key. You should see a black window popup.
    - Type adb devices and you should see your device show up with the device id next to it. This confirms the computer is talking to the Karoo.
  2. Unlock Bootloader (This will perform factory reset and all Karoo customizations will be lost. When you log back into the Karoo with your account most device specific things are restored).
    - Setup ADB and Fastboot on your PC.
    - Enable USB debugging and OEM Unlock on your Android device (in Developer Options).
    - Connect your device to the PC with a USB cable.
    - Open a command window on your PC and go to the folder where you placed all of the pre-req files. *Note: In Windows Explorer (File Manager) you can find the folder with your files, shift+right-click the folder and you should see an option to open command window in that folder.
    - Boot your device into bootloader mode using the following command:
    adb reboot bootloader
    └ You may get a request to authorize USB debugging on the device, accept it.
    - Once your device is in bootloader mode, issue the following command to unlock bootloader:
    • fastboot oem unlock
    • (Not applicable for all) If you get a confirmation screen on your device. Press Volume Up button to highlight Yes and press Power button to select it. This will begin bootloader unlocking process, which shouldn’t last more than couple of minutes.
    • Once bootloader is unlocked, your device will reboot into bootloader mode. You need to boot it into system now using the command below:
      fastboot reboot
    • During reboot, your device will go through a factory reset and then finally boot into system.
    • To verify your bootloader is unlocked, run this ADB command: fastboot getvar unlocked
    • Note: If this fails please try again until it succeeds as you’ll run into problems if the bootloader isn’t unlocked.
  3. Install Magisk (giving you root access to device)
    • From command prompt window in the folder that contains twrp.img type the following:
      • Adb boot twrp.img
    • *NOTE: Never install TWRP on the Karoo itself (it may prompt you to do it, don’t do it).
    • The Karoo should boot up and launch the TWRP app (it’s touchscreen).
    • Again ensure Karoo is connected to the computer. In the Windows/Mac File Manager you should see the Karoo show up as a device called (5010). If you double click the device you should see a folder called Internal Storage, double click on Internal Storage and create a folder called Downloads (if it doesn’t already exist).
    • Place the following files into the Downloads folder on the Karoo:
      • Magisk (.zip file)
      • Latest Karoo OTA found here (you’ll need to download the latest file which are displayed from newest at the top to oldest at the bottom): viewtopic.php?f=10&t=208 (.zip file)
      • GAPPS package (.zip file)
    • On the Karoo device the top left option is Install, touch Install. If device screen has gone black, click the power button to wake the screen up and you’ll likely have to slide the slider at the bottom to the right to re-enable.
    • Click the Magisk.zip file and confirm you want to install the package. Touchscreen is finicky so if you accidently touch the wrong file just go back and try again.
    • Once installation is complete you should get a success message. Choose the wipe cache option and then choose reboot. Reboot may take a little bit as you’ll see it’s optimizing applications.
  4. Install Titanium Backup (Again I’m assuming you’ve installed a custom launcher and can access the application once installed).
    • While the Karoo is up and running and plugged into computer, install Titanium Backup on the device:
      • Adb.exe install com.keramidas.TitaniumBackup_v8.1.0-397_Android-1.5.apk
    • Launch Titanium Backup (should prompt you with a requires root dialogue, grant root access).
    • Dismiss the informational dialogues (including the supersu dialogue) and choose the Backup tab
    • Scroll down to the K section (the files are alphabetical) and click on the Karoo NLP file. Uninstall Karoo NLP (required to get Google Play to work properly).
    • Reboot Device
  5. Install Google Applications (GAPPS)
    • From command window (same folder as above), type adb boot twrp.img
    • Once in TWRP choose Install, then choose the opengapps package (should be a .zip file).
    • Let OpenGapps install (it will take a bit), Then wipe cache again and reboot.
    • Google Play is now installed. Open Google Play Store and log-in with your Google account, installation from Google Play is now working!
  6. HELP, my Karoo won’t Boot!
    • Believe me I think I’ve tried almost everything and have always gotten the device back to booting by doing the following:
      • Typically if the device powers on you can boot into TWRP:
        From computer adb boot twrp.img, or
      • From Karoo, ensure device is off. Hold Power Button and Top Left button at the same time and continue to hold until in Bootloader. Select Fastboot option:
    • Download the latest Karoo OTA file. These are full images from Hammerhead. Found here: viewtopic.php?f=10&t=208
    • When in TWRP, copy the OTA file from your computer to the Karoo download folder.
    • From TWRP menu select flash and then install.
    • Reboot and you should be good again.
    • If you still have a problem, one last step will resolve it. Choose the wipe option, advanced wipe, and wipe system. Reflash the OTA file and then reboot and you should be back to stock.
    Follow these same steps (install Gapps, magisk, delete Karoo nlp) after each Karoo update. Also, you will need to install update via TWRP manually as it doesn't work via stock recovery.
Last edited by jhazelwd on Sun Aug 19, 2018 5:39 am, edited 2 times in total.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

Hmm. Maybe less interest than I thought.
dthempel
Site Admin
Posts: 373
Joined: Tue Mar 06, 2018 3:35 pm
Location: Cape Cod, MA
Contact:

Re: Draft Guide: Install Google Play Services

Post by dthempel »

jhazelwd wrote: Wed Jul 25, 2018 1:44 am Hmm. Maybe less interest than I thought.
I'm interested, but not yet ready to try it. Hopefully you get some feedback to improve the guide if/when it becomes needed or wanted. I'm in the "testing group", so I need to leave my Karoo stock for now...
User avatar
Steve
Site Admin
Posts: 698
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: Draft Guide: Install Google Play Services

Post by Steve »

Same here. I'm very interested but I don't really want to try it just now. Not enough time at the moment to mess around with it and try it properly.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

No worries, it's definitely pretty straightforward and I probably overcaveated it anyways. I'm 99% confident I have all of the steps needed in order, and even if not in order it's easy to go back. Reflashing any of the OTAs posted immediately takes you back to stock.

Having GAPPS installed gives options, I can use Google Maps, get email, I'm T-Mobile and they have the digits application so I can see my texts, plus find my phone works in case my device is lost. I'm not sure most people need that.
TerryK
Posts: 2
Joined: Mon Jul 02, 2018 2:02 pm

Re: Draft Guide: Install Google Play Services

Post by TerryK »

Very interested in this guide. I would like to install Trailforks which uses Google Play Services. Probably why nobody else seems to have installed this app.
Eagerly awaiting....
Terry
User avatar
Steve
Site Admin
Posts: 698
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: Draft Guide: Install Google Play Services

Post by Steve »

If I was going to start installing other apps on my Karoo, I'd prefer to go the whole hog and have Google Play Services, so that I could pretty much install whatever I liked and not be restricted.
RossA
Posts: 56
Joined: Sat Mar 10, 2018 9:21 am

Re: Draft Guide: Install Google Play Services

Post by RossA »

I’m interested in running other apps on the Karoo but being an iOS user I’ve not plucked up the nerve to try it on the Karoo yet. I keep looking though as I’d love to run Komoot on it!
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

I've sent the guide to Terry. I'll await feedback from him before sharing more broadly. As for Mac the process is identical, with the only difference is when running ADB on the Mac in Terminal you start it with ./ADB instead of just typing adb xxxx.
dthempel
Site Admin
Posts: 373
Joined: Tue Mar 06, 2018 3:35 pm
Location: Cape Cod, MA
Contact:

Re: Draft Guide: Install Google Play Services

Post by dthempel »

jhazelwd wrote: Thu Jul 26, 2018 2:24 pm I've sent the guide to Terry. I'll await feedback from him before sharing more broadly. As for Mac the process is identical, with the only difference is when running ADB on the Mac in Terminal you start it with ./ADB instead of just typing adb xxxx.
I"m happy to have a copy of the guide if you want to PM it to me. Can't guarantee I'll try it out right away, but would like to have a copy to look over.
User avatar
Psyclist
Posts: 72
Joined: Fri Jul 06, 2018 1:26 am
Location: Colombo, Sri Lanka

Re: Draft Guide: Install Google Play Services

Post by Psyclist »

+1, very interested and definitely going to try! I didn't say anything yet because I was still on holiday and couldn't have tried it anyway but I'll get my hands on the Karoo again early next week ...
I do have some experience with LineageOS and adb so what I've read so far doesn't even sound to scary :)
Ket
Posts: 8
Joined: Thu May 24, 2018 7:46 am

Re: Draft Guide: Install Google Play Services

Post by Ket »

I'm very interested!! Thanks for your hard work!
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

I've sent out the link to the WIP guide to all above. I freaked out yesterday thinking I forgot to add the Titanium backup step, opened the doc and realized I didn't forget it. I need to finish the last section and I'll likely post the guide this weekend. I'll take any feedback any of you have. It's really pretty straightforward.

Never Relock bootloader unless you're going 100% stock. With unlocked bootloader I can likely get you out of almost any bind. Once locked options are limited greatly.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

Blah! Freaking Hammerhead! Ok so Psyclist just noticed the option to unlock bootloader has been removed. So as of now this guide won't work.
User avatar
Steve
Site Admin
Posts: 698
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: Draft Guide: Install Google Play Services

Post by Steve »

I really hope that's a mistake, and not a deliberate limiting of what users can do with Karoo.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

Seems deliberate. I believe you can downgrade your version by installing an older OTA via stock. I've given Psyclist instructions on how to do it if he's interested in trying out the downgrade option. If the downgrade works we're back in business.
User avatar
Psyclist
Posts: 72
Joined: Fri Jul 06, 2018 1:26 am
Location: Colombo, Sri Lanka

Re: Draft Guide: Install Google Play Services

Post by Psyclist »

I'm trying, but no luck so far. "Volume down" (lower left button) while powering on gives you what seems to be the standard MTK recovery menu -- in Chinese, like in this video. Unfortunately it doesn't have any option to install a stock firmware :(
However, it looks like selecting "Recovery mode" from the fastboot menu does something similar, at least I got an "installing update" message when I selected it and 1.5.158.3 was installed. It turned out a new OTA update had just been downloaded.
I found a file /sdcard/.TMP/ota.zip.tmp, so I assumed those updates are always downloaded as ota.zip. Placing one in the /sdcard directory or /sdcard/.TMP didn't work however, I got a "No command" error upon selecting the "Recovery mode" option. So it seems there should be an accompanying "command file" or something.

Could someone who doesn't have 1.5.158.3 installed yet do a bit of testing before the reboot? Like running

Code: Select all

adb shell 'find /sdcard/ | xargs ls -ld'
and mailing me the result? If

Code: Select all

adb shell 'find /sdcard/ -name ota.zip'
returns a result, try listing the whole directory:

Code: Select all

adb shell 'ls -la /sdcard/...'
And if something looks like it could be a script or something (relatively small, possibly having a -rwx mode):

Code: Select all

adb shell 'cat /sdcard/...
Edit: This explains a bit about the OTA update process. Pushing to /cache fails due to missing permissions though. If stuff has to go to /cache (which I suppose the update downloader has permissions on), the above will probably not work...

Edit2: SPflashtool might be of use. I'll try it later.
Another possibility, in case the OTA downloader doesn't use certificate pinning would be to use a proxy on the Karoo's WiFi that manipulates connections to the update server and tricks the downloader into putting an older ZIP into the right place.
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

The normal OTA is called OTA.zip and is found in the cache/recovery folder (which you are correct you won't have permission). Did you try placing one of the older files (the ones pinned that I had uploaded to androidfilehost)? I'd download one of those, rename to OTA.zip and place in the root sdcard folder (which I'm relatively certain you can do without privelages. Then you can select install zip from stock recovery like you mentioned.

Glad you have knowledge of Android as this will be easier for you to figure out. Since I'm already unlocked and rooted I'm somewhat useless in resolving (and crabby they removed bootloader unlock).
jhazelwd
Posts: 43
Joined: Mon Mar 19, 2018 5:35 pm

Re: Draft Guide: Install Google Play Services

Post by jhazelwd »

One thing to note. If you already unlocked bootloader, it sticks even if menu is missing.
RustedRoot
Posts: 29
Joined: Thu Mar 08, 2018 3:29 pm

Re: Draft Guide: Install Google Play Services

Post by RustedRoot »

I'm one of the lucky ones who unlocked the bootloader through Developer options before the option was removed. Not sure if you did? Boot to the bootloader, activate fastbook, connect to your PC, open cmd and the folder containing fastboot tools then type this command:

fastboot getvar unlocked

If it returns yes, you're good to go to root and install Google Play Services. PM jhazelwd for instructions.
I did it today and it was an easy process.

I want to give John a shout-out for his help to me and the community for putting this primer together. Personally it makes the Karoo a bit more livable yet it doesn't raise my belief that Hammerhead has the goods to succeed. It only delays the inevitable of selling it to Karoo cheerleader.
Post Reply