Sideload failing on Samsung S21 due to "ddms: transfer error: fchown failed"
See original GitHub issueDescribe the bug
In order to perform Play Asset Delivery local testing, we run bundletool to sideload APKs on connected device.
Running the tool fails due to an ddms: transfer error: fchown failed
error.
Bundletool version(s) affected Version: 1.5.0
Stacktrace (Specific app and user names omitted)
> java -jar path\to\bundletool-all.jar install-apks --apks=.\app\build\apks\MyApp.apks --adb="C:\path\to\Android\sdk\platform-tools\adb.exe"
The APKs have been extracted in the directory: C:\Users\myuser\AppData\Local\Temp\3404055966948919610
The APKs have been extracted in the directory: C:\Users\myuser\AppData\Local\Temp\3404055966948919610
ADB << rm -rf '/sdcard/Android/data/com.mycompany.myapp/files/local_testing'
ADB >> OK
ADB << mkdir -p '/sdcard/Android/data/com.mycompany.myapp/files/local_testing' && rmdir '/sdcard/Android/data/com.mycompany.myapp/files/local_testing' && mkdir -p '/sdcard/Android/data/com.mycompany.myapp/files/local_testing'
ADB >> OK
11:55:12 E/ddms: transfer error: fchown failed: Operation not permitted
11:55:12 E/Device: Error during Sync: fchown failed: Operation not permitted
[BT:1.5.0] Error: Pushing additional splits for local testing failed. Your app might still have been installed correctly, but you won't be able to test dynamic modules.
com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Pushing additional splits for local testing failed. Your app might still have been installed correctly, but you won't be able to test dynamic modules.
at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57)
at com.android.tools.build.bundletool.device.DdmlibDevice.pushApks(DdmlibDevice.java:205)
at com.android.tools.build.bundletool.commands.InstallApksCommand.lambda$pushSplits$8(InstallApksCommand.java:267)
at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:81)
at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:43)
at com.android.tools.build.bundletool.commands.InstallApksCommand.pushSplits(InstallApksCommand.java:267)
at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:179)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:89)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
Caused by: com.android.ddmlib.SyncException: fchown failed: Operation not permitted
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:716)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:406)
at com.android.ddmlib.Device.pushFile(Device.java:803)
at com.android.tools.build.bundletool.device.DdmlibDevice.pushApks(DdmlibDevice.java:189)
... 7 more
To Reproduce
- Connect a Samsung S21 to development machine.
- Have ready a project using Play Asset Delivery with multiple assets packs.
- Build AAB from command line:
CALL .\gradlew.bat :app:bundleDebug DEL .\app\build\apks\MyApp.apks
- Build APK set (line wrapped in this report for clarity):
java -jar path\to\bundletool-all.jar build-apks --bundle=.\app\build\outputs\bundle\bundleDebug\app-debug.aab --output=.\app\build\apks\MyApp.apks --local-testing
- Install APK set (line wrapped in this report for clarity):
java -jar path\to\bundletool-all.jar install-apks --apks=.\app\build\apks\MyApp.apks --adb="C:\path\to\Android\sdk\platform-tools\adb.exe"
Expected behavior APK set installation completing without errors. APK files installed on device.
Known workaround None.
Environment:
OS: Android 11
Device: Samsung S21 (regular version, non Plus, non Ultra)
Additional context
All assets packs folders together, as measured on development machine file system, weight around 3 GB.
No issues happen on other - older or less performant - devices.
BTW we also looked at #196 , without luck
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
[Samsung S10e] adb sideload Error:21 while installing ...
With a "new" refurbished S10e I followed this instruction: https://wiki.lineageos.org/devices/beyond0lte/install installed adb (V1.0.41 ...
Read more >TWRP adb sideload error - XDA Forums
I've installed a version 311, but the adb sideload just hangs when you start it. the pc doesn't recognise any adb devices. I...
Read more >ADB Sideload Not Working, Showing Error Cannot Read File
Are you facing ADB sideload not working problem? If so, here's a guide on how to fix ADB Sideload Not Working, Showing Error...
Read more >adb shell "operation not permitted" for every command
I did not even have to adb remount . The problem still remains, why am I unable to use the shell? – ealfonso....
Read more >bundletool - bytemeta
Sideload failing on Samsung S21 due to "ddms: transfer error: fchown failed". chao2zhang. chao2zhang OPEN · Updated 1 year ago ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for the report, I’m investigating the issue.
Fix is available in 1.6.0.