Jump to content

Microsoft Lumia 640 (microsoft-dempsey): Difference between revisions

From postmarketOS Wiki
No edit summary
m Add type
 
(38 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = Microsoft
| manufacturer = Microsoft
| name =  Lumia 640 Dual SIM
| name =  Lumia 640
| codename = microsoft-dempsey
| codename = microsoft-dempsey
| image = File:msft-640dualsim.jpg
| image = File:Dempsey sxmo.png
| imagecaption = No image yet
| imagecaption = Dempsey running sxmo on postmarketOS
| releaseyear = 2015
| releaseyear = 2015
| originalsoftware = Microsoft Windows Phone 8.1
| originalsoftware = Windows Phone
| chipset = Qualcomm MSM8926 Snapdragon 400 (28 nm)
| originalversion = 8.1
| chipset = Qualcomm Snapdragon 400 (MSM8926)
| cpu = Quad-core 1.2 GHz Cortex-A7
| cpu = Quad-core 1.2 GHz Cortex-A7
| gpu = Adreno 305
| gpu = Adreno 305
| storage = 8GB
| storage = 8 GB
| display = IPS LCD capacitive touchscreen, 16M colors 5.0 inches, 68.9 cm2 (~67.6% screen-to-body ratio) 720 x 1280 pixels, 16:9 ratio (~294 ppi density) Corning Gorilla Glass 3 ClearBlack display
| display = 720 x 1280 IPS LCD
| memory = 1GB RAM
| memory = 1 GB
| architecture = armv7
| architecture = armv7
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
| type = handset
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment -->
| status_usbnet =  
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_flashing =
| 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_wifi = <!-- Wireless network works? -->
| status_wifi = N
| status_xwayland = <!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? -->
| status_xwayland =
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? -->
| status_fde = N
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
| status_mainline = Y
| status_battery = <!-- Charging the battery with charging-sdl is possible -->
| status_battery = N
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_3d = N
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_audio = N
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_bluetooth = N
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol -->
| status_camera = N
| status_camera = <!-- Taking photos and videos works. -->
| status_gps = N
| status_gps = <!-- The Global Positioning System sensor works.  -->
| status_mobiledata = N
| status_mobiledata = <!-- Connecting to the Internet via cellular network. -->
| status_sms = N
| status_sms = <!-- Sending and receiving short messages works as intended. -->
| status_calls = N
| status_calls = <!-- Talking to other people over the cellular network. -->
| status_nfc = Y
| status = started some research
| status_accel = Y
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* -->
| status_magnet =
| n-android =
| status_light =
 
| status_proximity =
<!-- you can also use these lines if you need to:
| status_hall =
if the device haven't originally ran Android OS, e.g. Nokia N900
| status_barometer =
Version of the kernel that pmos is running
| status_powersensor =
| pmoskernel = 3.x.x
| status_cameraflash =
see Unixbench page on wiki
| status_keyboard = -
| whet_dhry = 0.0
| status_touchpad = -
Is OTG available, not used in wiki
| status_usba = -
| status_otg = -
| status_hdmidp = -
-->
| status_irtx = -
| status_irrx = -
| status_stylus = -
| status_haptics =
| status_ethernet = -
| status_fossbootloader =
| booting = yes
| packaged=no
}}
}}


== Contributors ==
== Contributors ==
* Maxnet
* [[User:Maxnet|Maxnet]]
 
* [[User:WolfLink115|WolfLink115]]
== Maintainer(s) ==
* Maxnet


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


== Random thoughts ==
== Current porting status ==
There is a way to get linux to boot on the device. Porting edk2 is needed, it is described in this guide : https://github.com/konradybcio/Lumia-EDK2-Guide. Also this edk2 would probably work with some small modifications : https://github.com/Dominduchami/Lumia830Pkg. Unfortunately there is no efistub or efiframebuffer support in the newest msm8226 kernel, so backporting it is required to get pmOS to boot on it.
* Mainline boots and has touch, screen, and side keys working.
* All 4 cores are now up!
* NFC available!
* USB is currently being tested, I can't personally confirm if USB networking is working but someone with a Lumia 735 said it is for them.
* Proximity is working on tesla, just needs testing on dempsey
* WLAN & BT being looked at


If you got some information regarding this, please add it here.
== Installation ==
===Unlocking bootloader===
See the general guide [https://wiki.postmarketos.org/wiki/Windows_Phone#Guides Unlocking the Bootloader] for instructions.


It's possible to unlock the bootloader using WPinternals [https://wpinternals.net/ here], the device needs to be on Windows 10 Mobile. From there it may be possible to get an LK bootloader following this guide [https://github.com/sjrmac/lk_bootloader_lumia640 here] ([https://github.com/imbushuo/lk lk] and [https://github.com/imbushuo/boot-shim boot shim]). There is a Telegram group chat for Android4Lumia that may have more information that I missed on my brief skim through it [https://t.me/android4lumia here].
===Install developer menu and bootshim===
After you have unlocked the bootloader of your phone, you will have to install the developer menu and bootshim onto your phone. This is made easy by the LumiaQuickStart script.
* Clone the LumiaQuickStart repo [https://github.com/Mainline4Lumia/LumiaQuickStart]
* Use WPInternals to reboot your phone into mass storage mode.
* Run <code>install.ps1</code> as administrator. Provide the path to EFIESP (Windows might also have mounted it inside MainOS).  
After the script finishes, you should see a boot menu upon restart, which means we're ready to.


<!--
===Install lk2nd===
== How to enter flash mode ==
* Download <code>emmc_appsboot.mbn</code> [https://raw.githubusercontent.com/RDS5/mainline4lumia.github.io/main/data/emmc_appsboot.mbn.zip]
 
* Copy <code>emmc_appsboot.mbn</code> to your phone's EFIESP folder
== Installation ==
* Unmount mass storage and restart your phone by holding the volume down and power buttons for a few seconds
<!-- add more sections below as necessary, e.g. WiFi, photos, ... -->
If all went well, you should enter lk2nd by pressing volume up on the bootmenu or holding volume up on the NOKIA bootlogo.


== See also ==
== See also ==
* [https://github.com/LineageOS/android_kernel_lge_msm8226 possible downstream kernel: The devices seem very similar]
=== Internal links ===
* [https://github.com/sjrmac/lk_bootloader_lumia640 Possible start for a bootloader]
* [[Qualcomm Snapdragon 400 (MSM8226)]]
* [https://github.com/imbushuo/lk lk] and [https://github.com/imbushuo/boot-shim boot shim] used above
* [[Windows Phone]]
* [https://support.microsoft.com/en-us/windows/windows-device-recovery-tool-faq-2b186f06-7178-ed11-4cb6-5ed437f0855b Windows Device Recovery Tool] - useful for restoring a device
=== External links ===
* [https://www.microsoft.com/en-us/download/details.aspx?id=56726 Over-the-cable 8.1 to 10 WP Update] (FYI This update takes a while)
* [https://github.com/Mainline4Lumia/linux] Close to mainline linux kernel w/ support for dempsey and a few other msm8x26 lumias on msm8x26 branch. Use msm8x26-touchscreen branch for touchscreen, until it gets committed into msm8x26.
*
* [https://github.com/Dominduchami/Lumia830Pkg] EDK2 for dempsey, tesla, makepeace and superman. This does boot Linux!
<!--
* [https://github.com/Mainline4Lumia/lk] LittleKernel for tesla and some other lumias. This does not boot Linux!! Useful for chain loading lk2nd to dump regulators when porting a lumia to linux.
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
* [https://github.com/imbushuo/boot-shim] Boot shim used to boot EDK2.
* {{MR|CHANGEME|pmaports}} Initial merge request
* [https://github.com/WolfLink115/edk2-msm8x26-lumia#how-to-compile Compiling EDK2]
* {{issue|CHANGEME|pmaports}} Some related issue
* [https://github.com/WolfLink115/edk2-msm8x26-lumia#how-to-install-windows-needed Installing EDK2]
You can also add normal web links:
* [https://github.com/WolfLink115/edk2-msm8x26-lumia#how-to-boot-linux-from-emmc-on-lumia-640 Booting Linux from eMMC]
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
* [https://github.com/WolfLink115/Lumia-640-RM-1073_Unbrick#lumia-640-rm-1073-unbrick-guide unbrick guide] If you manage to brick the Lumia 640 (the RM-1073 version, not tested on others!!) into Qualcomm EDL mode, then this guide can help you unbrick it.
-->
<!--
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-DEVICE_CODENAME Device package]
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/linux-DEVICE_CODENAME Kernel package]
-->

Latest revision as of 13:06, 12 September 2024

This device has been tested with postmarketOS, but its device package has not yet been added to the postmarketOS repositories.
This means that it cannot be selected in pmbootstrap.
Microsoft Lumia 640
Dempsey running sxmo on postmarketOS
Dempsey running sxmo on postmarketOS
Manufacturer Microsoft
Name Lumia 640
Codename microsoft-dempsey
Released 2015
Type handset
Hardware
Chipset Qualcomm Snapdragon 400 (MSM8926)
CPU Quad-core 1.2 GHz Cortex-A7
GPU Adreno 305
Display 720 x 1280 IPS LCD
Storage 8 GB
Memory 1 GB
Architecture armv7
Software
Original software Windows Phone
Original version 8.1
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
No data
USB Networking
No data
Internal storage
No data
SD card
No data
Battery
Broken
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Broken
Bluetooth
Broken
GPS
Broken
NFC
Works
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Broken
USB OTG
No data
Sensors
Accelerometer
Works
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data
Power Sensor
No data


Contributors

Users owning this device


Current porting status

  • Mainline boots and has touch, screen, and side keys working.
  • All 4 cores are now up!
  • NFC available!
  • USB is currently being tested, I can't personally confirm if USB networking is working but someone with a Lumia 735 said it is for them.
  • Proximity is working on tesla, just needs testing on dempsey
  • WLAN & BT being looked at

Installation

Unlocking bootloader

See the general guide Unlocking the Bootloader for instructions.

Install developer menu and bootshim

After you have unlocked the bootloader of your phone, you will have to install the developer menu and bootshim onto your phone. This is made easy by the LumiaQuickStart script.

  • Clone the LumiaQuickStart repo [1]
  • Use WPInternals to reboot your phone into mass storage mode.
  • Run install.ps1 as administrator. Provide the path to EFIESP (Windows might also have mounted it inside MainOS).

After the script finishes, you should see a boot menu upon restart, which means we're ready to.

Install lk2nd

  • Download emmc_appsboot.mbn [2]
  • Copy emmc_appsboot.mbn to your phone's EFIESP folder
  • Unmount mass storage and restart your phone by holding the volume down and power buttons for a few seconds

If all went well, you should enter lk2nd by pressing volume up on the bootmenu or holding volume up on the NOKIA bootlogo.

See also

Internal links

External links

  • [3] Close to mainline linux kernel w/ support for dempsey and a few other msm8x26 lumias on msm8x26 branch. Use msm8x26-touchscreen branch for touchscreen, until it gets committed into msm8x26.
  • [4] EDK2 for dempsey, tesla, makepeace and superman. This does boot Linux!
  • [5] LittleKernel for tesla and some other lumias. This does not boot Linux!! Useful for chain loading lk2nd to dump regulators when porting a lumia to linux.
  • [6] Boot shim used to boot EDK2.
  • Compiling EDK2
  • Installing EDK2
  • Booting Linux from eMMC
  • unbrick guide If you manage to brick the Lumia 640 (the RM-1073 version, not tested on others!!) into Qualcomm EDL mode, then this guide can help you unbrick it.