nyuuzyou/wikis huggingface dataset:
Casio G'zOne (casio-ca201l)

== Contributors ==
* peremen
== Maintainer(s) ==
== Users owning this device ==
== How to enter flash mode ==
* Hold + + : Recovery
* adb reboot-bootloader on CWM recovery boots the device into fastboot
* For C811: flash CA-201L's aboot to get this combination working
== Names/Differences ==
There are three devices released under the similar name, which can boot the same kernel. To make naming even worse, the firmware of Korean and US variant shares no common codename among them, while crossflashing of devices is possible. Both Korean and US variants were available outside of the respective market, while Japanese variant was not seen often on the Internet.
 	🇰🇷 KR 	🇺🇸 US 	🇯🇵 JP
Marketing Name (Model)	G'zOne (CA-201L) 	G'zOne Commando 4G LTE (C811) 	G'zOne TYPE-L (CAL21)
Possible Codename 	DVE072, DVE073, GG3L 	DVE068, GG3 	
Final Firmware 	Android 4.0 	Android 4.1 	Android 4.0
FM Radio 	 	✅ 	
HDMI Output 	 	 	✅
Buttons 	4 (Back, Home, App Switch, Menu)	4 (Back, Home, App Switch, Menu)	3 (Back, Home, Menu)
== Components ==
While Casio's website was active, they offered kernel sources as patches against the Code Aurora source tree, instead of full source tree for the device. Sources were available for Korean and US variant, not for Japanese variant. Downstream kernel boots only when built with Android GCC 4.4.3.
* NFC: ST ST21NFCA, mainline driver available.
* Audio: "Sound processor" Audience eS310, Amplifier Yamaha YDA160. No mainline driver available.
* Touch: Atmel mXT224E, vendor driver provides two different touch configuration (normal and glove mode).
* Display: Driven by LG4573B, mainline driver only available for SPI, vendor driver for DSI.
* Backlight: TI LM3530, mainline driver available on apq8064-next.
* Sensors: Connected to DSPS, remoteproc not available yet.
== Mainlining ==
Because of lower version of downstream kernel, it does not boot when compiled with gcc newer than 4.4. Instead of fixing downstream 3.0.8 kernel or using downstream 3.4.0 kernel, we go directly to the mainline kernel. Currently the phone can boot 5.19.0-rc7 from apq8064-next branch, other parts of the device needs to be further investigated. The kernel can boot with both device native fastboot and lk2nd experimental-tmp branch.
* Mainline progress
== See also ==
* Downstream kernel source (3.0.8 for Android 4.0, both CA-201L and C811)
Casper Via F1 (casper-via f1)

This device seem to like those Chinese generic game phone (ALPS_pri6750_66t_m_(alps-pri6750_66t_m), MT6572_Obscure_(mediatek-mt6572obscure))
== Contributors ==
* Mertoalex
* ΞЖKↃ
== Users owning this device ==
== Additional info ==
this phone is modified version of Gionee S9, modified by casper and selled as "made in turkiye" but it's not made in turkiye .d
I tried to flash Gionee S9's stock rom to this phone, it literally worked as how it should work, just bottom buttons didn't worked, and I can't delete apps in that rom, other things worked so great.
== How to enter bootloader(or boot selector thing idk .d) mode ==
Press +
Cat S22 Flip (cat-s22-flip)

== Initial device info-gathering ==
Partitions 
*DDR -> /dev/block/mmcblk0p2
*aboot -> /dev/block/mmcblk0p43
*abootbak -> /dev/block/mmcblk0p44
*apdp -> /dev/block/mmcblk0p36
*boot -> /dev/block/mmcblk0p51
*cache -> /dev/block/mmcblk0p41
*carrier -> /dev/block/mmcblk0p53
*cmnlib -> /dev/block/mmcblk0p5
*cmnlib64 -> /dev/block/mmcblk0p7
*cmnlib64bak -> /dev/block/mmcblk0p8
*cmnlibbak -> /dev/block/mmcblk0p6
*config -> /dev/block/mmcblk0p29
*devcfg -> /dev/block/mmcblk0p21
*devcfgbak -> /dev/block/mmcblk0p22
*devinfo -> /dev/block/mmcblk0p11
*dip -> /dev/block/mmcblk0p32
*dpo -> /dev/block/mmcblk0p38
*dsp -> /dev/block/mmcblk0p23
*dtbo -> /dev/block/mmcblk0p45
*dtbobak -> /dev/block/mmcblk0p46
*factory -> /dev/block/mmcblk0p54
*fsc -> /dev/block/mmcblk0p13
*fsg -> /dev/block/mmcblk0p3
*keymaster -> /dev/block/mmcblk0p9
*keymasterbak -> /dev/block/mmcblk0p10
*keystore -> /dev/block/mmcblk0p28
*limits -> /dev/block/mmcblk0p12
*logdump -> /dev/block/mmcblk0p42
*mcfg -> /dev/block/mmcblk0p35
*mdtp -> /dev/block/mmcblk0p33
*metadata -> /dev/block/mmcblk0p40
*misc -> /dev/block/mmcblk0p27
*modem -> /dev/block/mmcblk0p1
*modemst1 -> /dev/block/mmcblk0p24
*modemst2 -> /dev/block/mmcblk0p25
*mota -> /dev/block/mmcblk0p31
*msadp -> /dev/block/mmcblk0p37
*oem -> /dev/block/mmcblk0p30
*persist -> /dev/block/mmcblk0p26
*recovery -> /dev/block/mmcblk0p52
*rpm -> /dev/block/mmcblk0p17
*rpmbak -> /dev/block/mmcblk0p18
*sbl1 -> /dev/block/mmcblk0p15
*sbl1bak -> /dev/block/mmcblk0p16
*sec -> /dev/block/mmcblk0p4
*splash -> /dev/block/mmcblk0p39
*ssd -> /dev/block/mmcblk0p14
*super -> /dev/block/mmcblk0p55
*syscfg -> /dev/block/mmcblk0p34
*tz -> /dev/block/mmcblk0p19
*tzbak -> /dev/block/mmcblk0p20
*userdata -> /dev/block/mmcblk0p56
*vbmeta -> /dev/block/mmcblk0p47
*vbmeta_system -> /dev/block/mmcblk0p49
*vbmeta_systembak -> /dev/block/mmcblk0p50
*vbmetabak -> /dev/block/mmcblk0p48
S22FLIP:/ # cat /proc/cmdline 
 
sched_enable_hmp=1 console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom androidboot.memcg=true user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78B0000 vmalloc=300M androidboot.usbconfigfs=true cgroup.memory=nokmem,nosocket loop.max_part=7 buildvariant=user androidboot.emmc=true androidboot.boot_devices=soc/7824900.sdhci androidboot.verifiedbootstate=orange androidboot.keymaster=1 androidboot.serialno=S226001221018843 androidboot.psn=285HA71B9Q028381 androidboot.sn=S226001221018843 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jd9161z_boe_ips_video:1:none:cfg:single_dsi androidboot.dtbo_idx=27 androidboot.dtb_idx=12
Change regulatory region

You can change the regulatory region by installing the and packages.
To get current region run:
$ iw reg get
You can set the regulatory region to the UK with:
$ iw reg set GB
The list of country codes can be found here: https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/www.cisco.com/content/en/us/td/docs/wireless/wcs/3-2/configuration/guide/wcscfg32/wcscod.html.xml
Finally, to apply your changes, restart the wifi modem. This can be done with the following commands:
$ rfkill block wlan
$ rfkill unblock wlan
Or, in Sxmo, you can use the wifi toggle from sxmo_appmenu.sh -> config menu.
Your wifi should work now!
To make this persistent, we create a new service script: /etc/local.d/wifi-country.start
which contains:
#!/bin/sh
iw reg set GB
remember to make it executable:
sudo chmod +x /etc/local.d/wifi-country.start
thats it, reboot and check if your wifi country was set.
Channels.cfg reference

__NOTOC__
channels.cfg is in the master branch of pmaports.git and maps postmarketOS pmaports branches to Alpine Linux aports branches for each release channel.
=== Example ===
# Reference: https://postmarketos.org/channels.cfg
[channels.cfg]
recommended=edge
[edge]
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
branch_pmaports=master
branch_aports=master
mirrordir_alpine=edge
[v21.06]
description=Latest release / Recommended for best stability
branch_pmaports=v21.06
branch_aports=3.14-stable
mirrordir_alpine=v3.14
[v21.03]
description=Old release (unsupported)
branch_pmaports=v21.03
branch_aports=3.13-stable
mirrordir_alpine=v3.13
=== Sections ===
==== channels.cfg ====
Metadata that does not belong in a channel section.
Variable 	Description 	Possibles values
recommended	What pmbootstrap will recommend to install for new users. This was introduced to have the possibility to let pmbootstrap suggest a stable release instead of edge... but this doesn't make sense anymore, we'll keep it on edge. Reasoning is that now we have pre-built images for stable releases and suggest using them on the download page instead of edge releases. On the other hand, pmbootstrap is for developers so it makes sense there to have the bleeding edge variant by default, where we have more devices.	edge, v21.06, ...
==== edge, v21.06, ... ====
Channel sections, each of them maps to one postmarketOS release.
Variable 	Description 	Possibles values
description 	Text displayed next to the branch in pmbootstrap init. May have hints that a branch is not meant to be used yet. 	
branch_pmaports 	Branch of postmarketOS pmaports.git and postmarketOS binary packages mirror directory name (as found here). 	master, v20.05, ...
branch_aports 	Branch of Alpine Linux aports.git 	master, 3.12-stable, ...
mirrordir_alpine	Alpine binary packages mirror directory name, as found here. (This is referred to as branch in the Alpine releases page, but it is not the same as the aports branch.)	edge, v3.12, ...
=== Location ===
pmbootstrap reads the file from the master/origin branch of pmaports.git. This way, it will always use the latest fetched version, even if the last checked out master branch (master without the origin/ infront) is not up-to-date. This is likely to happen if a release branch was checked out, as a git pull would then only update the reference from the release branch related to origin's release branch, master's reference would not change.
Release branches do not have a copy of the file, this would just require us to needlessly keep them all in sync.
View it with:
$ cd $(pmbootstrap config aports) # change directory to local checkout of pmaports.git
$ git show origin/master:channels.cfg
For development and testing, it is possible to override the path with --config-channels:
$ pmbootstrap --config-channels /tmp/channels.cfg status
=== History ===
In an earlier iteration of the channels.cfg file, the idea was to use stable, stable-next and legacy as channel names. This was changed in . Now the channel names are the same as the release names (edge, v21.06, v21.03, ...).
Category:Technical Reference
Charging-sdl

This is an application developed by the postmarketOS community to display the charging status when the device is powered on in "charge mode".
It is written in C and uses SDL2/SDL_power to query the battery information. The package is part of postmarketOS's aports.
== Reporting issues ==
Issues with charging-sdl should be reported on the project GitLab issues page.
== Current implementation ==
Connecting the usb cable to the phone while it's powered off should start the device as usual and in the initramfs it should detect that it's started in "charge mode", showing the charging-sdl for 5 seconds.
You can show this charging-sdl screen again for another 5 seconds by pressing the power key.
charging-sdl will show a lightning icon in the top left of the screen when the battery is charging, and if you unplug it the icon should disappear.
== Run charging-sdl manually ==
You first have to boot the device into the debug-shell. (See Inspecting the initramfs)
After you connected to the device using telnet, you can run:
$ source /init_functions.sh
$ mount_boot_partition /boot
$ extract_initramfs_extra /boot/*-extra
$ setup_directfb_tslib
$ fontpath=$(awk '/^keyboard-font/{print $3}' /etc/osk.conf)
$ charging-sdl -pcf "$fontpath"
== Troubleshooting ==
==== Charge mode not detected ====
In order to detect if the device has been powered on in "charge mode", the initramfs script looks for specific options in the kernel cmdline (e.g.: androidboot.mode=charger).
Kernel cmdline is the arguments Linux uses to boot. See this example.
Compare your kernel cmdline when powered on normally to when you power on by connecting the usb cable only. 
If you find a specific option to distinguish the two boot modes, please update the initramfs script.
==== DirectFB/FBDev: No supported modes found in /etc/fb.modes and current mode not supported! ====
See osk-sdl troubleshooting page
Category:Technical Reference
Chromium

This page explains how to make chromium usable in mobile UIs like Plasma Mobile.
=== Installation ===
Install chromium package from alpine. The armv7 package is not available anymore (another solution for this architecture is to compile Chromium or use an alternate web browser: https://wiki.postmarketos.org/wiki/Web_browsers).
=== Configure startup (scale + useragent) ===
Edit /usr/share/applications/chromium.desktop and set the following line:
Exec= chromium-browser %U --start-maximized --user-agent="Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36"
You may adapt scale and useragent to your needs.
=== Wayland ===
There have been problems reported using Chromium under XWayland, getting cannot open display: :0 errors.
As described in the ArchWiki, since version 87 you should be able to use Chromium's native wayland support through the following flags:
$ chromium-browser --enable-features=UseOzonePlatform --ozone-platform=wayland
You might want to make these arguments persistent through adding them to the desktop file, located under /usr/share/applications/chromium.desktop.
Related issue: 
=== On-screen keyboard ===
Currently, the on-screen keyboard does not work with Plasma Mobile (see ).
You may install this extension to get a virtual keyboard nevertheless (though it does not work with every website):
*https://chrome.google.com/webstore/detail/virtual-keyboard/pflmllfnnabikmfkkaddkoolinlfninn
*https://github.com/xontab/chrome-virtual-keyboard
=== Scroll-bar ===
Access "chrome://flags". To do that type it in the Plasma Mobile search bar (on home screen), and then copy and paste it in the chromium url bar.
Enable the following flags:
*Smooth Scrolling
*Overlay Scrollbars
*Scroll prediction
This will allow to have a good scrolling experience, and hide scrollbar, so that it does not take screen-space.
Category:Apps
Cleartouch

== Contributors ==
* CHANGE_ME (put your username here!)
== Users owning this device ==
== Todo list ==
Pick apart firmware
Figure out how to get adb shell, possibly serial, one of the usb-b ports, usb-c, or wifi3
Install Google Play
Install F-Droid 
Install Termux
Gain Root access
Allow flashing - Possible by using fastboot or something else
Figure out what flash to use - Flash program? SP Flash Tool might work.
Avoid bricking
== Installation ==
Use pmbootstrap to build your own installation image.
$ pmbootstrap init
$ pmbootstrap install --fde
== See also ==
ClockworkPi uConsole (clockworkpi-uconsole-cm4)

== Contributors ==
* Symmetrist
== Maintainer(s) ==
* Symmetrist
== Users owning this device ==
== Installation ==
Use pmbootstrap to build your own installation image.
$ pmbootstrap init
$ pmbootstrap install --sdcard /dev/mmcblkX
== Issues ==
=== Screen Keyboard ===
On Phosh, the screen keyboard appears whenever a text input is present (e.g. Terminal window).
The screen keyboard is not needed on this device as it has a physical keyboard and lacks a touchscreen.
To disable the keyboard (until next system update)
# chmod o-x /usr/bin/squeekboard
See Phosh/squeekboard Issue #383 for a proper screen keyboard fix.
=== Screen Rotation ===
The screen is natively a portrait screen, used in landscape mode.
Phosh does not currently honor the panel rotation DRM property.
The easiest way to rotate the screen is to open the Phosh top panel and press the screen rotation button
Alternatively this command applies the screen rotation, but I didn't find a way of calling it after Phosh lockscreen
$ XDG_RUNTIME_DIR=/run/user/10000 wlr-randr --output DSI-1 --transform 270
See Phosh/phoc MR !473 for a possible rotation fix.
== See also ==
* Initial merge request
* Kernel patches from ClockworkPi
* Arch Linux port for uConsole with CM3 module
* Wiki page with information on custom kernel
* uConsole Kit RPI-CM4 Lite | ClockworkPi
Configure postmarketOS for multiple UIs or users

When installing postmarketOS, you get exactly one User Interface, and a single-user system. This article explains how to modify such an installation to start a display manager with a greeter on boot, where it is possible to choose between multiple UIs (and possibly multiple users if supported by the greeter).
=== Install a second UI ===
Install a postmarketos-ui-* package (find them in the main dir of pmaports.git). You probably also want everything listed in _pmb_recommends of the APKBUILD, these are the packages pmbootstrap installs in addition to the UI package (but they are not depends of the UI package, so the user can uninstall them). As of writing, for Plasma Mobile:
$ sudo apk add postmarketos-ui-plasma-mobile \
	breeze-gtk \
	discover \
	firefox-esr \
	font-noto \
	font-noto-emoji \
	index \
	kaccounts-providers \
	kclock \
	kde-gtk-config \
	kirigami-gallery \
	koko \
	kpeoplesink \
	kpeoplevcard \
	megapixels \
	mobile-config-firefox \
	neochat \
	plasma-angelfish \
	plasma-dialer \
	plasma-phonebook \
	postmarketos-artwork-wallpapers \
	postmarketos-hidden-desktop-entries \
	qmlkonsole \
	spacebar \
	ttf-droid-nonlatin \
	xdg-user-dirs
=== Change tinydm session ===
For Wayland sessions
$ sudo tinydm-set-session -f -s /usr/share/wayland-sessions/session.desktop
For X11 sessions
$ sudo tinydm-set-session -f -s /usr/share/xsessions/session.desktop
=== Add a user for SXMO postmarketOS ===
Add user, set a password, add to groups, copy configs over. Replace myuser with your username, mypassword with your password.
$ sudo useradd -d /home/myuser -m myuser
$ echo -e "mypassword\nmypassword" | sudo passwd myuser
$ sudo usermod -G audio,input,video,netdev,plugdev,wheel,seat -a myuser
$ rsync -a /home/user/.config/ /home/myuser/.config/
Check your user ID and edit a file. Upon reboot it should login with your new user.
$ sudo cat /etc/passwd
$ sudo vim /etc/conf.d/tinydm 
In my case I had to change 10000 to 10001 in the last line of /etc/conf.d/tinydm. If you forget to add yourself to groups, sxmo won't start.
You can delete the default account with its homedir using
$ sudo userdel user -r
=== Related ===
* : ui paсkage conflicts
* : main/postmarketos-ui-phosh: re-enable autologin (with reasoning why we don't want a greeter by default)
* : feedbackd: Configure haptic feedback per device
Category:Guide
Converting Android icon packs to icon themes

== Downloading the icon pack ==
To use icons in Linux system one has to obtain them either bundled in .apk installation package or as separate images. Possible sources are:
# Application stores (Note that some application store clients - such as the official application of Google Play Store - do not save .apk files in storage to be accessed by user. In this case it is recommended to use other stores or third-party clients/frontends);
# Forums (e.g. XDA);
# Icon pack's repository.
== Getting the icons ==
First of all, it is needed to find the directory which contains the icons. To do that, one has to check the list of files in the apk file first. It can be done with either an archiver application (e.g. xarchiver) or via command line.
Example:
$ unzip -Z -1 iconpack.apk | less
where -Z means zipinfo mode and -1 sets the verbosity level.
Icons are most likely to be stored at one of res/drawable* folders or in assets/.
If there are multiple folders with icons, extract the icons with needed dpi. Here is the list of folders from highest to lowest dpi:
Directory 	Approximate dpi	Icon size
res/drawable-xxxdpi*/	640 	192x192
res/drawable-xxdpi*/ 	480 	144x144
res/drawable-xdpi*/ 	320 	96x96
res/drawable-hdpi*/ 	240 	72x72
res/drawable-tvdpi*/ 	213 	N/A
res/drawable-mdpi*/ 	160 	48x48
res/drawable-ldpi*/ 	120 	36x36
If not there, icons may be located at res/drawable-nodpi*/ which is for density-independent resources.
When the folder was found, one can do something like
$ unzip -j icon_pack.apk "res/drawable-nodpi-v4/*" -d "icon_theme_dir"
This command extracts all files from res/drawable-nodpi-v4/ to directory named icon_theme_dir. If this directory doesn't exist, it is created.
== Creating a theme ==
Icon themes can be located in $HOME/.icons and /usr/share/icons/ and consist of index.theme file, which describes the theme, and directories with icons.
The basic index.theme contents are as follows:
[Icon Theme]
Name=Icon Theme Name
Comment=Detailed icon theme description goes here
Directories=48x48/apps,scalable/apps
[scalable/apps]
Size=48
Type=Scalable
MinSize=1
MaxSize=256
Context=Applications
[48x48/apps]
Size=48
Type=Fixed
Context=Applications
Directories key accepts the list of subdirectories separated by commas as value. There must be a section for every listed subdirectory. The subdirectories are checked from left to right. So, in this example, an icon from 48x48/apps is used if 48x48 icon is needed. If the size differs, a scalable icon is used instead.
Refer to the latest icon theme specification for example and detailed documentation.
To pick a proper filename for an icon, one should check the .desktop file of the related program in one of the directories
# /usr/share/applications
# /usr/share/applications
# ~/.local/share/applications
Example: for this desktop file
[Desktop Entry]
Name=random.txt
Exec=gedit /home/user/random.txt
Icon=gedit
icon name must be gedit.png, gedit.svg or gedit.xpm. It is possible to use symlinks to reuse the same icon for multiple programs.
Category: Technical Reference
Coolpad Modena 2 (coolpad-modena2)

== Contributor ==
* McBitter
== Status ==
Flashing a custom kernel is not possible yet, but McBitter is working on replacing the bootloader with a custom fork of LK (a proprietary fork of LK is already present on the device, but it does not allow flashing a custom kernel). When that works, porting pmOS can begin.
Most of the time is spent on documenting Mediatek boot process in depth. This device will be used as an example.
See also: Mediatek
=== List of LCM's (the LCD control module) in original firmware ===
* hx8394f_dsi_ld_cpt_vdo
* ili9881c_dsi_ys_cmi_vdo
* otm1287a_dsi_by_auo
* ili9881c_dsi_ld_auo_vdo
=== Digitizer that is present on the model I have ===
* TBD
== Links ==
* Unbrick tutorial
* Proprietary flashing software SP Flash Tool
* Original firmware with Android 6.0
* Detailed description of boot process
== Links to useful reverse engineering hints ==
* http://www.stevenhoneyman.co.uk/2015/02/reconstructing-mtk-lcm-drivers.html
* https://forum.xda-developers.com/showpost.php?p=70395172&postcount=5882
Category:low-level