I wrote this originally for the Dynalink Android TV box but I think other boxes can work using this method also, (android 10+)
so after messing with trying to get adopted storage working for a few hours and trying about 30 different drives and sdcards and other types of storage (errors included unsupported usb drive, cannot format, device safely ejected, there is an issue click to fix ..etc)
I ended up just doing it manually from adb and eventually got it working, this should work with any drive / sdcard as long as it's recognized by the system..
Do the next steps at own risk.
Insert your usb drive (as long as its recognized) (note the following will erase the storage you are trying to use.)
in adb shell type
(wait about 5 seconds before each command, don't just copy and paste!).
sm list-disks
find your drive in my case it was Disk8,0
sm has-adoptable true
sm set-force-adoptable on
sm partition disk:8,0 public
sm partition disk:8,0 private
sm list-volumes
in my case private:8,2 unmountable (note if you don't see "private:8,2 unmountable", then repeat the two partition commands above) , once it shows up continue.
sm format private:8,2
sm set-force-adoptable off
sm set-force-adoptable on
done.
reboot
Go to settings - Device preferences - storage and you should now see your drive under device storage - click on USB Drive - now you can click Migrate data to this storage and enjoy having all the space you need :)...
Hope this helps.
I have tried this on 4 sdcards and it worked on every one 8gb, 16gb, 32gb and a 64gb, I have not tried this on USB flash drives or actual hard drives but I assume it will work too.
β
Edit:
I did find one bug when you put the device into standby mode (power button), after about 5 or 10 minutes it goes into a deep sleep it turns the device off (including usb accessories) you can tell because the red light on the box will shut off,
Edit2:
OK I found this bug goes away by installing some apps or maybe it was because of how I was powering the device, I changed to a proper power/ usb splitter otg cable and the usb storage/hub stays on now without wakelocks even when the device goes to sleep, again im not sure if this is because of the cable or if android keeps it awake because apps got installed to the external storage...
if your hub still goes on standby you can try these suggestions.
when the device wakes it doesn't re-connect the drive (although it looks connected, it's not) and this can cause some issues, replugging drive or rebooting is a quick fix, so after messing with this for awhile now this box seems to ignore most screen on and wakelock apps, but so far the only solution(s) are these.
- I found a app called wakelock-revamp so far it keeps the device awake after pressing power. (just need the cpu one enabled)
- Don't turn device off using power button or screensaver
-
Maybe some automated tool like tasker can run
sm set-force-adoptable on, on device wake? this forces the system to remount the storage.... - if you like where the device powers off fully , you can use tasker - setup a screen on state, for task set "Turn on" with block time of 900, then add another event script - "adb wifi' with command "sm set-force-adoptable default" . now after it comes out of sleep mode it will remount the storage.
so far option 1 is working the best for me, but I will try to find more alternatives.
β
Gigabyte_1000.
So I watched this YT video based on this reddit post which I can vouch for and I can confirm that the method in this post does indeed work...