summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: RecoveryRuntime: install_zip: print full zip pathHEADreplicant-6.0masterDenis 'GNUtoo' Carikli2022-01-071-1/+2
| | | | | | | | Having the full zip path makes it easier for debugging: if it fails for some reason, with the full path users can then simply look at the zip and/or retry to sideload it manually. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* tests: RecoveryRuntime: fix install_zipDenis 'GNUtoo' Carikli2022-01-071-0/+2
| | | | | | Without that fix, the zip wasn't installed. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* tests: RecoveryRuntime: fix append_recovery_commandDenis 'GNUtoo' Carikli2022-01-071-0/+1
| | | | | | | If the cache isn't mounted, we can't write to the /cache/recovery/command file. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* tests: RecoveryRuntime: make mount_cache device independentDenis 'GNUtoo' Carikli2022-01-071-1/+1
| | | | | | | The recovery has an fstab file, so we can reuse that to mount the cache without knowing the path to the cache partition. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* tests: lib: releases: remove unused install_zip functionDenis 'GNUtoo' Carikli2022-01-071-12/+0
| | | | | | The install_zip function being used is in replicant_releases.py. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* tests: install-replicant-6.0-0003.py: make it work by defaultDenis 'GNUtoo' Carikli2022-01-071-1/+1
| | | | | | | | | | Without that fix, it won't wipe the data partition, and the data partition format changed between Replicant 6.0 0003 and the Replicant 6.0 0004 RC releases. And it's better to have an example that works in all the cases. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: bootimages: Add support for xz compressed ramdisksreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004replicant-11Denis 'GNUtoo' Carikli2021-10-011-8/+52
| | | | | | | | | | | | | | | | | | | | | | Since Linux 3.0.101 which is used in Replicant 6.0, the kernel size increased a lot. Because of that, in Replicant 11, the recovery initramfs is compressed with xz to fit in the 8MiB RECOVERY partition of the Galaxy SIII (GT-I9300) and Galaxy SIII 4G (GT-I9305). Having the ability to add root to Replicant 11 recovery images helps a lot with the development or configuration of the recovery and install procedure as with this script we can have a shell in the recovery (to look at partitions, retrieve logs, etc) without needing to boot and setup Replicant. This script was also tested a Replicant 11 recovery on a Galaxy SIII (GT-I9300), and once flashed the recovery boots and we can get a shell with 'sudo adb shell'. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: wrap zImage operations in a classDenis 'GNUtoo' Carikli2021-10-011-87/+99
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: get rid of mktemp shell commandsDenis 'GNUtoo' Carikli2021-10-011-7/+3
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: Bootimage: cleanup temporary files after adding adb rootDenis 'GNUtoo' Carikli2021-10-011-0/+5
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: also move files identification code to the BootImage classDenis 'GNUtoo' Carikli2021-10-011-66/+46
| | | | | | | They are not used by the code handling pure zImage KERNEL and RECOVERY images. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: wrap bootimage operations in a classDenis 'GNUtoo' Carikli2021-10-011-30/+35
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: wrap ramdisk operations in a classDenis 'GNUtoo' Carikli2021-10-011-23/+40
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: fix lines over 80 characters and a whitespace issueDenis 'GNUtoo' Carikli2021-10-011-3/+3
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: switch from FSO's unbootimg to abootimgDenis 'GNUtoo' Carikli2021-10-011-15/+19
| | | | | | | | | | | | | | | | | | | | | | While abootimg git[1] has no new commits since 2021, FSO's unbootimg is not maintained at all as work on the Freesmartphone.org has stopped. As abootimg is used by diffoscope and it is pakcaged by Debian and Guix, so it's probably better to use to abootimg since more people will more likely already have it in the distribution they use and since it's a dependency of diffoscope we are more likely tools with the same command line interface in the future than the interface of FSO's unbootimg. I added a package for abootimg 6.0 in Parabola and Aur in order to make it easier for Parabola users to transition from fso-unbootimg to abootimg. [1]https://github.com/ggrandou/abootimg Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: Fix tests with bootimagesDenis 'GNUtoo' Carikli2021-09-303-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without that fix, running 'make test-recovery-i9300' twice produces two different images. With diffoscope we can see that the only differences between the two images are the gzip timestamps of the initramfs and the bootimage ID: --- tests/recovery-i9300-with-root.img.1 +++ tests/recovery-i9300-with-root.img ├── abootimg -i {} │ @@ -13,9 +13,9 @@ │ * load addresses: │ kernel: 0x40008000 │ ramdisk: 0x41000000 │ tags: 0x40000100 │ │ * cmdline = console=ttySAC2,115200 │ │ -* id = 0xbdaf2901 0x9c9b846c 0x229caf97 0x9a73b1e6 0x1403c772 0x00000000 0x00000000 0x00000000 │ +* id = 0x7551c944 0x85dcc898 0xbce08232 0x6de196b1 0x39ac56b5 0x00000000 0x00000000 0x00000000 ├── initrd.img │ ├── filetype from file(1) │ │ @@ -1 +1 @@ │ │ -gzip compressed data, was "ramdisk.cpio", last modified: Thu Sep 30 18:02:46 2021, from Unix │ │ +gzip compressed data, was "ramdisk.cpio", last modified: Thu Sep 30 18:02:53 2021, from Unix As in the current mkbootimg python implementation, the ID is generated from the checksum of various components of the image, just fixing the gzip command fixes the tests. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* add_adb_root: Retrieve ID from bootimagesDenis 'GNUtoo' Carikli2021-09-301-0/+3
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add script to handle repository removals from git.replicant.usDenis 'GNUtoo' Carikli2021-09-123-0/+749
| | | | | | | | | | | | | | | | | | | | While working on Replicant 11, I found nonfree software in AOSP (Android Open Source Project, Google's official source code release of Android). As I already started to mirror some of the AOSP repository before finding these nonfree software, I now need to see what to do for already mirrored repositories. If no other Replicant version than Replicant 11 (which hasn't got any releases yet and is still being working on at the time of writing) uses that repository it should be safe to remove it. If not the other versions or the repository might need to be modified somehow not to depend on nonfree software. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: Handle all git argumentsDenis 'GNUtoo' Carikli2021-09-011-46/+180
| | | | | | | | | | | | | | | | | | | | As we use git-format-patch under the hood, we need to handle all its arguents and some of git arguments too to handle all the use cases that are already covered by git format-patch. If we don't use this approach, we'll probably end up having to wrap many of the features of git format-patch anyway. Ideally it should be able to retrieve the commit ID or range in an automatic way without harcoded knowledge of git-format-patch arguments, but that could be implemented in a following commit if needed. The advantages of an approach like that are mutiple: not only it would lower maintenance, but merely using a newer or patched git would automatically make the new git-format-patch improvements automatically usable with this tool, with no change of code needed. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add crude python library and example programs to do automatic installationsmore-toolsDenis 'GNUtoo' Carikli2021-07-1418-0/+2307
| | | | | | | | | | | | | | | | | | | | Here's how to test the Replicant 6.0 0004 RC5 data migration: $ cd tests/src $ ./test-replicant-6.0-0004-rc5-migration.py n7100 [ OK ] Installed Replicant 6.0 0003 [ OK ] Installed APKs on top of Replicant 6.0 0003 [ OK ] Installed Replicant 6.0 0004-rc5-transition [ OK ] Installed Replicant 6.0 0004-rc5 There is still a lot to be done as the libraries still have many things that are not implemented yet. For instance it doesn't support yet all the Smartphones and tablets supported by Replicant 6.0 0003. There is also a lot of TODO in the source code. In addition, the loggin system isn't very flexible. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add crude script to add root to boot.imgDenis 'GNUtoo' Carikli2021-07-087-0/+1085
| | | | | | | | | | | | | | | | | This works but it's currently too fragile: - For the zImages, it relies on the compressed image being smaller, if not we need to at least append the size of the compressed Image to the zImage - It doesn't autodetect much, for instance we need to autodetect the compression type (xz, lzma, gzip, etc). - The bootimages are not reproducibles (probably because a random ID is added to the image). This prevents adding some easy testing where we could automatically download some Replicant 6 images and add root to them and compare the result with some checksums. The source code also has additional TODOs inside it. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add scripts to reboot and off shutdown the device cleanlyreplicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5Denis 'GNUtoo' Carikli2021-03-124-0/+36
| | | | | | | | This can be convenient when using the shell. Alternatively it could also help users with broken power buttons. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: fix Makefile bugDenis 'GNUtoo' Carikli2021-02-251-0/+1
| | | | | | | Without that fix, the install target will fail if a file named install is present in the same directory than the Makefile. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: Add Makefile for easy installationreplicant-6.0-0004-rc4Denis 'GNUtoo' Carikli2020-11-091-0/+5
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: fix crash when not using -CDenis 'GNUtoo' Carikli2020-11-081-2/+4
| | | | | | | | | | | | | | | Without that fix we have: $ ./patches/replicant_prepare_patch.py HEAD 1 Traceback (most recent call last): File "./patches/replicant_prepare_patch.py", line 231, in <module> repo = GitRepo(config, directory) File "./patches/replicant_prepare_patch.py", line 97, in __init__ self.directory = re.sub('/+$', '', directory) File "/usr/lib/python3.8/re.py", line 210, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or bytes-like object Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* cosmetics: modem<->soc shared memory: move comments within ifDenis 'GNUtoo' Carikli2020-11-031-6/+7
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add that the Galaxy J7 has shared memory between the modem and the SOCDenis 'GNUtoo' Carikli2020-11-031-0/+6
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Bump last LineageOS versionDenis 'GNUtoo' Carikli2020-11-031-1/+1
| | | | | | | At the time of writing, the last LineageOS version found in the devices data is 17.1. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Update to (deprecated) channels removalDenis 'GNUtoo' Carikli2020-11-031-1/+3
| | | | | | | | | | | | | | Since the following commit in the LineageOS wiki[1]: 707b756411b5ea77aa4003c69f8d20d4436c1916 707b75641 wiki: Remove deprecated channels the channels field has been removed as it was replaced by an empty maintainers field[2]. [1]git://github.com/LineageOS/lineage_wiki.git [2]That commit says to "replace [channels: [discontinued]] with 'device.maintainers == empty', where needed" Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* key-migration.sh: enable it to run multiple times and add printsreplicant-6.0-0004-rc3Denis 'GNUtoo' Carikli2020-10-111-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, the key-migration.sh script only migrated the keys the first time it ran. To do that, in that first run, it also creates the /data/system/.key-migration-done file, and in subsequent runs it skips the key migration if that file was present. It probably did that to not redo the same operations again and again either to limit the data loss risk by not doing any filesystem writes and/or to speedup the boot process. However if we have more than one maintainer or keyset changes over time, users will need to run this script the first time, and at the second change later on, the new script will not run. In addition users also need to be able to create such script themselves and run them whenever they need to in order to migrate to self builds, or downgrade. Using a revision system to do that would be error prone as users and developers would need to not forget to bump the revision to make the script run. Using an automatic revision with the hash of the script content also has issues as running the same script twice (for instance by doing an upgrade, then a downgrade and then an upgrade) wouldn't work. Running the script each time ensure that all uses cases work, at the cost of speed: in the recovery, with all Replicant 4.2 and 6.0 keys up to Replicant 6.0 0004 RC2, running the script takes about 5s on a Galaxy SIII (GT-I9300): # time sh ./key-migration.sh Key migration done 0m4.55s real 0m1.07s user 0m3.18s system We also ensured that no writes were made to the packages.xml file if nothing had to be changed. This increases the risk during the key update as no backup of the packages.xml is done, however this decreases the risk subsequently as no writes are made anymore. Prints were also added to inform the user of if the script ran fine, and if not why it didn't. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add new script to extract certificates from /data/system/packages.xmlDenis 'GNUtoo' Carikli2020-10-091-0/+150
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: Add -C option to run it in a given directoryDenis 'GNUtoo' Carikli2020-10-091-11/+28
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: wrap git commands in a classDenis 'GNUtoo' Carikli2020-10-091-86/+83
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add script to generate the key-migration.sh scriptDenis 'GNUtoo' Carikli2020-10-096-0/+1348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The applications built from Replicant are signed with a key that is generated during the build procedure The issue is that the data of an application becomes inaccessible to it if the application signature change. This affects all the applications built during and signed during the build of Replicant images, which includes all system applications. This is why, during the installation of a new Replicant version, the otasigcheck.sh is run: it verifies if the application signatures expected by the applications data match the signatures of the new applications that are part of the new Replicant image being installed. Without this check, users installing a new Replicant minor version (like Replicant 6.0 0004) and keeping the data from the previous minor version (like Replicant 6.0 0003) with a key that change will make at least some system applications like the launcher crash as they will not be able to access their data. If the check detects an incompatibility, on a Galaxy SIII (GT-I9300), we end up the installation aborting and the following message being displayed on the screen: detected filesystem ext4 for /dev/block/mmcblk0p12 Can't install this package on top of incompatible data. Ples se try another package or run a factory test E:Failed to install /sideload/package.zip E:Please take note of all the above lines for reports. This design has several issues: - You cannot upgrade between Replicant minor versions if the keys signing applications shipped in the new version changed. This is really problematic as to upgrade, users need to delete all their application data and restart creating them from scratch which is very time consuming. With frequent updates that would becomes too much time consuming to do. - It is also very fragile: if the data partition is encrypted, otasigcheck.sh cannot do the check, and the check is skipped completely, with the consequences explained before (the system applications end up not being able to access their data). To fix that: - This patch adds a new python script for generating the key-migration.sh script that will be added to the vendor_replicant repository. Generating the key-migration.sh script with a python script enables users and developers to generate a key-migration.sh script with the keys they want. This should make downgrade easier as the key-migration.sh script could also be run manually in the recovery and also make the migration to self-built images much easier. - The generated script (key-migration.sh) will be added to the vendor_replicant repository. It will take care of migrating the applications data to the new keys during the first boot (so after the data partition will have been mounted). - The call to otasigcheck.sh during the installation of new Replicant versions will be removed in the build repository. - otasigcheck.sh will be removed in the vendor_replicant repository. Also, the otasigcheck.sh script has already been removed in LineageOS 17.1 by the following commit in vendor/lineage: commit 95621f3c73b94a87ca4528748535bb114ae1613f Author: Michael Bestas <mkbestas@lineageos.org> Date: Sat Aug 4 17:46:35 2018 +0300 Revert "ota: Validate any installed data's signature against our own" * otasigcheck doesn't work on encrypted devices and makes the zip installation fail since oreo. * The build part of this was never ported to oreo. This reverts commit aff5e54c4ef5fec7e67e830f83ee64424005d07c. Change-Id: I411f33c1db64844091c1692ef4706ae541925d4f This key-migration.sh script has been generated by the following command in the Replicant source code directory: $ ./vendor/replicant-scripts/images/gen_key_migration_script/gen_key_migration_script.py \ gen-script \ vendor/replicant/prebuilt/common/bin/key-migration.sh \ vendor/replicant-data/distros/releases/certificates/ \ vendor/replicant-security/ This work is based on the following commit from the android_vendor_cm repository[1]: 2f7c7decc Add startup script to update the package signatures commit 2f7c7decc4cd5b42f044a7841a74468e4cacd694 (refs/changes/27/156327/3) Author: Gabriele M <moto.falcon.git@gmail.com> Date: Fri Jan 13 17:03:45 2017 +0100 Add startup script to update the package signatures This allows to jump straight to LineageOS without wiping userdata first. Change-Id: I208bcada9380cbd69f3bec6c64e3c9e0eb1104c8 [1] https://github.com/LineageOS/android_vendor_cm.git Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: Handle serie revision with git's -v switchDenis 'GNUtoo' Carikli2020-08-271-10/+9
| | | | | | | | | | | | | | Git has a switch to generate patches for a given revision. This generates a better filename, and still generate a Subject that is functionally similar to the one before. So for this patch we would have: - "v2-0003-replicant_prepare_patch.py-Handle-serie-revision-.patch" for the file name - "Subject: [vendor_replicant-scripts] [PATCH v2 3/3] replicant_prepare_patch.py: Handle serie revision with git's -v switch" for the Subject Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch.py: make generate_patches more modularDenis 'GNUtoo' Carikli2020-08-271-7/+7
| | | | | | | | | | | | | | | | | | This enables to add more arguments later on by constructing the git command to be executed. Doing that with the current design of that function would end up having to handle a power of two of the possible conditions: With one condition (subject_prefix), we have 2 commands to generate. With two conditions, we would have 4 commands to generate: - subject_prefix False, New condition False - subject_prefix False, New condition True - subject_prefix True, New condition False - subject_prefix True, New condition True Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch: cover text: Handle plural due to multiple patchesDenis 'GNUtoo' Carikli2020-08-271-8/+15
| | | | | | | If there is more than one patch, the generated text will look strange if left as-is, as it assume that only one patch is sent. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* Add tool to parse PIT and potentially other partition tables.Denis 'GNUtoo' Carikli2020-08-272-0/+860
| | | | | | | | | | | | | | | | | | | | | Currently, this tool can generate dd command to extract individual PIT partitions. Also, the Replicant wiki has tables describing the partition layout of several devices, like the Galaxy SIII (GT-I9300), however the degree of completeness varies from devices to devices, and most of the work could be automatized with a tool. This tool can also generate Redmine compatible tables similar to the ones on the Replicant wiki, and fill in information gathered from the PITs. More information sources (such as the output of the mount commands and the GPT partition tables) are needed to fill in the rest of the information. PITs for several devices are available in the following git repository: https://git.replicant.us/replicant/data.git Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* graphics: fix user interfaceDenis 'GNUtoo' Carikli2020-07-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The graphics user interface is the following, according to the help: Usage: graphics.sh [faster|compatible] Examples: graphics.sh faster |-> Uses Android's libagl which is faster but some applications like icecat won't work graphics.sh compatible |-> Uses llvmpipe which is slower but more compatible However the code is still expecting the "libagl" or "llvmpipe" arguments: graphics() { new_renderer="$1" # libagl || llvmpipe [...] if [ "${old_renderer}" == "${new_renderer}" ] ; then [...] } This fix the code to by passing the libagl and llvmpipe arguments to the graphics function as it expects, while keeping the same user interface. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: fix user interfaceDenis 'GNUtoo' Carikli2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | The modem user interface is the following, according to the help: Usage: modem.sh [on|off] Examples: modem.sh off |-> disable the modem and reboot modem.sh on |-> enable the modem and reboot However the code is still expecting the "enable" or "disable" arguments. This fix the code to use the new "on" and "off" arguments as expected. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch: subject prefix: add more project names autodetectionDenis 'GNUtoo' Carikli2020-07-061-0/+2
| | | | | | | This takes care of having projects like hardware_replicant_libsamsung-ril appear as libsamsung-ril in the subject prefix. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* display: renderer: setup.sh: sync with the modem setup.shreplicant-6.0-0004-rc2Denis 'GNUtoo' Carikli2020-07-031-5/+11
| | | | | | | | | | | | | The modem setup.sh had got a lot of improvements. As the only difference with the modem.sh is the use of graphics.sh instead of modem.sh which has already been sent for review and that not many people have the time to do reviewes, it's best to rely on the modem setup.sh review process instead and group all the changes in a single patch for the display renderer. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* display: renderer: rework script user interfaceDenis 'GNUtoo' Carikli2020-07-034-111/+139
| | | | | | | | | | | | | | The current interface has various issues that are fixed by this new interface. Here's the design decisions that went into the new interface: - Many people don't know what llvmpipe is, and androidsw.sh is not easy to remember. - This new interface still work fine on devices with a small screen like the Galaxy SII and with the default keyboard configuration. - It also checks for root permissions and has a help. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch: fix double / on git.replicant.usDenis 'GNUtoo' Carikli2020-07-031-1/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* replicant_prepare_patch: subject prefix: add crude project names autodetectionDenis 'GNUtoo' Carikli2020-07-031-4/+19
| | | | | | | | | | | For some projects, having the full repository name makes sense, like for device_samsung_i9300, while for other the directory structure can be omitted like libsamsung-ipc. While the autodetection isn't complete, it at least handle some common cases. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: setup.sh: only continue if adb root succeddedDenis 'GNUtoo' Carikli2020-06-261-6/+9
| | | | | | | | | This way if we don't have root access enable it will only show the following error message: root access is disabled by system setting - enable in settings -> development options Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: setup.sh: fix adb pushDenis 'GNUtoo' Carikli2020-06-261-1/+4
| | | | | | | | | | | | | | | | | | | Without that fix: - Copying the files to the device can fail with the following error: adb: error: failed to copy './device-files/modem.sh' to '/system/bin/modem.sh': remote Read-only file system This copying bug has been introduced by the following commit: ce8db3e networking: modem: setup.sh: use the same paths than Android.mk - using 'adb wait-for-device' instead of sleep 3 guarantees that the device is available and doesn't wait longer than necessary. - We re-set /system to read-only afterward and make sure that everything is written back to prevent any possible data corruption. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: setup.sh: Enable to run it from any directoryDenis 'GNUtoo' Carikli2020-06-261-1/+2
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: setup.sh: Use /system/bin/ instead of as it is easier to understandDenis 'GNUtoo' Carikli2020-06-261-2/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* modem: setup.sh: Add shebangDenis 'GNUtoo' Carikli2020-06-261-0/+1
| | | | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>