adb shell setprop fails on certain properties - Huawei P10 Plus Questions & Answers

setprop camara.dis.flag 0
setprop: failed to set property 'camara.dis.flag' to '0'
why am i getting this error?
when i am tring to change some other fields i succeeded
for example
HWBLA:/ $ setprop debug.aps.enable 1
HWBLA:/ $ echo $?
0
seems like i dont have root access although i did unlocked the phone..
what am i missing?

Related

How to setup DNS for APN in Internet setting

EDITED 30/8/2011
Did a lil research and found d solution..
U need to have Terminal Emulator installed first(needs root)
den type d follwing in terminal emulator:
$ su
Allow super user permission
$ getprop
$ setprop net.pdp0.dns1 value1
$ setprop net.pdp0.dns2 value2
$ setprop net.dns1 value1
$ setprop net.dns2 value2
where value1 is d first dns address eg. 202.255.255.255
value2 is the second dns address(if there is a second dat is)
using the setprop u can change certain properties that u can see from the getprop output(still do this at ur own risk)
Also note the dns is changed only for one session..
u have to repeat the above steps for every session..
if u find a beter way please post it..
It is not working on this phone so why bother?
The Tether app is opening and running, you can connect to the apn but you wont get internet.
I don't have a solution for this but may I remind you this is development section.
How to Setup DNS for APN in Internet Setting
Please ask if u didnt understand d above method .. i'll try my best to clear it out

[DEV Q] script ain't working

hi,
im new to linux and need little help.
can anyone tell me why this script is not working. If all the lines are executed individually, works fine but when inside the script gives error
# ls -l | grep 'aishu'
ls -l | grep 'aishu'
-rwxrwxrwx root root 279 2011-10-12 02:38 aishuscript.sh
# pwd
pwd
/system/bin
# cat aishuscript.sh
cat aishuscript.sh
#!/system/bin/sh
su
echo "Script has been started"
renice -10 'pidof com.android.phone'
echo "phone done"
renice -10 'pidof com.android.systemui'
echo "ui done"
for pidacore in 'pidof android.process.acore'; do
$pidacore;
renice -10 $pidacore;
done;
echo "script over"#
# sh aishuscript.sh
sh aishuscript.sh
: not found
Script has been started
phone done
ui done
aishuscript.sh: 8: Syntax error: word unexpected
dear moderator
i have searched posts as mush as i could but couldn't find solution, and since this is coding related i think development is appropriate place to post it
well its disappointing 140 views no reply...
as far as i could go... its happening caz the for loop variable is taking "pidof" value as a string instead of integer. the same script is working fine in other shells. fix might be required in shell.
I tried this simpler for and seemed to work:
Code:
for pid in `pidof android.process.acore`; do
renice --10 $pid; done

[Q] downgrading problem mytouch 4g

downgrading problem
every thing goes good till i get to here im on mytouch 4g help me
i use this guide
http://forum.xda-developers.com/showthread.php?t=1178912
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
./misc_version: permission denied
adb shell chmod 777 /data/local/tmp/*
You didn't do that or didn't successfully do that.
Redo that. COPY the command AS IS.
If you want, you can do it just before running ./misc_version, while being in the shell. In this case you just need to type chmod 777 *.
C:\android-sdk\platform-tools>adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length
C:\android-sdk\platform-tools>adb push fre3vo /data/local/tmp
push: fre3vo/__MACOSX/._fre3vo -> /data/local/tmp/__MACOSX/._fre3vo
push: fre3vo/fre3vo -> /data/local/tmp/fre3vo
2 files pushed. 0 files skipped.
222 KB/s (10025 bytes in 0.043s)
C:\android-sdk\platform-tools>adb shell
$ chmod 777 /data/local/tmp/fre3vo
chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
/data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
fre3vo by #teamwin
Please wait...
Attempting to modify ro.secure property...
fb_fix_screeninfo:
id: msmfb
smem_start: 802160640
smem_len: 3145728
type: 0
type_aux: 0
visual: 2
xpanstep: 0
ypanstep: 1
line_length: 1920
mmio_start: 0
accel: 0
fb_var_screeninfo:
xres: 480
yres: 800
xres_virtual: 480
yres_virtual: 1600
xoffset: 0
yoffset: 0
bits_per_pixel: 32
activate: 16
height: 80
width: 48
rotate: 0
grayscale: 0
nonstd: 0
accel_flags: 0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0
Buffer offset: 00000000
Buffer size: 8192
Scanning region faa90000...
Scanning region fab80000...
Scanning region fac70000...
Scanning region fad60000...
Scanning region fae50000...
Scanning region faf40000...
Scanning region fb030000...
Scanning region fb120000...
Scanning region fb210000...
Scanning region fb300000...
Scanning region fb3f0000...
Scanning region fb4e0000...
Scanning region fb5d0000...
Scanning region fb6c0000...
Scanning region fb7b0000...
Scanning region fb8a0000...
Scanning region fb990000...
Scanning region fba80000...
Scanning region fbb70000...
Potential exploit area found at address fbb80e00:200.
Exploiting device...
C:\android-sdk\platform-tools>adb shell
# exit
exit
C:\android-sdk\platform-tools>adb push misc_version /data/local/tmp/misc_version
push: misc_version/misc_version.c -> /data/local/tmp/misc_version/misc_version.c
push: misc_version/misc_version -> /data/local/tmp/misc_version/misc_version
push: misc_version/gopt.h -> /data/local/tmp/misc_version/gopt.h
push: misc_version/gopt.c -> /data/local/tmp/misc_version/gopt.c
4 files pushed. 0 files skipped.
341 KB/s (31399 bytes in 0.089s)
C:\android-sdk\platform-tools>adb push flashgc /data/local/tmp/flashgc
push: flashgc/flashgc -> /data/local/tmp/flashgc/flashgc
1 file pushed. 0 files skipped.
1566 KB/s (712688 bytes in 0.444s)
C:\android-sdk\platform-tools>adb shell chmod 777 /data/local/tmp/*
C:\android-sdk\platform-tools>adb shell
# cd /data/local/tmp
cd /data/local/tmp
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
./misc_version: permission denied
#
Click to expand...
Click to collapse
this is what i did
Jack_R1 said:
adb shell chmod 777 /data/local/tmp/*
You didn't do that or didn't successfully do that.
Redo that. COPY the command AS IS.
If you want, you can do it just before running ./misc_version, while being in the shell. In this case you just need to type chmod 777 *.
Click to expand...
Click to collapse
# chmod 777 /*
chmod 777 /*
Unable to chmod /bootcomplete.rc: Read-only file system
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
./misc_version: permission denied
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
./misc_version: permission denied
# chmod 777 *
chmod 777 *
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
./misc_version: permission denied
# chmod 777 *.
chmod 777 *.
Unable to chmod *.: No such file or directory
#
i just dont see what im i dong wrong
You unzipped the ZIP file misc_version in another subfolder, rather than locally.
When you're pushing misc_version, you're pushing subfolder instead of the file. This makes the executable file misc_version to be at /data/local/tmp/misc_version/misc_version and not /data/local/tmp/misc_version, as it should have been. The log is clear as a sun and shows it in a very visible way. Of course it means that the simple earlier step that says "extract the files here" wasn't executed properly, and you couldn't see this mistake of yours.
Of course, since the file isn't in the correct place, the command doesn't work.
Execute the commands as follows:
C:\android-sdk\platform-tools>adb shell chmod 777 /data/local/tmp/misc_version/*
C:\android-sdk\platform-tools>adb shell
# cd /data/local/tmp/misc_version
# ./misc_version -s 1.00.000.0
C:\android-sdk\platform-tools>adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length
C:\android-sdk\platform-tools>adb push fre3vo /data/local/tmp
push: fre3vo/__MACOSX/._fre3vo -> /data/local/tmp/__MACOSX/._fre3vo
push: fre3vo/fre3vo -> /data/local/tmp/fre3vo
2 files pushed. 0 files skipped.
113 KB/s (10025 bytes in 0.085s)
C:\android-sdk\platform-tools>adb shell
$ chmod 777 /data/local/tmp/fre3vo
chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
/data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
fre3vo by #teamwin
Please wait...
Attempting to modify ro.secure property...
fb_fix_screeninfo:
id: msmfb
smem_start: 802160640
smem_len: 3145728
type: 0
type_aux: 0
visual: 2
xpanstep: 0
ypanstep: 1
line_length: 1920
mmio_start: 0
accel: 0
fb_var_screeninfo:
xres: 480
yres: 800
xres_virtual: 480
yres_virtual: 1600
xoffset: 0
yoffset: 0
bits_per_pixel: 32
activate: 16
height: 80
width: 48
rotate: 0
grayscale: 0
nonstd: 0
accel_flags: 0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0
Buffer offset: 00000000
Buffer size: 8192
Scanning region faa90000...
Scanning region fab80000...
Scanning region fac70000...
Scanning region fad60000...
Scanning region fae50000...
Scanning region faf40000...
Scanning region fb030000...
Scanning region fb120000...
Scanning region fb210000...
Scanning region fb300000...
Scanning region fb3f0000...
Scanning region fb4e0000...
Scanning region fb5d0000...
Scanning region fb6c0000...
Scanning region fb7b0000...
Scanning region fb8a0000...
Scanning region fb990000...
Scanning region fba80000...
Scanning region fbb70000...
Potential exploit area found at address fbb80e00:200.
Exploiting device...
C:\android-sdk\platform-tools>adb shell
# exit
exit
C:\android-sdk\platform-tools>adb push misc_version /data/local/tmp/misc_version
push: misc_version/misc_version.c -> /data/local/tmp/misc_version/misc_version.c
push: misc_version/misc_version -> /data/local/tmp/misc_version/misc_version
push: misc_version/gopt.h -> /data/local/tmp/misc_version/gopt.h
push: misc_version/gopt.c -> /data/local/tmp/misc_version/gopt.c
4 files pushed. 0 files skipped.
268 KB/s (31399 bytes in 0.114s)
C:\android-sdk\platform-tools>adb push flashgc /data/local/tmp/flashgc
push: flashgc/flashgc -> /data/local/tmp/flashgc/flashgc
1 file pushed. 0 files skipped.
1322 KB/s (712688 bytes in 0.526s)
C:\android-sdk\platform-tools>adb shell chmod 777 /data/local/tmp/*
C:\android-sdk\platform-tools>adb shell chmod 777 /data/local/tmp/misc_version/*
C:\android-sdk\platform-tools>adb shell
# cd /data/local/tmp/misc_version
cd /data/local/tmp/misc_version
# ./misc_version -s 1.00.000.0
./misc_version -s 1.00.000.0
--set_version set. VERSION will be changed to: 1.00.000.0
Patching and backing up partition 17...
#
Click to expand...
Click to collapse
thx man we need to fix the guide
./flashgc
./flashgc: permission denied
#
C:\android-sdk\platform-tools>
The guide isn't wrong, you are. Probably hundreds or thousands of people used this guide for downgrading, here you come and the guide is suddenly wrong? And the same applies to the next failure - it's EXACTLY the same. Why is it so hard to make a single small step yourself?
Plus, you don't need flashgc. You can proceed with downgrading now.
thx jack_R1 you the man im perma root and s-off now i just have to see how to flash roms
Install custom recovery, boot into it, copy the ROM on SD card, wipe everything, flash.
These are the approximate steps. You can search for each step, or just search "mytouch 4g flash custom rom" in Youtube, you'll likely find a guide.

[Q] Busybox 'sh' Issue Help

I am trying to get CIFS working on my tablet per the instructions on this thread: http://forum.xda-developers.com/showthread.php?t=2003836
I have busybox installed and have created the script below, but whenever I run the script in terminal emulator or Script Manager I get:
not founds/bin/mountscript.sh[2]:
not founds/bin/mountscript.sh[9]:
etc...
I have also tried the busybox ash to no avail.
It seems like variables are not being set. What would cause this?
Code:
#!/system/bin/sh
# Your settings here
USERNAME="user"
PASSWORD="password"
IPADDRESS="10.0.0.84"
SHARE="DriveJ"
MOUNT_POINT="/sdcard/cifs/Drive"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /sdcard/mods/md4.ko; \
insmod /sdcard/mods/nls_utf8.ko; \
insmod /sdcard/mods/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect localhost
echo adm connected
# Make sure we only use the first device (sometimes there is more than one)
echo serial being set
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
echo SERIAL=$SERIAL
if [ "$SERIAL" = "" ]; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ]; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.

[GUIDE] Increase Number of OnePlus Launcher Rows

Credit: @stelio_kontos - https://forum.xda-developers.com/t/guide-add-more-columns-to-the-oneplus-launcher.3659772/
They were saying in that thread that it was no longer working for them, but it does still work, at least on 8T. Not sure how long it will continue to work though. They were also talking about changing the number of columns, but I'm only concerned with changing the number of rows. There is a column entry in the path listed below, I just haven't tried it myself because five columns is what I want.
Root required.
Go to: /data/data/net.oneplus.launcher/shared_prefs/net.oneplus.launcher.prefs.xml
Adjust this value to your liking: <int name="workspace_rows" value="9" />
Find OnePlus Launcher app in Settings and force close. Wait a second or two, then go home. Viola!
So far it's stuck through reboots and updating the launcher from Playstore.
If you have trouble finding the data/data/net.oneplus.launcher folder due to Android 11 nonsense, you can copy the file or folder to your sdcard via terminal, edit it, then push it back. Below are the commands for that process.
Code:
C:\xxx\00_OnePlus8T>adb shell
OnePlus8T:/ $ su
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # setenforce 0
OnePlus8T:/ # getenforce
Permissive
OnePlus8T:/ # cp -r /data/data/net.oneplus.launcher/shared_prefs /sdcard
OnePlus8T:/ # cp -r /sdcard/shared_prefs/net.oneplus.launcher.prefs.xml /data/data/net.oneplus.launcher/shared_prefs
OnePlus8T:/ # setenforce 1
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # exit
OnePlus8T:/ $

Categories

Resources