Skip to content

Conversation

@bialy69-git
Copy link

WE DO NOT MERGE PULL REQUESTS SUBMITTED HERE

You will need to submit it through OmniRom Gerrit

For changes to device trees, use TWRP Gerrit

This guide explani how to use Gerrit code review

alviteri and others added 30 commits March 23, 2019 04:35
Change-Id: Ifea3aca26e8664416ec1b161d2b102a0592fc9c1
Signed-off-by: David Viteri <[email protected]>
Change-Id: I01df82c5dc3494598e8393358ba84475ce668764
Change-Id: I9756237ac5c8b969fef79d0ebdf97dc25bd40c1a
Change-Id: I489009cb8396d632c63d9e530ca939b8cbf6475a
Change-Id: I23aba5ebaeb5bfb749e8aa28e11cff026375786d
Change-Id: I15f888d58c01de00920dc5c56148d363f4dd79b8
Change-Id: I60d2756dd3a4bb94335b00d945ba272815a27a59
Change-Id: I6af14e9cf16b3e2c1368420a96e89ef1891faaa7
Change-Id: Ia3544723cef1cc4f5152aea93616150c8daf2ff6
Change-Id: I680545d5af36ae8596c5205093f5f34a19517c6a
Change-Id: I76c5f02eb65ef3ca2841af34ba246f36cc5b6172
Change-Id: I3d18a0875150362fd63623860b9d6bd69d55557c
Change-Id: I215e58f20f9d3c25a5b3c3a62bb469243648d5e4
Change-Id: I21ff91f8453e30f9b5bb881253a13b01d07e07e5
Change-Id: I5ffa4bf056d6707c2d02f2d7d9ceef0c27a5f42c
/sbin must come before any other search path when TWRP is built for a
different version of Android than the one on which it will run.

Otherwise, as soon as any of the other paths becomes available via
direct action (i.e. the user mounts a file-system) or indirect action
(e.g. the user flashes a zip that mounts a file-system), incompatible
libraries will be prioritised and loaded instead of the correct ones
from /sbin in TWRP's ramdisk.

This will cause severe disruption of the TWRP environment. Toybox and
other dynamically linked binaries will immediately cease to work; and
since Toybox provides umount, it typically won't be possible to recover
from this state without a reboot.

For example, the following occurs when a Toybox applet is run on a
Samsung Galaxy S10 running Android 10, but using a version of TWRP built
for Android 9:

android:/ # getprop ro.boot.bootloader
CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"...
linker: CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"...

Change-Id: I31fe612ebb1c7d9ad71d67be2c615caa3fbb5d6f
* bootloader_message.cpp is the only file using
  BOOTLOADER_MESSAGE_OFFSET_IN_MISC and WIPE_PACKAGE_OFFSET_IN_MISC,
  so we can move their definitions to the cpp.
  This prevents the need to set BOARD_RECOVERY_BLDRMSG_OFFSET
  in every module that includes the header.

* Global cflags are no longer supported Oreo and up,
  so set the BOARD_RECOVERY_BLDRMSG_OFFSET via make variable

* Simplify logic, always set BOARD_RECOVERY_BLDRMSG_OFFSET.

Change-Id: I2b902bcce7f5ca13472e0ac30ac01b4991294dbe
Change-Id: I4be681c2720f62182e57237b1cfefc384235f0e1
 * We may use a custom offset to:
   a) preserve data that oem wrote to the first bytes of misc
   b) skip recovery flags written by the bootloader (e.g. --wipe_data)

   For case a) one should set the offset 'x' to be at least greater than
   the size of bootloader_message struct (2048 bytes). If this is the case,
   then we zero out bytes x ~ x + 2047

   For case b) one should set the offset to be strictly smaller than
   the size of bootloader_message struct. If this is the case, then we
   zero out bytes 0 ~ 2047.
   This allows to clear any additional flag set by the bootloader,
   that would otherwise be forgotten in misc.
   This also guarantees that we do not involountarily wipe any data that
   the oem may have written starting at byte 2048 (coff coff LG)

Change-Id: I2d4e0702a2d8cbbef6274a87ce9499b0f69310dd
zhenyolka and others added 30 commits November 11, 2021 19:52
In A12 format of XML files changed to Android Binary XML
TWRP uses RapidXML to parse XMLs, but it don't support ABX format
So before parse check format of XML format and if it is in ABX, just ignore it for now

Change-Id: Ie40f5b3534db50143999984be22ade1d1af162e7
Change-Id: I3ceac6c55bcddb975eec6d92f09eceddf08098f2
Change-Id: Ia1000b257a00f187ca43ad881b3035508c5cdb5c
* It seems that when the system partition is mounted, nano cannot access the ramdisk files it needs to, and therefore errors (e.g. error opening terminal: pcansi)
* This patch addresses the said issue by moving the files nano needs to /sbin

Change-Id: I8a19a12a709b5ca20e449810a841ce421c038800
* It seems that when the system partition is mounted, bash cannot access the ramdisk files it needs to
* This patch addresses the said issue by moving the files bash needs to /sbin

Change-Id: I65788408b2f45b239467613a2c026f2ee410455b
On some devices, having the vendor partition mounted makes
/vendor unable to be remounted after slot switching is done
Automatically unmount vendor partition prior to switching
slots to ensure /vendor is mountable afterwards

TEST: Mount vendor partition, then switch slots.
      Vendor partition should be unmounted when
      switching completes

[LinkBoi00] Adapt for android-9.0

Change-Id: Iac0a6ec0065256355778d319897f6ee10c8630df
* Since commit 168bc4c the vendor partition gets unmounted prior to switching the slots. However, devices without a vendor partition (e.g. tissot's stock partition table) will have errors since the partition doesn't actually exist
* Therefore, it should be only mounted if that partition exists in the partition table

Change-Id: Id16ab55e25d05964ca0de1bf218914d66c2b0205
* The TWRP app button results in a big delay to open the reboot page

Change-Id: I7390d5bff2142214dfb3e2aad821859ac03e8c2f
Since the TWRP app button is gone from the reboot menu,
it would make sense to switch back to the larger buttons
for the slots and move down the active slot information
to fit the screen better

Change-Id: Iabf891da8799b063bb4902d583b67f0594b4fc19
Change-Id: I9f6f396530ad40f70c02c917b01e9b8158add773
* Adds support for mixed adopted storage + removable
  storage partitioned sdcards.

* Also symlinks Adopted Storage datamedia folder to an
  available /sdcardN (N being 2 through 9) folder.

* Requires a suitable entry in fstab, for example:

    # Removable Storage
    /sd_ext ext4 /dev/block/mmcblk1p2 /dev/block/mmcblk1
        flags=storage;wipeingui;removable;encryptable=footer
    /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
        flags=storage;wipeingui;removable;encryptable=footer

  /sd_ext will be the mountpoint for adopted storage, and /sdcardN
  will become symlinked to /sd_ext/data/media[/0]

* Fix adopted storage nickname being ""

* Output adopted partition info after successful decrypt

* Mimic single lun code for multi lun devices:
  "Mount CurrentStoragePath if it's not /data"

Change-Id: I3874c09f1a1c3a81f04277e17f17cc03ecb4184a
Change-Id: I230e60cae9bbf606be8fdd704b91288c8f8ed7f7
Fixes build error on legacy devices that don't have this defined

Change-Id: Iab74c5ab952bf1d142d981823ab67867a6f7d185
Change-Id: Id1205f0dda771500f02195c53c5d49bb14c83fac
Change-Id: I877f293e1c411fe3450cf816e280ba02578ab1fd
and move updating partition details to the function

Change-Id: I6f27ab1191246b6a23e625b0e3459db9024691c7
(cherry picked from commit 0fc1ee2)
Change-Id: I334d26b04bfac217d276429ec74597a8255f934c
Change-Id: I8ce2a4d9a8999c8e74d15ef2b86f840bd64423a8
Change-Id: I2e8a52421c4120cbdbc08de78a402c81fc3d73fd
Change-Id: Ia0959e6467c1c721199f92a4f8de2ebc5f20ee60
The functions use the Property_Override function from libresetprop,
so don't include if libresetprop isn't included in build

Change-Id: I5eb210f17fea908ec35cb223e4a55066419f55dc
pcansi TERM has always had some display and/or scrolling (up, down, left or right) issues in nano on TWRP's embedded Terminal.
Most frequently seen is misaligned/displaced text on long lines and files, either initially or once scrolled through.
bg1.25 seems to be the most compatible TERM for all devices currently.

Change-Id: If00a8352ca3576085f69c12dffb5b21637c7b21c
(cherry picked from commit 546ebc3)
Change-Id: I32b04a4c5089f928a614f693415415ae8acbba26
Needed if no ats_ files are present on qcom device

Offset is the difference between the current time
and the time since_epoch

To calculate the offset in Android, the following expression
(from a root shell) can be used:
echo "$(( ($(date +%s) - $(cat /sys/class/rtc/rtc0/since_epoch)) ))"

Add 3 zeros to the output and use that in the TW_QCOM_ATS_OFFSET
flag in your BoardConfig.mk

For example, if the result of the calculation is 1642433544,
use 1642433544000 as the offset

Change-Id: I5d58125dffc3fdbfb76a5ffde4e27659376185f1
Some OEMs include prop files in custom locations. Add these to
a list and parse when setting properties.

Use the flag TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS followed
by a semi-colon-separated list of paths (relative to /system)
where the additional prop files can be found.

The standard build.prop file does not need to be specified and
will always be parsed.

Example:
TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS := etc/buildinfo/oem_build.prop;etc/prop.default

Change-Id: Ie0e25c7d2575d928310ff1b4fc1aef44a83784ca
Automatically add the current theme version to the
splash and ui xmls during the build

Change-Id: I52f8cb41fabe34a8849ecc54ece3c0fb645dcd74
Change-Id: I6be1f15d05e6ad53bf239674cf41173879eef37a
Change-Id: Id0a7f6597f3a76a692abc611778de78f2c481afe
Change-Id: Ie277df438518df9accefa86da4a3394fa7f689db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.