Immersive mode all miui - Xiaomi Mi 5 Guides, News, & Discussion

Run this script in terminal emulator
su
settings --user 0 put global policy_control immersive.status=*
Click to expand...
Click to collapse
If anyone know how to run the script auto every rebbot please tell me

#!/system/bin/sh
settings --user 0 put global policy_control immersive.status=com.miui.home
Click to expand...
Click to collapse
Placed it on your init.d folder

yoghibawono said:
Placed it on your init.d folder
Click to expand...
Click to collapse
Thanks,but how about permission ?

pukiman1204 said:
Thanks,but how about permission ?
Click to expand...
Click to collapse
Create a file named 99immersive for example, permission should be 755 or -rwrxr-xr-x
Make sure init.d is properly running or use init.d features from kernel adiutor

Related

Terminal 'SU' Command not working

Guys,
When I go into terminal and type 'SU' to use Imo's kernel speedtweaks, I get 'permission denied'...
Any help would be appreciated.
Thanks!
Check your superuser app to make sure it isn't set to deny su permissions to terminal emulator.
Sent from my ADR6400L using XDA App
jwterminator said:
Check your superuser app to make sure it isn't set to deny su permissions to terminal emulator.
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
All I have are allowed apps.... I am accessing terminal emulator thru the bamf toolkit which is set to allow.
check to see if su even exists (probably under /system/xbin, but maybe under /system/bin as well).
after you find it, see what the permissions are on it (ls -l -a su)
yareally said:
check to see if su even exists (probably under /system/xbin, but maybe under /system/bin as well).
after you find it, see what the permissions are on it (ls -l -a su)
Click to expand...
Click to collapse
Found it in system\xbin....how do I check permissions? Long press on it only gives me send,move,copy,rename or delete.
Thanks for your help!
tazman19 said:
Found it in system\xbin....how do I check permissions? Long press on it only gives me send,move,copy,rename or delete.
Thanks for your help!
Click to expand...
Click to collapse
open up the terminal emulator command line (if you dont have a terminal emulator, search for one in the market), then type:
ls -l /system/xbin/su
or
busybox -l /system/xbin/su
then paste the results
*just a note for your own reference, linux/unix use forward slashes (/) for directories, not backwards (\) like windows
yareally said:
open up the terminal emulator command line (if you dont have a terminal emulator, search for one in the market), then type:
ls -l /system/xbin/su
or
busybox -l /system/xbin/su
then paste the results
*just a note for your own reference, linux/unix use forward slashes (/) for directories, not backwards (\) like windows
Click to expand...
Click to collapse
Wierd...its saying no such file or directory...but in file manager, its there!
File size is 25.65KB
You are not typing it in all caps are you? Linux is case-sensitive.
if you did the later command, i meant:
busybox ls -l /system/xbin/su
had a typo
they should be the same, unless somehow linking is messed up on your system, so i mentioned doing it both ways, since android has a more stripped down version of ls built into the phone that isn't as great.
like the post before mentioned...no caps.
Beastclaw said:
You are not typing it in all caps are you? Linux is case-sensitive.
Click to expand...
Click to collapse
+1
Make sure your in lower case
Sent from a cellular telephone
Beastclaw said:
You are not typing it in all caps are you? Linux is case-sensitive.
Click to expand...
Click to collapse
+1000000
-rwsr -sr -x root root 26264 2008-08-01 08:00 su
tazman19 said:
+1000000
-rwsr -sr -x root root 26264 2008-08-01 08:00 su
Click to expand...
Click to collapse
Bumping message to front.
jwterminator said:
Check your superuser app to make sure it isn't set to deny su permissions to terminal emulator.
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
Thanks a lot! it worked

Useful Commands in Terminal Emulator

Hi guys!
I created this thread mainly because many useful things can be done in Terminal emulator. I will show you some simple commands which are useful.
Very useful if you don't have Root explorer when you need it.
Make sure you take a Nandroid backup before you try out just in case you can restore when you do something wrong!
You can get terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Note: Most commands need root. So type su and press enter and grant superuser permissions to Terminal Emulator!
First type this command before using any of the commands below just in case(needs root)
Code:
su
Some useful commands:
Turning device off (Turns your device off very fast!! ):
Code:
poweroff
Rebooting:
Code:
reboot
Rebooting to Recovery
Code:
reboot recovery
Rebooting to download mode:
Code:
reboot download
Forcing Most Apps to install to SDcard(Root needed with Terminal Emulator, no need root with ADB):
Code:
pm setInstallLocation 2
Alternatively, you can type 0 at the end instead of 2 for Auto location install mode or 1 for Internal memory install mode
To check what the current install location is:
Code:
pm getInstallLocation
Mounting R/W in system(Use with caution)
Code:
mount -o rw,remount -t /system
If above one doesnt work, try this.
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Unmounting R/W in system.
Code:
mount -o ro,remount -t /system
If above code doesn't work, try this
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Moving files from sdcard to system (Use after mounting R/W):
Code:
busybox cp /sdcard/<path> /system/<path>
Example: busybox cp /sdcard/demo/framework-res.apk /system/framework/
Changing file permissions to rw-r--r-- (Use after mounting R/W):
Code:
chmod 644 <path>
Example 1: chmod 644 /system/app/mms.apk
Example 2: chmod 644 /system/app/*.apk (This command changes the file permission of all apps in the folder to rw-r--r--)
Changing the current directory:
Code:
cd <path>
Example: cd /sdcard
Listing all the files and folders under the current directory:
Code:
ls
If you want to view all the files and folders in your sdcard, type:
cd /sdcard
ls
Making a new folder:
Code:
mkdir <path>
Example: mkdir /sdcard/newfolder
Removing files (For System files, Use after mounting R/W)
Code:
rm <path>
Example: rm /system/app/demoapp.apk
Removing Folders:
Code:
rmdir <path>
Get info of your build.prop values
Code:
getprop
That's all for now. I will add a few more later!
If you have any more new commands or if I have given an improper command, feel free to post it in the thread
Thanks for reading.
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
UserU said:
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
Click to expand...
Click to collapse
I don't understand your question...
Anyways...Thanks for reminding me of that command!
system.img said:
I don't understand your question...
Anyways...Thanks for reminding me of that command!
Click to expand...
Click to collapse
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
u0 [email protected]:/ $ pm set-install-location 2
Killed
137|u0 [email protected]:/ $
Click to expand...
Click to collapse
UserU said:
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
Click to expand...
Click to collapse
I never got that problem on adb.
Let me see....
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
panpjp said:
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
Click to expand...
Click to collapse
Isnt it /system?
ok...will add to op.
Thanks.
system.img said:
Isnt it /system?
ok...will add to op.
Thanks.
Click to expand...
Click to collapse
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
panpjp said:
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
Click to expand...
Click to collapse
Ok....
system.img said:
I never got that problem on adb.
Let me see....
Click to expand...
Click to collapse
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
UserU said:
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
Click to expand...
Click to collapse
I got it.
It needs root.
So type
su
pm set-install-location 2
Then you are done!
wow thanks !!
Bassesh said:
wow thanks !!
Click to expand...
Click to collapse
Welcome!
Useful
A question: once i tried to type
bootanimation
Click to expand...
Click to collapse
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Toni5830 said:
Useful
A question: once i tried to type
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Click to expand...
Click to collapse
That is the use of the bootanimation command. You can stop it either by pulling battery or closing terminal emulator!
But what I did to stop it was to rotate my phone to landscape and somehow close terminal emulator.
But in ADB it is easier to stop using exit command.
how to get info about /system memory and /data memory ?
rajxelton said:
how to get info about /system memory and /data memory ?
Click to expand...
Click to collapse
What info do you exactly want? Free Space, Partition Size or Used space?
system.img said:
What info do you exactly want? Free Space, Partition Size or Used space?
Click to expand...
Click to collapse
partition size. well can you tell me for all.
Anyone know a command to trigger media scanner?
Thanks for the commands. Quite new to all of this and these will help me understand things a little better

ROOT for R5A [really works]

I think this should really be linked here.
http://forum.xda-developers.com/showthread.php?t=2320283
Just done it, after loosing root while accidentally updating to r5a i can confirm i gained root again with that!
I guess thats kind of cool and should be implemented in the all in one rooting stuff and everything
Here you can find a little zipfile with all the needed Files and a README which describes How-To do it:
https://d1sturbed.org/android/root-r5a-v3.zip
there is also a v4, which contains a new binary and a new script...on Linux you now can just unzip the v4 and then execute doit.sh (perhaps someone can pass me a doit.bat or something, i guess it could run as a batch file for windows, but since i'm to sleepy and lazy to reboot into windows it's untestet. but you can try by removing the first line and rename to .bat)
https://d1sturbed.org/android/root-r5a-v4.zip
Procedure
Expand where appropriate the android_run_root_shell-test.zip, to libdiagexploit of android_run_root_shell-test.zip within the deployment just the "Android.mk", "diag.c", "diag.h" of libdiagexploit-master.zip deployment.
Go to the folder where you extracted the android_run_root_shell-test.zip from the terminal,
> Ndk-build NDK_PROJECT_PATH =. APP_BUILD_SCRIPT =. / Android.mk
Type.
Run_root_shell is created in "android_run_root_shell-master/obj/local/armeabi" Then.
Expand to "android_run_root_shell-master/obj/local/armeabi" the su and Superuser.apk from UPDATE-SuperSU-v1.30.zip, busybox also be moved to the same folder.
From terminal
> Adb push run_root_shell / data / local / tmp
> Adb push su / data / local / tmp
> Adb push Superuser.apk / data / local / tmp
> Adb push busybox / data / local / tmp
> Adb shell
$ Cd / data / local / tmp
$ Chmod 777 run_root_shell
$ Chmod 755 busybox
$. / Run_root_shell
# / Data / local / tmp / busybox mount-o rw, remount / system
# / Data / local / tmp / busybox cp / data / local / tmp / su / system / xbin
# / Data / local / tmp / busybox cp / data / local / tmp / Superuser.apk / system / app
# Chown 0.0 / system / xbin / su
# Chmod 6755 / system / xbin / su
# / Data / local / tmp / busybox mount-o ro, remount / system
# Sync
# Exit
Is over. It would help to delete the ones that you push to / data / local / tmp afterward.
> Adb shell
$ Rm / data / local / tmp / run_root_shell
$ Rm / data / local / tmp / su
$ Rm / data / local / tmp / Superuser.apk
$ Rm / data / local / tmp / busybox
Sent from my Sony Tablet S using xda app-developers app
---------- Post added at 08:51 AM ---------- Previous post was at 08:44 AM ----------
Get files from here
fi01/android_root_shell at test https://github.com/fi01/android_run_root_shell/tree/test
hiikezeo/libdiagex ploit https://github.com/hiikezoe/libdiagexploit
Update-SuperSU-v1.3.zip http://forum.xda-developers.com/showthread.php?t=1538053
Busybox for android http://benno.id.au/blog/2007/11/14/android-busybox
Note: translation provided by google translate so there may be some mistakes
Sent from my Sony Tablet S using xda app-developers app
i've made a small archive with a little README and a root.sh script, so you can just push everything from the archive to /data/local/tmp/ and execute root.sh
hope that's okay, if not tell me and i delete!
[removed old file, added new one with another post]
http://forum.xda-developers.com/showthread.php?p=42485765
smokey_joe said:
i've made a small archive with a little README and a root.sh script, so you can just push everything from the archive to /data/local/tmp/ and execute root.sh
hope that's okay, if not tell me and i delete!
Click to expand...
Click to collapse
Its fine. Will give it a try soon
Edit 1: is this only for linux?
Sent from my GT-S5830 using xda app-developers app
jumper62 said:
Its fine. Will give it a try soon
Edit 1: is this only for linux?
Click to expand...
Click to collapse
no, it does not include adb or anything.
You need working adb for you OS and the zip file.
I just extracted the needed stuff from the linked projects (Superuser and busybox), added a little shell script that copies the apk and the binaries..
and while writing this post i've seen that i didn't install the busybox binary at all...so i fixed this with v2, added with this post... i also updated the README as i forgot to mention that run_root_shell and root.sh have to get executable bit
smokey_joe said:
no, it does not include adb or anything.
You need working adb for you OS and the zip file.
I just extracted the needed stuff from the linked projects (Superuser and busybox), added a little shell script that copies the apk and the binaries..
and while writing this post i've seen that i didn't install the busybox binary at all...so i fixed this with v2, added with this post... i also updated the README as i forgot to mention that run_root_shell and root.sh have to get executable bit
Click to expand...
Click to collapse
Thanks a lot - I try that when I'm at home in the evening. Greetings from Mannheim to Aachen.
tried both v1 and v2. neither work.
jumper62 said:
tried both v1 and v2. neither work.
Click to expand...
Click to collapse
yeah...i worked on this after my phone was rooted and i changes some permissions by hand etc...the busybox binary was chmodded to late...but i cannot see much on the small screenshot, tell me if there are other problems, attached v3
tried to look at your screenshot i saw you tried to execute the shellscript on the windows system? you really should read the README...you have to push the files to the device, everything from the zip file...and after that get a shell via adb shell and then you can execute the run_root_shell and after that the root.sh skript to finally install superuser.apk / busybox and su commands
smokey_joe said:
tried to look at your screenshot i saw you tried to execute the shellscript on the windows system? you really should read the README...you have to push the files to the device, everything from the zip file...and after that get a shell via adb shell and then you can execute the run_root_shell and after that the root.sh skript to finally install superuser.apk / busybox and su commands
Click to expand...
Click to collapse
How can you push files into data/local/tmp without root?
xenoisme said:
How can you push files into data/local/tmp without root?
Click to expand...
Click to collapse
you could always....as far as i know it's the only place in the system where you can put files and make them executable. This was used by every exploit (i used) on my TabletP.
xenoisme said:
How can you push files into data/local/tmp without root?
Click to expand...
Click to collapse
Exactly. All i got was permission denied. ADB drivers are installed. USB debugging is also enabled
Sent from my Sony Tablet S using xda app-developers app
jumper62 said:
Exactly. All i got was permission denied. ADB drivers are installed. USB debugging is also enabled
Sent from my Sony Tablet S using xda app-developers app
Click to expand...
Click to collapse
what's the step after ./run_root_shell
smokey_joe said:
tried to look at your screenshot i saw you tried to execute the shellscript on the windows system? you really should read the README...you have to push the files to the device, everything from the zip file...and after that get a shell via adb shell and then you can execute the run_root_shell and after that the root.sh skript to finally install superuser.apk / busybox and su commands
Click to expand...
Click to collapse
is it okay?
Done it! thank you very much
Sent from my Sony Tablet S using xda app-developers app
xenoisme said:
View attachment 2037095
is it okay?
Click to expand...
Click to collapse
Yh. I got that but just carry on and it will work
Sent from my Sony Tablet S using xda app-developers app
xenoisme said:
is it okay?
Click to expand...
Click to collapse
looks good, after that you could install Superuser.apk/su/busybox by yourself or use execute root.sh ./root.sh to do it automatically...you can verify that you are root by using the command "id" but the root.sh script checks if your user id is 0 (root)
smokey_joe said:
looks good, after that you could install Superuser.apk/su/busybox by yourself or use execute root.sh ./root.sh to do it automatically...you can verify that you are root by using the command "id" but the root.sh script checks if your user id is 0 (root)
Click to expand...
Click to collapse
it's okay now, thanks very much
rooted!
Android 4.0.3 R5A finally rooted!!! Thank you so much, smokey_joe! :good:
Maybe I can help others now also.
smokey_joe said:
yeah...i worked on this after my phone was rooted and i changes some permissions by hand etc...the busybox binary was chmodded to late...but i cannot see much on the small screenshot, tell me if there are other problems, attached v3
Click to expand...
Click to collapse
after i installed this driver package, it worked on the first try.
http://forum.xda-developers.com/showthread.php?t=1488822&highlight=drivers
thanks!

Camera2api

Can you show me how to enable camera2api in the lastest miui eu dev vesion?
try this
unlock bootloader and make sure adb debugging is on, use this command to enable it without editing build.prop
adb shell setprop persist.camera.HAL3.enabled 1
Click to expand...
Click to collapse

Restore accidentally removed database using ADB without root

I needed to copy my debug app database. So I read Stackoverflow post and made such things:
adb shell
run-as myapp.package
chmod 666 ./databases
chmod 666 ./databases/db
Click to expand...
Click to collapse
After that I tried to run `adb pull`, but it doesn't work. I run the application and now it doesn't work. It writes:
Cannot open database '/data/user/0/myapp.package/databases/db'
Click to expand...
Click to collapse
ls -l result
1|bonito:/data/user/0/myapp.package $ ls -l databases/
total 0
-????????? ? ? ? ? ? db
-????????? ? ? ? ? ? db-shm
-????????? ? ? ? ? ? db-wal
Click to expand...
Click to collapse
PLEASE, HELP ME. This database contains 3 years of my science work.
For me helped:
chmod 777 databases
Click to expand...
Click to collapse
And never change any permissions. For coping use this command from the folder where you need to copy:
adb exec-out run-as myapp.package cat databases/db > db
Click to expand...
Click to collapse

Categories

Resources