meefik / linuxdeploy

Install and run GNU/Linux on Android
https://meefik.github.io/linuxdeploy
GNU General Public License v3.0
5.21k stars 679 forks source link

Linux Deploy ext4 and Adoptable Storage #820

Open Jedarc opened 7 years ago

Jedarc commented 7 years ago

From Android Enthusiasts.


I have a smartphone with the following settings:

enter image description here


And the following SD:

enter image description here


Ok, it's not a good SD, but that's what I have for today...

I was using SD as an extension to internal storage, and I was able to store applications and files there normally.

enter image description here enter image description here enter image description here


I would like to use Kali Linux through Linux Deploy (if there is no other way), but the system can only have a maximum of 4GB per account of the created .img file and the format of the card, which is very little in my opinion.

So I tried to follow this tutorial for an installation with more space for the operating system.

I created a three partitions:

enter image description here enter image description here

I've ejected the ext4 partition to install Kali Linux. And everything worked perfectly!

Well... Almost everything!

Kali Linux was working just the way I wanted it, but when I tried to use my smartphone as before, I realized that I could no longer transfer my applications to the fat32 partition I created for it.

enter image description here

The option to transfer applications to SD is no longer displayed.

I tried to transform part of SD as Adoptable Storage again but do it directly from the smartphone, formatting all the storage, undoing all created partitions.

I then followed this answer (both with adb, and with Root Essentials). Which again undid my partitions. But I re-did it again following the following steps:

  1. Format everything and use 50% for Adoptable Storage (by adb or Root Essentials).

  2. Remove the SD from the smartphone and insert it into the computer to create the other partitions (ext4) with MiniTool because Android Partition Tool (AParted) was not able to do this.

enter image description here

Ok, now I can transfer my applications to SD, and I also have the ext4 partition for installing Kali Linux, but now Linux Deploy can not see this partition mounted or ejected by Android.

Monted:

enter image description here

[12:36:31] >>> status
[12:36:32] Device: MotoG3
[12:36:32] Android: 7.1.2
[12:36:32] Architecture: armv7l
[12:36:32] Kernel: 3.10.49-MPI24.241-2.35-1-g4023d70
[12:36:32] Memory: 38/898 MB
[12:36:32] Swap: 273/511 MB
[12:36:32] SELinux: yes
[12:36:32] Loop devices: yes
[12:36:32] Support binfmt_misc: no
[12:36:32] Supported FS: ext2 ext3 ext4 f2fs fuseblk vfat 
[12:36:32] Installed system: unknown
[12:36:32] Status of components: 
[12:36:32] :: extra/dbus ... stopped
[12:36:32] :: extra/ssh ... stopped
[12:36:32] :: graphics/vnc ... stopped
[12:36:32] Mounted parts: 
[12:36:32]  ...nothing mounted
[12:36:32] Available mount points: 
[12:36:33] * /system  0.9/2.2 GB (ext4)
[12:36:33] * /data  4.5/11.8 GB (f2fs)
[12:36:33] * /cache  0.2/0.2 GB (ext4)
[12:36:33] * /fsg  0.0/0.0 GB (ext4)
[12:36:33] * /firmware  0.0/0.0 GB (ext4)
[12:36:33] * /persist  0.0/0.0 GB (ext4)
[12:36:33] * /mnt/runtime/default/emulated  4.5/11.8 GB (sdcardfs)
[12:36:33] * /storage/emulated  4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/runtime/read/emulated  4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/runtime/write/emulated  4.5/11.8 GB (sdcardfs)
[12:36:33] * /mnt/media_rw/f86f8583-23fb-d201-f063-858323fbd201  13.0/13.7 GB (ext4)
[12:36:33] * /mnt/runtime/default/f86f8583-23fb-d201-f063-858323fbd201  13.0/13.7 GB (sdcardfs)
[12:36:33] * /storage/f86f8583-23fb-d201-f063-858323fbd201  13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/runtime/read/f86f8583-23fb-d201-f063-858323fbd201  13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/runtime/write/f86f8583-23fb-d201-f063-858323fbd201  13.0/13.7 GB (sdcardfs)
[12:36:33] * /mnt/expand/bd43c04c-2500-40bd-9325-1de5ae577eb6  14.2/14.8 GB (f2fs)
[12:36:33] Available partitions: 
[12:36:34]  ...no available partitions
[12:36:34] <<< status

Ejected:

[12:39:49] >>> status
[12:39:49] Device: MotoG3
[12:39:49] Android: 7.1.2
[12:39:49] Architecture: armv7l
[12:39:49] Kernel: 3.10.49-MPI24.241-2.35-1-g4023d70
[12:39:49] Memory: 42/898 MB
[12:39:49] Swap: 216/511 MB
[12:39:49] SELinux: yes
[12:39:49] Loop devices: yes
[12:39:49] Support binfmt_misc: no
[12:39:49] Supported FS: ext2 ext3 ext4 f2fs fuseblk vfat 
[12:39:49] Installed system: unknown
[12:39:49] Status of components: 
[12:39:49] :: extra/dbus ... stopped
[12:39:49] :: extra/ssh ... stopped
[12:39:49] :: graphics/vnc ... stopped
[12:39:49] Mounted parts: 
[12:39:49]  ...nothing mounted
[12:39:49] Available mount points: 
[12:39:49] * /system  0.9/2.2 GB (ext4)
[12:39:49] * /data  4.5/11.8 GB (f2fs)
[12:39:50] * /cache  0.2/0.2 GB (ext4)
[12:39:50] * /fsg  0.0/0.0 GB (ext4)
[12:39:50] * /firmware  0.0/0.0 GB (ext4)
[12:39:50] * /persist  0.0/0.0 GB (ext4)
[12:39:50] * /mnt/runtime/default/emulated  4.5/11.8 GB (sdcardfs)
[12:39:50] * /storage/emulated  4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/runtime/read/emulated  4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/runtime/write/emulated  4.5/11.8 GB (sdcardfs)
[12:39:50] * /mnt/expand/bd43c04c-2500-40bd-9325-1de5ae577eb6  14.2/14.8 GB (f2fs)
[12:39:50] Available partitions: 
[12:39:50]  ...no available partitions
[12:39:50] <<< status


Is it possible to do what I'm trying? Use half the SD as Adoptable Storage and the rest as ext4 to install Kali Linux? Am I forgetting to set something up?

sithsupersu commented 7 years ago

I've been trying for a while to do half the (SD 128g) ext4 and fat32 and/or adoptable storage. I haven't been able to get it.

irvine37 commented 6 years ago

you can say that the partioning was successfull. if you see an available partition like

/dev/block/mmcblk1p2

this is the ext part on your sd card

russellcwarren commented 6 years ago

try using link2sd from playstore

https://techwiser.com/expand-internal-memory-of-android/