Jump to content

Samsung Galaxy J7 Prime (samsung-on7xelte): Difference between revisions

From postmarketOS Wiki
Add Installation Instructions and GitLab Link
Naproxen (talk | contribs)
suggest alternative flashing method
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = Samsung
| image                 = File:on7xelte.jpg
| name = Galaxy J7 Prime
| imagecaption           = J7 Prime running GNOME Mobile
| codename = samsung-on7xelte
| image = File:on7xelte.jpg
| imagecaption = No image yet :(
| releaseyear = 2016
| originalsoftware = Android 6.0.1, upgradable to Android 8.1
| chipset = Samsung Exynos 7870 Octa
| cpu = Octa-core 1.6 GHz Cortex-A53
| gpu = Mali-T830 MP1
| storage = 32 GB
| display = 1080 x 1920 PLS IPS
| memory = 3 GB
| architecture = aarch64
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
| status_usbnet =  Y<!-- USB networking does work? then put Y here and delete this comment -->
| status_flashing = P<!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_touch = Y<!-- Touch screen is working? You can also answer these questions with P for partially. -->
| status_screen = Y<!-- The display is working? -->
| status_wifi = Y<!-- Wireless network works? -->
| status_xwayland = P<!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? -->
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? -->
| status_mainline = N<!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
| status_battery = Y<!-- Charging the battery with charging-sdl is possible -->
| status_3d = N<!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_accel = N<!-- The sensor that measures proper acceleration works -->
| status_audio = N<!-- Using the device's speakers/headphone jack works -->
| status_bluetooth = P<!-- It's possible to pair and use other devices via the bluetooth protocol -->
| status_camera = N<!-- Taking photos and videos works. -->
| status_gps = N<!-- The Global Positioning System sensor works.  -->
| status_mobiledata = N<!-- Connecting to the Internet via cellular network. -->
| status_sms = N<!-- Sending and receiving short messages works as intended. -->
| status_calls = N<!-- Talking to other people over the cellular network. -->
| status = Boots :) <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
| status_otg = <!-- USB-OTG adapters work, e.g. to connect an USB flash drive to the device -->
| status_nfc = <!-- Near-Field Communication (NFC) works -->
| status_irtx = <!-- Infrared (IR) port works -->
| booting = yes <!-- The device is booting at all, can be yes/no *IMPORTANT* -->


<!-- you can also use these lines if you need to:
| manufacturer          = Samsung
if the device haven't originally ran Android OS, e.g. Nokia N900
| name                  = Galaxy J7 Prime
| n-android =
| codename              = samsung-on7xelte
Version of the kernel that pmos is running
| releaseyear            = 2016
| pmoskernel = 3.18.14
| type                  = handset
see Unixbench page on wiki
 
| whet_dhry = 0.0
| chipset                = Samsung Exynos 7870 Octa
-->
| cpu                    = Octa-core 1.6 GHz Cortex-A53
| gpu                    = Mali-T830 MP1
| display                = 1080 x 1920 PLS IPS
| storage                = 32 GB
| memory                = 3 GB
| architecture          = aarch64
 
| originalsoftware      = Android
| originalversion        = 6.0.1
| extendedversion        = 8.1
 
| category              = testing
| prebuiltimages        = no
| status_mainline        = Y
| booting                = yes
 
| status_flashing        = Y
| status_usbnet          = Y
| status_emmc            = Y
| status_sdcard          = Y
| status_battery        = P
| status_screen          = P
| status_touch          = Y
 
| status_3d              = Y
| status_audio          = N
| status_camera          = N
| status_cameraflash    = N
 
| status_wifi            = Y
| status_bluetooth      = Y
| status_gps            = N
| status_nfc            = -
 
| status_calls          = N
| status_sms            = N
| status_mobiledata      = N
 
| status_fde            =  
| status_otg            =
| status_hdmidp          = -
 
| status_accel          = Y
| status_magnet          = -
| status_light          = Y
| status_proximity      = Y
| status_hall            = -
| status_haptics        = Y
| status_barometer      = -
}}
}}
'''Samsung Galaxy J7 Prime''', also known '''Samsung Galaxy On Nxt''' and '''Samsung Galaxy On7 Prime''', is an Exynos 7870 device released by Samsung in 2016.


== Contributors ==
== Contributors ==
* th1nhhdk
* naproxen
* Otus9051


== Users owning this device ==
== Users owning this device ==
{{Device owners}}
{{Device owners}}
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page -->
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}-->
<!-- you may need to purge page cache to see changes (more->purge cache)-->
<!-- you can use {{My devices}} on your profile page to show table with all your devices -->


== How to enter flash mode ==
== How to enter flash mode ==
Heimdall: When the device is fully powered off, hold Power, Volume Down and Home for a few seconds.
A (turquoise) download mode warning screen should appear, press Volume Up to confirm.


TWRP: As Heimdall is broken as ever, we need to use TWRP/PBRP. Power + Volume Up + Home for a few seconds for TWRP. You need to install it first tho.
When the phone is powered off, hold the {{Button|Power}}, {{Button|Home}} and {{Button|Volume Down}} buttons to boot into download mode. A turquoise colored screen will appear, asking for confirmation. Press {{Button|Volume Up}} to confirm. Your device is ready for flashing via a front-end such as Odin or Heimdall.
 
To boot into recovery, hold the {{Button|Power}}, {{Button|Home}} and {{Button|Volume Down}} buttons.  


== Installation ==
== Installation ==
Export Recovery Zip
 
=== Prerequisites ===
 
Make sure your phone:
 
* Has its bootloader unlocked.
 
=== Preparation ===
 
Choose the following in the <code>pmbootstrap init</code> wizard:
'''Vendor:''' samsung
'''Device codename:''' on7xelte
 
To proceed with the installation run:
'''$''' pmbootstrap install
 
This will begin preparing your installation in your host computer.
 
=== Flashing ===
 
After the installation process is completed, get your phone booted into download mode, Then run:
'''$''' pmbootstrap flasher flash_kernel
 
The kernel gets flashed to your device. Now, the device will reboot automatically. Hold the key combination to reboot into download mode. Then run:
'''$''' pmbootstrap flasher flash_rootfs
 
The rootfs is flashed and the device gets rebooted.
It should reboot to postmarketOS now.
 
{{Notice | If there are any problems with flashing the rootfs via Heimdall, you may attempt an [[Installation_from_recovery_mode | installation via recovery]].}}
 
== Partial features ==
 
=== Battery ===
 
The fuelgauge driver (reports the charge percentage) works fine, but there's no charger driver which is responsible for reporting charge status and control.
 
=== Screen ===
 
Display works with simple-framebuffer, so brightness control is non-functional. Samsung DECON/DSIM driver for Exynos 7870 is a work-in-progress, which will properly initialize and use the display.
 
== Problems ==
 
=== USB Networking ===
 
At least on some operating systems, the host doesn't receive network packets from the device, unless the host sends packets to the device. Due to this behavior, SSH (among other things) doesn't work well. A workaround is to have <code>ping -Aq <IP></code> run in the background while you interact with the device (replace <code><IP></code> with the device IP address).
 
=== Wi-Fi ===
 
Wi-Fi behaves very erratically (practically unusable) when the SDIO is probed in DMA mode. The driver fails to communicate with the SDIO, reporting timeout errors. As a workaround, the SDIO is forced to be probed in PIO mode.
 
== Debugging (retrieving kernel logs) ==
 
=== Serial UART ===
 
As with most Samsung devices, UART is exposed in the micro-USB connector of the device, a resistance is applied between the ID and GND pins, which makes it switch to UART mode. More information is provided at this article about [[Serial_debugging|serial debugging]].
 
The VCC voltage level is '''3.3V''', and the multiplexing resistance for UART is '''150kΩ''' (±1% is acceptable).
 
You also need to change the cmdline arguments provided to the kernel. This is managed by S-BOOT, Samsung's proprietary primary bootloader. Sadly, S-BOOT forces its arguments over ones which could be possibly set by postmarketOS. There's a way to refuse bootloader arguments from the kernel, but it does more harm than good.
 
Connect the host and the device using the USB-TTL adapter, and open up a modem terminal emulator (for instance, <code>minicom</code>). Boot the phone by holding {{Button|Power}}. When the bootloader starts printing logs, start spamming the enter key. This will abort autoboot and S-BOOT's console will open.
 
{{Notice | It may happen that the bootloader output is cut off, but booting has paused and input keystrokes are reflected in the terminal. In that case, it's safe to consider that S-BOOT's console has been opened.}}
 
'''S-BOOT #''' printenv
 
This command will print all environment variables in S-BOOT. You should find such a variable called <code>CMDLINE</code>, which defaults to <code>console=ram loglevel=4</code>. We're supposed to edit this to redirect the console path to the UART device. To set the variable:
 
'''S-BOOT #''' setenv CMDLINE console=ttySAC2,115200
 
The variable can also be saved, so that the change remains persistent.
 
'''S-BOOT #''' saveenv
 
Now, you may resume booting by:
 
'''S-BOOT #''' load_kernel
'''S-BOOT #''' boot
 
Note that this will display a warning about <code>CMDLINE</code> being changed in the bootloader logs and the screen. It will stay until it's reverted.
 
=== Persistent store ===
 
Kernel logs are also exposed via ramoops. The downstream kernel uses ramoops only during panics. The mainline kernel uses the same memory region to store generic logs.
 
From recovery, the kernel logs can be found in <code>/sys/fs/pstore/dmesg-ramoops-0</code>. S-BOOT passes <code>loglevel=4</code> in the kernel's cmdline ([[#Serial_UART|see here]]), so only warnings and errors (and worse) are logged.
 
== Downstream kernel ==
 
A port based on the downstream kernel exists which has been archived in favor of the mainline kernel. More information is available in older revisions of this page.


== See also ==
== See also ==
<!--
 
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
{{MR|4220|pmaports}} Initial merge request
* {{MR|CHANGEME|pmaports}} Initial merge request
 
* {{issue|CHANGEME|pmaports}} Some related issue
{{MR|4980|pmaports}} (Downstream → Mainline)
You can also add normal web links:
 
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
{{Device package|samsung-on7xelte}}
-->
 
https://gitlab.com/linuxforexynos/pmos-samsung-on7xelte
{{Kernel package|postmarketos-exynos7870}}
<!--
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 17:45, 15 November 2024

Samsung Galaxy J7 Prime
J7 Prime running GNOME Mobile
J7 Prime running GNOME Mobile
Manufacturer Samsung
Name Galaxy J7 Prime
Codename samsung-on7xelte
Released 2016
Type handset
Hardware
Chipset Samsung Exynos 7870 Octa
CPU Octa-core 1.6 GHz Cortex-A53
GPU Mali-T830 MP1
Display 1080 x 1920 PLS IPS
Storage 32 GB
Memory 3 GB
Architecture aarch64
Software
Original software Android
Original version 6.0.1
Extended version 8.1
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
Works
USB Networking
Works
Internal storage
Works
SD card
Works
Battery
Partial
Screen
Partial
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Broken
Camera Flash
Broken
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
No data
USB OTG
No data
Sensors
Accelerometer
Works
Ambient Light
Works
Proximity
Works
Haptics
Works


Samsung Galaxy J7 Prime, also known Samsung Galaxy On Nxt and Samsung Galaxy On7 Prime, is an Exynos 7870 device released by Samsung in 2016.

Contributors

  • naproxen

Users owning this device


How to enter flash mode

When the phone is powered off, hold the Power, Home and Volume Down buttons to boot into download mode. A turquoise colored screen will appear, asking for confirmation. Press Volume Up to confirm. Your device is ready for flashing via a front-end such as Odin or Heimdall.

To boot into recovery, hold the Power, Home and Volume Down buttons.

Installation

Prerequisites

Make sure your phone:

  • Has its bootloader unlocked.

Preparation

Choose the following in the pmbootstrap init wizard:

Vendor: samsung
Device codename: on7xelte

To proceed with the installation run:

$ pmbootstrap install

This will begin preparing your installation in your host computer.

Flashing

After the installation process is completed, get your phone booted into download mode, Then run:

$ pmbootstrap flasher flash_kernel

The kernel gets flashed to your device. Now, the device will reboot automatically. Hold the key combination to reboot into download mode. Then run:

$ pmbootstrap flasher flash_rootfs

The rootfs is flashed and the device gets rebooted. It should reboot to postmarketOS now.

Notice If there are any problems with flashing the rootfs via Heimdall, you may attempt an installation via recovery.

Partial features

Battery

The fuelgauge driver (reports the charge percentage) works fine, but there's no charger driver which is responsible for reporting charge status and control.

Screen

Display works with simple-framebuffer, so brightness control is non-functional. Samsung DECON/DSIM driver for Exynos 7870 is a work-in-progress, which will properly initialize and use the display.

Problems

USB Networking

At least on some operating systems, the host doesn't receive network packets from the device, unless the host sends packets to the device. Due to this behavior, SSH (among other things) doesn't work well. A workaround is to have ping -Aq <IP> run in the background while you interact with the device (replace <IP> with the device IP address).

Wi-Fi

Wi-Fi behaves very erratically (practically unusable) when the SDIO is probed in DMA mode. The driver fails to communicate with the SDIO, reporting timeout errors. As a workaround, the SDIO is forced to be probed in PIO mode.

Debugging (retrieving kernel logs)

Serial UART

As with most Samsung devices, UART is exposed in the micro-USB connector of the device, a resistance is applied between the ID and GND pins, which makes it switch to UART mode. More information is provided at this article about serial debugging.

The VCC voltage level is 3.3V, and the multiplexing resistance for UART is 150kΩ (±1% is acceptable).

You also need to change the cmdline arguments provided to the kernel. This is managed by S-BOOT, Samsung's proprietary primary bootloader. Sadly, S-BOOT forces its arguments over ones which could be possibly set by postmarketOS. There's a way to refuse bootloader arguments from the kernel, but it does more harm than good.

Connect the host and the device using the USB-TTL adapter, and open up a modem terminal emulator (for instance, minicom). Boot the phone by holding Power. When the bootloader starts printing logs, start spamming the enter key. This will abort autoboot and S-BOOT's console will open.

Notice It may happen that the bootloader output is cut off, but booting has paused and input keystrokes are reflected in the terminal. In that case, it's safe to consider that S-BOOT's console has been opened.
S-BOOT # printenv

This command will print all environment variables in S-BOOT. You should find such a variable called CMDLINE, which defaults to console=ram loglevel=4. We're supposed to edit this to redirect the console path to the UART device. To set the variable:

S-BOOT # setenv CMDLINE console=ttySAC2,115200

The variable can also be saved, so that the change remains persistent.

S-BOOT # saveenv

Now, you may resume booting by:

S-BOOT # load_kernel
S-BOOT # boot

Note that this will display a warning about CMDLINE being changed in the bootloader logs and the screen. It will stay until it's reverted.

Persistent store

Kernel logs are also exposed via ramoops. The downstream kernel uses ramoops only during panics. The mainline kernel uses the same memory region to store generic logs.

From recovery, the kernel logs can be found in /sys/fs/pstore/dmesg-ramoops-0. S-BOOT passes loglevel=4 in the kernel's cmdline (see here), so only warnings and errors (and worse) are logged.

Downstream kernel

A port based on the downstream kernel exists which has been archived in favor of the mainline kernel. More information is available in older revisions of this page.

See also

pmaports!4220 Initial merge request

pmaports!4980 (Downstream → Mainline)

Device package

Kernel package