[Samsung Gear 2] Starfire-1:
Nexus 5 Stock KitKat and other AOSP 4.4.x ROM Variation

I have spent quite some time investigating why my Nexus 5 installation does not seem to go as smoothly as the OP's and other's HTC One M8 experience.

To the best of my knowledge, the AOSP / Kit Kat 4.4.x system have changed their policy with respect to granting system level rights to apks. It is no longer sufficient to place an APK on the system partition, it must be in the /system/priv-app subdirectory. Because of this, when apps tried to install/download additional packages they either failed (silently) or popped up an install dialog box because INSTALL_PACKAGES and DELETE_PACKAGES permissions are denied.

When I installed SamsungApps to priv-app, all three automatic downloads (Samsung Billing, In App Purchasing, and Push Service) all seemlessly installed. However, when these dependent apks install, they are placed into /data/app, a non-system location so any call to a signatureOrSystem permission will be denied.

I was hoping that if I moved the Gear Manager app to /system/priv-app *before* running it the first time, that it would take care of all ten or so dependent apks. But as it turns out, it only installs about four or five automatically and it can sometimes get hung trying to install an apk, but never finishes.

So in the end, here is my variation on the OP's original procedure.

1. Download:

Code:

A. Samsungservice

B. Samsung Apps

C. S-Voice_Android_Phone

D. GearManagerStub

E. S-Voiced_Signed

2. Move Samsung Apps, S-Voice_Signed, SamsungService, and GearManagerStub to /system/priv-app

3. Correct the permissions on each file to:

Code:

A. Long press on the app

B. Press "Properties"

C. Change Attributes to -rw-rw-r-- (664) or (644)

D. Under Attributes change "Group" to 0:root and press Set

4. Move Samsungservice to /System/priv-app and correct the permissions

5. Restart Phone

6. Open S Voice and agree to all TOS

7. Go into /System/priv-app and delete S Voice

8. Move S-Voice_Android_Phone to /System/priv-app and correct permissions

9. Restart Phone

10. Open Settings > Accounts (or press on the notification) and enter account/Register

11. Open S-Voice, it will stop working, don't worry that's normal

12. Open Samsung Apps

13. Search for, and download, Gear Manager

14. Open Gear Manager

15. Connect to Device (Connection will fail since dependent apks are not installed so cancel.)

16. Manually install Connecting-Fix apk (from OP download or from Gear Manager APK that you downloaded)

ConnectionManager,

HostManager,

SAFTCore,

SAFotoProicder,

SAccessoryService,

Gear2Plugin,

goproviders,

SANotiProvider,

SANSyncProvider,

saproviders,

SAWeatherProvider (won't install),

TextTemplateProvider

17. Re-open Gear Manager, sync, accept terms.

18. Install "/system/app mover" from play store, launch and grant root.

19. Reboot - precaution to clear out running apps

20. Use /system/app mover to move the following APKs to /system/priv-app. After selecting each apk and are asked if you want to reboot now, press cancel, until you get to the final apk, then reboot your phone.

Gear Manager

Gear2Plugin

Samsung Billing

HostManager

These last four APKs all contain INSTALL_PACKAGES and DELETE_PACKAGES in their manifest and were highly likely to require system level permissions. Some of the other APKs contain "non third-party" permissions and could be candidates for promotion, but I have not gone that far yet.

With this approach I can

Install Samsung watch apps

Uninstall watch apps without Gear2Plugin force closing

Pay for Samsung watch apps with credit card

Hopefully as Samsung moves into the new versions of Android, later versions of both Samsung Apps and Gear Manager will install dependent apks in better locations.

P.S. S-voice still does not work for me.