aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add support for i9100HEADreplicant-11-nlnet-eu-grant-825310-replicant-updatereplicant-11Denis 'GNUtoo' Carikli2022-06-206-22/+20
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Try to enable the boot animationDenis 'GNUtoo' Carikli2021-11-281-1/+0
| | | | | | | | 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>
* Fix /cache mountDenis 'GNUtoo' Carikli2021-10-081-1/+1
| | | | | | | | | | | | 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>
* fstab: Add ext4 cache partitionDenis 'GNUtoo' Carikli2021-10-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fstab: Add misc partitionDenis 'GNUtoo' Carikli2021-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix RECOVERY partition sizeDenis 'GNUtoo' Carikli2021-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* README.md: Add recoveryDenis 'GNUtoo' Carikli2021-09-141-1/+1
| | | | | | | | | | | | 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>
* README.md: Fix targetDenis 'GNUtoo' Carikli2021-09-141-1/+1
| | | | | | | 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>
* Move adding android.software.app_widgets.xml to common repoDenis 'GNUtoo' Carikli2021-09-141-1/+0
| | | | | | | | | 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>
* Move android.hardware.wifi.xml to common repoDenis 'GNUtoo' Carikli2021-09-071-1/+0
| | | | | | | | 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>
* device.mk: use LOCAL_PATH whenever possibleDenis 'GNUtoo' Carikli2021-09-071-2/+2
| | | | | | | This shorten the lines and makes this repository more position independent. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Move codecs to to common repoDenis 'GNUtoo' Carikli2021-09-071-1/+0
| | | | | | | | 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>
* Remove unused media_codecs.xmlDenis 'GNUtoo' Carikli2021-09-071-23/+0
| | | | | | | 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>
* move init.smdk4x12.rc to common repoShilin Victor2021-09-071-41/+1
| | | | | | | | | | | 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>
* Rename lineage_i9305-eng to replicant_i9305-engDenis 'GNUtoo' Carikli2021-05-043-4/+4
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Fix PRODUCT_MODELDenis 'GNUtoo' Carikli2021-05-041-1/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* use midas audio primary moduleDenis 'GNUtoo' Carikli2020-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix recovery typoDenis 'GNUtoo' Carikli2020-11-241-1/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Build the kernelDenis 'GNUtoo' Carikli2020-11-241-0/+3
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Use default audio HALJoonas Kylmälä2020-11-221-1/+1
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Build recovery imageJoonas Kylmälä2020-11-211-0/+2
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Make device repo work with Replicant 11Joonas Kylmälä2020-11-162-4/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Correct graphics settingsJoonas Kylmälä2020-07-222-4/+1
| | | | | | | | | | | | | 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>
* Remove unnecessary include to product_launched_with_p.mkJoonas Kylmälä2020-07-221-1/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Enable software based media decodingJoonas Kylmälä2020-07-072-4/+2
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Add remaining packages that are required for usual mobile phone usageJoonas Kylmälä2020-07-021-3/+4
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Move common configurations from i9305 to midas-commonJoonas Kylmälä2020-06-295-139/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Remove duplicated mounting of configfsJoonas Kylmälä2020-06-291-5/+0
| | | | | | The common init.rc already does this. Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Disable HW overlay planesJoonas Kylmälä2020-06-261-1/+1
| | | | | | It causes graphics corruption with Lima Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Replace vendorsetup.sh by COMMON_LUNCH_CHOICESTobias Tefke2020-06-262-17/+3
| | | | | | | | | | | | | 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>
* Use GPU render node for graphicsJoonas Kylmälä2020-04-131-1/+1
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Allow access to GPU render nodeJoonas Kylmälä2020-04-131-0/+1
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use lights HAL settings from midas-commonJoonas Kylmälä2020-04-121-6/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use Mesa3d and drm_hwcomposer for graphicsJoonas Kylmälä2020-04-121-2/+2
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use manifest.xml from midas-commonJoonas Kylmälä2020-04-102-136/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Include midas.mk to add memtrack module to the buildJoonas Kylmälä2020-04-102-0/+11
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use midas-common repo for shared settingsJoonas Kylmälä2020-04-1013-3657/+1
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use SwiftShader for graphicsJoonas Kylmälä2020-04-082-4/+2
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Remove memtrack since it blocks bootingJoonas Kylmälä2020-04-082-11/+0
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Use stub audio settingsJoonas Kylmälä2020-04-082-6/+7
| | | | | | | 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>
* Fix brand/manufacturerDenis 'GNUtoo' Carikli2020-02-101-2/+2
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* README: Add the hack to make adb workDenis 'GNUtoo' Carikli2020-02-101-1/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* README: The kernel is now built automaticallyDenis 'GNUtoo' Carikli2020-02-101-8/+0
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* README: Fix device nameDenis 'GNUtoo' Carikli2020-02-101-1/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add memtrack supportDenis 'GNUtoo' Carikli2020-02-102-0/+11
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Kernel: use unified kenrel configurationDenis 'GNUtoo' Carikli2020-02-101-1/+9
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add SwiftShaderJoonas Kylmälä2020-02-101-0/+2
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Add hwcomposer.ranchuJoonas Kylmälä2020-02-103-0/+431
| | | | | | This is used for testing SwiftShader Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Add backlight control supportJoonas Kylmälä2020-02-105-0/+14
| | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
* Set CONFIG_AVOID_GFX_ACCEL to true via system propertyRicardo 'Grim' Cabrita2020-02-101-0/+1
| | | | | | | | | | | 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>