1. Are you ready for the Galaxy S20? Here is everything we know so far!

Splitting partition Micro SD card adoptable and portable storage through adb shell commands?

Discussion in 'Android Lounge' started by kumaranil13k, Jul 22, 2021.

  1. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter

    My mobile device have

    OS Android 6.0.1 Marshellow Processor Qualcomm Family cortex a53 Machine arrch 64 Architecture arm cortex a53 External memory card 64GB ROM 16 GB MOBILE NOT ROOTED

    It have option to formatting external card as internal but when I install user apps and move not all apps move to the internal formatted external as card some installs still on internal card. And occupies internal memory.

    I tried to partition Micro SD card from PC mini partition wizard and created two three partition

    first one of 20GB Fat32 Second one 20GB ext2 Third one 20 GB ext2.

    When I connected it to mobile it doesn't show any partition and asked.for.formatting in portable or internal when I said to format as internal it formatted and deleted all partitions.

    After searching googling founded some posts and answers in many forums and found the commands for and shell or terminal all emulator

    adb shell sm list-disks adoptable
    sm partition disk:179:160 mixed 25
    adb shell sm format private:179,3
    adb shell sm mount private:179,3
    adb shell pm set-install-location 2
    adb shell pm get-install-location

    But will these commands for partitioning 2 portions and I want 3 dedicated partitions

    1. First fat32 one mountable viewable for photos videos of fat32 partion readable in Windows to

    2. Second ext2 one as apps moving ext2 partition for fast apps functioning formatting as adoptable internal storage

    3. Third ext2 For backup of stock from or custom ROM a can't support more than 4gb file size
    I tried these commands from Windows adb shell but 'SM' file not found error come

    Now my queries are :-

    1. Do SM & PM: command solve my problem to dedicated partitions for proper functioning. Of adoptable storage. In my case of Android 6.0.1

    2. Does the SM & PM commands needs to be turned in terminal emulator or Windows DOS and shell

    3. Does SM & PM command compatible in Android 6.01 do it function in it or not

    4. Does SM & PM command need rooting the mobile first

    5. Does super user command SU should be running before SM & PM command but sinus not functioning to do SU function without rooting.

    6. Where to get binAry files SM & PM & SU commands and how can we infuse or download in mobile system folder or can work without infusing in mobile by running bootloader recovery tarp image can we run it .... command help please

    7. How to mount and view browwse ext2 external partions in Android as whenever I format it in ext2 it's unreadable from file manager or any app which app or command we can view or mount the ext2 partitions from Android mobile
    As I am novice and new to Android adb commands Linux commands to. So I need advice help to modify the command and precious advice. Kindly guide step by step?
     


    #1 kumaranil13k, Jul 22, 2021
    Last edited: Jul 22, 2021

    1. Download the Forums for Android™ app!


      Download

       
  2. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!!

    maybe take a look at this method instead of using adb
    https://forum.xda-developers.com/t/...dcard-to-internal-and-sdcard-storage.3583875/


    and as far as i know sm is for storage management and pm is for package management. so in terms of your sd card you want the sm commands.
     
    kumaranil13k likes this.
  3. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter


    Thank for sharing the batch files but the download link is not working 404 download page not found for "aftiss.cmd" (for Windows) or "aftiss.sh" files...Kindly share the files or links if you have files
     
  4. Davdi

    Davdi Android Expert

    Back in the Days of Android. 4 (Jellybean/ICS) before you could format a card as internal (Encrypted), there was Int2Ext4+ which required root, it would let you format a card as Memory (NOT storage), Linux swap and un-encrypted storage. useful when you on;y has 512Mb, or 1 Gb if lucky for memory. I suspect it's been deprecated long since though.
     
    ocnbrze likes this.
  5. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!!

    huh? yes formatting will delete anything that's on the card including partitions. what are you trying to do? are you asking for the same thing as the op?
     
  6. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!!

    sorry don't have them. this is a problem when you have old devices. support for them all around just does not exist over time.....especially developers over at xda. those files are usually stored on file sharing site. most of them are not free or they can be stored for only x amount of time. you can try sending a pm to the op of the thread i linked.
     
  7. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    Generally systems that use additional partitions require root, because the phone needs to know what you want to do with them, which generally means additions to the system software to mount partitions and set up pointers when booting. This is in fact the problem you are facing: you can partition the card, but the phone doesn't know to mount the other partitions because the system software only expects a single partition. And you can't add the extra instructions to the system software without root.

    The "adb shell pm set-install-location 2" command is for phones that support the old Android 2 style (partial) moving of apps to the regular (fat32) sd card. This will move less than just formatting the card as internal storage, so isn't what you want. Since this was deprecated many years ago it is quite possible that this command will do nothing at all on your phone (or it might: some manufacturers kept this way of moving apps in some of their phones after Google moved on from it).

    Personally I'd not recommend trying to move everything to an SD card anyway. The static parts of an app are fine, the worst that happens there is loading takes fractionally longer, but app data and caches, which are constantly being written, you don't really want on SD: it's much slower than internal storage, so using it for that may impact performance, and also cards have a finite number of write cycles before they wear out, so using them for data that are constantly being modified will shorten their lifetime before they fail (and lose your data when they do). It's your choice, but I'd personally have to be very desperate for space before I'd consider it.
     
    #7 Hadron, Jul 23, 2021
    Last edited: Jul 23, 2021
    Davdi, kumaranil13k and ocnbrze like this.
  8. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter

    Hadron fistly thanks. Buddy for precious time. Knowledge and reply

    Hadron bro yes u may be right that it require root to detect partitions of the card but many years ago with another mobile I tried after rooting the Android original file manager don't mount the ext2 ext4 file system card and show in file managers as forum some.expert told me.it may not support ext2 file system and you have to manually mount it through boot.init command and told the procedure I don't remember and that question answer was deleted now in another forum.if u can help to check if my mobile support ext2 partitions and the command to manually or auto mount the drives without rooting through fastboot boot twrprecovery.img as it to have root privileged or busy box infused in it.

    Hadrom bro yes you are right that's it's old technique still I am using old a droid 5.1 and Android 6.01 mobiles may be it work on them. I asked do PM SM need rooting privileged can it be infused in busy box or Installed within twrprecovery.img and used externally through adb shell command by fastboot boot twrprecovery.img (using root privileged of twrp externally without touching system boot of mobile device). Is it possible. if yes how?

    Above ocnbrze shared a batch file script to do it through windows

    https://forum.xda-developers.com/t/...dcard-to-internal-and-sdcard-storage.3583875/

    I googled and found a blog on tool kindly read that it says possible without root

    https://miui.blog/any-devices/sd-card-auto-formatting-tool-windows-linux/

    Secondly as you said " Since this was deprecated many years ago it is quite possible that this command will do nothing at all on your phone (or it might: some manufacturers kept this way of moving apps in some of their phones after Google moved on from it)." Might be opened in old phones so it's just not bad to give a try. Secondly I have tried to edit all manifest through all editor and change the default install location to external as card it worked in many apps but not with some..May be this works.

    Hadron bro thanks best nice advice suggestion opinion I totally agree and founded previously the same effect of loading performance when. I moved with linked long 4-5 years back after rooting it's slow down the operations. Yes tHats why I am not trying link2sd pro version as it moves data cache or links script apps to.sd..I just only want to move static files not complete data hex lib or cache randomly used files.

    I think the self made Android option of move to a card in Android 5.0 and formatting external as card as internal and then moving apps to SD just move partial static files not data cache lib hex randomly used files.

    I founded tried an option to edit apk mainfest through apk editor which make many apps movable it first modify manifest digitally sign recompile rebuild all files and then uninstalls and reistalls recoiled build file and then make app movable then I manually move installed app to external SD card formatted as internal hope it only move partial static files.

    Now concerning speed of memory card I had purchased Sandisk plus or pro models with high random writing reading speed yes still it will be slow then internal ROM waiting for invention of external SD cards of internal memory speed .

    Thanks buddy for reading replying if any more suggestion advice precious knowledge will be welcome. If I am wrong some where do correct me as I am.new novice for Android Linux . Thanks thanks a lot for it time opinion suggestions advices
     
    ocnbrze likes this.
  9. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter

    @ocnbrze thank a busy lots for it suggestion advice opinion yes you are right the mobile is old but want to test learn R&D testing of apps good in old sets after testing will learn and apply only selected on new 5g mobiles

    @ocnbrze bro I Google's and found today the files of aftiss.cmd (for Windows) in some other blogs to don't know authentication but will test it in total virus scan or metaspehere for.malware spyware and test it's coding to will try if it works on my unroofed mobile or not

    https://miui.blog/any-devices/sd-card-auto-formatting-tool-windows-linux/

    Hoping it works thank ocnbrze will try today or tomorrow thanks for your precious advice opinion and sharing your precious knowledge time thanks a lot bro.
     
  10. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter

    @ocnbrze bro you misunderstood or writes wrong way I mean to say that I partitioned the external as card in Windows through mini portion tool with 1st portion as fat 32 and second partition as ext2 and when plugged in my mobile device it gave error of damaged unreadable file system.of.external SD.card in storage it showed only first fat32 portion and asked me.to format the ad card I thought it detected first fat32 portion and will format it's first portion as internal adoptable storage but it formatted whole as card yes it have to you are right

    Just I want know if it's possible to format the second partition in ext2 extra file system and mount in file manager of Android as fat32 can't save big then 4gb file and the apps work slower in fat 32 if you can guide me to mount the external file system
     
  11. kumaranil13k

    kumaranil13k Well-Known Member
    Thread Starter

    @Davdi bro thank for replying yes you are right Android 4.0 the ROM used be 512 Mb or 1gb and Android 5.0 it's 8GB but 5-6GB occupied by OS and system apps and only 2 GB left spare for user data files and Android 6.0.1 it's ROM is 16GB in which 10-11 GB occupied by Android OS and so on with Android 7 . Only Android 8 OS occupies less space as per Google.comments.

    Still in android 4,5.1,6.01,7 have to forcefully use the format micro SD card as Internal memory or move apps to SF as Android OS and system apps occupies lots of space in the internal.memory as updates of Google.apps are growing day by day. Still many use and find in forums for.link2sd or apl2sd except for.those who have big phones of 64GB or 128GB ROM internal memory
     
Loading...

Share This Page

Loading...