| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
If we remove debug.sf.nobootanimation=1, the bootanimation program
then runs but we still have nothing on the screen, even with a
bootanimation.zip in /system/media/.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, on a GT-I9300, the mount fails and we have the
following in dmesg:
EXT4-fs (mmcblk2p8): can't mount with journal_async_commit
in data=ordered mode
So we are likely to have exactly the same issue on the GT-I9305
as the /data entry in the fstab is the same.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE, when building
Replicant 11 for the GT-I9300 with 'make otapackage' we
have the following build failure:
2021-10-06 17:37:04 - blockimgdiff.py - INFO : Finding transfers...
Traceback (most recent call last):
File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/ota_from_target_files/__main__.py", line 12, in <module>
File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2258, in <module>
File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2237, in main
File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1980, in GenerateNonAbOtaPackage
File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 755, in WriteFullOTAPackage
File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 679, in GetBlockDifferences
File "[...]/out/host/linux-x86/bin/ota_from_target_files/common.py", line 2630, in __init__
File "[...]/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 342, in Compute
File "[...]/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 1561, in FindTransfers
AssertionError
17:37:04 ninja failed with: exit status 1
This is because for some reasons the cache_size variable is
None. I've not been able to track exactly why though.
And with BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE but without the
entry in fstab, in Replicant 11, also when running
'make otapackage' we have the following build failure:
Traceback (most recent call last):
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/__main__.py", line 12, in <module>
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 999, in <module>
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 993, in main
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 876, in AddImagesToTargetFiles
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 539, in AddCache
File "[...]/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 1872, in CheckSize
KeyError: '/cache'
17:05:43 ninja failed with: exit status 1
In Replicant 6, for the GT-I9300, f2fs is being used, and we
have the following in rootdir/fstab.smdk4x12 in
device/samsung/i9300:
/dev/block/mmcblk0p8 /cache f2fs noatime,discard,inline_xattr,inline_data,nosuid,nodev wait
/dev/block/mmcblk0p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait
And for the GT-I9305 we have have the following in
rootdir/fstab.smdk4x12 in device/samsung/i9405:
/dev/block/platform/dw_mmc/by-name/CACHE /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check
For now we will use ext4 instead of f2fs as ext4 is already
been used for and tested with the system and data
partitions in Replicant 11, so the diff is smaller than with
f2fs.
If it works fine we could then switch to f2fs (and spot
regressions if there are som):
- to stay compatible with Replicant 6
- because a log-structured file system seems more adapted
for cache than regular filesystems like ext4.
And even if f2fs design is more recent than ext4, and that
increases the risk of loosing data, the cache partion can
easily be reformated in the recovery.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Replicant 6 we have the following in
rootdir/fstab.smdk4x12 in device/samsung/i9300:
/dev/block/platform/dw_mmc/by-name/OTA /misc emmc defaults defaults
And without this patch, the Replicant 11 recovery complains
about a missing /misc partition.
Once the recovery is booted we see the following on the
bottom of the screen on the GT-I9300:
E:Failed to clear BCB message: failed to
find /misc partition
And when we select "Apply update from ADB" in the menu, we
have the following on the bottom of the screen:
E:Failed to clear BCB message: failed to
find /misc partition
E:Failed to WriteUpdateInProgress: faile
d to find /misc partition
Now send the package you want to apply
to the device with "adb sideload <filena
me>"...
With this fix all these warnings disappear on the GT-I9300.
And while the Replicant 6.0 fstab of the GT-I9305 doesn't
have a similar entry, the GT-I9305 also has an OTA partition.
The OTA/misc partition seems to be used for communicating
with the recovery by writing some binary data on the
first 32 bytes of it[1]:
"If the device uses an unmodified AOSP recovery image,
the bootloader reads the first 32 bytes on the misc
partition; if the data there matches boot-recovery,
the bootloader boots into the recovery image."
[1]https://source.android.com/devices/bootloader/updating
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the PIT that we have in the
vendor/replicant-data repository[1], the RECOVERY
partition size is 8M:
$ heimdall print-pit --file 16G.pit
Heimdall v1.4.2
[...]
--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 122880
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename:
[...]
Here the blocks size is 512 bytes, so that makes 8MiB.
Without that patch, Replicant can build recoveries bigger
than 8MiB, and when installing them with heimdall, they work
fine[2] and nothing looks wrong.
The issue is that when the image is bigger than the
partition size, the part of the recovery image that is
bigger than the recovery partition will be written on the
next partition(s) and overwrite their content.
In the case of the GT-I9305, the next partition is the
RADIO partition, which contains the modem firmware.
So if users built Replicant 11 themselves and followed
the Replicant 11 official installation instructions which
instruct users to install the recovery, and didn't make
any backup of the RADIO partition, their modem will probably
not work anymore.
And since the modem of the GT-I9305 isn't supported in
Replicant 6, users migth not notice the issue at all until
someone manages to make it work with Replicant.
As the modem firmware is nonfree and not redistributable,
fixing that without any backup is not trivial:
- We don't know the situation with repair shops, some
might have agreements with Samsung for being able to
restore original operating systems. Though if the
reparation costs more than buying a new phone it doesn't
help here.
- Some shops might not have agreements with Samsung, and
modem firmwares can also be found on the Internet, and
in both cases we don't know the legal situation (which
also depends on the countries) with various right to
repair legislation or the lack thereof.
If the law doesn't permit reparation, users that don't
have any backup will face a dylema between repairing the
phone themselves and respecting the copyright laws.
- As the code is nonfree we also don't have much
documentation on the side effects of installing a
different modem firmware than the one originally on the
device.
- Replicant obviously cannot redistribute such nonfree
firmwares and probably cannot have instructions to
find such firmwares.
In addition since users might not be aware at all of the
problem, the more they wait for fixing it, the harder it
will be because shops might stop fixing GT-I9305 at some
point if they are too old or images and knowledge might
also disapear from the Internet, etc.
[1]https://git.replicant.us/replicant/vendor_replicant-data/tree/devices/PIT/GT-I9105G/stock/16G.pit
[2]https://github.com/Benjamin-Dobell/Heimdall/issues/494
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do need to flash the recovery to enable people to format the
userdata partition.
In addition we can't flash the userdata as-is as the hack to
automatically reisize it at the first boot doesn't work anymore
because for some reasons selinux seems to be enforced for init
services even when it's in permissive mode globally.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
We now use userdebug for quite some time, and we also use it by
default in vendor/replicant/build.sh
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
The device_samsung_i9300 also copies the exact same
android.software.app_widgets.xml in the exact same
place, so it's best to move that in
device_samsung_midas_common.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
The device_samsung_i9300 also ships the exact same
android.hardware.wifi.xml file, so it's best to move
that in device_samsung_midas_common.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
This shorten the lines and makes this repository more position
independent.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
The device_samsung_i9300 also ships the exact same
media_codecs.xml file, so it's best to move that
in device_samsung_midas_common.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
The media_codecs.xml is already opied from
frameworks/av/media/libstagefright/data/media_codecs_sw.xml
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Beside the modem specific part, all the content of the
init.smdk4x12.rc is shared with the init.smdk4x12.rc from
the device_samsung_i9305 repository.
Change-Id: Iade835ea98cbf881f41f412405376fe9e361d7dc
GNUtoo: rebased to take into account the modem changes,
updated commit message
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default audio HAL is a stub that doesn't do any access to the
hardware. The code of the audio.primary.default default implementation
is in hardware/libhardware/modules/audio and in audio_hw.c we have:
static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
size_t bytes)
{
ALOGV("out_write: bytes: %zu", bytes);
/* XXX: fake timing for audio output */
struct stub_stream_out *out = (struct stub_stream_out *)stream;
struct timespec t = { .tv_sec = 0, .tv_nsec = 0 };
clock_gettime(CLOCK_MONOTONIC, &t);
const int64_t now = (t.tv_sec * 1000000000LL + t.tv_nsec) / 1000;
const int64_t elapsed_time_since_last_write = now - out->last_write_time_us;
int64_t sleep_time = bytes * 1000000LL / audio_stream_out_frame_size(stream) /
out_get_sample_rate(&stream->common) - elapsed_time_since_last_write;
if (sleep_time > 0) {
usleep(sleep_time);
} else {
// we don't sleep when we exit standby (this is typical for a real alsa buffer).
sleep_time = 0;
}
out->last_write_time_us = now + sleep_time;
// last_write_time_us is an approximation of when the (simulated) alsa
// buffer is believed completely full. The usleep above waits for more space
// in the buffer, but by the end of the sleep the buffer is considered
// topped-off.
//
// On the subsequent out_write(), we measure the elapsed time spent in
// the mixer. This is subtracted from the sleep estimate based on frames,
// thereby accounting for drain in the alsa buffer during mixing.
// This is a crude approximation; we don't handle underruns precisely.
return bytes;
}
This function is supposed to send the audio frames to the the audio driver,
but instead it doesn't send it anywhere. So we can safely deduce that this
implementation is a dummy one that implements the API just to make the
higher level of the stack happy.
Because of that the Dragonboard audio library which is known to work in
Android 11, has been imported in device_samsung_midas_common for now.
In order to use it, we need to change ro.hardware.audio.primary as it is
used by the higher level stack to find what HAL library to load for the
primary audio module.
While the Dragonboard audio library doesn't handle audio routing, it is
possible to either modify it to do that or use another library like
libaudioroute, and the associated mixer_paths.xml configuration file
to do it.
Thanks to Joonas Kylmälä who identified that the Dragonboard
audio library worked out of the box on Android 11 for the
Galaxy SIII 4G (GT-I9305).
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hardware seems to support vsync, at least no erros come without
this setting. Overlay planes also work, the issue with graphics
corruption was previously because we allocated graphics buffers for
SCANOUT (buffers to be shown on display) on the GPU render node which
seems to allocate the memory non-contiguously with MMU. The exynos
display controller seems to require contiguous memory. When
gralloc.gbm.device is card0 and kmsro driver is enabled then it
handles the allocation between card and render nodes correctly.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
| |
The common init.rc already does this.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
| |
It causes graphics corruption with Lima
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using vendorsetup generated the following warning message:
device/samsung/i9305/vendorsetup.sh:17: add_lunch_combo is obsolete.
Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
So we use COMMON_LUNCH_CHOICES in your AndroidProducts.mk
instead in order to silence this warning.
Signed-off-by: Tobias Tefke <t.tefke@stud.fh-sm.de>
GNUtoo@cyberdimension.org: fixed a tiny bit the comimt message
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
We have no audio implemented yet so let's use the audio settings for
devices that have no audio devices.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
| |
This is used for testing SwiftShader
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
This property decrease memory footprint by avoiding the usage of
accelerated graphics in certain places.
No noticeable difference in performance was observed when using this.
We are keeping it either way, in hopes that extra available memory will
be beneficial for some software rendering optimizations.
Signed-off-by: Ricardo 'Grim' Cabrita <grimkriegor@krutt.org>
|