Project

General

Profile

Actions

Feature #1873

open

Remove UMS partition

Added by Matthias-Christian Ott almost 7 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/12/2018
Due date:
% Done:

80%

Estimated time:
1.00 h
Resolution:
Device:
Galaxy S 2 (I9100)
Grant:
Type of work:
Any programming languages (scripts, C, etc)

Description

The stock ROM of Samsung Galaxy S II (i9100) does include an UMS (USB Mass Storage) partition. The device was first delivered with Android 2.3 when emulated storage (/data/media) did not exist. So it had an internal partition that behaved like a non-removable portable storage and similar to a SD card.

Android 3.0 introduced emulated storage that has many advantages, for example a proper file system, encryption and multi-user support. So starting with Android 3.0 the UMS partition is not needed anymore and the DATAFS partition can be used as emulated storage.

Grim Kriegor provided a patch and PIT file that shrink the UMS partition to a minimum, remove its fstab entry and set ro.vold.primary_physical to 0 and thus enable emulated storage.

If Replicant requires the device to repartitioned and removes the UMS partition, it will break compatibility with the stock ROM, requires the user to backup their data and complicates the installation. However, the partition layout that came with the stock ROM of the device that I have requires the partition layout to be changed anyhow because FACTORYFS partition is too small. So I think it makes sense to provide a PIT file to repartition the device.

So I think the following changes are required:

  • provide a PIT to enlarge the FACTORYFS and DATAFS partitions and shrink or disable the UMS partition
  • update the installation instructions to include a download link to the PIT file and an additional command line switch to heimdall
  • change the fstab to remove the UMS partition
  • set ro.vold.primary_physical to 0
Actions #1

Updated by Matthias-Christian Ott almost 7 years ago

I also tried to use the UMS partition as adoptable storage but LineageOS did correctly remove the encryptable=userdata option from the fstab because otherwise the entire eMMC is made unusable because the disk that contains the storage partition is repartitioned with a GPT partition table when storage is adopted. The review of LineageOS change 36272 explains this in more detail.

Actions #2

Updated by Kurtis Hanna over 6 years ago

Matthias-Christian, is Grim Kriegor's patch and PIT file still needed if you use the new Replicant images for the i9100 here? https://jenkins.minhas.io/nightly_builds/replicant/6.0-dev/i9100/

Or has the LineageOS change that you posted included in the new Replicant 6 i9100 images?

Actions #3

Updated by dl lud over 4 years ago

  • Tracker changed from Issue to Feature
  • Category deleted (Security)
  • Target version changed from Replicant 6.0 to replicant 10.0

Kurtis: you have to apply these changes on top of Replicant 6.0 if you would like to use emulated store on it.

We are considering them for Replicant 10, but we are reluctant to add them as default because repartitioning the device causes compatibility issues with other distros. Although, truth be said, other distros like LineageOs and /e/ are already requiring users to repartition their GT-I9100 phones.
We may support this as optional for advanced users.

Actions #4

Updated by Matthias-Christian Ott over 4 years ago

I returned the device to the vendor because Replicant and Android in general did not meet my expectations and continued to use an old proprietary mobile phone for emergency situations only. So I can't say more about the device.

From what I remember, I removed the UMS from the PIT file and encryption worked flawlessly. UMS is a relict from Android 2.3 and as I wrote, the FACTORYFS partition must to be enlarged to install Replication or, in fact, any newer version of Android. Therefore, PIT file must be changed regardless of the UMS partition. So removing the UMS partition is not an additional or more complicated step.

Moreover, as I wrote, emulated storage has advantages over adoptable storage or even UMS.

So I would highly recommend that Replication recommends to remove the UMS partition, explained, justified and described in the issue description.

Actions #5

Updated by _I3^ RELATIVISM almost 4 years ago

  • Type of work Any programming languages (scripts, C, etc) added
Actions

Also available in: Atom PDF