Jump to content

Samsung Galaxy Note II (samsung-t03g): Difference between revisions

From postmarketOS Wiki
S0p0st (talk | contribs)
Basic info: add reference to (replicant) table detailing many variants
S0p0st (talk | contribs)
Display: unable to use specific grep command, but for s6evr02 (on t0lte!), a more general command works
 
(51 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{note| This device is still running on armhf, although the processor supports armv7. If you own it, change it and test it [https://wiki.postmarketos.org/wiki/Tips_and_tricks#Update_the_architecture_of_your_device that] way.}}
{{Infobox device
{{Infobox device
| manufacturer = Samsung
| manufacturer = Samsung
| name = Galaxy Note II
| name = Galaxy Note II
| codename = samsung-n7100
| codename = samsung-t03g
| image = File:Samsung Galaxy Note II.png
| model = N7100
| imagecaption = Samsung Galaxy Note II
| image = File:Samsung Galaxy Note II Phosh.png
| imagecaption = Samsung Galaxy Note II running Phosh
| releaseyear = 2012
| releaseyear = 2012
| originalsoftware = Android 4.1.1 on Linux 3.0.31
| category = testing
| chipset = Exynos 4412 Quad
| originalsoftware = Android
| originalversion = 4.1.1
| extendedversion = 4.4.2
| pmoskernel = 6.4.2
| chipset = Samsung Exynos 4412 Quad
| cpu = Quad-core 1.6 GHz Cortex-A9
| cpu = Quad-core 1.6 GHz Cortex-A9
| gpu = Mali-400 MP4
| gpu = Mali-400 MP4
Line 15: Line 19:
| memory = 2 GB
| memory = 2 GB
| architecture = armv7
| architecture = armv7
| type = handset
| whet_dhry = 890
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
| status_usbnet = Y
| status_usbnet = Y
| status_flashing = Y
| status_flashing = Y
| status_touch = Y
| status_touch = Y
| status_screen = Y
| status_screen = Y
| status_wifi =  
| status_wifi = Y
| status_xwayland =  
| status_xwayland = Y
| status_fde =  
| status_fde = Y
| status_mainline = Y
| status_mainline = Y
| status_battery =
| status_battery = Y
| status_3d = Y
| status_3d = Y
| status_accel =  
| status_audio = Y
| status_audio =  
| status_bluetooth = P
| status_bluetooth =
| status_camera = <!-- Taking photos and videos works. -->
| status_camera =
| status_cameraflash = Y
| status_gps =  
| status_gps = N
| status_mobiledata =  
| status_mobiledata = N
| status_sms =  
| status_sms = N
| status_calls =  
| status_calls = N
| status_otg = P
| status_nfc = <!-- Near-Field Communication (NFC) works -->
| status_usba = -
| status_hdmidp = Y
| status_dvb = -
| status_keyboard = -
| status_touchpad = -
| status_irtx = -
| status_irrx = -
| status_uart = Y
| status_stylus = N <!-- S Pen won't work without additional work on the drivers and device tree -->
| status_haptics = Y
| status_ethernet = -
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_magnet = <!-- Magnetometer works -->
| status_light = <!-- Ambient light sensor works -->
| status_proximity = <!-- Proximity sensor works -->
| status_hall = -
| status_barometer = <!-- Barometer works -->
| status_powersensor = -
| status_fossbootloader = P
| status_uboot = Y
| status_uboot_primary = Y
| status_uboot_secondary = Y
| status_uboot_mainline = -
| status_uboot_internalstorage = Y
| status_uboot_sd = Y
| status_uboot_usbhost =
| status_uboot_usbperipheral = Y
| status_uboot_screen = Y
| status_uboot_keyboard = -
| status_uboot_buttons = Y
| booting = yes
| booting = yes
}}
}}
__TOC__
== Contributors ==
== Contributors ==
* Bloo
* Bloo
* [[user:Frost_I7|Frost_I7]] (''I'll try to keep the wiki page up-to-date with the available info when I'm active.'')


== Users owning this device ==
== Users owning this device ==
{{Device owners}}
{{Device owners}}


== Basic info ==
== Information ==
 
Code name of the device is '''Midas'''.
* [http://www.gsmarena.com/samsung_galaxy_note_ii_n7100-4854.php more specs]
* [https://github.com/bigbiff/android_kernel_samsung_smdk4412 Unofficial TWRP kernel repo]
* Exynos4412 [https://redmine.replicant.us/projects/replicant/wiki/Exynos4412Devices#Galaxy-Note-II Galaxy Note II] hardware table for t03g (and [[Samsung_Galaxy_Note_II_LTE_(samsung-t0lte)|t0lte]]) variants.
 
== What works ==
 
* Compiling the kernel
* Flashing with Heimdall
* Booting initramfs
* SSH
* Touch screen fully calibrated
 
== What does not work ==
 
* Sound
* Weston


== Not tested ==
For the LTE variant, see [[Samsung_Galaxy_Note_II_LTE_(samsung-t0lte)|this page]].


* WiFi (needs kernel modules compiling first)
See the [[Samsung_Galaxy_S_III_(samsung-m0)|Samsung Galaxy S III]] page for more information.


== How to enter flash mode ==
== How to enter flash mode ==
Hold {{Button|Power}} + {{Button|Volume Down}} + {{Button|Home}}. When prompted, release all buttons and click {{Button|Volume Up}}.


Press and hold &quot;volume down + home + power&quot; simultaneously. Then click volume up to confirm.
== How to enter recovery mode ==
Hold {{Button|Power}} + {{Button|Volume Up}} + {{Button|Home}}. When the Samsung logo appears, release all buttons.


== Installing system ==
== Installation ==
=== System Image ===
You can install the system to an SD card or make a [[Installation from recovery mode|recovery zip]] (probably won't fit in the partition size).


The device package and kernel is now available, pre-built, from the repositories.
{{Note|Be warned, the SD card will be formatted.}}
<!--
To install the system to an SD card, use:
First build the device package:
<syntaxhighlight lang="shell-session">$ pmbootstrap install --sdcard=/dev/mmcblk</syntaxhighlight>


<source lang="shell-session">$ pmbootstrap build device-samsung-n7100</source>
=== Kernel Image ===
Boot into flash mode, then flash the kernel:
<syntaxhighlight lang="shell-session">$ pmbootstrap flasher flash_kernel</syntaxhighlight>


<p hidden>
If you have done everything correctly, your Note II should reboot and you should see the Samsung logo. All that remains is to wait for the pmOS splash to appear.
Then you need to configure the kernel before building with <code>menuconfig</code> like so:


<pre class="shell">./pmbootstrap.py menuconfig linux-samsung-n7100</pre>
== U-Boot ==
You can hold down the enter key while it asks you the y/n questions until you get to the menu, then you want to enable the <code>DEVTMPFS</code> kconfig flag located in <code>Device Drivers ---&gt; Generic Driver Options</code>.
According to [https://blog.forkwhiletrue.me/pages/midas-mainline/ this blog], there is a working U-Boot port for the Midas devices.
</p>
Build it from [https://github.com/fourkbomb/u-boot/ this repository].


Now you want to compile the kernel itself:
=== Installation ===
This manual describes the installation on the SD card as a secondary bootloader.


<source lang="shell-session">$ pmbootstrap build linux-samsung-n7100 --arch=armhf</source>
Clone the repository:
-->
<syntaxhighlight lang="shell-session">
$ git clone https://github.com/fourkbomb/u-boot
$ cd u-boot
</syntaxhighlight>
Optionally, apply patches made by [https://github.com/ave4/ ave4]:
* https://gist.github.com/ave4/b4ac6c8a3abd3fd5d5b9f255cb2719d3
* https://gist.github.com/ave4/3e30c7d10eba42e948a78176f4da4326
<syntaxhighlight lang="shell-session">$ git am 000*</syntaxhighlight>
Set up the toolchain:
<syntaxhighlight lang="shell-session">
$ export ARCH=arm
$ export CROSS_COMPILE=arm-none-eabi-
</syntaxhighlight>
Build U-Boot:
<syntaxhighlight lang="shell-session">
$ make midas_defconfig && make -jN
$ ./create_4412_sd_image.sh u-boot.image
</syntaxhighlight>
Install pmOS the usual way to the SD card and then flash U-Boot on top of it:
<syntaxhighlight lang="shell-session">
$ dd if=u-boot.image of=/dev/mmcblkN bs=512 skip=1 seek=1
</syntaxhighlight>


You can install the OS to an SD card or your system partition. I've only tried an SD card:
== Hardware ==
=== Display ===
Note II has two variants of the display panel. S6EVR02 and EA8061. To find out which panel yours has, run <code>dmesg | grep 'panel driver'</code> in TWRP or in a rooted Android shell (immediately after booting, otherwise the logs will have time to rotate and you won't see this message). Output will be similar to:
<pre>
<6>[    3.177303] lcd panel: ea8061 lcd panel driver has been probed.
</pre>


<source lang="shell-session">$ pmbootstrap install --sdcard=/dev/sdb</source>
TWRP dmesg is rather verbose.  If no result, tap the power button to turn the display on (or off), and try <code>dmesg | grep panel</code>
You will need a 1GB SD card in order for this to work, also keep in mind that this will format the sd card.
<pre>
<6>[  106.148463] c0 lcd panel: s6evr02_check_fb, fb0
</pre>


Please also note, that you cannot flash directly to the system due to an error in Heimdall.
=== eMMC ===
==== Partitions ====
{{note|This will vary from device to device.}}
<syntaxhighlight lang="shell-session">$ sudo parted /dev/mmcblk2 print</syntaxhighlight>
<pre>
Model: MMC VTU00M (sd/mmc)
Disk /dev/mmcblk2: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
</pre>
<b>N7100XXSFQA1</b> firmware:
{| class="wikitable"
! Number
! Start
! End
! Size
! File system
! Name
! Flags
|-
  |  1
  | 4194kB
  | 8389kB
  | 4194kB
  |
  | BOTA0
  | msftdata
|-
  |  2
  | 8389kB
  | 12.6MB
  | 4194kB
  |
  | BOTA1
  | msftdata
|-
  |  3
  | 12.6MB
  | 33.6MB
  | 21.0MB
  | ext4
  | EFS
  | msftdata
|-
  |  4
  | 33.6MB
  | 37.7MB
  | 4194kB
  |
  | m9kefs1
  | msftdata
|-
  |  5
  | 37.7MB
  | 41.9MB
  | 4194kB
  |
  | m9kefs2
  | msftdata
|-
  |  6
  | 41.9MB
  | 46.1MB
  | 4194kB
  |
  | m9kefs3
  | msftdata
|-
  |  7
  | 46.1MB
  | 54.5MB
  | 8389kB
  |
  | PARAM
  | msftdata
|-
  |  8
  | 54.5MB
  | 62.9MB
  | 8389kB
  |
  | BOOT
  | msftdata
|-
  |  9
  | 62.9MB
  | 71.3MB
  | 8389kB
  |
  | RECOVERY
  | msftdata
|-
  | 10
  | 71.3MB
  | 164MB
  | 92.3MB
  |
  | RADIO
  | msftdata
|-
  | 11
  | 164MB
  | 168MB
  | 4194kB
  |
  | TOMBSTONES
  | msftdata
|-
  | 12
  | 168MB
  | 1602MB
  | 1434MB
  | ext4
  | CACHE
  | msftdata
|-
  | 13
  | 1602MB
  | 3750MB
  | 2147MB
  | ext4
  | SYSTEM
  | msftdata
|-
  | 14
  | 3750MB
  | 4337MB
  | 587MB
  | ext4
  | HIDDEN
  | msftdata
|-
  | 15
  | 4337MB
  | 4345MB
  | 8389kB
  |
  | OTA
  | msftdata
|-
  | 16
  | 4345MB
  | 15.8GB
  | 11.4GB
  | ext4
  | USERDATA
  | msftdata
|}


Next you want to put your phone in download mode by holding <code>power + vol down + home</code> all together until you enter download mode, press volume up again to continue past the warning.
=== USB ===
==== OTG ====
USB OTG only works in the host mode, which requires changing "dr_mode" from "peripheral" to "host" in the device tree.


Now you can flash the boot image:
Notes: Device itself can be charged in the host mode, but you'll need to have an external power source to power the USB device.


<source lang="shell-session">$ pmbootstrap flasher flash_kernel</source>
== Downstream ==
We're using <code>flash_kernel</code> because the N7100 packages its kernel and initfs file into one boot image, where as some other phones have separate partitions for each '''unlike''' the N7100.
{{note|This section is left for informational purposes only.}}
Original kernel version: 3.0.31


If everything checks out OK, your N7100 should reboot and you should see the Samsung logo. Dont worry if the screen is flashing on and off and its taking a while, after a minute or 2 it should show up the pmOS splash!
LineageOS kernel version: 3.0.101


=== Getting the S Pen to work ===
=== S Pen ===
To get the S Pen working, you may need to do the following:


To get the S Pen working, you might have to do the following:
* Put the following lines to <code>/etc/udev/hwdb.d/60-evdev.hwdb</code>:
 
<pre>
* Write the following into <code>/etc/udev/hwdb.d/60-evdev.hwdb</code>:
<source lang="shell-session">
$ sudo cat /etc/udev/hwdb.d/60-evdev.hwdb
evdev:name:*e-pen*
evdev:name:*e-pen*
EVDEV_ABS_00=::300
EVDEV_ABS_00=::300
EVDEV_ABS_01=::300
EVDEV_ABS_01=::300
</source>
</pre>
''(Note: The file's contents should be improved)''
* Possibly update the hwdb:
* Possibly: update the hwdb
<syntaxhighlight lang="shell-session">$ sudo udevadm hwdb --update</syntaxhighlight>
<source lang="shell-session">$ sudo udevadm hwdb --update</source>
* Restart the phone.
* Restart the phone
 
== Issues ==
* Weston does not run, presumably because of missing API calls. This should be fixed once the device runs mainline.
* The kernel seems to have a bug which causes it to reboot a large number of times. It will eventually be able to boot properly though. ([https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/rWxLNbGACqTlpXVuUZEWNQaG])


== Mainline U-Boot ==
== Gallery ==
According to [https://blog.forkwhiletrue.me/pages/midas-mainline/ this blog] there is a working U-Boot port on the N7100 (and some others). Build from [https://github.com/fourkbomb/u-boot/ this repository], U-Boot works successfully with SD-card. Unfortunately my device instance has dead eMMC memory so I can't test U-Boot with eMMC.
<gallery>
File:Samsung Galaxy Note II.png
</gallery>


== Mainline Kernel ==
== Other ==
Thanks in large part to the [http://blog.forkwhiletrue.me/pages/midas-mainline/ Midas on Mainline] work that was done a few years ago, we now have initial mainline support for this device. The pmOS patch that added initial support is [https://gitlab.com/postmarketOS/pmaports/-/commit/0bab9b5f8a99b6e80cf5def6590d82e6d5dddc3d here].
=== TWRP ===
{{note|Only if you still have Android installed. Make sure to boot into recovery mode at least once after flashing it, otherwise it will be overwritten by the default recovery.}}
Using [[Heimdall]]:
<syntaxhighlight lang="shell-session">$ heimdall flash --RECOVERY TWRP.img --no-reboot</syntaxhighlight>


The pmports repo for this device's linux-postmarketos-exynos4 mainline kernel is [https://gitlab.com/postmarketOS/pmaports/-/tree/master/main/linux-postmarketos-exynos4 here].
=== Recommendations ===
* Enable [[SWAP]].
* Enable [https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html binfmt_misc] (CONFIG_BINFMT_MISC).


There is a [https://github.com/fourkbomb/linux/blob/8ce0752f2cc22b8f8fa980c21be802ea387f9a86/arch/arm/boot/dts/exynos4412-n7100.dts downstream patch] to create a necessary exynos4412-n7100 specific DTS for this device in the mainline kernel, as opposed to the current more generic [https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/exynos4412-n710x.dts exynos4412-n710x] DTS, but it has yet to be submitted upstream. Please feel free to submit this patch on behalf of the author if you are willing and able.
== Issues ==
 
* The display brightness is too high when the display turns on.
The [https://replicant.us Replicant project] is interested in further mainlining this device and replacing the bootloader with u-boot and would like to collaborate with us [https://github.com/postmarketOS/pmbootstrap/pull/293#issuecomment-395889596].
** Solution: Change the brightness so it changes to the correct value.
* The sound output is distorted.
** Note: It's based on the CPU load.
* USB OTG doesn't switch modes automatically.
* Default CPU frequency is only 1.4GHz.
** Solution: Modify the device tree and add required frequencies.
** <div style="color:#ff0000;font-weight:bold">Warning: Do not touch it unless you know what you're doing!</div>


This device's Qualcomm Gobi MDM9615 Modem has limited mainline kernel support: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/clk/qcom/gcc-mdm9615.c?h=v5.2.7
== See also ==
* {{Device package|samsung-t03g}}
* {{Kernel package|postmarketos-exynos4|community}}
* {{Firmware package|samsung-midas|community}} (Common board firmware for Exynos Note 2 and S3 devices)
* [https://www.gsmarena.com/samsung_galaxy_note_ii_n7100-4854.php GSMArena]
* [https://twrp.me/samsung/samsunggalaxynote2international.html TWRP]
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyNote2N7100 Replicant]
* [https://redmine.replicant.us/projects/replicant/wiki/Exynos4412Devices#Galaxy-Note-II Hardware table for Note II and its variants]

Latest revision as of 22:51, 26 August 2024

Samsung Galaxy Note II
Samsung Galaxy Note II running Phosh
Samsung Galaxy Note II running Phosh
Manufacturer Samsung
Name Galaxy Note II
Codename samsung-t03g
Model N7100
Released 2012
Type handset
Hardware
Chipset Samsung Exynos 4412 Quad
CPU Quad-core 1.6 GHz Cortex-A9
GPU Mali-400 MP4
Display 720x1280 AMOLED
Storage 16/32/64 GB
Memory 2 GB
Architecture armv7
Software
Original software Android
Original version 4.1.1
Extended version 4.4.2
FOSS bootloader partial
postmarketOS
Category testing
Pre-built images no
Mainline yes
postmarketOS kernel 6.4.2
Unixbench Whet/Dhry score 890
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Stylus
Broken
Multimedia
3D Acceleration
Works
Audio
Works
Camera
No data
Camera Flash
Works
Connectivity
WiFi
Works
Bluetooth
Partial
GPS
Broken
NFC
No data
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Works
USB OTG
Partial
HDMI/DP
Works
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Haptics
Works
Barometer
No data
U-Boot
Primary Bootloader
Works
Secondary Bootloader
Works
Internal Storage
Works
SD card
Works
USB Host
No data
USB Peripheral
Works
Display
Works
Buttons
Works

Contributors

  • Bloo
  • Frost_I7 (I'll try to keep the wiki page up-to-date with the available info when I'm active.)

Users owning this device


Information

Code name of the device is Midas.

For the LTE variant, see this page.

See the Samsung Galaxy S III page for more information.

How to enter flash mode

Hold Power + Volume Down + Home. When prompted, release all buttons and click Volume Up.

How to enter recovery mode

Hold Power + Volume Up + Home. When the Samsung logo appears, release all buttons.

Installation

System Image

You can install the system to an SD card or make a recovery zip (probably won't fit in the partition size).

Note Be warned, the SD card will be formatted.

To install the system to an SD card, use:

$ pmbootstrap install --sdcard=/dev/mmcblk

Kernel Image

Boot into flash mode, then flash the kernel:

$ pmbootstrap flasher flash_kernel

If you have done everything correctly, your Note II should reboot and you should see the Samsung logo. All that remains is to wait for the pmOS splash to appear.

U-Boot

According to this blog, there is a working U-Boot port for the Midas devices. Build it from this repository.

Installation

This manual describes the installation on the SD card as a secondary bootloader.

Clone the repository:

$ git clone https://github.com/fourkbomb/u-boot
$ cd u-boot

Optionally, apply patches made by ave4:

$ git am 000*

Set up the toolchain:

$ export ARCH=arm
$ export CROSS_COMPILE=arm-none-eabi-

Build U-Boot:

$ make midas_defconfig && make -jN
$ ./create_4412_sd_image.sh u-boot.image

Install pmOS the usual way to the SD card and then flash U-Boot on top of it:

$ dd if=u-boot.image of=/dev/mmcblkN bs=512 skip=1 seek=1

Hardware

Display

Note II has two variants of the display panel. S6EVR02 and EA8061. To find out which panel yours has, run dmesg | grep 'panel driver' in TWRP or in a rooted Android shell (immediately after booting, otherwise the logs will have time to rotate and you won't see this message). Output will be similar to:

<6>[    3.177303] lcd panel: ea8061 lcd panel driver has been probed.

TWRP dmesg is rather verbose. If no result, tap the power button to turn the display on (or off), and try dmesg | grep panel

<6>[  106.148463] c0 lcd panel: s6evr02_check_fb, fb0

eMMC

Partitions

Note This will vary from device to device.
$ sudo parted /dev/mmcblk2 print
Model: MMC VTU00M (sd/mmc)
Disk /dev/mmcblk2: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

N7100XXSFQA1 firmware:

Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0 msftdata
2 8389kB 12.6MB 4194kB BOTA1 msftdata
3 12.6MB 33.6MB 21.0MB ext4 EFS msftdata
4 33.6MB 37.7MB 4194kB m9kefs1 msftdata
5 37.7MB 41.9MB 4194kB m9kefs2 msftdata
6 41.9MB 46.1MB 4194kB m9kefs3 msftdata
7 46.1MB 54.5MB 8389kB PARAM msftdata
8 54.5MB 62.9MB 8389kB BOOT msftdata
9 62.9MB 71.3MB 8389kB RECOVERY msftdata
10 71.3MB 164MB 92.3MB RADIO msftdata
11 164MB 168MB 4194kB TOMBSTONES msftdata
12 168MB 1602MB 1434MB ext4 CACHE msftdata
13 1602MB 3750MB 2147MB ext4 SYSTEM msftdata
14 3750MB 4337MB 587MB ext4 HIDDEN msftdata
15 4337MB 4345MB 8389kB OTA msftdata
16 4345MB 15.8GB 11.4GB ext4 USERDATA msftdata

USB

OTG

USB OTG only works in the host mode, which requires changing "dr_mode" from "peripheral" to "host" in the device tree.

Notes: Device itself can be charged in the host mode, but you'll need to have an external power source to power the USB device.

Downstream

Note This section is left for informational purposes only.

Original kernel version: 3.0.31

LineageOS kernel version: 3.0.101

S Pen

To get the S Pen working, you may need to do the following:

  • Put the following lines to /etc/udev/hwdb.d/60-evdev.hwdb:
evdev:name:*e-pen*
EVDEV_ABS_00=::300
EVDEV_ABS_01=::300
  • Possibly update the hwdb:
$ sudo udevadm hwdb --update
  • Restart the phone.

Gallery

Other

TWRP

Note Only if you still have Android installed. Make sure to boot into recovery mode at least once after flashing it, otherwise it will be overwritten by the default recovery.

Using Heimdall:

$ heimdall flash --RECOVERY TWRP.img --no-reboot

Recommendations

Issues

  • The display brightness is too high when the display turns on.
    • Solution: Change the brightness so it changes to the correct value.
  • The sound output is distorted.
    • Note: It's based on the CPU load.
  • USB OTG doesn't switch modes automatically.
  • Default CPU frequency is only 1.4GHz.
    • Solution: Modify the device tree and add required frequencies.
    • Warning: Do not touch it unless you know what you're doing!

See also