Lanchon / haystack

Signature Spoofing Patcher for Android
GNU General Public License v3.0
233 stars 45 forks source link

Detect /system/system in TWRP #26

Open ghost opened 5 years ago

ghost commented 5 years ago

Hey, on my device, sailfish, system is mounted as /system/system. A way to detect this in pull-fileset and push-fileset would be appreciated.

Lanchon commented 5 years ago

hi, it seems like there's an issue with your twrp. could you provide a link that explains why system is and must be mounted this way? thanks

ghost commented 5 years ago

This is official TWRP 3.3.0-0 builds, by the way. ls /system:

acct
bin
bugreports
cache
charger
config
d
data
default.prop
dev
dsp
etc
firmware
init
init.environ.rc
init.rc
init.usb.configfs.rc
init.usb.rc
init.zygote32.rc
init.zygote64_32.rc
lost+found
mnt
odm
oem
persist
postinstall
proc
product
res
sbin
sdcard
storage
sys
system
ueventd.rc
vendor
verity_key

ls /system/system:

addon.d
app
bin
build.prop
compatibility_matrix.xml
etc
fake-libs
fake-libs64
fonts
framework
lib
lib64
media
priv-app
product
usr
vendor
xbin
Lanchon commented 5 years ago

yeah, i'm surprised the FS is not mounted in /. i don't know if this is standard for the new layout. in any case, i don't have a test device so i can't fix it.

my push and pull scripts already adapt to a variety of layouts. it shouldn't be hard to support this. or, as a workaround, specialized scripts for this layout could be added. you are welcome to try your hand at it :)

ghost commented 5 years ago

A simple way to check would be df -h /system/system

ghost commented 5 years ago

@Lanchon this MAY be the reason, not sure: https://source.android.com/devices/bootloader/system-as-root

Lanchon commented 5 years ago

yes i'm aware of the system as root FS situation. what i was asking was whether it was standard of TWRP to mount the fs in /system instead of / and where is that documented. but come to think about it, it makes sense to do it this way (although it is kinda horrible). i hate google and their stupid changes. anyway, i cannot fix it without a device so this will stay open for now.

alextmz commented 5 years ago

Hi Launchon, and thanks for the amazing work. I'll watch this one bug, as it blocks usage of the NanoDroid/TWRP combo (the easiest way to get microG) on Pixel/XL (sailfish/marlin) and maybe others.