Skip to content

Add initial rsync transfer support#19

Open
jbruechert wants to merge 5 commits intomasterfrom
rsync
Open

Add initial rsync transfer support#19
jbruechert wants to merge 5 commits intomasterfrom
rsync

Conversation

@jbruechert
Copy link
Owner

@jbruechert jbruechert commented Mar 12, 2018

Needs testers, but works on my device already
If you test this, please tell me whether it's faster or slower than ADB?
And sorry, this is currently only working on arm devices for the simple reason that I haven't found a good way to detect the architecture. For intel, you need to replace arm by x84 in the rsync download link manually.

You can still use ADB on this branch if you set FLASH_METHOD=ADB as environment variable.

TODO:

  • Make architecture independent

halium-install Outdated
if [ $FLASH_ADB ]; then
flash_error flash_adb
else
flash_error flash_rsync
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the parameters 'flash_adb' and 'flash_rsync' used?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flash_error functions calls the flash_rsync function

function flash_error() {
if ! $1; then
echo "Error: Couldn't copy the files to the device, is it connected?"
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should happen, if there is a first argument?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function prints the error message if the function it calls (argument) fails

echo "[Debug] rootfs: $ROOTFS_TAR"
echo "[Debug] android image: $AND_IMAGE"
echo "[Debug] release: $ROOTFS_RELEASE"
echo "[Debug] install method: $FLASH_METHOD"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you spelled [install] without capital letters, you should do it the same way here.

}

function flash_rsync() {
TARGET_ARCH=$(adb shell uname -m)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fix for that yet: On ilyabizyaev's device, uname -m reports i686

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, you could just replace all i*86 architectures with i386 (or x86)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to have a solution without mapping different architecture shemes, but as their doesn't seem to be one, I'll probably do it like that.

echo "Debug: Chosen release is $ROOTFS_RELEASE"
echo
# Print out useful debugging information
[ $DEBUG == "true" ] && debug_variables
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea, you could call it verbose mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants