Jump to content

OnePlus One (oneplus-bacon): Difference between revisions

From postmarketOS Wiki
Maufl (talk | contribs)
Add users owning this device section
updateing the new boot.img part for size, and delete ln2k as no longer needed.
 
(30 intermediate revisions by 18 users not shown)
Line 6: Line 6:
| imagecaption = OnePlus One running Weston
| imagecaption = OnePlus One running Weston
| releaseyear = 2014
| releaseyear = 2014
| originalsoftware = Android 4.4.2 on Linux 3.4
| originalsoftware = Android
| chipset = Qualcomm MSM8974AC Snapdragon 801
| originalversion = 4.4.2 on Linux 3.4
| chipset = Qualcomm Snapdragon 801 (MSM8974AC)
| cpu = Quad-core 2.5 GHz Krait 400
| cpu = Quad-core 2.5 GHz Krait 400
| gpu = Adreno 330
| gpu = Adreno 330
Line 14: Line 15:
| memory = 3 GB
| memory = 3 GB
| architecture = armv7
| architecture = armv7
| type = handset
| status_usbnet = Y
| status_usbnet = Y
| status_flashing = Y
| status_flashing = Y
Line 23: Line 25:
| status_mainline = Y  
| status_mainline = Y  
| status_battery = Y
| status_battery = Y
| status_3d = Y
| status_3d = P
| status_accel = N
| status_accel = N
| status_audio = N
| status_audio = N
Line 29: Line 31:
| status_camera = N
| status_camera = N
| status_gps = N
| status_gps = N
| status_mobiledata = N
| status_mobiledata = Y
| status_sms = N
| status_sms = Y
| status_calls = N
| status_calls = N
| status_otg = N
| status_otg = N
Line 39: Line 41:


* flacks
* flacks
* Nimayer
* [[User:Nimayer|Nimayer]]
* [[User:jrg|Julian Goldsmith]]
* [[User:jrg|Julian Goldsmith]]
== Users owning this device ==
{{Device owners}}


== Installation ==
== Installation ==


After [[Installing_pmbootstrap|installing pmbootstrap]], build the image:
Flashing the standart way (boot + rootfs) works fine under mainline kernel.
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ pmbootstrap init
$ pmbootstrap flasher boot
$ pmbootstrap install
$ pmbootstrap flasher flash_rootfs --partition userdata
</source>
</syntaxhighlight>
 
Be aware, the boot partition has a size of 16mb. the newer Kernels are bigger.
 
including '''deviceinfo_create_initfs_extra=true''' brings it back to a stable way.


Then to flash it, put your device in fastboot mode, and plug it into your USB port. Currently, you will need to break apart the subpartitions before flashing:
Release 6 of the mainline kernel is established, and updates should work properly now for the boot size.
<source lang="shell-session">
$ pmbootstrap export
$ losetup /dev/loop0 <path to rootfs image>
$ dd if=/dev/loop0p1 of=cache.img
$ dd if=/dev/loop0p2 of=userdata.img
$ fastboot flash boot <path to boot image>
$ fastboot flash cache cache.img
$ fastboot erase system
$ fastboot flash userdata userdata.img
</source>


=== Entering fastboot mode ===
=== Entering fastboot mode ===
Line 66: Line 65:
From a power off state, hold the '''volume up''' and '''power''' buttons until the device vibrates. The display should then light up and say "Fastboot Mode".
From a power off state, hold the '''volume up''' and '''power''' buttons until the device vibrates. The display should then light up and say "Fastboot Mode".


=== WiFi and Bluetooth ===
== WiFi and Bluetooth ==
 
WiFi and Bluetooth are working, but aren't well-tested.  The firmware isn't packaged yet, so you will need to get it from the partitions on your device.  For Bluetooth, you will need to install '''bluez''' and enable the '''bluetooth''' service.
WiFi and Bluetooth are working, but aren't well-tested.  The firmware isn't packaged yet, so you will need to get it from the partitions on your device.  For Bluetooth, you will need to install '''bluez''' and enable the '''bluetooth''' service.


=== Cell usage ===
== Cell usage ==
 
oFono support shouldn't take too much to get up and running.  Adding the remoteproc node, using qmictl (possibly more utilities), and using a patched oFono should get basic support up and running.
oFono support shouldn't take too much to get up and running.  Adding the remoteproc node, using qmictl (possibly more utilities), and using a patched oFono should get basic support up and running.


Line 80: Line 81:
It may be possible to fix the issue by flashing a new [https://www.oneplus.com/support/softwareupgrade/details?code=1 OxygenOS image].  If that doesn't work, try flashing postmarketOS [[Android_Recovery_Zip_Installation|using a recovery zip]].
It may be possible to fix the issue by flashing a new [https://www.oneplus.com/support/softwareupgrade/details?code=1 OxygenOS image].  If that doesn't work, try flashing postmarketOS [[Android_Recovery_Zip_Installation|using a recovery zip]].


=== wlan0 interface is available but WiFi is not working ===
Check that <code>wlan0</code> device MAC address is not <code>00:00:00:00:00:00</code>. If it is, change it to any other available one like this:
<syntaxhighlight lang="shell-session">
# ip link set dev wlan0 address 70:85:c2:d9:2b:e0
</syntaxhighlight>
If the Mac is not <code>00:00:00:00:00:00</code> try to restart NetworkManager by executing:
<syntaxhighlight lang="shell-session">
# service networkmanager restart
</syntaxhighlight>
Most likely you want create Initscript for working network when boot.
Create <code>/etc/init.d/wlanhwaddr</code>:
<syntaxhighlight lang="bash">
#!/sbin/openrc-run
command=/sbin/ip
command_args="link set dev wlan0 address 70:85:c2:d9:2b:e0"
description="WLAN hw-addr setter"
depend() {
  before networkmanager
}
</syntaxhighlight>
Install:
<syntaxhighlight lang="shell-session">
# chmod 755 /etc/init.d/wlanhwaddr
# rc-update add wlanhwaddr
</syntaxhighlight>
=== Backlight is not completley going to off ===
interims as a workaround, in mainline kernel a patch is included, to switch the Baclight to off. This is a workaround, only helpfull under the usage as a mini Server with no need of display:
<syntaxhighlight lang="shell-session"># sh -c 'echo 0 > /sys/class/backlight/lcd-backlight/brightness'</syntaxhighlight>
or
<syntaxhighlight lang="shell-session"># echo 0 > /sys/devices/platform/soc/f9924000.i2c/i2c-1/1-0036/backlight/lcd-backlight/brightness</syntaxhighlight>
=== rootfs is on the wrong (too small) partition ===


== Users owning this device ==
this happens if you flash by mistake without --userpartition (which is on bacon /dev/mmcblk0p28p2 with 55 gb). standart system-partition has only 1,4 GB, wich initially let it flash and use, but fast it run out of space.
{{Device owners}}
 
after mistaken, you have to reflash rootfs to --userdata, and to clean the system partition to let it boot correctly:
<synyaxhighlight lang="shell-session">
$ fastboot format system
$ pmbootstrap flasher flash_rootfs --userdata
</syntaxhighlight>


== Links ==
== Links ==
 
* {{Device package|oneplus-bacon}}
* [https://github.com/postmarketOS/pmbootstrap/tree/master/aports/device/device-oneplus-bacon Device package]
* {{Kernel package|postmarketos-qcom-msm8974}} (close to mainline)
* [https://github.com/postmarketOS/pmbootstrap/tree/master/aports/device/linux-oneplus-bacon Vendor kernel package]
* {{Kernel package|oneplus-bacon}} (downstream vendor)
* [https://gist.github.com/valentino-sm/701bbb077b17a7f1e4171d8d4e6c24bc Quick setup script for Docker]
* [https://devices.ubuntu-touch.io/device/bacon/ UbuntuTouch port of this device]

Latest revision as of 09:06, 9 February 2025

OnePlus One
OnePlus One running Weston
OnePlus One running Weston
Manufacturer OnePlus
Name One
Codename oneplus-bacon
Released 2014
Type handset
Hardware
Chipset Qualcomm Snapdragon 801 (MSM8974AC)
CPU Quad-core 2.5 GHz Krait 400
GPU Adreno 330
Display 1080x1920 IPS
Storage 16/64 GB
Memory 3 GB
Architecture armv7
Software
Original software Android
Original version 4.4.2 on Linux 3.4
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Partial
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
No data
Modem
Calls
Broken
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Broken
USB OTG
Broken
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Users owning this device

  • Bdju (Notes: water damaged and doesn't boot)
  • Blackwell
  • Double-hash (Notes: damaged screen & touchscreen, running pmOS)
  • Eloy (Notes: Broken touchscreen)
  • Fizzo
  • Hastalavista (Notes: PMOS edge w/ mainline kernel, WiFi intermittently failing)
  • IonAgorria (Notes: PMOS - Damaged)
  • Jrg (Notes: Broken touchscreen)
  • KenOokamiHoro (Notes: SIM Card slot was broken. Running LineageOS 15.1)
  • Ksqeib (Notes: Using as Minecraft Server)
  • MasterPlexus (Notes: with PMO as small server, Mainline)
  • Maufl
  • Noocsharp
  • Nspire
  • Poipa
  • Toastal (Notes: tried pmOS running XMPP server, but plagued with hard drive issues after a few days running that make it go read-only every time I reinstalled the OS)
  • Val (Notes: PmOS for Docker server)
  • Vipaol (Notes: LOS)
  • Z3ntu


Installation

Flashing the standart way (boot + rootfs) works fine under mainline kernel.

$ pmbootstrap flasher boot
$ pmbootstrap flasher flash_rootfs --partition userdata

Be aware, the boot partition has a size of 16mb. the newer Kernels are bigger.

including deviceinfo_create_initfs_extra=true brings it back to a stable way.

Release 6 of the mainline kernel is established, and updates should work properly now for the boot size.

Entering fastboot mode

From a power off state, hold the volume up and power buttons until the device vibrates. The display should then light up and say "Fastboot Mode".

WiFi and Bluetooth

WiFi and Bluetooth are working, but aren't well-tested. The firmware isn't packaged yet, so you will need to get it from the partitions on your device. For Bluetooth, you will need to install bluez and enable the bluetooth service.

Cell usage

oFono support shouldn't take too much to get up and running. Adding the remoteproc node, using qmictl (possibly more utilities), and using a patched oFono should get basic support up and running.

Troubleshooting

Fastboot unknown chunk type

Nimayer received the message "FAILED (remote: Unknown chunk type)" when trying to flash the rootfs to userdata.

It may be possible to fix the issue by flashing a new OxygenOS image. If that doesn't work, try flashing postmarketOS using a recovery zip.

wlan0 interface is available but WiFi is not working

Check that wlan0 device MAC address is not 00:00:00:00:00:00. If it is, change it to any other available one like this:

# ip link set dev wlan0 address 70:85:c2:d9:2b:e0

If the Mac is not 00:00:00:00:00:00 try to restart NetworkManager by executing:

# service networkmanager restart

Most likely you want create Initscript for working network when boot.

Create /etc/init.d/wlanhwaddr:

#!/sbin/openrc-run
command=/sbin/ip
command_args="link set dev wlan0 address 70:85:c2:d9:2b:e0"

description="WLAN hw-addr setter"

depend() {
  before networkmanager
}

Install:

# chmod 755 /etc/init.d/wlanhwaddr
# rc-update add wlanhwaddr

Backlight is not completley going to off

interims as a workaround, in mainline kernel a patch is included, to switch the Baclight to off. This is a workaround, only helpfull under the usage as a mini Server with no need of display:

# sh -c 'echo 0 > /sys/class/backlight/lcd-backlight/brightness'

or

# echo 0 > /sys/devices/platform/soc/f9924000.i2c/i2c-1/1-0036/backlight/lcd-backlight/brightness

rootfs is on the wrong (too small) partition

this happens if you flash by mistake without --userpartition (which is on bacon /dev/mmcblk0p28p2 with 55 gb). standart system-partition has only 1,4 GB, wich initially let it flash and use, but fast it run out of space.

after mistaken, you have to reflash rootfs to --userdata, and to clean the system partition to let it boot correctly: <synyaxhighlight lang="shell-session"> $ fastboot format system $ pmbootstrap flasher flash_rootfs --userdata </syntaxhighlight>

Links