[SOLVED] install-recovery.sh - The undeletable script from the dark side... - Nexus One Q&A, Help & Troubleshooting

Greeting all,
First of, I would like to thanks all of you for the amount of info I have found in this forum.
This is trully amazing and, so far, allowed me to sucessfully:
- Unlock my phone
- Root my phone
- Install a custom recovery image
I know that I am creating a new post on a very known and discussed subject BUT after 2 days of google seach nothing I have tried has permitted me to sucessfuly delete this £$%^&*() of script.
As you all know, it needs to be deleted to launch the custome recovery image (at the moment, I am stucked with the exclamation mark with the little Droid when I try).
IMPORTANT: I currently run the Froyo android 2.2 official ROM.
To delete this scipt, I have tried 2 approaches:
- Console mode from windows using ADB
- directly form the phone using a File explorer
#1: From the console:
As mentionned in many previous posts, I have tried the following commands once connected to the nexus
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
I beleive this command is either incorrect OR no longer working with Froyo 2.2 as I get the following message which looks fishy (I am not a Linux specialist...):
Usage: mount [-r] [-w] [-o options] [-t type] device directory
When I try to delete the scripe with the commande below, I am kindly informed that it failed as it is still a read only file system
rm /system/etc/install-recovery.sh
#2: From the phone
I read that SUFBS, a very nice file explorer was available on the market allowing to mount both system AND data in RW would allow me to do it.
I have had several try at it enabling RW at different moment (System then etc then directly when I am in the folder and see the script I want to delete) and whatever I do, each time I select the command delete, it looks like it works (little pacman eating) but the script from the dark side is sill there like nothing happened...
As I am close to give it the microwave treatment to see if it works better ;-) I thought I give it a try on the forum to see if any Android/Linux god would spend 5 minutes to explain to me what I am doing wrong...
Thanks a lot in advance!
BooToo

Try this:
mount -o rw,remount /system
I can't guarantee that works with Froyo but it's all I've ever used and I don't remember it giving me any problem when I used Froyo.

Umm I think it should be mount -o remount,rw then type the rest
You can also try this mount -o remount,rw /dev/block/mtdblock3 /system
Sent from my Nexus One using XDA App

adb is supposed to have it's own remount command for doing this, but I've only used adb once when I rooted so I'm no help there.
Other than that, try doing: ls -l /system/xbin/mount to see if mount is a link to busybox. If it is, the last part of the output will look like this: /system/xbin/mount -> busybox
If it is, type busybox | head -n1 to see what version of busybox you have.
ilostchild said:
Umm I think it should be mount -o remount,rw then type the rest
Click to expand...
Click to collapse
Heh, I never realized I had those backwards compared to how people usually do it, but the order doesn't actually matter. It's not necessary to specify the device as the remount option doesn't change the mount point or device.
# mount | grep system
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
# mount -o rw,remount /system
# mount | grep system
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)

Well...
I am an ass...
I did not have enabled the "USB debugging" on the phone...
Problem soved with the exact command lines I put at the beginning...

After rooting, flashing clockworkmod through ROM manager it was still going into stock recovery mode. Then I deleted /system/etc/install-recovery.sh and got my phone(HTC magic - 32A) bricked. Now it starts, shows rogers logo for 5-6 seconds and restarts and repeats untill i take out battery. I tried all combinations(power+back , power+home, Power+volume, Menu+home+power, menu+call+power) for quickboot and recovery mode but no success. Anyone has any idea about this issue?

If you have an HTC Magic, you're in the wrong forum...
Sent from my Nexus One using XDA App

just rename the script and you're done!

1) Bump 6 month old thread
2) Post in the completely wrong forum
3) Posts: 1 Join Date: Feb 2011
UGH.

error while loading new compiled Linux kernel image into the android emulator(1.5)
I am sorry, that i am asking my question in "reply" but i am not able to make a new post.
I have successfully compiled Linux kernel for android:
[email protected]:~/common# ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
.
.
.
SYMLINK include/asm -> include/asm-arm
CALL scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
CHK include/linux/compile.h
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 157 modules
[email protected]:~/common#
but i get the following error while loading this images in the emulator:
[email protected]:~/android-sdk-linux_x86/tools# ./emulator -avd avd1.5 -kernel ~/common/arch/arm/boot/zImage -show-kernel -verbose
emulator: found SDK root at /home/preetam/android-sdk-linux_x86
emulator: root virtual device file at /home/preetam/.android/avd/avd1.5.ini
.
.
.
yaffs_read_super: isCheckpointed 0
sh: can't access tty; job control turned off
# init: cannot find '/system/bin/playmp3', disabling 'bootsound'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
eth0: link up
init: untracked pid 578 exited
init: untracked pid 579 exited
warning: `rild' uses 32-bit capabilities (legacy support in use)
init: untracked pid 601 exited
init: untracked pid 592 exited
init: untracked pid 605 exited
init: untracked pid 602 exited
init: untracked pid 609 exited
init: untracked pid 606 exited
init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode
save exit: isCheckpointed 1
save exit: isCheckpointed 1
Restarting system with command 'recovery'.
Reboot failed -- System halted
and the emulator didn't start with the new kernel image(emulator didn't reboot). what is the problem here..?? and how can i replace my emulator's image with newly compiled Linux permanently??
please help. thank you!

I did everything as the guy who initiated this post under windows vista, and I have the same problem. However, I don't know how to go about deleting or renaming that scrip. Can you, give me a step by step procedure? Thank you

Flash this through recovery to delete the script...
http://db.tt/ooDaCnU

Hi,
I am sort of new to this. how do I flash using the above script?

Related

[Q] Missing files to run Debian?

I had it working on my I897 Captivate, then I Odin flashed back to stock, installed Cognition (previously SRE [Super Rooter Extreme]). I reinstalled debian, but now it errs. I checked my filesystem, and bash doesn't exist anywhere (nor any file with the word bash in it), and this is a list of all the EXT files:
/sbin/mkfs.ext2
/system/framework/ext.jar
/system/framework/ext.odex
/system/xbin/mkfs.ext2
The specific error message I receive when trying to run Debian is as follows:
When I enter:
$su
# bootdeb
I get:
Android Filesystem remounted as read/write
insmod: can't read 'ext2': No such file or directory
mknod: /dev/loop: File exists
[Penguin Logo]
Usage: mount [-r] [-w] [-o options] [-t type] device directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
Custom Linux Pseudo Bootstrapper V1.0 - by Mark Walker
WEB: <url>
EML: <url>
Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!
chroot: can't execute '/bin/bash': No such file or directory
umount: can't forcibly umount /data/local/mnt/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/mnt/proc: No such file or directory
umount: can't forcibly umount /data/local/mnt/sys: No such file or directory
umount: can't forcibly umount /data/local/mnt: Invalid argument
Filesystems have unmounted
losetup: /dev/block/loop2: No such device or address
Loopback device shutdown - success
Debian down
Coded by Mark Walker
<url>
<url>
Reverted back to Android console
#
OP here. Digging into the problem, so far it seems I'm only missing the ext2 kernel module. The bash it's trying to run is on debian.img. I haven't found an ext2 that will run on my Captivate though.
Upgrading Busybox may have helped, but I'm not sure yet because I broke the Super User app by installing UnleashTheBeast over SuperRooter. I'll try to find out later.
I won't be testing it at all. I bought an N900, as anyone who wants hardware and software they can put to use should.

How to install ubuntu on the Droid 4

How to install ubuntu on the Droid 4
Note to mods: this thread is a branch off of this thread
Huge thanks to zacthespack for creating the ubuntu installer app and original boot script and to zeroktal for modifying the script to work on the D4 and helping me get it working on my device.
I decided to take my experience in setting this up and put it into a how-to so that others could enjoy the experience of having ubuntu on the Droid 4. If zackthespac or zeroktal have any problems with me making and putting this guide up, please let me know and I will remove it.
Knowledge Required:
working knowledge of command line
working knowledge of vi
OR the ability to learn how to use both
Tools Required:
A rooted Motorola Droid 4
BusyBox (Android Market)
Terminal Emulator (Android Market)
Android VNC Viewer (Android Market)
Ubuntu Installer App (Android Market)
zeroktal's ubuntud4.zip file (attached to this post and mediafire)
Vi Cheat Sheet (lagmonster.org)
Step by Step:
Install BusyBox, Terminal, and Android VNC Viewer
Install and run Ubunutu Installer App
Follow the on-screen instructions and click next
Download either the Small or Large image to your phone, (use zeroktal's ubuntud4.zip file instead of the boot script provided in the guide) after the image downloads (will take a while because the file is HUGE) click next
For this screen, the instructions differ from the app.
1. With your D4 plugged into your PC in USB Mass Storage, create a directory (folder) called ubuntu in the EXTERNAL sdcard's root*
2. Extract the image you downloaded to that directory
3. Download and extract the attached .sh (ununtud4.zip) to that directory
4. Disconnect your phone from your PC
5. Open terminal and run the following commands:
su [ENTER]
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext [ENTER]
cd /mnt/sdcard-ext/ubuntu [ENTER]
sh ubuntud4.sh [ENTER]
960x540 [ENTER]**​If you get an error message: ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "then") see troubleshooting section below.​killall -TERM Xtightvnc [ENTER]
vncserver :1 -geometry 960x540 [ENTER]**​6. Open androidVNC app and enter the following settings:
Nickname: Anything you want
Password: ubuntu
Address: localhost
Port: 5901
Color Format: 24-bit color (4 bpp)
7. Hit connect
8. Hit your menu soft button and then set input mode to touchpad
9. You have ubuntu on your Droid 4!
To "shut down" ubuntu:
press the menu button, select disconnect in VNC
In terminal type this command 3 times (terminal will close itself when you are done):
exit [ENTER]
To "start up" ubuntu again:
Follow steps 5-8 above
Troubleshooting:
If you get the error message: ubuntud4.sh: 45: syntax error: end of file unexpected (expecting "then") you are about to have fun with vi at the command line.
Do the following from inside terminal:
su [ENTER]
cd /mnt/sdcard-ext/ubuntu [ENTER]
vi ubuntud4.sh [ENTER]​If you see ^M or ^ at the end of any line (remember to scroll all the way to the right to see the end of long lines) remove it. once you do that, everything should work just fine. (See the Vi Cheat Sheet above for help with Vi)
Note: Vol Up + E is [ESC] by default in this terminal emulator
Notes:
* It does not have to be on the external SD, but if you put it on the internal SD you will have to modify things as needed-- if you dont know what needs to be changed, just put it on the external SD.
** Screen size can be whatever you want it to be, but 960x540 is the size of the D4 screen.
*** This is a fairly involved process... especially when it comes to editing the .sh file in vi things can get very frustrating and hard, but just take your time and you will get it. As always, doing anything with root access on your phone, especially on the command line has risks. I am not responsible if anything goes wrong with your phone... proceed at your own risk!
greekchampion04 said:
Notes:
* It does not have to be on the external SD, but if you put it on the internal SD you will have to modify things as needed-- if you dont know what needs to be changed, just put it on the external SD.
** Screen size can be whatever you want it to be, but 960x540 is the size of the D4 screen.
*** This is a fairly involved process... especially when it comes to editing the .sh file in vi things can get very frustrating and hard, but just take your time and you will get it. As always, doing anything with root access on your phone, especially on the command line has risks. I am not responsible if anything goes wrong with your phone... proceed at your own risk!
Click to expand...
Click to collapse
I actually got it up and running on my internal sdcard partition. Pretty much just have to modify the Mount remount command, and a few lines in the script.
Here's the original command
Code:
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
And the modified one
Code:
mount -o remount,rw,exec,suid /dev/block/vold/179:57 /mnt/sdcard
Only things you have to change are the device location(179:57) and mount location(drop the -ext after sdcard)
Now, after that you also have to modify the script a bit. Just go through it, and anywhere that you see sdcard-ext, drop the -ext off the end.
thanks for putting that up for everybody! like i said, if you know what you are doing its not a hard swap to make.
Is anyone else getting just a gray screen when they remote in? What could be causing this?
i had that same problem at first... did you use zeroktal's ubuntud4.zip file? or did you use the ubuntu.sh file included in the app?
I used the sh file included. I did however fix the problem, when mounting at the start i confused vold with void. I did not get the file system mounted properly. This method does work!! however I am currently trying to get bash on my droid to replace sh as the shell. I've checked the forums but have not found anything yet about someone installing bash on the droid 4. With no way for nandroids I feel i should wait before I kill sh.
Sent from my DROID4 using XDA App
If you mod your init.sh in your root directory to the following, your vnc will work on startup without issue. It will also shutdown vnc on exit.
#!/bin/bash
#############################################
# Asks User to screen size and saves as REZ #
#############################################
#echo "Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:"
#read REZ
##############################################
# Pick which desktop environment to use, this#
# is done by having a xstartup file for each #
# desktop, then renaming the one you want to #
# use to 'xstartup' before boot #
##############################################
echo "Please select which Desktop environment you want to use, type the number to select it then press [ENTER]"
echo "1 - LXDE"
echo "2 - Gnome"
echo "Make your Selection:"
read DESKTOP
if [ $DESKTOP == 1 ]
then
mv /root/.vnc/lxstartup /root/.vnc/xstartup
fi
if [ $DESKTOP == 2 ]
then
mv /root/.vnc/gxstartup /root/.vnc/xstartup
fi
###########################################
# Tidy up previous LXDE and DBUS sessions #
###########################################
rm /tmp/.X* > /dev/null 2>&1
rm /tmp/.X11-unix/X* > /dev/null 2>&1
rm /root/.vnc/localhost* > /dev/null 2>&1
rm /var/run/dbus/pid > /dev/null 2>&1
############################################################
# enable workaround for upstart dependent installs #
# in chroot'd environment. this allows certain packages #
# that use upstart start/stop to not fail on install. #
# this means they will have to be launched manually though #
############################################################
dpkg-divert --local --rename --add /sbin/initctl > /dev/null 2>&1
ln -s /bin/true /sbin/initctl > /dev/null 2>&1
###############################################
# start vnc server with given resolution and #
# DBUS server, (and optionally an SSH server) #
###############################################
dbus-daemon --system --fork > /dev/null 2>&1
/etc/init.d/ssh start
vncserver :1 -geometry 960x540
echo
echo "If you see the message 'New 'X' Desktop is localhost:1' then you are ready to VNC into your ubuntu OS.."
echo
echo "If VNC'ing from a different machine on the same network as the android device use the 1st address below:"
##########################################
# Output IP address of android device #
##########################################
ifconfig | grep "inet addr"
echo
echo "If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)"
echo
echo "To shut down the VNC server and exit the ubuntu environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!"
echo
###############################################################
# Spawn and interactive shell - this effectively halts script #
# execution until the spawning shell is exited (i.e. you want #
# to shut down vncserver and exit the ubuntu environment) #
###############################################################
/bin/bash -i
#########################################
# Disable upstart workaround and #
# kill VNC server (and optionally SSH) #
# Rename used xstartup to its first file#
#########################################
killall -TERM Xtightvnc
/etc/init.d/ssh stop
Also save the follow lines between ### as remount.sh on your system partition. Then chmod 755 /system/remount.sh. Now you can just run run from a terminal /system/remount.sh and voila it remounts correctly and starts ubuntu(with the above fixes). Im still working on the unmounts.
####### for the internal sd card
mount -o remount,rw,exec,suid /dev/block/vold/179:57 /mnt/sdcard
/mnt/sdcard/ubuntu/ubuntu.sh
######
OR
####### for the external sd card
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
/mnt/sdcard-ext/ubuntu/ubuntu.sh
#######
great stuff!
feel free
Feel free and take, modify, repost or edit anything I touch.
QUESTION:
After I delete all the ^M and ^ what do i do next? I try to hit the command ":x" to exit and save changes but it just creates another line. Also when I press VOL UP + E to escape nothing happens.
PhanTuhC said:
QUESTION:
After I delete all the ^M and ^ what do i do next? I try to hit the command ":x" to exit and save changes but it just creates another line. Also when I press VOL UP + E to escape nothing happens.
Click to expand...
Click to collapse
In vi, the command to save and exit is :wq (probably short for write and quit).
remember, read up on the vi quick-reference guide: http://www.lagmonster.org/docs/vi.html
OK I fixed it but now its not letting me connect with androidVNC. All the settings entered is correct but when I try to connect it says:
"VNC connection failed!" localhost/127.0.0.1:5901 - Connection refused"
ok, i've gone thru this a few times (slowly and deliberately) and must be missing something...the directions seem pretty straightforward! here's what i know...
busy/terminal/vnc are all installed
small 2.5gb image is unzipped in /sdcard-ext/ubuntu directory
the attached .sh file from page 1 is in the same directory
i removed all ^M using vi
but when I try sh ubuntud4.sh i get an error...
"mkdir failed for /data/local/mnt/ubun, No such file or directory"
(plus a few other errors)
should the directory be "ubun" or "ubuntu"? am I typing something incorrectly?
copy and paste new script
Copy and paste the new scripts I posted. They will fix your problem. Remember to use the remount script from /system/ the rest will work perfectly if you are root. I'll check back later on your progress.
Ok, well I started from scratch (deleted both .img and .sh files) and it's still not working.
I have all the apps installed (and yes rooted, SU works just fine)
I used Ubuntu Installer app to download the image zip (tried both the large and small img)
I downloaded the .sh file from the first post
The /sdcard-ext/ubuntu/ folder now has two files: "ubuntu.img" and "ubuntud4.sh"
All ^M characters have been removed from .sh file
Still no joy...
Ideas? What am I missing?
In terminal, I can set SU permissions and the mount/cd commands work just fine...it's the last sh command that spits out a bunch of errors about not being able to create/find the directories.
I'm going to format the sdcard and try again...any help is appreciated.
Update: Even after re-formatting the SD and following the steps exactly, no luck!
Did you remember to remount the sdcard with exec and suid permissions?
Andbuntu will work much better than this method. It works on every single phone with modification to the "environmental variables".
http://code.google.com/p/andbuntu/
Follow the directions in the script to make the process much easier than the first post.
instructions:
generate an image with rootstock on an ubuntu computer.
put it on /sdcard/ubuntu/ubuntu.img
run the script on your phone with "sh /path/to/script"
Here is the script. http://andbuntu.googlecode.com/svn/trunk/uboot
Also, run "firstRun" to make things like terminals work properly.
Adamoutler: That didnt work for me. The permissions were incorrect on the mounted partitions.
Sent from my DROID4 using XDA App

[KERNEL](31/7/2013) NFS & CIFS modules

Here are NFS and CIFS modules compiled for use against the STOCK KERNEL ONLY.
Works for me on my Xperia Z.
Notes:
---------
NFS: supports NFSv3 only.
CIFS: Has the known kernel bug that affected all versions after 3.3.8 until ~3.5, which requires you to manually specify the unc parameter in the mount options.
I have included lockd.ko, sunrpc.ko for use with NFS, and nls_utf8.ko (only needed for .350, .432 has it compiled in to the kernel) for use with either.
I have only tested from the command line, so I won't offer any support for use from MountManager/CIFSManager. You are welcome to try to use them from there if you prefer.
4.2 introduced a more complicated multi-user storage system. (Details here). This may make it more difficult for you to use the mounted storage in your other apps (simply appearing as an empty folder). The only known workaround (please correct me if you know a better way) is to perform the mount via adb (yes, this you can do this from a script on your local device) so that all open apps get permissions to 'see' the mount.
Usage:
----------
Code:
insmod nfs.ko/cifs.ko/whatever
mount -t nfs -o vers=3,nolock,hard,intr 1.2.3.4:/yourmount /path/to/mount/to
mount -t cifs -o username=youruser,password=yourpassword,unc=\\\\1.2.3.4\\yourshare //1.2.3.4/yourshare /path/to/mountpoint/
Current Versions:
-------------------------
10.1.A.1.350 tar zip
10.3.A.0.423 tar zip
SHA512 sums:
---------------------
10.3.A.0.423
Code:
2b6109a329ed825b358607cd0f6218e064bd368c45bbecde38fd103f30c8cb323bfa4374ee4d85a77e70f52bf81109044f9f6a2e01ea4d521cb27a274a941d1b cifs.ko
20af544d34cc83b4955503d7232e8ea575c1d35abfd5e6c5c9726990ef9f945eaea9d22c91c95f6c03e366e9837fd30e60e3a09995c4d96bb7d4d93ca96edb6c config_nfscifs
6900aa64ce563f1d1c03e91aec2cbf89a69c902bbfdc78f3dca4bba2045e7106633d920da5ca285ebab7c26097e8ecc0b29c967fa14d28f057ada39dc8c8a294 lockd.ko
4760decf2cf3828af937ed844f436133c429a6db33bbdcd7563f8e6613414850fa13245e102115811196c1714522ec1c932ee7ea99ae9d4c4041425e63cf3a91 nfs.ko
4e0cdd708973ee1a90de490b9f2d0fc345447668d05539ebb97514997733be7421efbede2c0235414a3ad6be730bc1dfe20359ac285ccb9ff4038a7d34e2d4dd sunrpc.ko
10.1.A.1.350
Code:
5d6c29f519b3b85a08b0380271a64e52d23d641f030639ff560c7966811f2ec4b782a32f52b615d57463324169e7b410f51639513c038ddcf79895bcd7ca070a cifs.ko
34b767fce2c55fe5c3eb711df2ac7e450903901cecd21c165d5a1471da91f3a27c37c1d4c0530647064c1b92eac1b11751c2a829a1dbd0efec881a60be07477f config_nfs
eff854c9b28ae50d2b305ca4e230abbe8305d609783cc1ceb6b01a6d36ea55131cca29ab64cb3acf584fefb7c7bb6292e66f441333691da113f2c81d894ddbf9 config_nfscifs
6632ffd08354ee9b5e36615e19754696e8c497a8ce3639846b929b3d7085008f0c225bece20c6c96351c4e8612fc59084db975d71f44bd76b2c96b71d4ecef23 lockd.ko
278886d1a3684e1274477617b501b75d1a0d8caafc15d195564a3ef17dedbab90aa9e22eda7ec2d50e0e23206346d60b0f7b71a241e46252fb32ab2ad9ff088f nfs.ko
42c0bd96555a6396e24ea20e35305980a13cbf08bdc02fe660da5b23a641e70a38361c769f7d722bf116a8bc586ab20d278e3e8210b008524e5566fb46b740bb nls_utf8.ko
4a4b3bf6289904a0dedd889aacbb22a1a562fbaa7b78e714f9e1739ff7809187210b1cfac5632f740f81f4bb8213589707dc298319d7affb9910a33af1cd5d8a sunrpc.ko
Cool !
I always use CIFS previously on my old samsung.
Tks a Lot !
:good:
Using script is fine for me, so that I don't need to install anything.
[KERNEL] NFS & CIFS modules
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21
thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
thanks
Sorry for my ignorance, but what this things are needed for?
rregn said:
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21
Click to expand...
Click to collapse
These are for the kernel included with 10.1.A.1.350 which is 3.4.0-g298631f-01992-g95474bc.
deligoz said:
thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
Click to expand...
Click to collapse
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
xNAPx said:
Sorry for my ignorance, but what this things are needed for?
Click to expand...
Click to collapse
These modules are used to access NFS/CIFS mounts from your phone, since Sony didn't compile them in by default. (If you don't know what NFS/CIFS is, you don't need this. )
modsRule said:
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
Click to expand...
Click to collapse
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.
Dr_SUSE said:
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.
Click to expand...
Click to collapse
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.
modsRule said:
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.
Click to expand...
Click to collapse
Done. Check the first post for downloads.
modsRule said:
Done. Check the first post for downloads.
Click to expand...
Click to collapse
Thanks for that!
Good news is that the module's loaded:
Code:
[email protected]:/ # lsmod
cifs 243687 0 - Live 0x00000000
wlan 2559132 0 - Live 0x00000000 (O)
texfat 121149 0 - Live 0x00000000 (PO)
cfg80211 128293 1 wlan, Live 0x00000000
hid_sony 1984 0 - Live 0x00000000 (O)
Code:
[email protected]:/ # modinfo /system/lib/modules/cifs.ko
filename: /system/lib/modules/cifs.ko
license: GPL
author: Steve French <[email protected]>
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
version: 1.78
version: %s
srcversion: 3F86E0A9406EADE34D14793
depends:
vermagic: 3.4.0-gba62870 SMP preempt mod_unload modversions ARMv7
parm: enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767.
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048
The bad news is I still can't get the share to mount.
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
255|[email protected]:/ #
Code:
mount -t cifs -o username=un,password=pw \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
mount -t cifs -o username=un,password=pw unc=\\\\10.0.0.7\\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw, \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
mount -t cifs -o username=un,password=pw,\\10.0.0.7\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
dmesg
<3>[ 1619.729064] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1720.159484] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1880.073638] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1931.261993] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1963.688110] CIFS VFS: Connecting to DFS root not implemented yet
I've tried every reasonable variation I can think of in the syntax. Can you help me figure out what I'm doing wrong here?
Of interest?
Busybox /CIFS Bug/Patch
When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.
modsRule said:
When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.
Click to expand...
Click to collapse
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.
Dr_SUSE said:
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.
Click to expand...
Click to collapse
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.
modsRule said:
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.
Click to expand...
Click to collapse
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
I did notice that I do not have these two modules indicated in the script. Do I need them? Nothing (CIFS Manager, Mount Manager) seems to have installed them.
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)
Dr_SUSE said:
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
Click to expand...
Click to collapse
That is strange. What version of busybox do you have?
Dr_SUSE said:
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
Click to expand...
Click to collapse
These are not included because they are compiled into this kernel version by Sony.
Dr_SUSE said:
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)
Click to expand...
Click to collapse
Surprise!</sarcasm>
Busybox v1.20.2-jb static 2012-11-25
Sent from my C6502 using xda app-developers app
edit: Updated to 1.21, no difference.
Code:
busybox mount -t cifs -o username=xxxxx,password=xxxxxx,unc=\\\\10.0.0.7\\Music \\\\10.0.0.7\\Music /storage/emulated/legacy/Music
mount: mounting \\10.0.0.7\Music on /storage/emulated/legacy/Music/ failed: Invalid argument
Sometimes it tells me it can't read fstab. I don't know if that means I'm getting warmer or colder.
Dr_SUSE said:
Busybox v1.20.2-jb static 2012-11-25
Click to expand...
Click to collapse
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass
modsRule said:
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass
Click to expand...
Click to collapse
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.
Dr_SUSE said:
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.
Click to expand...
Click to collapse
I am running TWRP on a locked BL here. My dmesg is also full with messages about /sbin/ric (mine has mode 0644). Yet this mounting works.
I am not sure why you would get "Operation now in progress" when trying to mount.
This stuff here also works on the Xperia Tablet Z!
On my tablet with Android 4.1.2 the first version (for 10.1.A.1.350) works. :good::good:
(But only CIFS; when trying to insmod nfs.ko, I get an error.)
Opposed to what seems the case on the Xperia Z, it's even not necessary to have the "unc:////" stuff in the mount command.
And one important addition: The mount command should always include the option "iocharset=utf8" because otherwise filenames with special characters cannot be processed correctly.
Best Wishes,
Hasenbein

Boot script does not have priviledge

I want to mount the second partition of my SD card at boot time for Link2SD's benefit, but I have been having a hard time.
I copied Link2SD's script in /data/adb/service.d/ and made some small changes:
Code:
#!/system/bin/sh
LOG=/data/link2sd-11link2sd.log
echo >> $LOG
date >> $LOG
sleep 10
mount -t ext4 -o rw,noatime /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
My log shows: "/data/adb/service.d/link2sd.sh: line 6: mount: Permission denied".
I have therefore tried to use su -c, and my log then shows: "/data/adb/service.d/link2sd.sh: line 7: su: Permission denied".
What am I doing wrong?
If it's useful, the log is also not showing the date.
noticed similar strange behavior guess Magisk is kinda broken

Question Fork Magisk for Vivo Devices

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

Categories

Resources