1

My phone is Samsung Galaxy SM-J7 and it's rooted. I heard a linux command which could format the entire operating system from root directory (I do not want to mention it here). I've been curious to know what happens if I try it on Android, and I sadly did so today using tsudo on Termux. After executing that, I realized I'm playing with fire.
However, while everything was being deleted, I stopped Termux app so my device was partially formatted. After a minute, it turned out that my phone does not even accept my password. Hence I decided to wipe its data using Google Device Finder. I did so and also a factory reset, and my device booted up with a long delay afterwards. Anyway, almost every thing went well, but I saw that Wifi and Mobile data are not working...
Now, is there a way to repair my operating system?
Any help will be appreciated.
Edit:
In order to see what filesystems I have on my device (as @IrfanLatif asked), I installed ADB Shell and executed this command in Command Prompt:

adb shell mount > result.txt

This is the content of result.txt after executing the command:

rootfs / rootfs ro,seclabel 0 0

tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=701408k,nr_inodes=175352,mode=755 0 0

devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,seclabel,relatime 0 0

selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0

/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0

none /acct cgroup rw,relatime,cpuacct 0 0

none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=701408k,nr_inodes=175352,mode=750,gid=1000 0 0

tmpfs /mnt tmpfs rw,seclabel,relatime,size=701408k,nr_inodes=175352,mode=755,gid=1000 0 0

tmpfs /mnt/secure tmpfs rw,seclabel,relatime,size=701408k,nr_inodes=175352,mode=700 0 0

tmpfs /mnt/secure/asec tmpfs rw,seclabel,relatime,size=701408k,nr_inodes=175352,mode=700 0 0

none /dev/cpuctl cgroup rw,relatime,cpu 0 0

/dev/block/platform/13540000.dwmmc0/by-name/SYSTEM /system ext4 ro,seclabel,noatime,block_validity,norecovery 0 0

/dev/block/platform/13540000.dwmmc0/by-name/EFS /efs ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0

/dev/block/platform/13540000.dwmmc0/by-name/CACHE /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered 0 0

/dev/block/platform/13540000.dwmmc0/by-name/USERDATA /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0

/dev/block/platform/13540000.dwmmc0/by-name/PERSDATA /persdata/absolute ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0

/dev/block/platform/13540000.dwmmc0/by-name/CPEFS /cpefs ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0

tmpfs /storage tmpfs rw,seclabel,relatime,size=701408k,nr_inodes=175352,mode=755,gid=1000 0 0

/dev/block/loop0 /su ext4 rw,seclabel,noatime,data=ordered 0 0

/data/knox/tmp_sdcard /mnt/knox sdcardfs rw,seclabel,nosuid,nodev,relatime,mask=0077 0 0

/data/knox/sdcard /mnt/knox/default/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=1015,multi_user,mask=0006 0 0

/data/knox/sdcard /mnt/knox/read/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,mask=0027 0 0

/data/knox/sdcard /mnt/knox/write/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,mask=0007 0 0

/data/knox/secure_fs/enc_media /mnt/shell/enc_media sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,reserved=20MB 0 0

/data/media /mnt/runtime/default/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,multi_user,mask=0006,reserved=20MB 0 0

/data/media /storage/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,multi_user,mask=0006,reserved=20MB 0 0

/data/media /mnt/runtime/read/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,multi_user,mask=0027,reserved=20MB 0 0

/data/media /mnt/runtime/write/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,multi_user,mask=0007,reserved=20MB 0 0

/dev/block/vold/public:179,33 /mnt/media_rw/4482-1BED vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/public:179,33 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/mnt/media_rw/4482-1BED /mnt/runtime/default/4482-1BED sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,mask=0006 0 0

/mnt/media_rw/4482-1BED /storage/4482-1BED sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,mask=0006 0 0

/mnt/media_rw/4482-1BED /mnt/runtime/read/4482-1BED sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,mask=0022 0 0

/mnt/media_rw/4482-1BED /mnt/runtime/write/4482-1BED sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,mask=0022 0 0

Guess I have lots of filesystems.

Edit2:

Now, take a look at this:

IMG:

Along with message,
Device does not have DRK, please install...

I saw this during the first reboot after Odin passed the first operation. Actually I had trouble downloading the firmware from SamMobile, so I downloaded a firmware from someware else. The downloaded zip file contained only one file with extension .md5. And the instructions told me to set it in AP section on Odin.

  • 3
    Flash a ROM – either the original one, or a custom ROM. And consider trying hot stuff in an emulator first next time :) – Izzy Dec 31 '18 at 18:47
  • 1
    Linux and Android have some major differences in root directory. My guess is that the said behavior is due to /persist deleted, but can't tell for sure unless I don't know what you exactly executed and what are your mount points in rootfs, though they are same on most devices. – Irfan Latif Dec 31 '18 at 22:36
  • @Irfan Latif This is what I executed, tsudo rm -rf /. Now I'll try to copy Root Explorer apk file to my phone via my PC and check what's deleted. Though I hope /su/bin is not deleted and the root access is intact. – Javad Bayat Jan 1 at 10:17
  • @JavadBayat I don't why you tried this command. This recursively deletes everything it can subject to DAC and MAC permissions it can have, except the read-only filesystems. Your OS would be intact because that lives on read-only /system filesystem. Reflashing firmware is best option for you right now. – Irfan Latif Jan 1 at 10:22
  • @IrfanLatif You see, I'm not an expert in Android operating system. I know mostly stuff about Windows. Could you explain more on how I can reflash frimware? And you were right, I found no folder named persist at root directory. And I rooted my phone again because everything in /su was deleted. – Javad Bayat Jan 1 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.