@@ -16,28 +16,28 @@ There are 2 ways of applying an OTA update:
1616OTA via ``adb sideload ``
1717************************
1818
19- 1 . Build and flash android images following :ref: `android-build-aosp ` instructions.
19+ # . Build and flash android images following :ref: `android-build-aosp ` instructions.
2020
21- 2 . Build OTA package
21+ # . Build OTA package
2222
23- .. code-block :: console
23+ .. code-block :: console
2424
25- $ cd ${YOUR_PATH}/ti-aosp-15
26- $ source build/envsetup.sh
27- $ lunch <BUILD_TARGET>
28- $ export DIST_DIR=./dist_output
29- $ m dist
25+ $ cd ${YOUR_PATH}/ti-aosp-15
26+ $ source build/envsetup.sh
27+ $ lunch <BUILD_TARGET>
28+ $ export DIST_DIR=./dist_output
29+ $ m dist
3030
31- 3 . `Enable adb debugging on your device <https://developer.android.com/studio/command-line/adb#Enabling >`__
31+ # . `Enable adb debugging on your device <https://developer.android.com/studio/command-line/adb#Enabling >`__
3232
33- 4 . Reboot to recovery and apply OTA
33+ # . Reboot to recovery and apply OTA
3434
35- .. code-block :: console
35+ .. code-block :: console
3636
37- $ adb reboot sideload
38- $ adb wait-for-sideload
39- $ adb sideload $DIST_DIR/am62p-ota-eng.${USER}.zip
40- $ adb reboot
37+ $ adb reboot sideload
38+ $ adb wait-for-sideload
39+ $ adb sideload $DIST_DIR/am62p-ota-eng.${USER}.zip
40+ $ adb reboot
4141
4242
4343 .. _android-ota-update-engine :
@@ -46,110 +46,110 @@ OTA via ``adb sideload``
4646OTA via Update Engine
4747*********************
4848
49- 1 . Build the OTA package
49+ # . Build the OTA package
5050
51- .. code-block :: console
51+ .. code-block :: console
5252
53- $ source build/envsetup.sh
54- $ lunch <BUILD_TARGET>
55- $ export DIST_DIR=./dist_output
56- $ m
57- $ m dist
53+ $ source build/envsetup.sh
54+ $ lunch <BUILD_TARGET>
55+ $ export DIST_DIR=./dist_output
56+ $ m
57+ $ m dist
5858
59- 2 . Set your ``PYTHONPATH ``.
59+ # . Set your ``PYTHONPATH ``.
6060
61- Some dependent python modules for :file: `gen_update_config.py ` are part of AOSP tree or
62- part of the build output.
61+ Some dependent python modules for :file: `gen_update_config.py ` are part of AOSP tree or
62+ part of the build output.
6363
64- .. code-block :: console
64+ .. code-block :: console
6565
66- $ cd $ANDROID_BUILD_TOP
67- $ apex_manifest_pb2_path=$(find out -name 'apex_manifest_pb2.py' -print -quit)
68- $ PYTHONPATH=$ANDROID_BUILD_TOP/$(dirname ${apex_manifest_pb2_path}):$PYTHONPATH
69- $ PYTHONPATH=$ANDROID_BUILD_TOP/build/make/tools/releasetools:$PYTHONPATH
70- $ PYTHONPATH=$ANDROID_BUILD_TOP/system/apex/apexer/:$PYTHONPATH
71- $ export PYTHONPATH
66+ $ cd $ANDROID_BUILD_TOP
67+ $ apex_manifest_pb2_path=$(find out -name 'apex_manifest_pb2.py' -print -quit)
68+ $ PYTHONPATH=$ANDROID_BUILD_TOP/$(dirname ${apex_manifest_pb2_path}):$PYTHONPATH
69+ $ PYTHONPATH=$ANDROID_BUILD_TOP/build/make/tools/releasetools:$PYTHONPATH
70+ $ PYTHONPATH=$ANDROID_BUILD_TOP/system/apex/apexer/:$PYTHONPATH
71+ $ export PYTHONPATH
7272
73- 3 . Patch the :file: `gen_update_config.py ` script to be compatible with Android 15.
74- In :file: `bootable/recovery `, apply the following change:
73+ # . Patch the :file: `gen_update_config.py ` script to be compatible with Android 15.
74+ In :file: `bootable/recovery `, apply the following change:
7575
76- https://android-review.googlesource.com/c/platform/bootable/recovery/+/2837717
76+ https://android-review.googlesource.com/c/platform/bootable/recovery/+/2837717
7777
78- This can be done with:
78+ This can be done with:
7979
80- .. code-block :: console
80+ .. code-block :: console
8181
82- $ cd $ANDROID_BUILD_TOP/bootable/recovery
83- $ git fetch https://android.googlesource.com/platform/bootable/recovery refs/changes/17/2837717/1
84- $ git cherry-pick FETCH_HEAD
82+ $ cd $ANDROID_BUILD_TOP/bootable/recovery
83+ $ git fetch https://android.googlesource.com/platform/bootable/recovery refs/changes/17/2837717/1
84+ $ git cherry-pick FETCH_HEAD
8585
86- 4 . Update the ota config file. Feel free to change ``$DIST_DIR `` to match your developer environment.
86+ # . Update the ota config file. Feel free to change ``$DIST_DIR `` to match your developer environment.
8787
88- .. code-block :: console
88+ .. code-block :: console
8989
90- $ source build/envsetup.sh
91- $ lunch <BUILD_TARGET>
92- $ DIST_DIR=dist_output
93- $ BOARD=am62p
94- $ bootable/recovery/updater_sample/tools/gen_update_config.py --ab_install NON_STREAMING $DIST_DIR/$BOARD-ota-eng.${USER}.zip $DIST_DIR/$BOARD-ota-eng.${USER}.json file:///data/user/0/com.example.android.systemupdatersample/files/packages/$BOARD-ota-eng.${USER}.zip
90+ $ source build/envsetup.sh
91+ $ lunch <BUILD_TARGET>
92+ $ DIST_DIR=dist_output
93+ $ BOARD=am62p
94+ $ bootable/recovery/updater_sample/tools/gen_update_config.py --ab_install NON_STREAMING $DIST_DIR/$BOARD-ota-eng.${USER}.zip $DIST_DIR/$BOARD-ota-eng.${USER}.json file:///data/user/0/com.example.android.systemupdatersample/files/packages/$BOARD-ota-eng.${USER}.zip
9595
96- .. warning ::
96+ .. warning ::
9797
98- Be careful, last line is **one single ** very long line.
98+ Be careful, last line is **one single ** very long line.
9999
100- 5 . Run the SystemUpdaterSample app once:
100+ # . Run the SystemUpdaterSample app once:
101101
102- .. code-block :: console
102+ .. code-block :: console
103103
104- $ adb root
105- $ adb shell setenforce 0
106- $ adb shell am start com.example.android.systemupdatersample/com.example.android.systemupdatersample.ui.MainActivity
104+ $ adb root
105+ $ adb shell setenforce 0
106+ $ adb shell am start com.example.android.systemupdatersample/com.example.android.systemupdatersample.ui.MainActivity
107107
108- 6 . Push the files on the board:
108+ # . Push the files on the board:
109109
110- .. code-block :: console
110+ .. code-block :: console
111111
112- $ adb root
113- $ adb shell mkdir /data/user/0/com.example.android.systemupdatersample/files/configs
114- $ adb shell mkdir /data/user/0/com.example.android.systemupdatersample/files/packages
115- $ adb push $DIST_DIR/$BOARD-ota-eng.${USER}.json /data/user/0/com.example.android.systemupdatersample/files/configs/
116- $ adb push $DIST_DIR/$BOARD-ota-eng.${USER}.zip /data/user/0/com.example.android.systemupdatersample/files/packages/
112+ $ adb root
113+ $ adb shell mkdir /data/user/0/com.example.android.systemupdatersample/files/configs
114+ $ adb shell mkdir /data/user/0/com.example.android.systemupdatersample/files/packages
115+ $ adb push $DIST_DIR/$BOARD-ota-eng.${USER}.json /data/user/0/com.example.android.systemupdatersample/files/configs/
116+ $ adb push $DIST_DIR/$BOARD-ota-eng.${USER}.zip /data/user/0/com.example.android.systemupdatersample/files/packages/
117117
118- 7 . Change SELinux label:
118+ # . Change SELinux label:
119119
120- .. code-block :: console
120+ .. code-block :: console
121121
122- $ adb shell chcon -R u:object_r:ota_package_file:s0 /data/user/0/com.example.android.systemupdatersample/
122+ $ adb shell chcon -R u:object_r:ota_package_file:s0 /data/user/0/com.example.android.systemupdatersample/
123123
124124
125- 8 . Change Unix permisssions:
125+ # . Change Unix permisssions:
126126
127- .. code-block :: console
127+ .. code-block :: console
128128
129- $ adb shell chmod -R 777 /data/user/0/com.example.android.systemupdatersample/
129+ $ adb shell chmod -R 777 /data/user/0/com.example.android.systemupdatersample/
130130
131- 9 . Run the update on the UI:
131+ # . Run the update on the UI:
132132
133- - Tap on ``RELOAD `` to load the config
134- - Tap on ``APPLY `` to apply the OTA
135- - Tap ``OK `` to confirm application
136- - Wait for progress bar to complete
137- - Tap on ``SWITCH SLOT `` to finish update (scroll downwards to see the button)
138- - Wait for verification
133+ - Tap on ``RELOAD `` to load the config
134+ - Tap on ``APPLY `` to apply the OTA
135+ - Tap ``OK `` to confirm application
136+ - Wait for progress bar to complete
137+ - Tap on ``SWITCH SLOT `` to finish update (scroll downwards to see the button)
138+ - Wait for verification
139139
140- 10 . Reboot the device with:
140+ # . Reboot the device with:
141141
142- .. code-block :: console
142+ .. code-block :: console
143143
144- $ adb shell svc power reboot
144+ $ adb shell svc power reboot
145145
146- 11 . Confirm that booting on slot b
146+ # . Confirm that booting on slot b
147147
148- .. code-block :: console
148+ .. code-block :: console
149149
150- $ adb root
151- $ adb shell grep -o 'androidboot.slot_suffix=[_ab]*' /proc/cmdline
152- androidboot.slot_suffix=_b
150+ $ adb root
151+ $ adb shell grep -o 'androidboot.slot_suffix=[_ab]*' /proc/cmdline
152+ androidboot.slot_suffix=_b
153153
154154
155155 Troubleshooting
0 commit comments