How to use the internal memory - Milestone 2 General

1.First crate a 5G disk file called sdfs.img(or other) in the /data/local directory and make it to vfat(or other) file system
su
dd if=/dev/zero of=/data/local/sdfs.img bs=1024 count=5242880
busybox mkfs.vfat /datd/local/sdfs.img
2.Crate a file in /system/etc/init.d to mount it to /mnt/sdcard/mydata(or other) on boot
The file contents are as follows
#use sleep 50s(less or more) to wait the sdcard be mouted
busybox sleep 50s
umount /mnt/sdcard/mydata
losetup -d /dev/block/loop0
mount -o loop,umask=702,uid=1000,gid=1015 -t vfat /data/local/sdfs.img /mnt/sdcard/mydata
Then you can use the internal memory
Sorry for my poor english

alan101 said:
1.First crate a 5G disk file called sdfs.img(or other) in the /data/local directory and make it to vfat(or other) file system
su
dd if=/dev/zero of=/data/local/sdfs.img bs=1024 count=5242880
busybox mkfs.vfat /datd/local/sdfs.img
2.Crate a file in /system/etc/init.d to mount it to /mnt/sdcard/mydata(or other) on boot
The file contents are as follows
#use sleep 50s(less or more) to wait the sdcard be mouted
busybox sleep 50s
umount /mnt/sdcard/mydata
losetup -d /dev/block/loop0
mount -o loop,umask=702,uid=1000,gid=1015 -t vfat /data/local/sdfs.img /mnt/sdcard/mydata
Then you can use the internal memory
Sorry for my poor english
Click to expand...
Click to collapse
Cool, I'll try.

alan101 said:
1.First crate a 5G disk file called sdfs.img(or other) in the /data/local directory and make it to vfat(or other) file system
su
dd if=/dev/zero of=/data/local/sdfs.img bs=1024 count=5242880
busybox mkfs.vfat /datd/local/sdfs.img
2.Crate a file in /system/etc/init.d to mount it to /mnt/sdcard/mydata(or other) on boot
The file contents are as follows
#use sleep 50s(less or more) to wait the sdcard be mouted
busybox sleep 50s
umount /mnt/sdcard/mydata
losetup -d /dev/block/loop0
mount -o loop,umask=702,uid=1000,gid=1015 -t vfat /data/local/sdfs.img /mnt/sdcard/mydata
Then you can use the internal memory
Sorry for my poor english
Click to expand...
Click to collapse
It didn't work here
I got this: mkfs.vfat: lseek: Value too large for defined data type

edgaredgar said:
It didn't work here
I got this: mkfs.vfat: lseek: Value too large for defined data type
Click to expand...
Click to collapse
because the busybox does not support
use this busybox

Related

Need help with apps2sd on milestone

I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Fixed it by changing app-private folder two
hey glaus...
this almost seems like a guide, hehe...
i'm trying to get apps2sd to work on my milestone as well...
i tried booting in recovery mode and entering the chain of commands you just set out....
but when i go into recovery mode, i see the reboot system option, apply sdcard:update.zip, wipe data/factory reset and wipe cache partition....
and under it, i have e: can't open /cache/recovery/command
any ideas on how to fix this or where can i enter those commands you set out?
i tried in adb shell, but i get a /data/busybox/chown is not found error when setting the permissions...
thanks!
do
crap me too and it deleted some apps 2 i really want this been trying for a week oh i have a telus milestone and get the same above error.busybox is installed and hard drive is partioned
ah crap market is gone 2 lol gotta do a nano restore......man i want this bad i even bricked my phone and brought it back to life this week arghhhh
yeah...i don't know where claus is from...but if he has a telus milestone, he's the only one i've seen been able to install apps2sd with a telus milestone
i've seen other countries, even some with the same bands as we have, but none have had the actual "telus" one....the funny thing is that i can get everything else to work..
i have titanium backup pro, emulator, root explorer and everything is at superuser access...
if claus can help, i will bear his children
edit: how the heck do you install/activate the mot_boot_mode script? I see reference to it in a few wikis on basically that's what will allow us to use apps2sd...but I have no clue how to implement it
got app2sd working on milestone using a diff method will post soon
ok i got app2sd working on my telus milestone here is how i did it if u tried this method here ur gunna have to unroot then root or use a nano backup of freshly rooted phone busybox need mot to be installed so use titanium for back up and proceed http://forum.xda-developers.com/showthread.php?t=692367
ClausG76 said:
I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Click to expand...
Click to collapse
fixed http://forum.xda-developers.com/showthread.php?t=692367

Creating Android's very own SDCard filesystem

If I were to create a 1.5gb fakesd.img ext2 file
done once, on computer
dd if=/dev/zero of=fakesd.img bs=1048576 count=1536
mke2fs -F fakesd.img
--------
done in rootfs-init
losetup /dev/block/loop2 /sdcard/fakesd.img
mount -t ext2 -o noatime,nodiratime /dev/block/loop2 /fakesd
change " symlink /mnt/sdcard /sdcard/ " in rootfs-init.rc
symlink /mnt/sdcard /fakesd/
probably want to avoid changing the external path from /mnt/sdcard/ to anything.. for compatibility sake..
I have my windows stuff on my card. I want android to index as little as possible yet still be able to access my sd card at /sdcard.. Will this work?
I have a feeling that someone is just going to tell me to partition card. I don't feel like it right now..
Partition the card Just kidding, but I like your thinking.
Trying to test it out post boot.. My router has more command line functionality, thanks Google.

[Q?] Problem with /efs partition (can't mount but IMEI OK)

Problem with /efs partition (can't mount but IMEI OK)
Hi guys,
I've been searching for two days before posting this.. I'm completely mad on how to repair this problem.
I tried to flash a custom recovery on my GT-9505 doing this in terminal (of course my phone was rooted):
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p10
The problem is that I flashed the recovery on the wrong partition, as /mmcblk0p10 is for /efs (right?)
I was on stock firmware I9505XXUDMH8.
When I reboot, phone went on factory mode and I couldn't make calls. Wifi was working right.
I flashed CM 10.1.3 last night and now I can make calls. IMEI and wifi mac are shown ok in status, but bt is not not available and I think serial number is wrong (3403a6f2??)
I suppose that if I go back to stock the problem will be the same with factory mode and no calls because flashing this won't write on /efs.
I have a backup of efs (efs_19700508_054443.img) (~13MB) done in philz touch recovery, but this was made after I corrupted the /efs.
So the problem is I can't mount /efs in recovery neither in File Manager or terminal.
Any ideas on what can I do to repair it?? Thanks in advance and sorry if I have posted in wrong place
Update:
I've made another backup but with EFS Professional: GT-I9505_20131026_190930.tar.gz -> efs.img.ext4
If it holds for something...
Edit: BT address is showing correctly when BT is ON (sorry for that mistake!)
So the only thing is showing wrong (i think) is serial number.
i still cannot mount /efs nor access it via root explorer...:crying:
If I'm on Windows 7, is there any way to mount the efs.img file to edit files into it? (I.e. Like in daemon tools)
If I can format /efs then I'll only hace to edit the files in efs.img to edit my serial number for the good one and copy these files into /efs.
Then my /efs partition won't be corrupted and I will be able to mount it
Someone can give any idea?
Up!
Up!
Uuuup..!
If I restore the .img backup that I have of /efs in recovery it doesn't change anything... Maybe cause it's corrupted?
fran41 said:
If I restore the .img backup that I have of /efs in recovery it doesn't change anything... Maybe cause it's corrupted?
Click to expand...
Click to collapse
try these commands in terminal emulator:
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
echo -n ON > /efs/FactoryApp/keystr
echo -n ON > /efs/FactoryApp/factorymode
sync
reboot
samersh72 said:
try these commands in terminal emulator:
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
echo -n ON > /efs/FactoryApp/keystr
echo -n ON > /efs/FactoryApp/factorymode
sync
reboot
Click to expand...
Click to collapse
Thanks for reply.
First line (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs) Mount: invalid argument
Something spelled wrong?
fran41 said:
Thanks for reply.
First line (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs) Mount: invalid argument
Something spelled wrong?
Click to expand...
Click to collapse
Ok, try without first command (mount....)
if not try this
Code:
mount -w -t ext4 /dev/block/mmcblk0p10
samersh72 said:
Ok, try without first command (mount....)
if not try this
Code:
mount -w -t ext4 /dev/block/mmcblk0p10
Click to expand...
Click to collapse
[email protected]:/ # echo -n ON > /efs/FactoryApp/keystr
sh: can't create /efs/FactoryApp/keystr: No such file or directory
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Should be like this??:
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
fran41 said:
[email protected]:/ # echo -n ON > /efs/FactoryApp/keystr
sh: can't create /efs/FactoryApp/keystr: No such file or directory
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Should be like this??:
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
Click to expand...
Click to collapse
it is weird! try:
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
or
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
samersh72 said:
it is weird! try:
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
or
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
Click to expand...
Click to collapse
[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
fran41 said:
[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
ext4 /dev/block/mmcblk0p10 /efs <
mount: Invalid argument
Click to expand...
Click to collapse
this command work for me (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10)
i dont know what is the matter with your efs partition!
by the way, install busybox then do the commands
samersh72 said:
this command work for me (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10)
i dont know what is the matter with your efs partition!
by the way, install busybox then do the commands
Click to expand...
Click to collapse
I have busybox installed! I'm getting mad with this Nothing seems to work...
fran41 said:
I have busybox installed! I'm getting mad with this Nothing seems to work...
Click to expand...
Click to collapse
try to re-partition the phone partitions using pit file with the firmware, it may help
samersh72 said:
try to re-partition the phone partition using pit file with the firmware, it may help
Click to expand...
Click to collapse
I did that once flashing it with stock and nothing...
fran41 said:
I did that once flashing it with stock and nothing...
Click to expand...
Click to collapse
my last commands to mount efs (make sure that busybox binaries are installed from the application)
Code:
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
or
Code:
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
you can try also to flash the modem twice in odin as "phone"
if not, i guess you have the service center option
samersh72 said:
my last commands to mount efs (make sure that busybox binaries are installed from the application)
Code:
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
or
Code:
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
you can try also to flash the modem twice in odin as "phone"
if not, i guess you have the service center option
Click to expand...
Click to collapse
This doesn't work:
[email protected]:/ # busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: mounting /dev/block/mmcblk0p10 on /efs failed: Invalid argument
This works:
255|[email protected]:/ # mke2fs /dev/block/mmcblk0p10
mke2fs /dev/block/mmcblk0p10
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
3488 inodes, 13952 blocks
697 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=14417920
2 block groups
8192 blocks per group, 8192 fragments per group
1744 inodes per group
Superblock backups stored on blocks:
8193
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[email protected]:/ #
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
[email protected]:/ #
Now I go to /efs in root explorer and there's a folder lost+found

Need help on userinit script.

I want a script that will rename a /system/app on boot in userinit (.d or.sh) in /data/local. This is my first script and was thrilled when I was able to get it to work in SManager. I copied the script to /data/local and renamed to userinit.d. Rebooted, checked the file, not renamed. More research, tried various ways, which also work in SManager, but not as a userinit script. I have included the three ways I have tried with attempt counts and used # on two of them. I didn't use these all at once but included them so you could see what I've tried including a delay o allow time for the "mount" to work. This doesn't work in SManager in boot mode. And returns that it cannot rename because it is ro.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
#export PATH=${PATH};/system/bin;/system/xbin
FN=/system/app/DSPManager.apk
if (FN.exists())
then
# attempt one
#busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p5 /system
# attempt two
#busybox mount -o remount,rw / 2>/dev/null
#busybox mount -o remount,rw rootfs 2>/dev/null
#busybox mount -o remount,rw /system 2>/dev/null
# attempt three
busybox mount -o remount,rw /system
#thread.wait(3000)
mv $FN $FN.bak
busybox mount -o remount,ro /system
#thread.wait(3000)
#
#busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p5 /system
#
#busybox mount -o remount,ro / 2>/dev/null
#busybox mount -o remount,ro rootfs 2>/dev/null
#busybox mount -o remount,ro /system 2>/dev/null
fi
Maybe I'm trying more than the userinit is supposed to do. I want this to survive and do its thing after Nightly updates. I use Speaker boost for volume and don't want DSPmanager taking extra memory.
Two things, first make sure you are using a root file manager and have set the directory to rw. Second, if you want the file to execute in /data/local you must name it userinit.sh and set the permissions of the file for execute. Or you can create a folder named userinit.d in /data/local and put multiple script files in that folder. Each script file must have its permission set to execute. To understand this, look at the contents of /etc/init.d/90userint.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
Two things, first make sure you are using a root file manager and have set the directory to rw. Second, if you want the file to execute in /data/local you must name it userinit.sh and set the permissions of the file for execute. Or you can create a folder named userinit.d in /data/local and put multiple script files in that folder. Each script file must have its permission set to execute. To understand this, look at the contents of /etc/init.d/90userint.
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse
I have the file permissions set to rwxr-xr-x (755) as well as the folder userinit.d set to the same. I have been using either Speed software's Root explorer (prefered) or Jrummy's Root Browser. I have named the script in the userinit.d folder "90RnamDSP". Again I can run the script in the root browser as a script and it renames the file. After set the file name back to the .apk I reboot, check in the /system/app and the file is not renamed. I have given the specific script I am using in the userinit.d folder.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
path=/system/bin:/system/xbin;
FN=/system/app/DSPManager.apk;
if [ -e $fn];
then
busybox mount -o remount,rw -t /dev/block/mmcblk0p5 /system;
sleep 5;
mv $FN $FN.bak;
busybox mount -o remount,ro -t /dev/block/mmcblk0p5 /system;
fi;
You have the mount commands wrong for a userinit script. It should be:
mount -o remount,rw /system
and
mount -o remount,ro /system
And you don't need the path statement. You don't need the busybox in front of mount either. And shouldn't $fn be capitalized in the if statement?
Sent from my BN NookHD+ using XDA Premium HD app
Yippee, Yahoo, it works
leapinlar said:
You have the mount commands wrong for a userinit script. It should be:
mount -o remount,rw /system
and
mount -o remount,ro /system
And you don't need the path statement. You don't need the busybox in front of mount either. And shouldn't $fn be capitalized in the if statement?
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse
Thanks for your help and patience. Didn't need the sleep either. I will be posting this on my help post noted in my signature below. I will give you thanks there as well. Couple of final questions.
Can you recommend a how to script reference ie: init script for dummies?
Can you recommend a how to make an install zip and install script, (again for the untrained)?
I have included the final code to maybe help someone trying to do something similar.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
FN=/system/app/DSPManager.apk;
if [ -e $FN ];
then
mount -o remount,rw /system;
mv $FN $FN.bak;
mount -o remount,ro /system;
fi;
pastordl said:
Thanks for your help and patience. Didn't need the sleep either. I will be posting this on my help post noted in my signature below. I will give you thanks there as well. Couple of final questions.
Can you recommend a how to script reference ie: init script for dummies?
Can you recommend a how to make an install zip and install script, (again for the untrained)?
I have included the final code to maybe help someone trying to do something similar.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
FN=/system/app/DSPManager.apk;
if [ -e $FN ];
then
mount -o remount,rw /system;
mv $FN $FN.bak;
mount -o remount,ro /system;
fi;
Click to expand...
Click to collapse
I don't know of any how-to's for those topics. I learned by studying examples of how others did them.
Sent from my SCH-i705 using Tapatalk
leapinlar said:
I don't know of any how-to's for those topics. I learned by studying examples of how others did them.
Sent from my SCH-i705 using Tapatalk
Click to expand...
Click to collapse
Thank you again. This script and a second one that adds the folder and the script are available at this post.
http://forum.xda-developers.com/showpost.php?p=50795653&postcount=6
I was able to make and debug the installer in a couple of hours. I thanked you in the post also.
The post is part of the help/info/reference post that I asked your permission to list your help files on.

Unable to mount System as rw in 7.1.1 DP

I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar. I am currently using the build.prop method which doesn't work nicely with the Now on Tap action of Swipe Navigation which is what I am ultimately trying to fix.
I tried using Solid Explorer to simply create the new directory like I did previously in 7.0 and 6.x but was unable to do so (action failed). I decided to try using the terminal and create the folder and move files from there but got the message that the system was read-only. I then attempted to mount system a few different ways all of which failed. I did use su before entering these commands.
Code:
angler:/system/vendor $ mkdir overlay
mkdir: 'overlay': Read-only file system
angler:/system/vendor $ mount -o rw,remount,rw /system
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system' not user mountable in fstab
angler:/system/vendor $ /system/bin/mount -o rw,remount,rw /system /system
mount: '/system' not in /proc/mounts
angler:/system/vendor $ /system/bin/mount /system
mount: bad /etc/fstab: No such file or directory
Googling around didn't yield much in the way of solutions other than these different methods of mounting system. Am I just unable to mount system as rw in 7.1.1 currently, and if so, is there another way to accomplish what I want?
I'm trying to find thread I read this from, so if I find it I'll post link to it. When I was on early 7 previews that was set up with systemless root I went into twrp and then went to terminal and typed the following, touch su. When your in terminal cd to both bin and xbin and type command "touch su" without quotes. Then reboot and you should be able to use something like es file explorer to get into and write in /system. Hope that helps.
Found it, look to post = 15
http://forum.xda-developers.com/nexus-6p/help/es-file-explorer-doesnt-understand-t3242775
Unfortunately that did not end up working for me, thanks for looking up the link for me though!
On Nougat the rw mount command should be typed like this:
mount -o rw,remount /system
then for touch:
touch sbin/su
Thank you blitz for clarifying.
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
AbuShabanov said:
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
Click to expand...
Click to collapse
I'm not sure what you're trying to accomplish but still:
The touch sbin/su means creating an empty file called su in the sbin subdirectory under the current directory. So if there is no subdir named sbin under /system/bin, then it's not going to work
Secondly, you should know about the ls command: ls -la lists the files in the current directory, and remember than in unix and linux terminology, a directory is also a file so you'll also see directories (including current "." and parent "..")
Third, you should know about the df command which shows filesystem disk space usage. df -h will show you how much free space you have an all of your filesystems, including system.
Last, with great power comes great responsibilities. Running the wrong command as root will easily make your system unusable.
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
rchtk said:
I'm not sure what you're trying to accomplish
Click to expand...
Click to collapse
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
rchtk said:
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
Click to expand...
Click to collapse
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
AbuShabanov said:
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
Click to expand...
Click to collapse
Yes 7.1.1.
Substratum created the overlay directory and the link to it.
Manually that would be:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
But links do take a very small amount of bytes (roughly name and target) so for that, you'll need some space in your vendor partition (no space left on /vendor). check with "df".
I have 3.8MB free (that's an original vendor + overlay link)
rchtk said:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
Click to expand...
Click to collapse
Well, this works and I was able to mount system and vendor, create the link, move the apk file, etc but it appears that the apk itself is not working on NPF10C. Thank you for your help and the refresher on the unix commands!

Categories

Resources