Merge "16KB -> 16 KB" into main

This commit is contained in:
Pawan Wagh
2025-02-20 19:28:35 -08:00
committed by Gerrit Code Review
2 changed files with 36 additions and 36 deletions

View File

@@ -12563,36 +12563,36 @@
<!-- Developer Settings: Search keywords for the Profile HWUI rendering. [CHAR_LIMIT=NONE] --> <!-- Developer Settings: Search keywords for the Profile HWUI rendering. [CHAR_LIMIT=NONE] -->
<string name="track_frame_time_keywords">GPU</string> <string name="track_frame_time_keywords">GPU</string>
<!-- setting Checkbox title whether to boot with 16KB page size [CHAR_LIMIT=35] --> <!-- setting Checkbox title whether to boot with 16 KB page size [CHAR_LIMIT=35] -->
<string name="enable_16k_pages">Boot with 16KB page size</string> <string name="enable_16k_pages">Boot with 16 KB page size</string>
<!-- setting Checkbox summary whether to boot with 16K page size[CHAR_LIMIT=50] --> <!-- setting Checkbox summary whether to boot with 16 KB page size[CHAR_LIMIT=50] -->
<string name="enable_16k_pages_summary">Boot device using 16KB page size supported kernel</string> <string name="enable_16k_pages_summary">Boot device using 16 KB page size supported kernel</string>
<!-- Confirmation dialog title to ensure user wishes to enable 16K page size --> <!-- Confirmation dialog title to ensure user wishes to enable 16 KB page size -->
<string name="confirm_enable_16k_pages_title">Switch from 4KB mode to 16KB mode</string> <string name="confirm_enable_16k_pages_title">Switch from 4 KB mode to 16 KB mode</string>
<!-- Warning dialog message to confirm user wishes to enable 16KB page size --> <!-- Warning dialog message to confirm user wishes to enable 16 KB page size -->
<string name="confirm_enable_16k_pages_text">You are in the page-agnostic mode running a 4KB kernel, and you are switching to the 16KB mode. <string name="confirm_enable_16k_pages_text">You are in the page-agnostic mode running a 4 KB kernel, and you are switching to the 16 KB mode.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk. Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
This will reboot the device. Some features will be disabled in these modes, so some applications may not work. This will reboot the device. Some features will be disabled in these modes, so some applications may not work.
To return the device to production mode, you would need to then, switch back to the 4KB mode and lock the bootloader, To return the device to production mode, you would need to then, switch back to the 4 KB mode and lock the bootloader,
which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string> which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string>
<!-- dialog title to confirm user wishes to revert to 4k page size kernel --> <!-- dialog title to confirm user wishes to revert to 4k page size kernel -->
<string name="confirm_enable_4k_pages_title">Switch from 16KB mode to 4KB mode</string> <string name="confirm_enable_4k_pages_title">Switch from 16 KB mode to 4 KB mode</string>
<!-- dialog message to confirm user wishes to enable 4K page size --> <!-- dialog message to confirm user wishes to enable 4K page size -->
<string name="confirm_enable_4k_pages_text">You are in the page-agnostic mode running a 16KB kernel, and you are switching to the 4KB mode. <string name="confirm_enable_4k_pages_text">You are in the page-agnostic mode running a 16 KB kernel, and you are switching to the 4 KB mode.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk. Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
This will reboot the device. Some features will be disabled in these modes, so some applications may not work. To return the device to production mode, This will reboot the device. Some features will be disabled in these modes, so some applications may not work. To return the device to production mode,
you would need to then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string> you would need to then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string>
<!-- Toast message when 16k OTA update fails --> <!-- Toast message when 16k OTA update fails -->
<string name="toast_16k_update_failed_text">Failed to update kernel to 16KB pages compatible kernel.</string> <string name="toast_16k_update_failed_text">Failed to update kernel to 16 KB pages compatible kernel.</string>
<string name="progress_16k_ota_title">Applying change</string> <string name="progress_16k_ota_title">Applying change</string>
<!-- Confirmation dialog title and text to reformat data to ext4 --> <!-- Confirmation dialog title and text to reformat data to ext4 -->
<string name="confirm_format_ext4_title">Reformat device to ext4? (required for 16KB mode)</string> <string name="confirm_format_ext4_title">Reformat device to ext4? (required for 16 KB mode)</string>
<string name="confirm_format_ext4_text">This devices data partition needs to be converted to ext4 before using the 16KB developer option. <string name="confirm_format_ext4_text">This devices data partition needs to be converted to ext4 before using the 16 KB developer option.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk. Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
Activating the 16KB option will require one more reboot after this. Once you are in this mode, you can switch back and forth between 4KB and 16KB mode with a single reboot. Activating the 16 KB option will require one more reboot after this. Once you are in this mode, you can switch back and forth between 4 KB and 16 KB mode with a single reboot.
Some features will be disabled in these modes, so some applications may not work. To return the device to production mode, you would need to switch back to 4KB mode and Some features will be disabled in these modes, so some applications may not work. To return the device to production mode, you would need to switch back to 4 KB mode and
then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options. then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.
The device will be wiped and the filesystem will be changed to ext4 after confirmation. After this completes, please come back to enable 16KB again. The device will be wiped and the filesystem will be changed to ext4 after confirmation. After this completes, please come back to enable 16 KB again.
</string> </string>
<!-- Text for confirmation buttion for ext4 --> <!-- Text for confirmation buttion for ext4 -->
<string name="confirm_ext4_button_text">Erase all data</string> <string name="confirm_ext4_button_text">Erase all data</string>
@@ -12600,22 +12600,22 @@
<string name="format_ext4_failure_toast">Failed to reformat and wipe the data partition to ext4.</string> <string name="format_ext4_failure_toast">Failed to reformat and wipe the data partition to ext4.</string>
<!-- Dialog to OEM unlock the device before using 16K developer option --> <!-- Dialog to OEM unlock the device before using 16K developer option -->
<string name="confirm_oem_unlock_for_16k_title">Bootloader Unlock Required</string> <string name="confirm_oem_unlock_for_16k_title">Bootloader Unlock Required</string>
<string name="confirm_oem_unlock_for_16k_text">This device needs to have the bootloader unlocked before using the 16KB developer option. <string name="confirm_oem_unlock_for_16k_text">This device needs to have the bootloader unlocked before using the 16 KB developer option.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk. Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
All user data and settings will be wiped when activating 16KB mode. Once the bootloader is unlocked, activating the 16KB option will require two reboots. All user data and settings will be wiped when activating 16 KB mode. Once the bootloader is unlocked, activating the 16 KB option will require two reboots.
Once you are in this mode, you can switch back and forth between 4KB and 16KB mode with a single reboot. Some features will be disabled in these modes, Once you are in this mode, you can switch back and forth between 4 KB and 16 KB mode with a single reboot. Some features will be disabled in these modes,
so some applications may not work. To return the device to production mode, you would need to switch back to 4KB mode and then OEM/bootloader lock (which factory resets) the device. so some applications may not work. To return the device to production mode, you would need to switch back to 4 KB mode and then OEM/bootloader lock (which factory resets) the device.
Please unlock the bootloader and try again. You can see instructions for how to do this at Please unlock the bootloader and try again. You can see instructions for how to do this at
&lt;a href=\"https://source.android.com/docs/core/architecture/bootloader/locking_unlocking\"&gt;https://source.android.com/docs/core/architecture/bootloader/locking_unlocking&lt;/a&gt; &lt;a href=\"https://source.android.com/docs/core/architecture/bootloader/locking_unlocking\"&gt;https://source.android.com/docs/core/architecture/bootloader/locking_unlocking&lt;/a&gt;
</string> </string>
<!-- persistent notification 4k page agnostic mode title --> <!-- persistent notification 4k page agnostic mode title -->
<string name="page_agnostic_4k_pages_title">Using 4KB page-agnostic mode</string> <string name="page_agnostic_4k_pages_title">Using 4 KB page-agnostic mode</string>
<!-- persistent notification 4k page agnostic mode text --> <!-- persistent notification 4k page agnostic mode text -->
<string name="page_agnostic_4k_pages_text_short">You are in the 4KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode, <string name="page_agnostic_4k_pages_text_short">You are in the 4 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work. and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must lock the bootloader of the device. Tap to read more.</string> In order to re-enter the production mode, you must lock the bootloader of the device. Tap to read more.</string>
<!-- persistent notification 16k page agnostic mode title --> <!-- persistent notification 16k page agnostic mode title -->
<string name="page_agnostic_4k_pages_text">You are in the 4KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode, <string name="page_agnostic_4k_pages_text">You are in the 4 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work. and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must lock the bootloader of the device. This would factory reset the device again and restore it to production settings. In order to re-enter the production mode, you must lock the bootloader of the device. This would factory reset the device again and restore it to production settings.
After the device successfully boots into Android, disable OEM unlocking in Developer options. After the device successfully boots into Android, disable OEM unlocking in Developer options.
@@ -12624,20 +12624,20 @@
or use &lt;a href=\"https://flash.android.com/back-to-public\"&gt;https://flash.android.com/back-to-public&lt;/a&gt; or use &lt;a href=\"https://flash.android.com/back-to-public\"&gt;https://flash.android.com/back-to-public&lt;/a&gt;
and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string> and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string>
<!-- persistent notification 16k page agnostic mode title --> <!-- persistent notification 16k page agnostic mode title -->
<string name="page_agnostic_16k_pages_title">Using 16KB page-agnostic mode</string> <string name="page_agnostic_16k_pages_title">Using 16 KB page-agnostic mode</string>
<!-- persistent notification 16k page agnostic mode text --> <!-- persistent notification 16k page agnostic mode text -->
<string name="page_agnostic_16k_pages_text_short">You are in the 16KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode, <string name="page_agnostic_16k_pages_text_short">You are in the 16 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work. and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must, switch back to 4KB mode and then lock the bootloader of the device. Tap to read more.</string> In order to re-enter the production mode, you must, switch back to 4 KB mode and then lock the bootloader of the device. Tap to read more.</string>
<string name="page_agnostic_16k_pages_text">You are in the 16KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode, <string name="page_agnostic_16k_pages_text">You are in the 16 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work. and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must, switch back to 4KB mode and then lock the bootloader of the device. This would factory reset the device again and In order to re-enter the production mode, you must, switch back to 4 KB mode and then lock the bootloader of the device. This would factory reset the device again and
restore it to production settings. After the device successfully boots into Android, disable OEM unlocking in Developer options. restore it to production settings. After the device successfully boots into Android, disable OEM unlocking in Developer options.
If the device fails to boot into Android or is unstable, re-flash the device with the latest factory images from If the device fails to boot into Android or is unstable, re-flash the device with the latest factory images from
&lt;a href=\"https://developers.google.com/android/images\"&gt;https://developers.google.com/android/images&lt;/a&gt; &lt;a href=\"https://developers.google.com/android/images\"&gt;https://developers.google.com/android/images&lt;/a&gt;
or use &lt;a href=\"https://flash.android.com/back-to-public\"&gt;https://flash.android.com/back-to-public&lt;/a&gt; or use &lt;a href=\"https://flash.android.com/back-to-public\"&gt;https://flash.android.com/back-to-public&lt;/a&gt;
and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string> and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string>
<string name="page_agnostic_notification_channel_name">16KB Page-agnostic Mode</string> <string name="page_agnostic_notification_channel_name">16 KB Page-agnostic Mode</string>
<string name="page_agnostic_notification_action">Read more</string> <string name="page_agnostic_notification_action">Read more</string>
<!-- DSU Loader. Do not translate. --> <!-- DSU Loader. Do not translate. -->

View File

@@ -43,17 +43,17 @@ import java.util.Locale;
public class Enable16KbDeviceTest { public class Enable16KbDeviceTest {
private static final long TIMEOUT = 2000; private static final long TIMEOUT = 2000;
private static final String ENABLE_16K_TOGGLE = "Boot with 16KB page size"; private static final String ENABLE_16K_TOGGLE = "Boot with 16 KB page size";
private static final String BUILD_NUMBER = "Build number"; private static final String BUILD_NUMBER = "Build number";
private static final String USE_DEVELOPER_OPTIONS = "Use developer options"; private static final String USE_DEVELOPER_OPTIONS = "Use developer options";
private static final String EXT4_CONFIRMATION = "Erase all data"; private static final String EXT4_CONFIRMATION = "Erase all data";
private static final String EXT4_TITLE = "Reformat device to ext4? (required for 16KB mode)"; private static final String EXT4_TITLE = "Reformat device to ext4? (required for 16 KB mode)";
private static final String TOGGLE_16K_TITLE = "Switch from 4KB mode to 16KB mode"; private static final String TOGGLE_16K_TITLE = "Switch from 4 KB mode to 16 KB mode";
private static final String TOGGLE_4K_TITLE = "Switch from 16KB mode to 4KB mode"; private static final String TOGGLE_4K_TITLE = "Switch from 16 KB mode to 4 KB mode";
private static final String ANDROID_WIDGET_SCROLLVIEW = "android.widget.ScrollView"; private static final String ANDROID_WIDGET_SCROLLVIEW = "android.widget.ScrollView";
private static final String OKAY = "OK"; private static final String OKAY = "OK";
private static final String NOTIFICATION_TITLE_4K = "Using 4KB page-agnostic mode"; private static final String NOTIFICATION_TITLE_4K = "Using 4 KB page-agnostic mode";
private static final String NOTIFICATION_TITLE_16K = "Using 16KB page-agnostic mode"; private static final String NOTIFICATION_TITLE_16K = "Using 16 KB page-agnostic mode";
private Context mContext; private Context mContext;
private UiDevice mDevice; private UiDevice mDevice;