Sample Header Ad - 728x90

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

Latest Questions

0 votes
2 answers
657 views
Bluetooth is not turning on NetHunter Android
I am using Kali NetHunter on a rooted Android device, and I'm encountering an issue with Bluetooth. Whenever I try to enable Bluetooth through the GUI or using the command line, it simply doesn't turn on. I can see the Bluetooth icon, but it stays stuck on "Turning on." It was working in the beginni...
I am using Kali NetHunter on a rooted Android device, and I'm encountering an issue with Bluetooth. Whenever I try to enable Bluetooth through the GUI or using the command line, it simply doesn't turn on. I can see the Bluetooth icon, but it stays stuck on "Turning on." It was working in the beginning, I could connect to headphone, I sent a video file from PC to tablet via Bluetooth.
service bluetooth status
>bluetooth is not running ... failed! Then I started
service bluetooth restart
>Stopping bluetooth: /usr/sbin/bluetoothd.\ >Starting bluetooth: bluetoothd. but this does not restart the Bluetooth. Right after start command, service Bluetooth status still says "Bluetooth is not running ... failed!" I already ran these commands:
sudo apt-get update
sudo apt-get install bluetooth bluez
sudo systemctl start bluetooth
sudo systemctl enable bluetooth
lsusb command shows this: >Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\ >Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub It does not show anything about the Bluetooth adapter I also added kali-tools-bluetooth, but this did not help either.
Yilmaz (101 rep)
Dec 29, 2024, 02:08 AM • Last activity: Jul 31, 2025, 08:29 AM
19 votes
4 answers
173146 views
Why can't I get root access from shell?
> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called [SD Maid][1] that is able to operate with root permissions. [1]: https://play.google.com/store/apps/details?id=eu.thedarken.sdm&hl=en
> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called SD Maid that is able to operate with root permissions.
Kshitiz Sharma (489 rep)
Feb 21, 2013, 10:16 AM • Last activity: Jul 29, 2025, 09:37 AM
5 votes
1 answers
4523 views
MTP not working under Android 6
I am running out of Ideas how to get MTP working _again_... I am simply not getting the dialog again on my android, asking me wether I want just charging, or MTP or Picture mode... **Until most recently, it was easy: Use a USB cable, concect it to my Ubuntu 16.04 Laptop, get the mentioned choice/app...
I am running out of Ideas how to get MTP working _again_... I am simply not getting the dialog again on my android, asking me wether I want just charging, or MTP or Picture mode... **Until most recently, it was easy: Use a USB cable, concect it to my Ubuntu 16.04 Laptop, get the mentioned choice/approval box...** and voilà the Tablet appeared as an MTP device in the Ubuntu ‚file explorer‘ (caja) nicely auto-mounted. * got an Samsung Galaxy S2 tablet * running Android 6.01 * it worked until recently in this configuration I already followed some advice: * I made the developer options visible (by tapping the about device info thrice) * enabled USB debugging (which some sources say, is something to watch out for) * dialed on the phone menu *#0808# → which shows I'am on (o)AP and on MTP + ADB mode just like I should (this radio box btw only holds its state, if USB debugging is enabled) also... * tried different USB ports * tried different cables * tried with another device (MacBook. Thus I have no reason to believe, I messed something up on the host machine OS side... Ubuntu is very stable anyway) * External Store (4kb) under Settings→Applications→“Show System Apps” is on well, one last clue: * Settings → Tethering has the USB switch grayed out „USB cable not connected“. Althoug it clearly is. And I can recharge my tablet through it (otherwise I would have certainly noted...) Device is not rooted. No other glitches. Are there maybe some log files (now that Dev mode is enabled) to check out what might got wrong? Not looked/understood ADB yet. So I couldn't tell you, if that works. Anyway, no dialog to choose upon connecting. I am out of ammo :-( **Thank you for any piece of advice...**
Frank N (151 rep)
Oct 26, 2016, 04:30 AM • Last activity: Jul 13, 2025, 03:11 AM
1 votes
3 answers
2629 views
How to use terminal on Android to ssh access my server?
Can I ssh into a Linux Server from my Android device?
Can I ssh into a Linux Server from my Android device?
NINJA (29 rep)
Jun 9, 2015, 03:13 PM • Last activity: Jun 26, 2025, 07:38 AM
7 votes
3 answers
24011 views
How to Play Sound from Termux when using Linux?
I have a problem with audio streaming that I can not listen audio from Pulseaudio when using VNC with a Linux Desktop Environment. However it works if I export the audio to XSDL. But the problem is that after I exit the application the sound does not work in the background. I know that Pulseaudio on...
I have a problem with audio streaming that I can not listen audio from Pulseaudio when using VNC with a Linux Desktop Environment. However it works if I export the audio to XSDL. But the problem is that after I exit the application the sound does not work in the background. I know that Pulseaudio only supports Xorg servers, so how to stream audio to VNC or any other application on Android and to run it in the background. I know that there is an application Simple Protocol Player that listens to pulseaudio sound from Xorg Server, but it does not work for me and I do not know the reason.
Maher_2000 (113 rep)
Dec 24, 2018, 08:08 AM • Last activity: Jun 17, 2025, 10:40 PM
1 votes
3 answers
12932 views
Rooting Samsung Galaxy S II GT-i9100
How does one root a Samsung Galaxy S II GT-i9100 (with its original Android 2.3 Gingerbread), preferably under Linux Mint? This questions pertains specifically the GT-i9100 version (not GT-i9100G nor GT-i9100T, et cetera), which currently has no entry under the [rooting index][1]. I am particularly...
How does one root a Samsung Galaxy S II GT-i9100 (with its original Android 2.3 Gingerbread), preferably under Linux Mint? This questions pertains specifically the GT-i9100 version (not GT-i9100G nor GT-i9100T, et cetera), which currently has no entry under the rooting index . I am particularly looking for a rooting method which does not wipe the data on the phone, as [I am hoping to recover data afterwards](https://android.stackexchange.com/questions/89133/data-recovery-on-boot-looped-samsung-galaxy-s-ii-gt-i9100) . I have an 8GB external SD card.
Timotheos (155 rep)
Nov 24, 2014, 02:49 PM • Last activity: May 17, 2025, 10:05 PM
2 votes
3 answers
2433 views
Modifications of vendor image on Android 10
There is a vendor image in my device I want to change (unpack/mount, doing changes, pack/umount). My purpose is to update `boot.img` with my new kernel (in a rooted device). Unfortunately, it does not work due to incompatible versions between a newly compiled kernel (my compilation) to the previous...
There is a vendor image in my device I want to change (unpack/mount, doing changes, pack/umount). My purpose is to update boot.img with my new kernel (in a rooted device). Unfortunately, it does not work due to incompatible versions between a newly compiled kernel (my compilation) to the previous kernel modules stored in vendor.img. As I figure it, I need to update the old ko executables stored in vendor.img in my product. The first step is to do dd from my device and adb pull it out to my build environment. While I tried to do a mount on vendor.img, I discovered it not working due share_blocks attribute blocking it to mount as RW (dmesg wrote: "...unsupported optional features (4000)"), To solve it, running the following command e2fsck -y -E unshare_blocks vendor.img will disable the share_blocks feature that prevented me to do mount as RW. Of course, doing mount RW works correctly. In the last phase, I tried to replace files in the vendor filesystem and then I discovered another challenge into my way, Unfortunately, there was a problem with limited space in the file system, For example: In case I want to replace the kernel module called abc.ko, deleting the file doesn't show any new free space in the file system. At this point, I can't update the old kernel modules with the new ones (compatible with the newly compiled kernel). Of course, running df -h . returned no free space and 100% used. Does anyone have any idea what I need to do?
sivandahan (43 rep)
Sep 19, 2021, 11:28 AM • Last activity: Mar 27, 2025, 03:25 PM
8 votes
1 answers
9527 views
How to boot Ubuntu persistent live USB on Android?
I'm discovering the possibilities offered by persistent live USB using Ubuntu 19.10 and I was wondering if it would be possible to boot with Ubuntu on Android (i.e. using your computer capabilities through your smartphone) using those multi-plug USB sticks which have both USB3 and micro-USB2. In oth...
I'm discovering the possibilities offered by persistent live USB using Ubuntu 19.10 and I was wondering if it would be possible to boot with Ubuntu on Android (i.e. using your computer capabilities through your smartphone) using those multi-plug USB sticks which have both USB3 and micro-USB2. In other way: can I get some kind of a boot menu on an Android device in order to boot with a persistent live USB in order to access my Linux computer tools and setup from a wider range of devices?
Etsaf
Jan 12, 2020, 11:01 AM • Last activity: Feb 9, 2025, 04:42 PM
1 votes
1 answers
348 views
How to install Ubuntu OS on an Android phone?
I am not sure where to start all help is welcome. I have a Samsung Phone and computer for flashing.
I am not sure where to start all help is welcome. I have a Samsung Phone and computer for flashing.
Thomas
Feb 7, 2025, 03:10 PM • Last activity: Feb 7, 2025, 04:55 PM
55 votes
10 answers
425576 views
Use an Android tablet as a Wacom drawing tablet for a PC?
Since a nice Wacom tablet is a bit pricey, especially for someone like me who doesn't do much graphic editing, I was wondering if it is possible to use a tablet (i.e. my Nexus 7) as a Wacom-esque drawing tablet when connected to a Linux computer? I did a bit of searching, however most of the info I...
Since a nice Wacom tablet is a bit pricey, especially for someone like me who doesn't do much graphic editing, I was wondering if it is possible to use a tablet (i.e. my Nexus 7) as a Wacom-esque drawing tablet when connected to a Linux computer? I did a bit of searching, however most of the info I found is for using a Wacom tablet on an Android device. I've never used a Wacom device, however I have been doing some graphic editing in Gimp, and think it would be much easier than just using a mouse. And since I have a Nexus 7, it seemed like the logical place to start. I would have to use the Nexus as a USB peripheral for the computer, and I don't know if it is possible to transmit the touch screen coordinates to the PC. If anyone can point me in the right direction, I'd appreciate it!
Garrett Fogerlie (705 rep)
Mar 6, 2013, 04:10 PM • Last activity: Feb 5, 2025, 02:54 PM
6 votes
0 answers
20028 views
How to install Google Play or other repo's on Waydroid?
Having just installed [`waydroid`][1], how is the Google Play Store installed? ``` $ sudo waydroid shell /system/bin/sh: No controlling tty: open /dev/tty: No such file or directory /system/bin/sh: warning: won't have full job control :/ # whoami root :/ # exit ``` ``` $ waydroid status Session: RUN...
Having just installed waydroid , how is the Google Play Store installed?
$ sudo waydroid shell
/system/bin/sh: No controlling tty: open /dev/tty: No such file or directory
/system/bin/sh: warning: won't have full job control
:/ # whoami
root
:/ # exit
$ waydroid status
Session:	RUNNING
Container:	RUNNING
Vendor type:	MAINLINE
Session user:	nicholas(1000)
Wayland display:	wayland-0
$ waydroid --version
1.3.1
The directions are: waydroid app install xyz.apk Which is easy enough. However, there's no mention per se of installing the Google Play Store and secondary sources would indicate that alternates must be used. Looking to install some sort of repository to pull in mainstream apps like gmail. What repo's can be installed?
Nicholas Saunders (191 rep)
Sep 11, 2022, 07:46 AM • Last activity: Jan 31, 2025, 04:10 AM
0 votes
1 answers
4549 views
Block Instagram for Android to access the Internet, using a software like SQUID on my Laptop/Desktop
Is there any way I could block Android Apps for example Instagram from accessing the Internet, using the SQUID software or something similar on my Personal Computer?
Is there any way I could block Android Apps for example Instagram from accessing the Internet, using the SQUID software or something similar on my Personal Computer?
deadshotpro (11 rep)
Apr 11, 2019, 07:41 AM • Last activity: Jan 27, 2025, 03:08 PM
1 votes
1 answers
204 views
Termux Running easyrsa as `sudo -u root` gives me No such file or directory
I'm trying to run a sh script (easyrsa) while being in `sudo -u root` environment. sudo -u root sh /data/data/com.termux/files/home/openvpn/easy-rsa/easyrsa3/easyrsa This gives me an error telling me that OpenSSL is not present (I assume because I'm running it in a different environment) And when I...
I'm trying to run a sh script (easyrsa) while being in sudo -u root environment. sudo -u root sh /data/data/com.termux/files/home/openvpn/easy-rsa/easyrsa3/easyrsa This gives me an error telling me that OpenSSL is not present (I assume because I'm running it in a different environment) And when I try sudo -u root /data/data/com.termux/files/home/openvpn/easy-rsa/easyrsa3/easyrsa It gives me "No such file or directory". I tried every possible combination of commands but just can't seem to get it right. The main issue is I'm trying to run easyrsa from a web dashboard for generating certificates, and this dashboard is running as sudo -u root and for some strange reason, it just can't find the files in termux home. /data/data/com.termux/files/home/openvpn/easy-rsa/easyrsa3/easyrsa is my location of the easyrsa shell file
xMidNight-. (21 rep)
Dec 18, 2024, 10:14 PM • Last activity: Dec 20, 2024, 03:38 AM
1 votes
1 answers
3311 views
Blank screen when accessing Kali Linux
I'm trying to access Linux Deploy, Kali Linux via a VNC Client on my Android phone. I could access it, but I get a blank screen. How to fix it?
I'm trying to access Linux Deploy, Kali Linux via a VNC Client on my Android phone. I could access it, but I get a blank screen. How to fix it?
DrWongKC (121 rep)
Jan 26, 2017, 02:45 PM • Last activity: Dec 14, 2024, 10:00 AM
1 votes
1 answers
201 views
Backup Android Phone to PC
I would like to backup all the data on my phone. I saw that the Google Drive backup of my phone shown below, only encompases about 200MB. But my phone storage is 64 GB. From that about 10GB are WhatsApp messages, that are backed up to google drive, but in a propriatary file format. When the smartpho...
I would like to backup all the data on my phone. I saw that the Google Drive backup of my phone shown below, only encompases about 200MB. But my phone storage is 64 GB. From that about 10GB are WhatsApp messages, that are backed up to google drive, but in a propriatary file format. When the smartphone storage is opened in a file explorer only a subset of the files in "Internal Storage" are shown, which are themselves only a fraction of the files located on the smartphone, eg. WhatsApp media. My question should be simple, but seems suprisingly hard to answer: How can I back up as much of the data from my phone as possible? I use a Google Pixel 4 and Arch Linux google Backup is only 200MB
TheFibonacciEffect (161 rep)
Dec 5, 2024, 10:02 PM • Last activity: Dec 6, 2024, 10:38 AM
4 votes
1 answers
4341 views
How to disable dm-verity on `Treble` , `system-as-root` device?
**Background:** Please check following links 1. [How to disable dm-verity on Android with “user” build type ROM?][1] 2. [Stuck in boot-loop when unpack and pack `system.img`?][2] **Update:** So, I am trying to disable dm-verity on my Samsung S10 5G device to successfully flash an unpack, unmodified...
**Background:** Please check following links 1. How to disable dm-verity on Android with “user” build type ROM? 2. Stuck in boot-loop when unpack and pack system.img? **Update:** So, I am trying to disable dm-verity on my Samsung S10 5G device to successfully flash an unpack, unmodified and then packed system.img.ext4.lz4 file(with another ROM files) using Odin. I have tried the following things: 1. Removed avb flag from boot.img with following commands:
# magiskboot dtb boot.img print -f
> #345900: fstab
│  [compatible]: [android,fstab]
├── #345940: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect,avb]
│      [status]: [ok]
└── #346156: vm-linux






#343692: fstab
│  [compatible]: [android,fstab]
├── #343732: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect,avb]
│      [status]: [ok]
└── #343948: vm-linux








# magiskboot dtb boot.img patch

# magiskboot dtb boot.img print -f
> #345900: fstab
│  [compatible]: [android,fstab]
├── #345940: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect]
│      [status]: [ok]
└── #346152: vm-linux






#343692: fstab
│  [compatible]: [android,fstab]
├── #343732: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect]
│      [status]: [ok]
└── #343944: vm-linux
2. Removed avb and verify flags from dtbo.img with following commands:
# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor





#126596: fstab
├── #126608: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]# magiskboot dtb dtbo.img print -f
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126796: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor







# magiskboot dtb dtbo.img patch


# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor





#126596: fstab
├── #126608: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126788: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor





#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
3. Patched ramdisk.cpio with following commands:
# magiskboot cpio ./initrd 'patch false true'
Loading cpio: [./initrd]
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [etc/recovery.fstab]
Dump cpio: [./initrd]

# magiskboot cpio ./initrd extract
# cat etc/recovery.fstab
> # Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#     * Neither the name of The Linux Foundation nor the names of its
#       contributors may be used to endorse or promote products derived
#       from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#                                                
/dev/block/bootdevice/by-name/boot        /boot           emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/recovery    /recovery       emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/system      /               ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/userdata    /data           ext4        defaults                  wait,length=-16384
/dev/block/bootdevice/by-name/cache       /cache          ext4        defaults                  recoveryonly
/dev/block/mmcblk0p1                      /sdcard         vfat        defaults                  recoveryonly
/dev/block/bootdevice/by-name/sec_efs     /efs            ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/sec_efs     /sec_efs        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/carrier     /carrier        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/hidden      /preload        ext4        defaults                  recoveryonly

# FOTA
/dev/block/bootdevice/by-name/apnhlos     /modem          emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/modem       /mdm            emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/dsp         /dsp            emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/vendor      /vendor         ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/product     /product        ext4        defaults                  recoveryonly

# Add misc for GOTA
/dev/block/bootdevice/by-name/misc        /misc           emmc        defaults                  recoveryonly

# Samsung ODE
/dev/block/bootdevice/by-name/keydata     /keydata        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/keyrefuge   /keyrefuge      ext4        defaults                  recoveryonly

#Auto-generated code by FOTA Portal
/dev/block/bootdevice/by-name/dtbo	/dtbo	emmc	default	recoveryonly
After patching, I have converted dtbo.img to dtbo.img.lz4 using lz4 compression tool and created new recovery.img image with patched initrd file. After that. I have tried to flash magisk_patched.tar file with AP contents as one of the following: - Overwritten all three patched file in points 1, 2 and 3 above. -> Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen. - Overwritten 1.boot.img and 2.dtbo.img.lz4 above. -> Successfully rooted but when trying to edit the system_root partition then I am facing the following problem:
D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # mount -o rw,remount /system
beyondxq:/ # cd system
beyondxq:/system # echo "Test /system mounting" > temp.txt
beyondxq:/system # cat temp.txt
Test /system mounting
beyondxq:/system # cd ..
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # echo "Test /system_root mounting" > temp.txt
/system/bin/sh: can't create temp.txt: Read-only file system           ---> Error here
1|beyondxq:/ # cat system/temp.txt
Test /system mounting
beyondxq:/ # cat system_root/temp.txt
cat: system_root/temp.txt: No such file or directory              ---> Verify: File not created
1|beyondxq:/ # exit
1|beyondxq:/ $ exit

D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb root              ---> It didn't work as the next command is not working

D:\>adb remount                            
Not running as root. Try "adb root" first.

D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # ls sdcard
Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones Samsung selinux_policy_modified
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # cp sdcard/selinux_policy_modified /system_root/sepolicy
cp: /system_root/sepolicy: Permission denied      ---> Permission Denied here
1|beyondxq:/ #
- Overwritten 1.boot.img and 2.dtbo.img.lz4 above with unpack and packed system.img.ext4.lz4 -> The result is boot-loop after successful flashing. Please suggest what went wrong or am I missing any step.
Vatish Sharma (1101 rep)
Nov 14, 2019, 12:24 PM • Last activity: Oct 27, 2024, 07:03 PM
16 votes
4 answers
68484 views
How to unpack/repack system.img of android ROM?
I have OnePlus 6T device which has A/B partition system and has a ROM of user type i.e `[ro.build.type]: [user]`. This device is rooted with Magisk. I have a requirement([Want to place customized sepolicy file under system_root directory][1]) to modify `system.img`. I have tried different tools like...
I have OnePlus 6T device which has A/B partition system and has a ROM of user type i.e [ro.build.type]: [user]. This device is rooted with Magisk. I have a requirement(Want to place customized sepolicy file under system_root directory ) to modify system.img. I have tried different tools like: 1. simg2img :
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/img-tools$ ./simg2img system.img sys.raw
Invalid sparse file format at header magi
Failed to read sparse file
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/img-tools$
2. imgtools
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ sudo ./imgtool system.img extract
[sudo] password for OMEN: 
system.img is not a recognized image. Sorry
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$
3. and more tools even on windows.. but none of them is capable of parsing my system.img. I have copied system.img directly from OnePlus6T ROM setup which installs Android 9 on this device without any issue. Any help on: 1. How to fix the system.img so it will be extracted and repacked fine? 2. Any command that can unpack/repack system.img? 3. Any working tool to accomplish this task? **Update 1**: I have run file system.img and I found that its ext2 image and the tools support ext4.
system.img: Linux rev 1.0 ext2 filesystem data, UUID=d09c08e9-628d-590e-a610-3a14de2a8db0 (extents) (large files) (huge files)
**Update 2**: Tried to find the magic number and have following result:
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ xxd system.img | head
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................
OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$
**Update 3** Fing the image already unpacked. So to add the required file, I have mount the image as sudo mount -o loop system.img system_mount and then tried to copy the contents to another folder with cp system_mount/* system/ so that I can add the required file and make new image out of it but I got following errors:
root@OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea# mkdir system && cp system_mount/* system/
cp: omitting directory 'system_mount/acct'
cp: cannot stat 'system_mount/bin': No such file or directory
cp: cannot stat 'system_mount/bt_firmware': No such file or directory
cp: cannot stat 'system_mount/bugreports': No such file or directory
cp: cannot stat 'system_mount/cache': No such file or directory
cp: cannot stat 'system_mount/charger': No such file or directory
cp: cannot stat 'system_mount/charger_log': No such file or directory
cp: omitting directory 'system_mount/config'
cp: omitting directory 'system_mount/d'
cp: omitting directory 'system_mount/data'
cp: omitting directory 'system_mount/dev'
cp: cannot stat 'system_mount/dsp': No such file or directory
cp: cannot stat 'system_mount/etc': No such file or directory
cp: cannot stat 'system_mount/firmware': No such file or directory
cp: omitting directory 'system_mount/lost+found'
cp: omitting directory 'system_mount/mnt'
cp: omitting directory 'system_mount/odm'
cp: omitting directory 'system_mount/oem'
cp: omitting directory 'system_mount/op1'
cp: omitting directory 'system_mount/op2'
cp: cannot stat 'system_mount/persist': No such file or directory
cp: omitting directory 'system_mount/postinstall'
cp: omitting directory 'system_mount/proc'
cp: cannot stat 'system_mount/product': No such file or directory
cp: omitting directory 'system_mount/res'
cp: omitting directory 'system_mount/sbin'
cp: cannot stat 'system_mount/sdcard': No such file or directory
cp: omitting directory 'system_mount/storage'
cp: omitting directory 'system_mount/sys'
cp: omitting directory 'system_mount/system'
cp: omitting directory 'system_mount/vendor'
root@OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea#
Vatish Sharma (1101 rep)
Aug 16, 2019, 10:06 AM • Last activity: Oct 17, 2024, 08:59 PM
0 votes
0 answers
371 views
Install Linux on Android phones (bare metal but with needed drivers)
So, to summarise the questions: 1. How do I get the bootloader to work if I want to install Linux ARM distro on Android phones (in this case, OnePlus 5T) 2. Is it possible to copy drivers in `/vendor` in any possible way to my Linux install and get it to work? Details: I've installed Ubuntu Touch on...
So, to summarise the questions: 1. How do I get the bootloader to work if I want to install Linux ARM distro on Android phones (in this case, OnePlus 5T) 2. Is it possible to copy drivers in /vendor in any possible way to my Linux install and get it to work? Details: I've installed Ubuntu Touch on my OnePlus 5T phone. After some experience with it, I found that it's not fun so I want to switch to other distros that allow me to install whatever GUI I want, 99% open-source (no Snap), be able to get into tty, and compile a custom kernel. Basically, most functionalities that could be found on x86 Linux distros. (It would be best if it's Gentoo) However, there are 2 big problems that I couldn't get over with: bootloaders and modules. From installing Gentoo Linux by hand, I'm pretty familiar with installing bootloaders with Grub on EFI. But there's no such thing as BIOS or EFI on phones (just fastboot), and as for the drivers, on Ubuntu Touch (which is supposed to be more "Linux" than "Android") don't have kernel modules .ko file but says all the drivers are in /vendor. Since I cannot boot from USB in phones but am able to install alternative OS from flashing .img files, I have come up with a way to install Linux on phones (ignoring driver and bootloader issues): 1. Plug a USB drive on the phone and mount it to a directory 2. In the directory, download and extract Gentoo/Arch/etc. stage tarball 3. chroot into the Linux environment and try all I can to install Linux on it 4. Unplug the USB drive, mount it on my Linux PC, and dd into a .img file 5. Flash the .img file in whatever way Is it possible, if so, how/why not? I know that Android is based on the Linux kernel, but it's still much different from Linux distros that I've seen. I have much less Android knowledge than Linux, so feel free to correct my misunderstandings.
gentoo user Vergil (1 rep)
Oct 1, 2024, 05:12 PM • Last activity: Oct 2, 2024, 02:16 PM
1 votes
0 answers
211 views
Installing Alpine Linux using Fastboot
I have a Lenovo TAB 10 (TB-X103F) with TWRP installed, but no OS. I am attempting to install alpine linux but to my knowledge, the tablet is unable to boot from EFI, so im confused on what to do next as i cant find any bootloader that will work. I dont know too much about how bootloaders work so any...
I have a Lenovo TAB 10 (TB-X103F) with TWRP installed, but no OS. I am attempting to install alpine linux but to my knowledge, the tablet is unable to boot from EFI, so im confused on what to do next as i cant find any bootloader that will work. I dont know too much about how bootloaders work so any help is appreciated
jamesYValley (11 rep)
Sep 14, 2024, 07:04 AM
-1 votes
1 answers
79 views
How Can I Resolve a Persistent Security Breach on My Devices Despite Multiple Measures?
I’ve been experiencing a severe security breach where individuals have hacked into both my Android and Linux devices. They have access to all my online and offline activities, including my social media accounts, Gmail, WhatsApp, call logs, and SMS. Despite resetting my phone multiple times and enabl...
I’ve been experiencing a severe security breach where individuals have hacked into both my Android and Linux devices. They have access to all my online and offline activities, including my social media accounts, Gmail, WhatsApp, call logs, and SMS. Despite resetting my phone multiple times and enabling two-factor authentication for all my accounts, I am still unable to remove these intruders. I’ve also used the paid version of Bitdefender for malware protection, but it hasn’t detected any malware. I am confident that the intruders remain in my system. To check if my phone is still compromised, I posted a story on Instagram and used the 'Close Friends' feature to share it only with my other account. However, I discovered that the intruders were still able to see the story. Additionally, they have made comments about my personal online activities that they should not have known about. What further steps can I take to ensure that my devices are fully secure, and how can I conclusively verify that the intruders are no longer accessing my information?
aniket sahu (1 rep)
Sep 11, 2024, 09:50 PM • Last activity: Sep 11, 2024, 11:41 PM
Showing page 1 of 20 total questions