Manually setup adopted storage for troublesome devices.

by gigabyte_1000

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.

Image

​

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.

  1. I found a app called wakelock-revamp so far it keeps the device awake after pressing power. (just need the cpu one enabled)
  2. Don't turn device off using power button or screensaver
  3. Maybe some automated tool like tasker can run sm set-force-adoptable on , on device wake? this forces the system to remount the storage....
  4. 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.

urbanman2004

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...

spider8489

Thanks so much, Gig! I will try this method tomorrow, on my Dynalink. Like you, I've tried multiple USB drives, without success. My fingers 🀞are crossed! πŸ‘

spider8489

Hiya Gig! My update is that after following your instructions, I successfully added a 16 GB USB drive and am happily moving many apps to the drive! It went exactly as you outlined. To say I'm pleased is an understatement! I will share your post, to help others. Thanks again! πŸ‘πŸ€£πŸ‘

mdpgc

After I entered the sm format line (I used a 128gb flash drive) my dynalink box restarted by itself. After the reboot I checked if the drive was there. It was. So I reboot myself again just to make sure it was still reading the drive and it was. I guess I didn't need the other two lines or do I need to reconnect and insert the last two lines.

johnnybordello_71

Hi Gigabyte_1000,

I just got my hands on the Dynalink and tried the instructions you posted.

It worked after a few tries. My only issue with it is that if my USB drive (Sandisk 64GB) is ejected or unplugged from the OTG cable I get an error message when I try to download anything from downloader or filelinked (something along the lines of unknown error check url / unexpected error... sd card already exists). I did skip this step from the instructions: sm partition disk:8,0 public because i wanted to partition the drive as private only. Once you get the usb drive recognized it will then appear in settings under storage as part of device storage and not removable storage. Not sure if there's something in the settings to do with the fact that I can't download when the usb drive is not connected or the fact that I skipped the stepped mentioned above. Is that normal? Any ideas? Please let me know if there's anything I can try. Thanks

spider8489

Hiya Gig! An update from my earlier posts. I just added a 16 GB USB drive to my Onn Android 10 box! I used your directions and it worked flawlessly! Before USB, I had 1 GB available space. After USB installed, I have 3 GB available! Thanks again for your support! πŸ‘πŸ‘

dpepsi27

Do you do this on the device itself or do you need a computer? Thanks

DubEDoLLarS

Any luck getting this to work on the google chromecast with tv? An update recently messed up adoptable storage on android tv 10. Every time I set as public it soft reboots to the google tv logo. Same when I set to private. Any way around this?