| # An example app for partner customizations. When this APK is installed, Chrome |
| # will show a homepage button and partner bookmarks, disable incognito mode, and |
| # disable bookmark editing. |
| |
| # Remount /system/ as read-write. |
| # < MNC instructions |
| adb root && adb wait-for-device |
| adb shell mount -o rw,remount /system |
| # >= MNC instructions |
| adb root |
| adb disable-verity |
| adb reboot |
| adb root |
| adb remount |
| |
| # Build an example customizations content provider APK. |
| android update project --path . --name PartnerCustomizationProviderExample --target 1 |
| ant debug |
| |
| # Install the compiled APK. |
| adb shell mkdir -p /system/app |
| adb push bin/PartnerCustomizationProviderExample-debug.apk /system/app/ChromeCustomizations.apk |
| |
| # If you want partner bookmarks to work, delete the preinstalled partner |
| # bookmarks provider (which typically provides zero bookmarks). |
| adb shell rm -r /system/app/PartnerBookmarksProvider |
| |
| # To get partner bookmarks even when Chrome isn't preinstalled, remove the |
| # ApplicationInfo.FLAG_SYSTEM check from PartnerBookmarksShim.java |
| |
| # Restart Java services to ensure dex caching. |
| adb shell stop && adb shell start |
| |
| # Start Chrome. |
| adb shell am start -S -n com.android.chrome/.Main |
| |