OpenLLM-France/wikimedia huggingface dataset:
# Advanced phone customization/Installing your custom ROM

Now that we've the prerequisites ready, let's start!

## Flashing recovery

A recovery is a type of bootloader which allows you to flash custom ROMs, back up the current OS (including apps) of your phone and wipe the phone if desired. Since most phone bootloaders are far too limited in their capability, we need to flash a custom one.
For this guide, we'll use Team Win Recovery Project (TWRP).
Download TWRP for your device from here. Then enter download mode. How to access it depends on your device. Once in there, flash it and immediately boot to recovery (hint: the combination is most likely different!). If you do not boot immediately to recovery, you'll most likely find that the original bootloader is still present; repeat the process if that happens.
Once you are in recovery, it's fine to restart; you'll see your stock OS. This is normal as you haven't overwritten the OS yet, only the recovery.

## Installing your custom OS

* Go to Wipe and wipe off the system and data partitions.
* Go to Advanced and wipe off the Dalvik cache.
* If the ROM is already present on your phone, go to Install and select the ROM to install. If not, you need to download the Android SDK. Launch adb, and use the adb send and adb push to install the ROM, whose file should be in your hard drive.
* Flash GApps. You must do this before leaving the recovery (Android 6+). If the phone boots, restart the process, as the phone will misbehave if GApps is installed after the phone first boots.
* Restart the phone and complete the first boot process.
If you get an error like Failed to mount '/data' (invalid argument), then your phone partition is most likely encrypted. In that case, go to Format, and select the option to format data. You will lose all of your data in your internal storage.

### Logs

1. On the computer side: Here's the log from adb:
The error on the second part occurred because I forgot to set the phone to adb sideload again.
# Advanced phone customization/Unlocking your bootloader

For non-Samsung phones, the bootloader is often in a locked state and you need to unlock it to allow the installation of custom OS.

## Instructions

* Get the Android SDK if you already haven't; you need ADB to continue.
* Enable USB debugging. Open your phone’s app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer. Head back to the main Settings page, and you should see a new option near the bottom called “Developer Options”. Open that, and enable “OEM Unlocking”, if the option exists. Next, enable “USB Debugging”. Enter your password or PIN when prompted, if applicable.
* If your manufacturer requires you to obtain an unlock code (eg: Huawei, Motorola), go to the website now. Check your manufacturer's website for the steps.
* Boot to fastboot. Check the Internet for the exact steps for your phone.
* Connect your phone to your PC with a USB cable. Your phone should indicate that the device is connected. On your computer, open the platform-tools folder in your Android SDK folder and Shift+Right Click on an empty area. Choose “Open a Command Prompt Here”, and use that Command Prompt window to retrieve your unlock key as described by your manufacturer. (For example, Motorola phones will run the fastboot oem get_unlock_data command, while HTC phones will run the fastboot oem get_identifier_token command.)
* The Command Prompt will spit out a token in the form of a very long string of characters (see right). Select it, copy it, and paste it into the applicable box on your manufacturer’s website–make sure there are no spaces!–and submit the form. If your device is unlockable, you’ll receive an email with a key or file that you’ll use in the next step.
* With your phone still in fastboot, run fastboot oem unlock, though you should check for the exact command to run for your phone, which could be different.

## References

* ↑ https://www.howtogeek.com/239798/how-to-unlock-your-android-phones-bootloader-the-official-way/
# Advanced phone customization/Freeing up space

First off: You have already completed a significant portion of this article. By installing a custom ROM itself, you have saved a lot of space.
But you may wish to save more space by, for instance, deleting some of the system apps. How to do so depends on your ROM. Some may allow you to just uninstall normally, others may use unusual methods to achieve the same. You can also install apps from the Play Store which will do this for you.
       Personal note: On Resurrection Remix, a dedicated option is available in the Customization section which allows you to delete any system app you want.
A word of caution though:
# Advanced phone customization/Improving battery life

Improving the battery life of your phone is another popular reason of using a custom ROM.

## Customizing power management

Custom ROMs often include a greater level of power management options, and you should take some time to find out which setting really suits you best. The procedure for accessing the power management features vary between ROMs. You can also change the phone governors; try with the powersave or conservative for a start, though they may impact your performance in return. It depends on your tolerance level.

## Using apps

There are apps like Greenify which can be used to aggressively manage battery life, some even without root. Again, you should take the time to find out which app suits you best, and make sure that the settings you apply still allow the apps to sync regularly.

## Hardware

Often, the grim reality is that
* your phone simply has a small battery or uses older, inefficient components
* your battery has degraded over time.
In both situations, your only options are to
* add a battery pack or keep spare external batteries
* replace your phone's battery if you can
* replace your phone
Unfortunately, all the customizations we did here can only improve your phone by so much; as we said, these techniques are software and can't account for hardware limitations beyond a point.
# Advanced phone customization/The need to root and install a custom OS

There are many useful reasons as to why you would want to root your phone. Let's take a few:

## Removing app bloat

Your Android manufacturer would have bundled a bunch of apps on your phone, many of which you have no use for. For instance, take this image from a stock Note 3 (see left)
Notice that
* You do not need the AT&T Navigator app when Google Maps is already present
* The Samsung Internet browser is a duplicate of the Google Chrome browser
And that's only a page. The issue is that you cannot remove them from your phone. The Uninstall option does not exist. At best, you can disable them, which does remove it from the app drawer and makes it unavailable for use, but it still sits on your phone, wasting memory. And that's not true for every application: for instance, newer Samsung phones ship with a duplicate email application which cannot be disabled; it'll sit there in your app drawer always.
With a root, these 'system applications' can be easily removed permanently from your phone.

## Customization

Many Android manufacturers skin or modify their UI heavily which many people do not like. While you can reduce the problem to an extent by, for instance, using a third-party launcher, many system parts will still be skinned not to your taste. Installing a custom OS allows you to enjoy your preferred style: there are even ROMS mimicking a particular model ROM, for instance a Note 8.

## Speed

In some cases, manufacturers do not configure their phone governors properly and hence your phone often does not reach its full potential. For such users, installing a custom governor (after rooting) often improves the performance.

## Security

Most Android phones stop receiving updates after 3 years at the most, with many lower-end phones being stuck at the same Android version for their lives. However, custom ROM's are often available long after the manufacturer stops supporting the phone.
For instance,
* Galaxy S2 stopped receiving updates by Samsung on Android 4.1. Custom ROMs are available for Android 7 and higher.
* Galaxy S6 stopped receiving updates by Samsung on Android 7. Custom ROMs are available for Android 11, on par with the newest devices.

## Battery

Custom ROMs often include far more power management options that allow you to improve battery life instead of performance if you so wish. With a root, you can even downclock the cores or switch off some cores entirely (for fast phones, you may not even notice a performance reduction as modern phones can do well even with fewer cores).

## References

* ↑ The Android app CPU throttling test mentions an example of a LG G3 wherein the stock kernel does not manage single-core loads properly, effecting a significant performance reduction. After a custom kernel was installed, the problem disappeared and the performance remained stable.
# Ada Programming/Libraries/Ada.Strings.Hash Case Insensitive

This language feature has been introduced in Ada 2012.
Ada.Strings.Hash_Case_Insensitive is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings

### External examples

* Search for examples of Ada.Strings.Hash_Case_Insensitive in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.Hash_Case_Insensitive in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.9: String Hashing
# Ada Programming/Libraries/Ada.Strings.UTF Encoding.Conversions

This language feature has been introduced in Ada 2012.
Ada.Strings.UTF_Encoding.Conversions is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings
* Ada Programming/Libraries/Ada.Strings.UTF_Encoding

### External examples

* Search for examples of Ada.Strings.UTF_Encoding.Conversions in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.UTF_Encoding.Conversions in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.11: String Encoding

### Open-Source Implementations

FSF GNAT
* Specification: a-suenco.ads
* Body: a-suenco.adb
drake
* Specification: strings/a-suenco.ads
* Body: strings/a-suenco.adb
# Ada Programming/Libraries/Ada.Strings.UTF Encoding.Wide Wide Strings

This language feature has been introduced in Ada 2012.
Ada.Strings.UTF_Encoding.Wide_Wide_Strings is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings
* Ada Programming/Libraries/Ada.Strings.UTF_Encoding

### External examples

* Search for examples of Ada.Strings.UTF_Encoding.Wide_Wide_Strings in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.UTF_Encoding.Wide_Wide_Strings in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.11: String Encoding

### Open-Source Implementations

FSF GNAT
* Specification: a-suezst.ads
* Body: a-suezst.adb
drake
* Specification: strings/a-suezst.ads
# Ada Programming/Libraries/Ada.Strings.Less Case Insensitive

This language feature has been introduced in Ada 2012.
Ada.Strings.Less_Case_Insensitive is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings

### External examples

* Search for examples of Ada.Strings.Less_Case_Insensitive in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.Less_Case_Insensitive in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.10: String Comparison
# Ada Programming/Libraries/Ada.Strings.Maps.Constants

This language feature is available from Ada 95 on.
Ada.Strings.Maps.Constants is a unit of the Predefined Language Environment since Ada 95.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Strings

### External examples

* Search for examples of Ada.Strings.Maps.Constants in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.Maps.Constants in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 95

* A.4.6: String-Handling Sets and Mappings

#### Ada 2005

* A.4.6: String-Handling Sets and Mappings

#### Ada 2012

* A.4.6: String-Handling Sets and Mappings

### Open-Source Implementations

FSF GNAT
* Specification: a-stmaco.ads
drake
* Specification: strings/a-stmaco.ads
# Ada Programming/Libraries/Ada.Strings.UTF Encoding.Strings

This language feature has been introduced in Ada 2012.
Ada.Strings.UTF_Encoding.Strings is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings
* Ada Programming/Libraries/Ada.Strings.UTF_Encoding

### External examples

* Search for examples of Ada.Strings.UTF_Encoding.Strings in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.UTF_Encoding.Strings in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.11: String Encoding

### Open-Source Implementations

FSF GNAT
* Specification: a-suenst.ads
* Body: a-suenst.adb
drake
* Specification: strings/a-suenst.ads
# Ada Programming/Libraries/Ada.Strings.Hash

This language feature is only available from Ada 2005 on.
Ada.Strings.Hash is a unit of the Predefined Language Environment since Ada 2005.

## See also
### Wikibook

* Ada Programming/Libraries/Ada

### External examples

* Search for examples of Ada.Strings.Hash in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.Hash in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2005

* A.4.9: String Hashing

#### Ada 2012

* A.4.9: String Hashing

### Open-Source Implementations

FSF GNAT
* Specification: a-strhas.ads
drake
* Specification: hash/a-strhas.ads
# Ada Programming/Libraries/Ada.Strings.UTF Encoding.Wide Strings

This language feature has been introduced in Ada 2012.
Ada.Strings.UTF_Encoding.Wide_Strings is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings
* Ada Programming/Libraries/Ada.Strings.UTF_Encoding

### External examples

* Search for examples of Ada.Strings.UTF_Encoding.Wide_Strings in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.UTF_Encoding.Wide_Strings in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.11: String Encoding

### Open-Source Implementations

FSF GNAT
* Specification: a-suewst.ads
* Body: a-suewst.adb
drake
* Specification: strings/a-suewst.ads
# Ada Programming/Libraries/Ada.Strings.Maps

This language feature is available from Ada 95 on.
Ada.Strings.Maps is a unit of the Predefined Language Environment since Ada 95.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Strings

### External examples

* Search for examples of Ada.Strings.Maps in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.Maps in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 95

* A.4.2: The Package Strings.Maps

#### Ada 2005

* A.4.2: The Package Strings.Maps

#### Ada 2012

* A.4.2: The Package Strings.Maps

### Open-Source Implementations

FSF GNAT
* Specification: a-strmap.ads
* Body: a-strmap.adb
drake
* Specification: strings/a-strmap.ads
* Body: strings/a-strmap.adb
# Ada Programming/Libraries/Ada.Strings.UTF Encoding

This language feature has been introduced in Ada 2012.
Ada.Strings.UTF_Encoding is a unit of the Predefined Language Environment since Ada 2012.

## See also
### Wikibook

* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/Ada.Strings

### External examples

* Search for examples of Ada.Strings.UTF_Encoding in: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
* Search for posts related to Ada.Strings.UTF_Encoding in: Stack Overflow, comp.lang.ada or any Ada related page.

### Ada Reference Manual
#### Ada 2012

* A.4.11: String Encoding

### Open-Source Implementations

FSF GNAT
* Specification: a-stuten.ads
* Body: a-stuten.adb
drake
* Specification: strings/a-stuten.ads
* Body: strings/a-stuten.adb
# Aros/Developer/Zune/Examples

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License
Collection of Zune example code.
Each example consists of:
* a description of usage, purpose, etc.
* tested and commented sourcecode
* AROS native gcc or g++ compiler command line
* screenshot of resulting executable
* AROS version used for testing

## Requester / MessageBox

    Display a message window to the user

## Window with string requester

    Open a window, and ask the user for text input

## Texteditor

    A texteditor using TextEditor Zune gadget (custom class)
# Aros/Developer/Zune/Examples/Requester

Sometimes it is necessary to open a MessageBox that gives a short Message to the user. That can be an error message or something like that.
For this purpose, there is ZUNE's MUI_Request.

## Sourcecode

This is how it works:
Note: In the above example, to save typing and get a clearer look, some C macros have been used (ApplicationObject, WindowObject, SubWindow, set, and get), which are defined in <libraries/mui.h>, see there for more C macros, and what Zune's macros actually do.

## Screenshot

And this is how it looks:

## AROS version

This example tested with AROS of 2010-03-10.
# Aros/Developer/Zune/Examples/Texteditor

A short example program using TextEditor Zune (=MUI) Custom Class. It will present a ready to use Texteditor in a window.
# Aros/Developer/Zune/Menus

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License
# Aros/Developer/Docs/Devices/AmberRAM

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## References

if you direct your attention to the generated 'amberram_start.c', the 'InitHandler' routine:
AmberRAM reverted to %build_module_simple. Reasons are:
* It doesn't need to be added to FileSystem.resource - 'dosnode' handlers are no longer added to FileSystem.resource. Mixed handlers (ie if you wanted to have a built-in NFS network boot system, DOSTYPE=AROS_MAKE_ID('N','F','S',0) and DOSNODE=NFS) are now possible.
* It can be initialized after dos.library and add DosNode directly. Yes. Note that expansion.library's AddBootNode will operate correctly both before and after DOS initialization.
# Aros/Developer/Docs/Examples

Collection of AROS example code.
For GUI related example code we suggest you take a good look at Zune GUI toolkit's examples.
Each example consists of:
* a description of usage, purpose, etc.
* tested and commented sourcecode
* AROS native gcc or g++ compiler command line
* screenshot of resulting executable
* AROS version used for testing

## "Hello world!"

    the root of all coding

## SimpleWindowIntuition

    Open a window using AmigaOS3.1 compatible code
# Aros/Developer/Docs/Devices/Console

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## References

There should be Shell support for the '_pchar' and '_mchar' variables. If it can be added _pchar and _mchar support, then C:Pipe command can be added to support it. BTW: Open("PIPE:*",...) now opens an automatically named piped.
Use NameFromFH to get the name of its opposite. ie to implement something similar to the Unix pipe call:
I did some attempts but there is something strange going on with AOS _mchar.. (OS3.9+BB2)
_mchar set and command line including _mchar character: PIPE is inserted as command (just like _pchar). Even single shell line containing _mchar runs PIPE.
I didn't even have C:PIPE so I only got PIPE not found error.. how is this supposed to work?
Does this mean it is actually C:PIPE that handles both _pchar and _mchar and not shell? Shell's only task is to check if _mchar or _pchar is found in command line and inserting PIPE at the beginning of command if found?
I can implement shell change but first I need to know how to handle _mchar. It relies upon the new 'PIPE:*' autonamed pipe feature, so keep that in mind if anyone is interested in porting this back to ABI_V0.
PIPE seems to be a shell expansion that was never fully finished by commodore in 2.0, and was forgotten in later versions.
I noticed that C:Type and C:Sort can't take stdin as input.
<snip> 1> Pipe List: SYS: NOHEAD | Sort IN: OUT: | More
Notice how Sort needs `IN:' and `OUT:'. These devices don't actually exist, but the Pipe command simulates them with the PIPE:. This is necessary because C:Sort can not use the `standard IO', but insists on files. </snip>
I guess this needs to be implemented too.