Unable to install custom app, Herelink read-only

I am trying to install a custom version of QGC. When I try to install using "adb install <name.apk> it fails. And the Herelink goes offline.

I also tried "adb push <name.apk> <name.apk> and it fails saying the device is read-only.

use adb install, not push

I have tried “adb install <name.apk>”, many times. Also tried “adb install --no-streaming <name.apk>” and that also did not work.

I only tried push to see if I could get the apk file to the device. And that is when it gave me the read only error.

Just another data point. I was able to successfully install the same apk onto an old Samsung Galaxy 6 device. This was done using the same command that does not work with my Herelink: adb install <name.apk>

you need to at least provide the exact error you are getting.

Below is captures from attempting the install with streaming and no streaming. And log captures afterwards. Note the exceptions in each case.
I have more complete logs but this site will not let me upload them.

Device SW Version: LATEST: BRU01211104

C:\apk>adb devices
List of devices attached
d7934778 device

C:\apk>adb install android-build-release-signed.apk
Performing Streamed Install
adb: failed to install android-build-release-signed.apk:

C:\apk>adb devices
List of devices attached
d7934778 offline

** Unplugged USB cable and plugged back in

C:\apk>adb devices
List of devices attached
d7934778 device

C:\apk>adb logcat

05-14 08:09:27.423 262 262 I usbethx : POWER_SUPPLY_CURRENT_MAX=500
05-14 08:09:27.423 262 262 I usbethx : POWER_SUPPLY_TYPE=USB
05-14 08:09:27.423 262 262 I usbethx : POWER_SUPPLY_CHARGE_TYPE=N/A
05-14 08:09:27.423 262 262 I usbethx : SEQNUM=2215
05-14 08:09:27.431 746 825 V UsbDeviceManager: USB UEVENT: {USB_STATE=DISCONNECTED, SUBSYSTEM=android_usb, SEQNUM=2216, ACTION=change, DEVPATH=/devices/virtual/android_usb/android0}
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:334): avc: denied { write } for name=“0.modem” dev=“sysfs” ino=6182 scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:335): avc: denied { add_name } for name=“charger_status” scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:336): avc: denied { create } for name=“charger_status” scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
05-14 08:09:27.438 746 1978 W FastPrintWriter: Write failure
05-14 08:09:27.438 746 1978 W FastPrintWriter: java.io.IOException: write failed: EIO (I/O error)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.IoBridge.write(IoBridge.java:501)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at java.io.FileOutputStream.write(FileOutputStream.java:316)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flushBytesLocked(FastPrintWriter.java:336)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flushLocked(FastPrintWriter.java:359)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flush(FastPrintWriter.java:394)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.ShellCommand.exec(ShellCommand.java:113)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18409)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.shellCommand(Binder.java:468)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.onTransact(Binder.java:367)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3056)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.execTransact(Binder.java:565)
05-14 08:09:27.438 746 1978 W FastPrintWriter: Caused by: android.system.ErrnoException: write failed: EIO (I/O error)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.Posix.writeBytes(Native Method)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.Posix.write(Posix.java:273)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:319)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.IoBridge.write(IoBridge.java:496)
05-14 08:09:27.438 746 1978 W FastPrintWriter: … 11 more
05-14 08:09:27.439 262 262 I usbethx : change@/devices/virtual/android_usb/android0
05-14 08:09:27.439 262 262 I usbethx : ACTION=change
05-14 08:09:27.439 262 262 I usbethx : DEVPATH=/devices/virtual/android_usb/android0
05-14 08:09:27.439 262 262 I usbethx : SUBSYSTEM=android_usb
05-14 08:09:27.439 262 262 I usbethx : USB_STATE=DISCONNECTED
05-14 08:09:27.440 262 262 I usbethx : SEQNUM=2216
05-14 08:09:27.440 262 262 I usbethx : change@/devices/platform/soc/fa300000.usb/udc/fa300000.usb
05-14 08:09:27.440 262 262 I usbethx : ACTION=change
05-14 08:09:27.442 262 262 I usbethx : DEVPATH=/devices/platform/soc/fa300000.usb/udc/fa300000.usb
05-14 08:09:27.442 262 262 I usbethx : SUBSYSTEM=udc

C:\apk>adb devices
List of devices attached
d7934778 device

C:\apk>adb install --no-streaming android-build-release-signed.apk
Performing Push Install
adb: error: failed to read copy responseease-signed.apk
android-build-release-signed.apk: 1 file pushed, 0 skipped. 4.9 MB/s (26079780 bytes in 5.108s)
adb: error: failed to read copy response

C:\apk>adb devices
List of devices attached
d7934778 offline

** Unplugged USB cable and plugged back in

C:\apk>adb devices
List of devices attached
d7934778 device

C:\apk>adb logcat

05-14 08:09:27.423 262 262 I usbethx : SEQNUM=2215
05-14 08:09:27.431 746 825 V UsbDeviceManager: USB UEVENT: {USB_STATE=DISCONNECTED, SUBSYSTEM=android_usb, SEQNUM=2216, ACTION=change, DEVPATH=/devices/virtual/android_usb/android0}
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:334): avc: denied { write } for name=“0.modem” dev=“sysfs” ino=6182 scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:335): avc: denied { add_name } for name=“charger_status” scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
05-14 08:09:27.432 1 1 I init : type=1400 audit(0.0:336): avc: denied { create } for name=“charger_status” scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
05-14 08:09:27.438 746 1978 W FastPrintWriter: Write failure
05-14 08:09:27.438 746 1978 W FastPrintWriter: java.io.IOException: write failed: EIO (I/O error)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.IoBridge.write(IoBridge.java:501)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at java.io.FileOutputStream.write(FileOutputStream.java:316)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flushBytesLocked(FastPrintWriter.java:336)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flushLocked(FastPrintWriter.java:359)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.internal.util.FastPrintWriter.flush(FastPrintWriter.java:394)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.ShellCommand.exec(ShellCommand.java:113)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18409)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.shellCommand(Binder.java:468)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.onTransact(Binder.java:367)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3056)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at android.os.Binder.execTransact(Binder.java:565)
05-14 08:09:27.438 746 1978 W FastPrintWriter: Caused by: android.system.ErrnoException: write failed: EIO (I/O error)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.Posix.writeBytes(Native Method)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.Posix.write(Posix.java:273)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:319)
05-14 08:09:27.438 746 1978 W FastPrintWriter: at libcore.io.IoBridge.write(IoBridge.java:496)
05-14 08:09:27.438 746 1978 W FastPrintWriter: … 11 more
05-14 08:09:27.439 262 262 I usbethx : change@/devices/virtual/android_usb/android0
05-14 08:09:27.439 262 262 I usbethx : ACTION=change
05-14 08:09:27.439 262 262 I usbethx : DEVPATH=/devices/virtual/android_usb/android0
05-14 08:09:27.439 262 262 I usbethx : SUBSYSTEM=android_usb
05-14 08:09:27.439 262 262 I usbethx : USB_STATE=DISCONNECTED
05-14 08:09:27.440 262 262 I usbethx : SEQNUM=2216
05-14 08:09:27.440 262 262 I usbethx : change@/devices/platform/soc/fa300000.usb/udc/fa300000.usb

Android versions may not match so you can try to update different versions or here link?

as @Jesus has mentioned, what android version are you targeting? needs to be 7.1 or bellow. you can use a newer sdk, just need to target the lower value

Thanks for the suggestions. But that does not seem to be the issue. I am setting the Target to be “API 25: Android 7.1”. The Herelink device Android version is 7.1.2.

Here is some info from the apk file.
Android manifest:
N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:versionCode(0x0101021b)=(type 0x10)0x494d3
A: android:versionName(0x0101021c)=“3.0.0-243-gd759437” (Raw: “3.0.0-243-gd759437”)
A: android:installLocation(0x010102b7)=(type 0x10)0x0
A: package=“gov.nasa.arc.aol.qgroundcontrol” (Raw: “gov.nasa.arc.aol.qgroundcontrol”)
A: platformBuildVersionCode=(type 0x10)0x19 (Raw: “25”)
A: platformBuildVersionName=“7.1.1” (Raw: “7.1.1”)
E: uses-sdk (line=8)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x19

ok, so i dont see anything that should be blocking it initialy. we dont stop you installing custom apps at all, so there must be something else going on here.

can you
reboot the unit
do a
“adb install android-build-release-signed.apk”
then after it fails
“adb bugreport”
and upload the file it generates

bugreport-N2G47J-2022-05-16-17-02-56.zip (823.5 KB)

I have followed the steps you provided and uploaded the file. To note is that once the install fails the device appears to go offline. So I had to unplug the device from USB and then plug back in to generated the bugreport.