Related
Hi guys,
I use VPNTunnel.se and want to use it on my SGS. I´m on Darkys 9.3 with Damians Ultimate kernel.
I installed OpenVPN installer and openVPN Settings, placed my openvpn.conf at sdcard/openvpn.
I can connect but www.wieistmeineip.de shows still real IP adress. What have I done wrong?
I tried out some things, but it still doesn´t work:
OpenVPN Settigs tells:
FATAL: Linux ifconfig
could not execute external program
Why does is not work??
I didtaken from other topic)
At this point, Openvpn could connect and create a tun device, but route are not pushed so it's not very usefull
So, I downloaded this version of Openvpn
http://github.com/downloads/fries/an...atic-2.1.1.bz2
As superuser
Code:
su
I remounted in rw /system
Code:
mount -o remount,rw /system
I renamed /system/xbin/openvpn into openvpn_old
Code:
mv /system/xbin/openvpn /system/xbin/openvpn_old
I put that new openvpn binary in /system/xbin
I created symlinks from /system/bin/route and ifconfig to /system/xbin
Code:
ln -s /system/bin/route /system/xbin/route
ln -s /system/bin/ifconfig /system/xbin/ifconfig
I also created a symlink os /system/xbin to /system/xbin/bb, just in case
Code:
ln -s /system/xbin /system/xbin/bb
Do some search: "enabling TUN".
GL.
I already enabled tun in recovery.
I also placed tun.ko in system/lib/modules.
Sent from my GT-I9000 using XDA App
Now I can connect,but no data is routed,because I can't replace route with busybox. Root Explorer says no free space although there are 17 MB free and when I try via terminal there is just :file exists
How can I replace a file in system/xbin?
Sent from my GT-I9000 using XDA App
Hi folks,
here's an easy-to-install busybox for your Galaxy Tab 2. NOW with Cyanogen Mod support.
ChangeLog:
BusyBox 1.21.0-git Nano1 (2012-07-28): initial release
BusyBox 1.21.0-git Nano2 (2012-07-29): applied various patches:
BUGFIX: flush all open files after listing them (ls)
BUGFIX: when setting hostname from file p**** whole name
COMPAT: ps now accepts (= ignores) all options a POSIX ps should
allow passing -mthumb to make
ash applet now exports HOME
silently ignore processes from inittab with terminal names without matching device file
default behaviour of 'showkey' applet changed from displaying interpreted keycode to decimals
do not show a message when testing an uninitialized variable
changed some terms in top applet output (rss vs. vsz)
BusyBox 1.21.0-git Nano3 (2012-08-05): major fix
NEW: rfkill applet¹
several minor modifications to applet
BUGFIX fixed a bug in busyinstall that left system without 'sh' upon uninstall²
provide busybox-patches to the world
BusyBox 1.21.0-git Nano4 (2012-08-15): minor fix / cm 10 edition
updated to latest git (some bugfixes)
BUGFIX: reading profile now works
BUGFIX: adjusted shell paths
BUGFIX: history now works
BUGFIX: no longer replace reboot on stock rom³
NEW: Cyanogen Mod edition (tested on cm10)
¹ Either redo 'busyinstall install', or do 'ln -sf /system/bin/busybox /system/bin/rfkill'
² You can find the original sh in you CWM backup, or here: http://www.nanolx.org/downloads/P3110/original-sh
If you didn't get /system/bin/sh.orig after 'busyinstall install', use this file as /system/bin/sh.orig
³ push new busyinstall into tablet to ensure future install/uninstall is fine. then do 'mv /system/bin/reboot.orig /system/bin/reboot'
from within 'adb shell' as root to get original reboot back.
Prerequisites:
* root access on your Tablet
Download:
busybox (normal): http://www.nanolx.org/downloads/P3110/busybox-nano4
busybox (debug): http://www.nanolx.org/downloads/P3110/busybox_unstripped-nano4
busyinstall (installer/stock): http://www.nanolx.org/downloads/P3110/busyinstall
busyinstall (installer/cm10): http://www.nanolx.org/downloads/P3110/busyinstall-cm
profile (optional): http://www.nanolx.org/downloads/P3110/profile¹
busybox (patches): http://www.nanolx.org/downloads/index.php?dir=P3110/busybox-patches/
¹ profile is a generic file, read on each startup of busybox. Mine sets HOME to /,
and puts /system/xbin/ in front of /system/bin/ in PATH. You can also adjust the
prompt (PS1) or whatever here, it's valid for all users. You could check for
'$(id -u) == 0' to adjust prompt for root, if not 0, for ordinary user.
Ordinary user should get 'busybox (normal)', rather than 'busybox (debug)'.
NEW INSTALLATION (STOCK ROM):
Putting busybox on internal sd-storage:
Code:
adb push busybox /mnt/extSdCard/
adb push busyinstall /mnt/extSdCard/
replace "extSdCard" if you saved busybox somewhere else
Code:
adb shell
su
chmod 0777 /mnt/extSdCard/busybox
chmod 0777 /mnt/extSdCard/busyinstall
/mnt/extSdCard/busybox remount -o rw,remount /system
/mnt/extSdCard/busybox mv -f /mnt/extSdCard/busybox /system/bin/
/system/bin/busybox mv -f /mnt/extSdCard/busyinstall /system/bin
busyinstall install
NEW INSTALLATION (CYANOGEN ROM):
Putting busybox on device:
in Settings > Development > set 'root access' to 'apps + adb'
Code:
adb root
adb shell
busybox mount -o rw,remount /system
exit
adb push busybox /system/xbin/busybox.nano
adb push busyinstall /system/bin/busyinstall
adb push profile /system/etc/profile # optional, if downloaded profile
adb shell
chmod 0777 /system/bin/busyinstall
busyinstall install
UPDATE:
Just download busybox, busyinstall and replace the ones in /system/bin/ - it will instantly work:
Code:
adb push busybox /system/bin/
adb push busyinstall /system/bin/
adb shell
su
toolbox chmod 0777 /system/bin/busybox # if you use windows, the executable bit might be missing in the uploaded file
chmod 0777 /system/bin/busyinstall
UNINSTALLATION:
Code:
ab shell
su
busyinstall --
That's it!
I tested everything and it does work perfect, either way a backup (CWM) is always recommened, when working around with stuff down the stack.
Suggestions welcome.
Out of curiosity, what is the difference between what this does and what BusyBox (by Stericson) from the Play Store does?
Sent from my MB855 using Tapatalk 2
Jleeblanch said:
Out of curiosity, what is the difference between what this does and what BusyBox (by Stericson) from the Play Store does?
Sent from my MB855 using Tapatalk 2
Click to expand...
Click to collapse
mine is a newer version
has all features of busybox (stericsons free version does not have all applets in busybox enabled, eg. 'sh' applet is missing)
installation 100% GT-P3XXX optimized
As of now, mostly personal preference I'd say.
Edit: But I'm currently applying stuff from busybox-power (maemo) which adds serveral bugfixes and stuff to busybox.
OK, improved version of busybox available in post 1 (+ changelog)
OK, thanks for letting me know!
I actually haven't done much with my Tablet lately as I've been busy with my phone as that now has CM10 too
But once I get my phone all set I'll use your BusyBox and give it a go!
Also, you said your busybox version is newer...but busybox via my phone is version 1.20.2. Just letting you know!
Thanks for this btw, I'd rather have a modified version optimized for my tablet versus a more universal version so to speak. Plus, with your updated applets! Thanks!
Sent from my MB855 using Tapatalk 2
Jleeblanch said:
Also, you said your busybox version is newer...but busybox via my phone is version 1.20.2. Just letting you know!
Sent from my MB855 using Tapatalk 2
Click to expand...
Click to collapse
Oh, ... mine is 1.21.0-git - fixed the typo
First,thank you for your work,second I've a question: I've an p3100 (wifi+gsm) ,it rooted on stock 4.0.4 ,and no busybox installed.It has 16gb onboard ,and I don't have at the moment any external microsd in slot,I've ordered an 32gb,but it hasn't come yet.Can you please tell me if it's safe puting your files in /sdcad (not ExtSdCard like you wrote) and give the commands using ''sdcard'' word ?
For e.g:
db shell
su
/mnt/sdcard/busybox remount -o rw,remount /system
I need busybox to backup my /efs folder ,but I don't want to screw something,so please tell me if it is safe to use internal memory (sdcard) for busybox install?Also ,when I'll receive the microsd ,I will need to install again busybox with your original commands from this topic ?
Thanks a lot!!
Best Regards!
viasat said:
First,thank you for your work,second I've a question: I've an p3100 (wifi+gsm) ,it rooted on stock 4.0.4 ,and no busybox installed.It has 16gb onboard ,and I don't have at the moment any external microsd in slot,I've ordered an 32gb,but it hasn't come yet.Can you please tell me if it's safe puting your files in /sdcad (not ExtSdCard like you wrote) and give the commands using ''sdcard'' word ?
For e.g:
db shell
su
/mnt/sdcard/busybox remount -o rw,remount /system
I need busybox to backup my /efs folder ,but I don't want to screw something,so please tell me if it is safe to use internal memory (sdcard) for busybox install?Also ,when I'll receive the microsd ,I will need to install again busybox with your original commands from this topic ?
Thanks a lot!!
Best Regards!
Click to expand...
Click to collapse
Of course you can. It does not matter where you put busybox. All that matters is, that you adjust the commands to your path.
In your you would push the files using ADB, like
Code:
adb push busybox /mnt/sdcard
adb push busyinstall /mnt/sdcard
also you don't need to re-do this when you got your sd-card, because during the steps you move busybox/busyinstall into /system/bin/.
Edit: updated instructions to clarify this.
Ok,thank you for your time,everything it's clear now.I'll try later,when I'm going home.
Cheers!
---------- Post added at 07:04 PM ---------- Previous post was at 06:11 PM ----------
OK,first problem:when I try to execute the first comand,it gives me ''permission denied'',so after a little reading,because my kernel it's stock,I've installed Chainfire's ''adbd Insecure v1.0 '' http://forum.xda-developers.com/showthread.php?t=1687590 to give me rights.After that I've no more errors,but,when I execute first command in adb,it says nothing,just hanging,and adb doesn't come back to # symbol ,and because of that I can't execute the next command.Any ideea what I'm doing wrong?Thanks!
What command failed?
Gesendet von meinem GT-P3110 mit Tapatalk 2
I don't know how to explain,it not really failed, but when I type
/mnt/sdcard/busybox remount -o rw,remount /system the adb doesn't return anything back,and doesn't come back to # symbol ,it just staying,nothing more,no response.I was waiting 2 minutes,and nothing ,doesn't return to # .I can type the next command
/mnt/sdcard/busybox mv /mnt/sdcard/busybox /mnt/sdcard/busyinstall /system/bin/
it's the same,no output,nothing.
Can you please tell me what I'm doing wrong?
Thanks again!
Now I'm stuck,even with adbd insecure activate I cannot execute commands:
C:\Documents and Settings\X\Desktop\ADB>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ # /mnt/sdcard/busybox remount -o rw,remount /system
/mnt/sdcard/busybox remount -o rw,remount /system
/system/bin/sh: /mnt/sdcard/busybox: cannot execute - Permission denied
126|[email protected]:/ # /mnt/sdcard/busybox mv /mnt/sdcard/busybox /mnt/sdcard/busy
install /system/bin/
dcard/busybox /mnt/sdcard/busyinstall /system/bin/ <
/system/bin/sh: /mnt/sdcard/busybox: cannot execute - Permission denied
126|[email protected]:/ #
Maybe I need first to install Stericsson's busybox from Market?At the moment,as I said before I don't have busybox installed at all,only su.
One more thing,every time when I save from your link busyinstall,no matter what browser,the file is saved as busyinstall.txt
It is normal ,or I need to rename it?
Thanks a lot!
Hmm... seems I forgot a little thing.
do this after you put busybox on tablet, before anything else:
Code:
adb shell
su
chmod 0777 /mnt/sdcard/busybox
then follow the rest of the instructions.
/goingtofixfirstpost
Same story,take a look:
[email protected]:/ # chmod 0777 /mnt/sdcard/busybox
chmod 0777 /mnt/sdcard/busybox
[email protected]:/ # chmod 0777 /mnt/sdcard/busyinstall
chmod 0777 /mnt/sdcard/busyinstall
[email protected]:/ # /mnt/sdcard/busybox remount -o rw,remount /system
/mnt/sdcard/busybox remount -o rw,remount /system
/system/bin/sh: /mnt/sdcard/busybox: cannot execute - Permission denied
126|[email protected]:/ #
Hmmm... > could you provide me the details of 'adb logcat'? Ensure to run those commands while logging.
Gesendet von meinem GT-P3110 mit Tapatalk 2
I don't know if this is what you want,but here we go:
I'm going to check your logs soon and report back.
Meanwhile I updated to Nano3 - see first post.
I got no clue why it does not work for you, but me.
What boot image and ROM are you using? Default boot/ROM, rooted boot/ROM, cyanogen?
I only tested default ROM with my boot. Currently testing cyanogenmod 10, but except some adjustments to busyinstall it will work there, too.
Sorry for the late reply,I'm on vacation until Sunday,and my acces to internet it's very limited here.Now,regarding my problem,first when I got the tablet it was on stock 4.0.3 ,wich I rooted manually to keep the counter to 0 (for warranity) ,and after that I updated to stock 4.0.4 using Mobile Odin Pro,with Everoot option ( it's rooting the rom on the fly) .So now I'm rooted on stock 4.0.4 ,stock recovery, and no busybox installed.I fell more secure and want to install your busybox version,because it's specialy designed for tab2,and it's has features from Maemo (I'm a big fan,I owned an N800,and I've also an N900 ).Maybe,if you have the time and the skills,you can pack it on an .apk version,if it's possible,of course.I will try more Sunday,when I'll be back home.Thanks again for your patience and help.Best Regards!
It will be great if we have a kernel (even stock) with CWM and this busybox...
I am also rooted with flash counter 0 and stock recovery.
Sent from my GT-P3110 using Tapatalk 2
Maybe some contributor creates a flashable zip (for CWM).
So... uploaded 1.20.1-Nano4. See first post for changes.
This time an addtional install-script for cyanogen mod was added, along some fixes.
ah... and: 100th post
it is not tested on galaxy mini so I will say it beta, please its a request to post a reply whether it is working or not
bash:- an advanced command line than sh, it is colorful so you can differentiate the commands easily
steps for installing bash if you have cwm and want automated process
1:- download the bash command line flashable zip from here
2. download bash enabler script from here
3. flash the bash command line dhlalit11.zip in cwm recovery
4. boot the device normally
5. with the help of script manager execute the bash install.sh script with su privilege
and you are done
Click to expand...
Click to collapse
steps for installing bash if you don't have cwm or want to do it manually
1:- download the bash command line flashable zip from here
2. extract the files to a folder
3. go to /extracted folder/system
4. copy all the files to your system as they are placed
5. open terminal and type chmod 0755 /system/xbin/bash
and its done
Click to expand...
Click to collapse
note:- running bash will not give you root privilege automatically, you will need to type "su -c bash" to go directly into bash with root
reserved
if you don't mind...you can add this line into your updater script
Code:
set_perm(0, 0, 0755, "/system/blabla-the file position");
this one will automatically change the file permission for you so that we don't have to run the script anymore. you can also add symlink("/system/bin/bash", "/system/bin/sh"); to replace our old sh with bash so that everytime we use sh command, we will run bash instead. I was using these trick on my old ROM. however, this step will erase our sh binary file. so we must use it carefully. I usually did these step on a fresh rom installation. you might want to test it by yourself to make sure everything is alright.
I like to make scripts and one more reason is the script first looks for bash in /system/xbin to ensure a proper flash, if bash is not found it will tell the owner
didn't wanted to replace sh
if the purpose is to check whether it was installed correctly or not you can use run_program command instead and make the installation a lot simpler. you can put the script temporary in cache and delete it after the installation complete. or else...you can play with aroma installer. you can design the UI with several option like
1. install bash
2. symlink bash to sh
3. check the bash installation status
4. etc etc (as you like)
aroma could make our usual installation stuff into sumething more fun and interactive ^,^v
anyway, this is only a suggestion. if you want to use aroma you can modify my multi tweak installer. you said that you like to make scripts. it will be easy for you to get the basic stuff on aroma and starting to made one for your self. the link is in my sig. check the akuro or one pack tweak thread and got the aroma from the latest version there.
script run in cwm do not print anything on the UI and the user will not see whether the it was done or not
and I had previously used aroma in my rom patch for galaxy s series but this is just a simple task to do
I will think about it, but sure it will take time and I don't have time as I wanted to update the sticky of this forum then I am working on two mods for my karbonn smart tab 1
but I will for sure figure it out
installing bash
hi i have a Galaxy Centura tracphone and i get this error after executing su-c bash into the cmd via adb......I have installed the flashable zip and ran the installer script....
255|[email protected]:/system/bin # su -c bash
su -c bash
link_image[1936]: 7974 could not load needed library 'libncurses.so' for 'bash
(load_library[1091]: Library 'libncurses.so' not found)CANNOT LINK EXECUTABLE
255|[email protected]:/system/bin #
any ideas?
Bash
Hi, I managed to install the ZIP file (Moto G XT1032) and the script worked as well but after it was done, bash didn't have 755.
I tried adding it manually (as root) but it fails with this error:
Unable to chmod /system/xbin/bash: read-only filesystem
I tried remount using this:
su mount -o remount,rw /
But still no luck, any suggestions?
---------------------------------------------------- UPDATE -------------------------------------------------------
managed to get it via ADB Shell with this commands:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 755 /system/xbin/bash
still not working because of not having "libncurses.so" which will try to install manually.
ThePlayer10 said:
Hi, I managed to install the ZIP file (Moto G XT1032) and the script worked as well but after it was done, bash didn't have 755.
I tried adding it manually (as root) but it fails with this error:
Unable to chmod /system/xbin/bash: read-only filesystem
I tried remount using this:
su mount -o remount,rw /
But still no luck, any suggestions?
---------------------------------------------------- UPDATE -------------------------------------------------------
managed to get it via ADB Shell with this commands:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 755 /system/xbin/bash
still not working because of not having "libncurses.so" which will try to install manually.
Click to expand...
Click to collapse
You didn't needed to type whole dev block address, what you were missing was
(su
mount -o remount,re /system)
You were actually mountung the root of your device instead of system partition, which was the reason of non-working
I wanted to enable SCP and SSH using DropBear II ... for some reason DropBear Server II doesn't install scp & ssh binaries, you can get them from github and symlink it into system. Here's what I did...
DropBear archive (1M): https://www.dropbox.com/s/h2guipuvdltiden/dropbearii.zip
Feel free to mirror that if you want.
These directions allow you to ssh into the system as root, be very careful. I recommend not leaving the service running if you are not using it.
I take no responsibility if you brick your unit while mucking around as root.
Back Up
Download dropbearii.zip and unzip on your local file system.
From your local filesystem install the APK and push scp & ssh to tmp.
Code:
adb install DropBearServer2.1.apk
adb push scp /data/local/tmp/scp
adb push ssh /data/local/tmp/ssh
From the OUYA GUI install the DropBearServerII service... Select Make -> Software -> DropBearServer II -> Install
Shell into your OUYA and make /system writable.
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
Move scp & ssh into DropBear II directory
Code:
mv /data/local/tmp/scp /data/data/me.shkschneider.dropbearserver2/app_data/
mv /data/local/tmp/ssh /data/data/me.shkschneider.dropbearserver2/app_data/
Change the permissions
Code:
chmod 6555 /data/data/me.shkschneider.dropbearserver2/app_data/scp
chmod 6555 /data/data/me.shkschneider.dropbearserver2/app_data/ssh
Create the symlinks
Code:
cd /system/bin/
ln -s /data/data/me.shkschneider.dropbearserver2/app_data/scp ./scp
ln -s /data/data/me.shkschneider.dropbearserver2/app_data/ssh ./ssh
Change /system back to read-only (optional) and exit.
Code:
mount -o ro,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
exit
exit
Reboot the OUYA (optional)
Code:
adb reboot
Notes/testing
Windows users can use Putty to ssh & scp get them here.
To ssh into the system:
Code:
ssh [email protected]_ADDRESS
To scp a file to the sdcard:
Code:
scp ./some_file [email protected]_ADDRESS:/sdcard/
To get to settings push the U circle button one time.
If you turn on "Start on boot" in the settings menu and reboot, the service will be turned off. Though it will be left on in the standard standby mode.
I recommend using pubkey rather than password. Basically generate a public key and push it into /sdcard/ then install it from the DropBear II app.
Unix Hosts can do:
Code:
ssh-keygen -t rsa
Windows using PuttySSH follow these directions, I haven't tested them though.
If you don't want to be bothered with pubkey, please change the default password it is set to 42.
If you already know about pubkey, you can cat them into: /data/data/me.shkschneider.dropbearserver2/app_data/authorized_keys
Unchecking "Allow Password" doesn't work properly.
Why would I want to do this? I didn't really like the Wireless ADB disappearing after the OTA upgrade, this may be less annoying if the next OTA doesn't nuke it.
I'm getting an error that busybox is not installed when trying to start the service. Is there anything special you had to do with busybox to get this to run? I installed it via the apk.
Edit: Nevermind. I didn't realize the busybox apk was an installer and I didn't find the icon when I looked. Just checked again and found the busybox installer icon and did a smart install. Dropbear ssh is running now.
I ran it manually with
Code:
dropbear -E -s -P /data/dropbear/dropbear.pid -r /data/dropbear/dropbear_rsa_host_key -d /data/dropbear/dropbear_dss_host_key
and it looks ok when idling but when connection it gives me
Aiee, segfault! You should probably report this as a bug to the developer
Click to expand...
Click to collapse
This could be CM10.1 environment issues (libc). The built-in SSHd doesn't work properly as well. Some binaries give strange errors when executed with SSHd (like sqlite3).
I can't install the DropBearServer II from the Make option, comes up with "operation failed". Tried to make the system rw to see if that might have been the problem but still no luck. Anyone else had that problem?
andlid said:
I can't install the DropBearServer II from the Make option, comes up with "operation failed". Tried to make the system rw to see if that might have been the problem but still no luck. Anyone else had that problem?
Click to expand...
Click to collapse
I installed it via adb.
For others I was able to install using IncognitoMan's -=StockPlus=- ROM -- http://forum.xda-developers.com/showthread.php?t=2347214
You may need busybox installed, I'm not 100% sure, I haven't tried without busybox.
SSH command line on android
The link is broken
Could someone please reupload this? would be awesome
Thank you so much
BIade said:
Could someone please reupload this? would be awesome
Thank you so much
Click to expand...
Click to collapse
bump - upload again please
You can also get static binaries from dropbear or ssh server apks in playstore by simply unpacking the apk.
This post seeks attention of Senior XDA developers who are contributors of Magisk:
I have been struggling to fix Magisk mount and SU execution on VIVO devices.
Magisk issue #5148
VIVO/iQOO kernel restictions: "Operation not permitted" when executing `su` or mounting to `/system`, or bootloops if rooted · Issue #5148 · topjohnwu/Magisk
Device: iQOO Z1/VIVO X70 PRO/iQOO NEO3, and more Android version: N/A Magisk version name: N/A Magisk version code: N/A, but more serious since 24302 Magisk fails to mount /system on some Vivo/iQOO...
github.com
I am ready to work together to the best of my technical capacity.
I will pay for your test device and a special bounty for your hard work and development efforts.
Interested developers please reach out to me.
Actual problem is on Vivo devices only. Tested on Vivo Y33s and Y21.
When you call su, it returns: "Operation not permitted"
Trying to run /dev/xxxx/Magisk --daemon: "No daemon is currently running"
Previous attempts:
Problem seems to be SELinux policy, if you attempt to manually run from android debug builds, then the daemon is properly loaded.
2109:/dev/9Lgz # ./supolicy --magisk
Load policy from: /sys/fs/selinux/policy
2109:/dev/9Lgz # magisk --daemon
2109:/dev/9Lgz # magisk --path
/system/bin
2109:/dev/9Lgz # su
2109:/dev/9Lgz # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:magisk:s0
With this solution, the problem is that we need to run this from "adb root" shell after every boot.
Is there any way to run this locally on a the device having debug build?
Where should I post this thread to find the right developers to solve this problem?
I would highly appreciate some help here.
Maybe you can try change 'su' to 'suu' or 'timesu', as the [ref](http://bbs.ydss.cn/thread-1528844-1-1.html) said.
Good luck and success to you!
JuanLv said:
Maybe you can try change 'su' to 'suu' or 'timesu', as the [ref](http://bbs.ydss.cn/thread-1528844-1-1.html) said.
Good luck and success to you!
Click to expand...
Click to collapse
I tried but no luck (
Looking for developers who have good knowledge of Magisk mount and magiskinit.
NextGenMagisk said:
Looking for developers who have good knowledge of Magisk mount and magiskinit.
Click to expand...
Click to collapse
The developer has made restrictions in the kernel as ref
| https://github.com/topjohnwu/Magisk/issues/5148#issuecomment-1167697477
Maybe we can make a workaround by kernel patch.
I'm not too familiar with these.
Do you have any idea?
JuanLv said:
The developer has made restrictions in the kernel as ref
| https://github.com/topjohnwu/Magisk/issues/5148#issuecomment-1167697477
Maybe we can make a workaround by kernel patch.
I'm not too familiar with these.
Do you have any idea?
Click to expand...
Click to collapse
Thanks for the update. Looks like this issue is not easy to fix and it depends on access to kernel sources for each device model. I am not familiar with Kernel patching.
My ideas are focused around leveraging debug builds to execute SU locally and then make it persist across reboots.
NextGenMagisk said:
Is there any way to run this locally on a the device having debug build?
Click to expand...
Click to collapse
vivo y31, LineageOS 19.1, userdebug
magisk 24.3 can inject code in init.rc, can't mount /system /vendor /oem
magisk >24.3 can't inject code, because magisk switched to new method wich requires mounting /system. Zygisk is broken since 2431*
If you want to have adb root, then you can use phh-su(if you use gsi) and execute in termux
su -c setprop service.adb.root 1
su -c setprop service.adb.tcp.port 5555
su -c stop adbd
su -c start adbd
adb wait-for-device
adb shell whoami
Without phh-su you would need to split screen [termux + developer options/wifi debugging] and pair with code
one time in termux
adb pair localhostort code
no need to split screen anymore
then off -on wifi debugging
adb connect localhost:newport
adb root
off-on wifi debugging again
adb kill-server
adb connect localhost:newnewport
gz! you're root
Another way is to edit init.rc. Just look at magiskrc.inc from the source code.
I have no problems with zygisk and modules on 24.3 magisk. I just mounting overlayfs on top of /system and then just copy all modules into /system.
Here is my .rc script which I pushed in boot.img like this
./magiskboot unpack boot.img
./magiskboot cpio ramdisk.cpio 'add 0644 overlay.d/ofs.rc ofs.rc'
./magiskboot repack boot newboot.img
script
on load_persist_props_action
exec u:r:su:s0 -- /system/bin/mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
on zygote-start
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
Then just create two folders
/data/system/ou
/data/system/ow
And copy modules files in upper layer(real system will not be modified)
su -c cp -r /sbin/.magisk/modules/*/system/* /system
If you need to revert changes then you can delete two folders and create them again. Or you can delete module files like this
cd /sbin/.magisk/modules/{Module Name}/system/
find -exec rm /system/{} \;
cd /data/system/ou
find . -type d -empty -delete
If you want to boot with real /system then just rename two folders
mount -t overlay
overlay on /system type overlay (rw,seclabel,relatime,lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow)
mount | grep " / "
/dev/block/dm-0 on / type ext4 (ro,seclabel,nodev,relatime,discard)
Pervokur said:
mount -t overlay
overlay on /system type overlay (rw,seclabel,relatime,lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow)
mount | grep " / "
/dev/block/dm-0 on / type ext4 (ro,seclabel,nodev,relatime,discard)
Click to expand...
Click to collapse
This is extremely helpful and has given me a very clear path to solve problems with Vivo root. I will implement these suggestions. Thanks a lot.
NextGenMagisk said:
This is extremely helpful and has given me a very clear path to solve problems with Vivo root. I will implement these suggestions. Thanks a lot.
Click to expand...
Click to collapse
Another tip from me. There is a way to have system rw for magisk root. At least it works for me on LOS19.1 userdebug gsi, vndklite variant, magisk24.3
Normaly
magisk-su: mount -o rw,remount /
operation not permitted
adb root:mount -o rw,remount /
ok
but / is still ro for magisk-su
Then I just kill surfaceflinger which leads to zygote restart(aka soft reboot)
su -c killall surfaceflinger
After booting / is rw for magisk-su and you can work with partition in file manager like Total Commander.
Pervokur said:
Another tip from me. There is a way to have system rw for magisk root. At least it works for me on LOS19.1 userdebug gsi, vndklite variant, magisk24.3
Normaly
magisk-su: mount -o rw,remount /
operation not permitted
adb root:mount -o rw,remount /
ok
but / is still ro for magisk-su
Then I just kill surfaceflinger which leads to zygote restart(aka soft reboot)
su -c killall surfaceflinger
After booting / is rw for magisk-su and you can work with partition in file manager like Total Commander.
Click to expand...
Click to collapse
Again a great tip, thanks!
I am currently testing your previous suggestions to inject custom init script on Y33s.
you can test this with adb root without editing boot.img or init.rc
NextGenMagisk said:
Again a great tip, thanks!
I am currently testing your previous suggestions to inject custom init script on Y33s.
Click to expand...
Click to collapse
adb shell
mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
then restart zygote
killall surfaceflinger
zygote will restart, but mounts will still be there
Pervokur said:
you can test this with adb root without editing boot.img or init.rc
adb shell
mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
Click to expand...
Click to collapse
mount overlay is working when executed from adb root.
but i cant get past the second step:
2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount: '/sbin/.magisk/zygisk/app_process32'->'/system/bin/app_process32': No such file or directory
1|2109:/data/system/ow #
1|2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
mount: '/sbin/.magisk/zygisk/app_process64'->'/system/bin/app_process64': No such file or directory
what must be causing this?
NextGenMagisk said:
mount overlay is working when executed from adb root.
but i cant get past the second step:
2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount: '/sbin/.magisk/zygisk/app_process32'->'/system/bin/app_process32': No such file or directory
1|2109:/data/system/ow #
1|2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
mount: '/sbin/.magisk/zygisk/app_process64'->'/system/bin/app_process64': No such file or directory
what must be causing this?
Click to expand...
Click to collapse
you didn't activate zygisk in magisk settings, so there are no files /sbin/.magisk/zygisk/app_process32
/sbin/.magisk/zygisk/app_process64
Pervokur said:
you didn't activate zygisk in magisk settings, so there are no files /sbin/.magisk/zygisk/app_process32
/sbin/.magisk/zygisk/app_process64
Click to expand...
Click to collapse
I cant enable it because Magisk daemon does not run at boot. Superuser tab in the app is greyed out.
testing this on a Vivo PD2147F debug build with Magisk patched boot and ofs.rc entry included.
NextGenMagisk said:
I cant enable it because Magisk daemon does not run at boot. Superuser tab in the app is greyed out.
testing this on a Vivo PD2147F debug build with Magisk patched boot and ofs.rc entry included.
Click to expand...
Click to collapse
even with magisk 24.3?
Pervokur said:
even with magisk 24.3?
Click to expand...
Click to collapse
Yes, patched magisk 24306. tmp dir with random name under /dev is created with root rights but the magic mount fails and hence the superuser tab is greyed out.
Magisk issue #5148
VIVO/iQOO kernel restictions: "Operation not permitted" when executing `su` or mounting to `/system`, or bootloops if rooted · Issue #5148 · topjohnwu/Magisk
Device: iQOO Z1/VIVO X70 PRO/iQOO NEO3, and more Android version: N/A Magisk version name: N/A Magisk version code: N/A, but more serious since 24302 Magisk fails to mount /system on some Vivo/iQOO...
github.com
Then you should manually add something like this to the end of init.rc
on load_persist_props_action
exec u:r:su:s0 -- /system/bin/mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
on zygote-start
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
on post-fs-data
start logd
rm /dev/.magisk_unblock
start mqVxwb7J
wait /dev/.magisk_unblock 40
rm /dev/.magisk_unblock
service mqVxwb7J /sbin/magisk --post-fs-data
user root
seclabel u:r:magisk:s0
oneshot
service DC83jQtNHiJDw8 /sbin/magisk --service
class late_start
user root
seclabel u:r:magisk:s0
oneshot
on property:sys.boot_completed=1
start Zaw2TLXyH
service Zaw2TLXyH /sbin/magisk --boot-complete
user root
seclabel u:r:magisk:s0
oneshot