Jump to content

Samsung Galaxy J4 (samsung-j4lte): Difference between revisions

From postmarketOS Wiki
Initial device template. Device information will be updated soon.
 
Halamix2 (talk | contribs)
mNo edit summary
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = <!-- e.g. HTC -->
| manufacturer = Samsung
| name = CHANGE_ME <!-- e.g. Desire -->
| name = Galaxy J4
| codename = CHANGE_ME <!-- e.g. htc-bravo -->
| codename = samsung-j4lte
| model = CHANGE_ME <!-- Manufacturer's model/part number, e.g. SM-T330 -->
| model = SM-J400
| image = File:CHANGE_ME_TO_DEVICE_CODENAME.jpg
| image = File:Samsung-j4lte-pmos-bootstrap.jpg
| imagecaption = CHANGE_ME
| imagecaption = Samsung Galaxy J4, on postmarketOS boot splash screen
| releaseyear = CHANGE_ME
| releaseyear = 2018
| category = testing
| category = testing
| originalsoftware = CHANGE_ME <!-- e.g. Android -->
| originalsoftware = Android
| originalversion = CHANGE_ME <!-- e.g. 11 for Android 11 -->
| originalversion = 10
| pmoskernel = 6.x.x <!-- Version of the kernel that postmarketOS is running -->
| pmoskernel = 3.18.140
| chipset = CHANGE_ME <!-- e.g. Qualcomm Snapdragon S1 (QSD8250) - see "Chipset names" section in Help:Device Page -->
| chipset = Samsung Exynos 7570 Quad
| cpu = CHANGE_ME <!-- e.g. 1.0 GHz Scorpion -->
| cpu = 4x 1.4 GHz ARM Cortex A53
| gpu = CHANGE_ME <!-- e.g. Adreno 200 -->
| gpu = Mali T720
| display = CHANGE_ME <!-- e.g. 480x800 AMOLED -->
| display = 720x1280 IPS
| storage = CHANGE_ME <!-- e.g. 512 MB -->
| storage = 32 GB
| memory = CHANGE_ME <!-- e.g. 576 MB -->
| memory = 2 GB
| architecture = CHANGE_ME <!-- One of these: armhf, armv7, aarch64, riscv64, x86, x86_64 -->
| architecture = aarch64
| type = CHANGE_ME <!-- One of "desktop", "laptop", "convertible", "server", "tablet", "handset", "watch", and "embedded" -->
| type = handset
| whet_dhry = 0.0 <!-- see Unixbench page on wiki -->
| whet_dhry = <!-- see Unixbench page on wiki -->
<!-- Features -->
<!-- Features -->
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment -->
| status_usbnet = Y
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_flashing = P
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. -->
| status_touch = Y
| status_screen = <!-- The display is working? -->
| status_screen = Y
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_3d =
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? -->
| status_fde =
| status_emmc = <!-- Internal storage can be accessed? -->
| status_emmc = Y
| status_wifi = <!-- Wireless network works? -->
| status_wifi = Y
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
| status_mainline =
| status_battery = <!-- Charging the battery and getting the battery percentage is possible -->
| status_battery = Y
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_audio = N
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol -->
| status_bluetooth =
| status_camera = <!-- Taking photos and videos works. -->
| status_camera = N
| status_gps = <!-- The Global Positioning System sensor works.  -->
| status_gps =
| status_mobiledata = <!-- Connecting to the Internet via cellular network. -->
| status_mobiledata =
| status_sms = <!-- Sending and receiving short messages works as intended. -->
| status_sms =
| status_calls = <!-- Talking to other people over the cellular network. -->
| status_calls =
| status_otg = <!-- USB-OTG adapters work, e.g. to connect an USB flash drive to the device -->
| status_otg =
| status_nfc = <!-- Near-Field Communication (NFC) works -->
| status_nfc = -
<!-- Sensors -->
<!-- Sensors -->
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_magnet = <!-- Magnetometer works -->
| status_magnet = <!-- Magnetometer works -->
| status_light = <!-- Ambient light sensor works -->
| status_light = - <!-- Ambient light sensor works -->
| status_proximity = <!-- Proximity sensor works -->
| status_proximity = <!-- Proximity sensor works -->
| status_hall = <!-- Hall effect sensor works -->
| status_hall = <!-- Hall effeĺct sensor works -->
| status_barometer = <!-- Barometer works -->
| status_barometer = <!-- Barometer works -->
| status_powersensor = <!-- Power sensor works -->
| status_powersensor = <!-- Power sensor works -->
<!-- Misc -->
<!-- Misc -->
| status_dvb = <!-- Built-in TV receiver works -->
| status_dvb = -
| status_cameraflash = <!-- Camera flash/torch works -->
| status_cameraflash =
| status_keyboard = <!-- Keyboard works (Mark "-" if device doesn't have a keyboard) -->
| status_keyboard = -
| status_touchpad = <!-- Touchpad works (Usually applicable to laptops) -->
| status_touchpad = -
| status_usba = <!-- Full-sized USB-A port works (Usually applicable to SBCs and laptops) -->
| status_usba = -
| status_sdcard = <!-- SD/UFS card works -->
| status_sdcard =
| status_hdmidp = <!-- Video and audio output with HDMI or DisplayPort works -->
| status_hdmidp = -
| status_irtx = <!-- Infrared (IR) transmit works -->
| status_irtx = -
| status_irrx = <!-- Infrared (IR) receive works -->
| status_irrx = -
| status_stylus = <!--  -->
| status_stylus = -
| status_haptics = <!--  -->
| status_haptics =
| status_ethernet = <!--  -->
| status_ethernet =
| status_fossbootloader = <!-- Device has a free and open source bootloader -->
| status_fossbootloader = -
 
| booting = yes
<!-- optional for devices running u-boot
| status_uboot =
| status_uboot_primary =
| status_uboot_secondary =
| status_uboot_mainline =
| status_uboot_internalstorage =
| status_uboot_sd =
| status_uboot_usbhost =
| status_uboot_usbperipheral =
| status_uboot_screen =
| status_uboot_keyboard =
| status_uboot_buttons =
-->
 
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* -->
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
}}
}}


== Contributors ==
== Contributors ==
* CHANGE_ME (put your username here!)
* manoedinata


== Users owning this device ==
== Users owning this device ==
Line 93: Line 77:


== How to enter flash mode ==
== How to enter flash mode ==
{{Button|Power}} + {{Button|Volume Down}} + {{Button|Home}}
In some cases, using power button to boot into Download Mode doesn't work. Instead, while pressing {{Button|Volume Down}} + {{Button|Home}}, connect the device to PC via USB. Don't release the buttons until you're in the Download Mode.


== Installation ==
== Installation ==
Use [[pmbootstrap]] to build your own installation image.
Use [[pmbootstrap]] to build your own installation image. The device configuration will also build firmware package, which contains required proprietary blobs for Wi-Fi.
 
'''[[Heimdall]] installation doesn't work'''.  Use [[Installation_from_recovery_mode]] instead.
 
== Known Working ==
 
* Touchscreen
* Screen & display
* Framebuffer (additionally with <code>msm-fb-refresher</code> to refresh the screen)
* Charging & battery status
* Wi-Fi (partially, with firmware package)
 
== Notes ==
 
=== Wi-Fi ===
To enable Wi-Fi, these proprietary blobs are required to be loaded:
 
<pre>
vendor/etc/wifi/mx
vendor/etc/wifi/mx140.bin
vendor/etc/wifi/mx140_wlan.hcf
</pre>
 
These files are pulled and packaged already in <code>firmware-samsung-j4lte</code> pmaports package.
 
=== Framebuffer ===
Some patches are required for framebuffer to fix some issues, e.g. swapped color.
 
The kernel panics with <code>null pointer dereference</code> if running [https://wiki.postmarketos.org/wiki/Category:Interface#Other_interfaces framebuffer-based or text interfaces] with <code>CONFIG_FRAMEBUFFER_CONSOLE</code>, or if you want to display kernel console to the screen. So, <code>none</code> or <code>console</code> environment doesn't show anything.


<!-- add more sections below as necessary, e.g. WiFi, photos, ... -->
{{note|Newer DECON drivers as seen in newer devices e.g. [[Samsung Galaxy A51 (samsung-a51)]] also have similar issue, and can be fixed by [https://github.com/map220v/kernel_samsung_a51-linux/commit/974f3e70d07021a9d7b42f08720b0b425003745f keeping <code>fb0</code> enabled]. Could it be the same reason for our device?}}


== See also ==
== See also ==
<!--
* {{MR|5936|pmaports}} Initial merge request
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
* {{Device package|samsung-j4lte}}
* {{MR|CHANGEME|pmaports}} Initial merge request
* {{Kernel package|samsung-j4lte}}
* {{issue|CHANGEME|pmaports}} Some related issue
You can also add normal web links:
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
-->
<!--
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
* {{Device package|DEVICE_CODENAME}}
* {{Kernel package|DEVICE_CODENAME}}
-->

Latest revision as of 11:32, 1 February 2025

Samsung Galaxy J4
Samsung Galaxy J4, on postmarketOS boot splash screen
Samsung Galaxy J4, on postmarketOS boot splash screen
Manufacturer Samsung
Name Galaxy J4
Codename samsung-j4lte
Model SM-J400
Released 2018
Type handset
Hardware
Chipset Samsung Exynos 7570 Quad
CPU 4x 1.4 GHz ARM Cortex A53
GPU Mali T720
Display 720x1280 IPS
Storage 32 GB
Memory 2 GB
Architecture aarch64
Software
Original software Android
Original version 10
postmarketOS
Category testing
Pre-built images no
postmarketOS kernel 3.18.140
Features
Flashing
Partial
USB Networking
Works
Internal storage
Works
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
No data
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
Ethernet
No data
GPS
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data
Power Sensor
No data


Contributors

  • manoedinata

Users owning this device


How to enter flash mode

Power + Volume Down + Home

In some cases, using power button to boot into Download Mode doesn't work. Instead, while pressing Volume Down + Home, connect the device to PC via USB. Don't release the buttons until you're in the Download Mode.

Installation

Use pmbootstrap to build your own installation image. The device configuration will also build firmware package, which contains required proprietary blobs for Wi-Fi.

Heimdall installation doesn't work. Use Installation_from_recovery_mode instead.

Known Working

  • Touchscreen
  • Screen & display
  • Framebuffer (additionally with msm-fb-refresher to refresh the screen)
  • Charging & battery status
  • Wi-Fi (partially, with firmware package)

Notes

Wi-Fi

To enable Wi-Fi, these proprietary blobs are required to be loaded:

vendor/etc/wifi/mx
vendor/etc/wifi/mx140.bin
vendor/etc/wifi/mx140_wlan.hcf

These files are pulled and packaged already in firmware-samsung-j4lte pmaports package.

Framebuffer

Some patches are required for framebuffer to fix some issues, e.g. swapped color.

The kernel panics with null pointer dereference if running framebuffer-based or text interfaces with CONFIG_FRAMEBUFFER_CONSOLE, or if you want to display kernel console to the screen. So, none or console environment doesn't show anything.

Note Newer DECON drivers as seen in newer devices e.g. Samsung Galaxy A51 (samsung-a51) also have similar issue, and can be fixed by keeping fb0 enabled. Could it be the same reason for our device?

See also