All sensors broken - need persist partition - OnePlus 2 Q&A, Help & Troubleshooting

SOLUTION: post #18
Hello,
For some reason all of my sensors are gone. See attachment.
Due to some problems i've formatted my "persist" partition. And from what i read, that partition contains all sorts of sensor parameters. So i guess i shouldn't have.
I've checked all files on the forum and original OTA's from oneplus. None of them have (working) partition for me.
Therefor i would like to ask someone with an A2003 device who has working sensors and is running OOS 3.02 or CM13 to perform the following actions and share the file with me:
(root (adb and apps) needed)
Code:
adb shell
su
su
cd /sdcard
dd if=/dev/block/bootdevice/by-name/persist persist.dd.img
exit
exit
And share the file "persist.dd.img" with me. It's on your sdcard.
Thanks very much in advance!

_HugoBoss_ said:
Hello,
For some reason all of my sensors are gone. See attachment.
Due to some problems i've formatted my "persist" partition. And from what i read, that partition contains all sorts of sensor parameters. So i guess i shouldn't have.
I've checked all files on the forum and original OTA's from oneplus. None of them have (working) partition for me.
Therefor i would like to ask someone with an A2003 device who has working sensors and is running OOS 3.02 or CM13 to perform the following actions and share the file with me:
(root (adb and apps) needed)
Code:
adb shell
su
su
cd /sdcard
dd if=/dev/block/bootdevice/by-name/persist persist.dd.img
exit
exit
And share the file "persist.dd.img" with me. It's on your sdcard.
Thanks very much in advance!
Click to expand...
Click to collapse
I uploaded it to AFH a while back - it's the stock persist.img from the OnePlus 2.2.0 Qualcomm Recovery Package. AFAIK, it's not been updated since then.
persist.img

Spannaa said:
I uploaded it to AFH a while back - it's the stock persist.img from the OnePlus 2.2.0 Qualcomm Recovery Package. AFAIK, it's not been updated since then.
persist.img
Click to expand...
Click to collapse
Hi,
Yeah, google found it for me. But sadly, it didn't work for me.
I've tryed installing it
- trough fastboot (fastboot flash persist persist.img) and also
- dd'ing it and also
- creating a flashable zip package_extract_file("persist.img", "/dev/block/bootdevice/by-name/persist");
but none of it worked.. so i was kinda hoping for a newer version.

btw..
Code:
mount | grep persist
shows that the persist partition is mounted RW.
if someone could do the following:
Code:
adb shell
su
su
cd /sdcard
mkdir persist
cd persist
rsync -av /persist .
exit
exit
then zip the content of the folder persist on your sdcard.. would like to try that too.

_HugoBoss_ said:
btw..
Code:
mount | grep persist
shows that the persist partition is mounted RW.
if someone could do the following:
Code:
adb shell
su
su
cd /sdcard
mkdir persist
cd persist
rsync -av /persist .
exit
exit
then zip the content of the folder persist on your sdcard.. would like to try that too.
Click to expand...
Click to collapse
Code:
/system/bin/sh: rsync: not found

Spannaa said:
Code:
/system/bin/sh: rsync: not found
Click to expand...
Click to collapse
instead of
Code:
rsync -av /persist .
type
Code:
cp -r /persist .
Thanks

_HugoBoss_ said:
instead of
Code:
rsync -av /persist .
type
Code:
cp -r /persist .
Thanks
Click to expand...
Click to collapse
Code:
cp: No /persist: Permission denied

Spannaa said:
Code:
cp: No /persist: Permission denied
Click to expand...
Click to collapse
Are you root?
su
su

_HugoBoss_ said:
Are you root?
su
su
Click to expand...
Click to collapse
Yes
Code:
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
1|[email protected]:/ $ su
1|[email protected]:/ $ cd /sdcard
[email protected]:/sdcard $ mkdir persist
[email protected]:/sdcard $ cd persist
[email protected]:/sdcard/persist $ cp -r /persist .
cp: No /persist: Permission denied
1|[email protected]:/sdcard/persist $

Spannaa said:
Yes
Code:
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
1|[email protected]:/ $ su
1|[email protected]:/ $ cd /sdcard
[email protected]:/sdcard $ mkdir persist
[email protected]:/sdcard $ cd persist
[email protected]:/sdcard/persist $ cp -r /persist .
cp: No /persist: Permission denied
1|[email protected]:/sdcard/persist $
Click to expand...
Click to collapse
use "whoami" to check if you're really root..
Code:
su
[email protected]:/ # whoami
root

Spannaa said:
Yes
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
1|[email protected]:/ $ su
1|[email protected]:/ $ cd /sdcard
[email protected]:/sdcard $ mkdir persist
[email protected]:/sdcard $ cd persist
[email protected]:/sdcard/persist $ cp -r /persist .
cp: No /persist: Permission denied
1|[email protected]:/sdcard/persist $
Click to expand...
Click to collapse
You don't have root access dude, the " 1| " means that an error occurred. Furthermore, check your prompt, still " $ " instead of " # " .

Got there in the end...
Code:
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
[email protected]:/ # su
[email protected]:/ # cd /sdcard
[email protected]:/sdcard # mkdir persist
[email protected]:/sdcard # cd persist
[email protected]:/sdcard/persist # cp -r /persist .
cp: product_calib_ref1.dat: Function not implemented
cp: product_calib_ref2.dat: Function not implemented
cp: product_calib_ref3.dat: Function not implemented
cp: unit_calib_ref1.dat: Function not implemented
cp: unit_calib_ref2.dat: Function not implemented
cp: unit_calib_ref3.dat: Function not implemented
cp: mixer_paths.xml: Function not implemented
cp: sw_calib.dat: Function not implemented
1|[email protected]:/sdcard/persist #
Let me know when you've grabbed the attached zip and I'll delete it

Spannaa said:
Got there in the end...
Code:
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
[email protected]:/ # su
[email protected]:/ # cd /sdcard
[email protected]:/sdcard # mkdir persist
[email protected]:/sdcard # cd persist
[email protected]:/sdcard/persist # cp -r /persist .
cp: product_calib_ref1.dat: Function not implemented
cp: product_calib_ref2.dat: Function not implemented
cp: product_calib_ref3.dat: Function not implemented
cp: unit_calib_ref1.dat: Function not implemented
cp: unit_calib_ref2.dat: Function not implemented
cp: unit_calib_ref3.dat: Function not implemented
cp: mixer_paths.xml: Function not implemented
cp: sw_calib.dat: Function not implemented
1|[email protected]:/sdcard/persist #
Let me know when you've grabbed the attached zip and I'll delete it
Click to expand...
Click to collapse
Yeah, downloaded it.. thanks!
Gonna play with it. Thanks!!

Spannaa said:
Got there in the end...
Code:
C:\Users\spannaa\Desktop>adb shell
[email protected]:/ $ su
[email protected]:/ # su
[email protected]:/ # cd /sdcard
[email protected]:/sdcard # mkdir persist
[email protected]:/sdcard # cd persist
[email protected]:/sdcard/persist # cp -r /persist .
cp: product_calib_ref1.dat: Function not implemented
cp: product_calib_ref2.dat: Function not implemented
cp: product_calib_ref3.dat: Function not implemented
cp: unit_calib_ref1.dat: Function not implemented
cp: unit_calib_ref2.dat: Function not implemented
cp: unit_calib_ref3.dat: Function not implemented
cp: mixer_paths.xml: Function not implemented
cp: sw_calib.dat: Function not implemented
1|[email protected]:/sdcard/persist #
Let me know when you've grabbed the attached zip and I'll delete it
Click to expand...
Click to collapse
At least it seems to contain more data, but i can't seem to get it fully working.
Could you perhaps do the following from TWRP:
advanced -> terminal
then type
Code:
cd /sdcard
dd if=/dev/block/bootdevice/by-name/persist of=persist.dd.img
exit
Then from android, grab the persist.dd.img and share it with me?

_HugoBoss_ said:
At least it seems to contain more data, but i can't seem to get it fully working.
Could you perhaps do the following from TWRP:
advanced -> terminal
then type
Code:
cd /sdcard
dd if=/dev/block/bootdevice/by-name/persist of=persist.dd.img
exit
Then from android, grab the persist.dd.img and share it with me?
Click to expand...
Click to collapse
Done.

Spannaa said:
Done.
Again, let me know when you've downloaded it.
Click to expand...
Click to collapse
Thanks A LOT.
SENSORS WORK...
but hold your horses.. Couple of things i find right away..
First boot: it doesn't recognize SIM cards anymore.. Second boot, they are recognized.
Then: when i switch to MTP (file transfer), phone reboots.
So have to see whether it's all stable or not.
Delete the attachment for now.. i'll work on it a couple of days and let you know.
Again, thanks a lot!!

Proof:

Ok, at this point i'm not sure what is related and what is not anymore.
One thing i know for sure: simply copying the persist partition from one phone to another IS working, however the partitions holds some device- (like mac addresses) and maybe even some user-specific information. So it would not be right to start sharing that in the wild.
But while experimenting with the data, i found myself in a pretty f*cked up situation where there was no booting OS anymore and the Oneplus told me the bootloader was unlocked but refused to flash files trough fastboot anymore. Basically a dead phone.
Thank god i created a nandroid (full TWRP) backup and copied it to my laptop.
Long story short: i needed to perform a full repair of my phone and started looking for brick-guides.
The following worked for me AND magically repaired my persist partition too.
Steps to take:
- perform a full TWRP backup of your phone and copy it to your computer (don't keep it ON the phone!)
- also backup everything on your internal memory (sdcard) that is worth keeping. This process will also wipe your internal memory.
- Download the files from this guide. I've used method 3. The others may work. 3 worked for me.
- shutdown your phone
- press volume up and then connect the usb cable. Only volume up!
- the phone won't really power on, but your computer will detect a device. Use the driver you downloaded from the page above.
- When the driver is installed, start the MSM8994DownloadTool.exe as administrator (right click: run as administrator!)
- It's chinese or some language i can't uderstand. But just hit the start button. Some green text will show the progress.
- In the end, your phone will ask you if it's OK to wipe all user data. I did.
- And then it boots to Oxygen OS.
From this point on it's back to normal business
- flash custom recovery trough fastboot
- copy your TWRP backup back to the phone
- restore the backup
- Oh and don't forget: all your firmwares are OLD now. So in order to run CM13 or some other marshmellow rom, you also need to flash that "Switch_tOS3_H2OSMMv3.zip" like you did before!
- restore any other data to your internal memory (sdcard)
There ya go. Fully working system with sensors and all
Good luck!

So after you did the Qualcomm recovery does cpuz still show the sensors as uncalibrated like the screenshot in post 17. I have some issues with my screen rotation as randomly it was not switch to landscape. My cpuz shows gyroscope calibrated and uncalibrated, any way to calibrate gyroscope without that Qualcomm recovery? I had to go through that process in March.

Dude_Virus said:
So after you did the Qualcomm recovery does cpuz still show the sensors as uncalibrated like the screenshot in post 17. I have some issues with my screen rotation as randomly it was not switch to landscape. My cpuz shows gyroscope calibrated and uncalibrated, any way to calibrate gyroscope without that Qualcomm recovery? I had to go through that process in March.
Click to expand...
Click to collapse
It still says so yes. Even now, after more than a month.
However, everything still works fantastic. No issues whatshowever.

Related

cp: write error: no space left on device in system

I have been having this error message come up using the terminal. I was attempting to add the volume enhancements via Lucid's script on the hybrid JF 1.51 with the HTC apps. I have asked Lucid if he knew how to solve this, but i wanted to see if anyone else might know the solution. I have been searching on here and also on google and yahoo but I have yet to find anything. I even took out my sd card to see if that would help after restarting my phone but nothing. Did i just screw myself?
innerlight said:
I have been having this error message come up using the terminal. I was attempting to add the volume enhancements via Lucid's script on the hybrid JF 1.51 with the HTC apps. I have asked Lucid if he knew how to solve this, but i wanted to see if anyone else might know the solution. I have been searching on here and also on google and yahoo but I have yet to find anything. I even took out my sd card to see if that would help after restarting my phone but nothing. Did i just screw myself?
Click to expand...
Click to collapse
i'm not privvy to lucid's script, but..
remount /system rewrite
do a cp -f to the files you are replacing
remount /system read-only
if you still get no space left, reboot your phone, then try again.
pershoot said:
i'm not privvy to lucid's script, but..
remount /system rewrite
do a cp -f to the files you are replacing
remount /system read-only
if you still get no space left, reboot your phone, then try again.
Click to expand...
Click to collapse
forgive my ignorance but do I type this in terminal as is? Because when I do that it cannot find remount.
I think I found the problem as to why I saw that error. I went from JFs-1.51 US built to the hybrid one that cyanogen did (the JF-1.51 + HTC apps) and I think there maybe something wrong inside there. First wiped and flashed JF's one and then wiped and flashed the cyanogen one and the problem is there.
innerlight said:
forgive my ignorance but do I type this in terminal as is? Because when I do that it cannot find remount.
Click to expand...
Click to collapse
copy the three files needed for the volume increase (2 if your on JF (AudioFilter and AudioPara4)) on to the sdcard in to lets say a directory named 'audio'. make sure you have unmounted the sdcard from within your OS after you have completed the copy, and have unplugged the USB cable.
open up terminal (on your phone)
$ su
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /sdcard/audio
# mkdir BK
# cp -p /system/etc/Audio* ./BK
# cp -f AudioFilter.csv /system/etc
# cp -f AudioPara4.csv /system/etc
# cp -f AudioPara_TMUS.csv /system/etc
# mount -o ro,remount /dev/block/mtdblock3 /system
# exit
$ exit
bounce your phone.
pershoot said:
copy the three files needed for the volume increase (2 if your on JF (AudioFilter and AudioPara4)) on to the sdcard in to lets say a directory named 'audio'. make sure you have unmounted the sdcard from within your OS after you have completed the copy, and have unplugged the USB cable.
open up terminal (on your phone)
$ su
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /sdcard/audio
# mkdir BK
# cp -p /system/etc/Audio* ./BK
# cp -f AudioFilter.csv /system/etc
# cp -f AudioPara4.csv /system/etc
# cp -f AudioPara_TMUS.csv /system/etc
# mount -o ro,remount /dev/block/mtdblock3 /system
# exit
$ exit
bounce your phone.
Click to expand...
Click to collapse
Thanks for the reply. I am still getting the same error with the JF-1.51+HTC apps build. I told Cyanogen about it and hopefully he will get it sorted out because his built is faster than the regular JF build. I guess I have to decide if the added HTC apps are worth more than the sound increase.

need write to /system or something EXEC path

I was the first person I know on the internet to compile nmap for android and this guy ( http://wjholden.com/nmap/ ) took it to the next level got a new phone ( CM6 with OC ) nbow it does not work
* can't write to /system even with rw remount
* if I boot recovery I can' write to /systm but its just a temp fs so failsause ...
* can't ADB shell (read below ) to find out where system is really mounted OR mount the real /system my self ..
* remouted / but anything I add gets wipped on reboot ...
* onlything that works is remount / , copy nmap and then add PATH hackery to EXEC nmap ... on EVERY reboot ...
NOTES BELOW:
Code:
http://forum.xda-developers.com/showthread.php?t=701589&page=4
I think its because /system is protected in CM5+ ? even with remount
command... ?
let me know what I need to copy where in recovery mode to /system to
get yours to run properly :/
you could also have your installer check for this and have notes etc ..
# uname -a
Linux localhost 2.6.29.6-cyanogenmod #1 PREEMPT Fri Sep 17 16:05:39
PDT 2010 arm v6l GNU/Linux
# ls
ls
NMAP FOR ANDROID CROSS COMPILE ARM.html
NMAP.zip
nmap
nmap-4.01-1.spec
nmap-mac-prefixes
nmap-os-fingerprints
nmap-protocols
nmap-rpc
nmap-service-probes
nmap-services
# cp * /system/bin
cp * /system/bin
cp: can't create '/system/bin/NMAP FOR ANDROID CROSS COMPILE ARM.html': Out of m
emory
cp: can't create '/system/bin/NMAP.zip': Out of memory
cp: can't create '/system/bin/nmap': Out of memory
cp: can't create '/system/bin/nmap-4.01-1.spec': Out of memory
cp: can't create '/system/bin/nmap-mac-prefixes': Out of memory
cp: can't create '/system/bin/nmap-os-fingerprints': Out of memory
cp: can't create '/system/bin/nmap-protocols': Out of memory
cp: can't create '/system/bin/nmap-rpc': Out of memory
cp: can't create '/system/bin/nmap-service-probes': Out of memory
cp: can't create '/system/bin/nmap-services': Out of memory
# df /system
df /system
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mtdblock3 245760 240824 4936 98% /system
# mount
mount
...
/dev/block/mtdblock3 on /system type yaffs2 (rw)
Code:
mount -o rw,remount -t yaffs2 /
rm -Rf /nmap
mkdir /nmap
echo 'export PATH=$PATH:/nmap' > path
cd /nmap
wget http://rmccurdy.com/stuff/G1/BINS/NMAP/NMAP.zip
unzip NMAP.zip
chmod 777 /nmap/*
export PATH=$PATH:/nmap
echo run /nmap/path before you start nmap
nmap -vvv 127.0.0.1
rmccurdy.com/nmap.sh (tested on CM6 / mytouch slide )
in normal mode ..
Code:
bash
localhost / # mount -o rw,remount -t yaffs2 /system
mount -o rw,remount -t yaffs2 /system
localhost / # cd /system
cd /system
localhost system # for i in `ls` ;do mkdir $i\\nmap ;done
for i in `ls` ;do mkdir $i\\nmap ;done
mkdir: can't create directory 'app\nmap': Out of memory
mkdir: can't create directory 'bin\nmap': Out of memory
mkdir: can't create directory 'build.prop\nmap': Out of memory
mkdir: can't create directory 'etc\nmap': Out of memory
mkdir: can't create directory 'fonts\nmap': Out of memory
mkdir: can't create directory 'framework\nmap': Out of memory
mkdir: can't create directory 'lib\nmap': Out of memory
mkdir: can't create directory 'lost+found\nmap': Out of memory
mkdir: can't create directory 'media\nmap': Out of memory
mkdir: can't create directory 'usr\nmap': Out of memory
mkdir: can't create directory 'xbin\nmap': Out of memory
in "Android system recovery (2e)" :
( note: /system is also a vfs I think .. I adb push to it and reboot and the file is gone ... )
Code:
C:\Documents and Settings\Administrator\nmap>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\Documents and Settings\Administrator\nmap>
You can't write in /system in normal boot mode as security is on (s-on), remounting rw does you no good.
In recovery you will need to mount /system from clockwork before you can do anything.
I do have Clockwork Recovery 2.5.0.1 but I am not sure how to get to a shell and or find /system mount path as I can't adb shell ( read above ) so I can't remount or mount /system
rmccurdy.com/nmap.sh * this is what I am using for nmap as of now ..
Usage:
bash -x /sdcard/nmap.sh localhost
etc ...
There's an option in clockwork under partitions to allow you to mount the system. I'm not sure why but a lot of people have an issue getting into su with adb when they are in recovery, the constant /system/bin/sh error is annoying. Also, if I remember right, yaffs2 is not what you use to mount the system when using that command. It's mtdblock3 or something like that if I'm thinking along the correct lines here.
Maybe you should try putting it in a zip file as a script and running it that way since you use a different command (and much easier) to mount the system and write to it. Then again, I'm not sure what you're trying to so so I could just be talking out of my a$$
I can't do anything usefull in recovery ... reboot and apply update.zip but I dont how how nor do I really want to make a .zip / script to mount system etc .. do you know a zip I can work from as an example
rmccurdy said:
I can't do anything usefull in recovery ... reboot and apply update.zip but I dont how how nor do I really want to make a .zip / script to mount system etc .. do you know a zip I can work from as an example
Click to expand...
Click to collapse
The slide doesn't have S-Off, most HTC phones have them now...So you have to wait for Alpharev 2.0 to be released.
Ace42 said:
The slide doesn't have S-Off, most HTC phones have them now...So you have to wait for Alpharev 2.0 to be released.
Click to expand...
Click to collapse
Yes, but in recovery we can mount the system and write to it. Phones with s-off can do that while booted normally because the NAND is unlocked and the system is no longer protected.
You can do it one of two ways. This one is easiest if you know linux commands but are unfamiliar with update-script format. Make an update script and put this in there:
Code:
show_progress 0.5 0
run_program PACKAGE:example.sh
show_progress 0.5 10
You don't have to use the show_progress line, it's just for aesthetics.
Make a .sh script, name it whatever you want and put the linux commands you want to execute in the script. For example:
Code:
#!/sbin/sh
#
##############################################
mount /system;
rm -rf /nmap
mkdir /nmap
echo 'export PATH=$PATH:/nmap' > path
cd /nmap
wget http://rmccurdy.com/stuff/G1/BINS/NMAP/NMAP.zip
unzip NMAP.zip
chmod 777 /nmap/*
export PATH=$PATH:/nmap
echo run /nmap/path before you start nmap
nmap -vvv 127.0.0.1
exit 0;
Or what ever you're trying to get done. I'll upload an example file of all this since hands on is always better. Looking at this though, you may want to have the files in the zip (in the directories they will be installed to) because wget probably wont work since the radio is off while in recovery.
interesting thanks ! ... do you have to resign it and all or can you just edit and rezip it ?
rmccurdy said:
interesting thanks ! ... do you have to resign it and all or can you just edit and rezip it ?
Click to expand...
Click to collapse
As long as you're using clockwork you just edit and zip. Might be easier to use an archive explorer to open (without uzipping it) then drag and drop, but do what's easiest for you.

Why 'adb remount' failed on a Rooted neuxs one

Hi,
I have rooted my Nexus one. I can do "'adb shell and then 'su' under the shell"
But on my MacOS Desktop, when I execute 'adb remount', it still said
$ adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
Can anyone please help me resolve this?
Thank you.
[size=+4]DO *NOT* POST QUESTIONS IN THIS FORUM - only tips/info/etc.[/size]
Right at the top. Why does this have to be repeated on a daily basis?
Can you please move my thread to the right forum? I can't find a way to do it.
Anyhow, to answer you question... you "adb remount" is disabled in production releases... just rooting does not allow this.
You need a modified boot image where ro.secure=0 in default.props, instead of ro.secure=1. The ro.secure flag in the boot image indicates whether the root filesystem can be remounted as read/write... 0 indicated it can be... 1 indicated it cannot be.
If ro.secure=0, this is referred to as insecure boot.
Most custom ROMs have this by default... some rooted stock ROMs do not have this...
Will the Modified GRI40 (2.3.3 Gingerbread) ROM from this
http:// forum.xda-developers.com/showthread.php?t=968396
Does what I need? Thanks.
Or you can also use these commands to mount and unmount the system partition as writable:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,ro /dev/block/mtdblock3 /system
Thank you. That seems to be an easier solution for me.
But after I did
$ adb shell
$ su
# mount -o remount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
I go to another shell and i did
adb push sqlite3 /system
failed to copy 'sqlite3' to '/system/sqlite3': Read-only file system
$ adb push sqlite3 /system/bin
failed to copy 'sqlite3' to '/system/bin/sqlite3': Permission denied
Click to expand...
Click to collapse
It still does not let me push 'sqlite3' to /system or /system/bin
That is what I need.
Thank you for any more pointers.
hap497 said:
Thank you. That seems to be an easier solution for me.
But after I did
I go to another shell and i did
It still does not let me push 'sqlite3' to /system or /system/bin
That is what I need.
Thank you for any more pointers.
Click to expand...
Click to collapse
Don't try to combine adb commands with shell commands.
Copy/move/push the file to your sdcard first.
Then open a root shell, mount it as rw, then copy the file from your sdcard to the directory you want.
Thanks. but I get 'failed on '/sdcard/sqlite3' - Cross-device link'
$ su
# mount -o remount,rw /dev/block/mtdblock3 /system
# mv /sdcard/sqlite3 /system/
failed on '/sdcard/sqlite3' - Cross-device link
# ls -l /sdcard/sqlite3
----rwxr-x system sdcard_rw 24120 2010-10-16 22:04 sqlite3
Click to expand...
Click to collapse
and i have tried:
# mv /mnt/sdcard/sqlite3 /system/bin/
failed on '/mnt/sdcard/sqlite3' - Cross-device link
# ls -l /mnt/sdcard/sqlite3
----rwxr-x system sdcard_rw 24120 2010-10-16 22:04 sqlite3
Click to expand...
Click to collapse
I get the 'sqlite3' from SuperOneClickv1.7-ShortFuse.zip.
Wholly crap, don't use the mv command! Bad idea!!! mv does not move the data, it moves the hardlink to the data! Thank your lucky stars mv wouldn't let you do it.
Use cp instead. cp will actually copy the data to where you're going.
Thank you. But I don't have 'cp' in my adb shell.
# cp
cp: not found
# /system/bin/cp
/system/bin/cp: not found
Click to expand...
Click to collapse
From here:
http://android-tricks.blogspot.com/2009/02/cp-on-android.html
I use 'cat' command to move to /system/bin
How do you have mv but not cp? Do you not have BusyBox installed?
No. I just need to search 'BusyBox' on Android market and install it? That is?
hap497 said:
Thank you. But I don't have 'cp' in my adb shell.
From here:
http://android-tricks.blogspot.com/2009/02/cp-on-android.html
I use 'cat' command to move to /system/bin
Click to expand...
Click to collapse
The cat command will work fine, no busybox needed: cat source_file > dest_file
efrant said:
The cat command will work fine, no busybox needed: cat source_file > dest_file
Click to expand...
Click to collapse
Woah there partner. Cat shouldn't be used on binary files, only ascii files. While it might work fine, it is not the recommended practice and really should not be done.
OP, Yes, BusyBox can be installed from the market.
GldRush98 said:
Woah there partner. Cat shouldn't be used on binary files, only ascii files. While it might work fine, it is not the recommended practice and really should not be done.
Click to expand...
Click to collapse
Really? I was unaware of that. It worked every time I used it.
efrant said:
Really? I was unaware of that. It worked every time I used it.
Click to expand...
Click to collapse
On standard Unix/Linux/etc. systems, cat works fine for binary files. It's only under DOS that cat or type shouldn't be used for binaries.
back in my ADB days.. itd say remount failed or w.e but i could still access my phone..
but i dont know.. ever since i switched to linux i stopped using ADB.. hahah

[Q] /system/bin 100% full?

Hi,
I unrooted and ran the 4.5.141 update. I'm now on Android OS 2.3.6. I am now trying to follow the directions to re-root from here: http://www.android-advice.com/2012/root-the-motorola-atrix-4g-running-4-5-141/
However, when I get to the step where I run the command:
Code:
cp /preinstall/su /system/bin/
I get the error "cp: write error: No space left on device" which I thought was very odd....so, I ran the command
Code:
df /system/bin
and the output I see is:
Code:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/block/mmcblk0p12
326071 326068 3 100% /system
Is this possible? How do I get su back on to /system/bin?
How can it be that the /system partition is full? Is there a way to resize it, if that's the case?
Please help!!!
did you do step 6 before step 4
check this out THIS
Obviously, otherwise it won't work. My problem is that /system has no free space. How is that possible?
quordandis said:
Obviously, otherwise it won't work.
Click to expand...
Click to collapse
a simple 'yes', without 'tude, would have sufficed.
Ok, here's what I had to do to make this work. First, you have to check if you have Superuser.apk saved in /system/app. If you do, delete it (you'll reinstall this later).
Since I also wanted to install the latest version of Swype, first, rename /system/lib/libSwypeCore.so to /system/lib/libSwypeCore.so.bak
Then, cp /system/app/Swype.apk /sdcard/Swype.apk.bak
After you've copied the stock Swype to the sdcard, then rm /system/app/Swype.apk
This should provide you with enough room on /system to cp /preinstall/su /system/bin/su
The rest should follow accordingly.
-Q

[QUESTION] About the source code of supersu/suid

Hi to all,
I would like understand the process about root on my s4 i9505.
For due this I have opened the script of CF-Supersu I have found some part that I don't understand.
Before write more about it, I have another question.
I would like also understand why, if I copy the binary SU from CWM (that has a root access thought adb) into the folder /system/xbin and I set to this binary the right permission, when I call this binary from the application terminal into the system I haven't root.
About the second question, looking the source code of supersu script, I have found some command that I don't understand.
First:
Code:
su --install
Second:
Code:
cp $BIN/su /system/bin/.ext/.su
cp $COM/install-recovery.sh /system/etc/install-recovery.sh
ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
cp $COM/99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
echo 1 > /system/etc/.installed_su_daemon
Third:
Code:
/system/xbin/supolicy
LD_LIBRARY_PATH=/system/lib $BIN/[B][U]chattr[/U][/B]$PIE -i /system/bin/su
Fourth:
Code:
#!/system/bin/sh
/system/xbin/daemonsu --auto-daemon &
Could someone please help me ?
Many thanks to support.

Categories

Resources