[Root] Check root and reboot recovery mode (script?) - Android Q&A, Help & Troubleshooting

I have a samsung A50 stock rooted (Magisk + TWRP).
But Now, on the Android rooted, you mustn't reboot your device otherwise you lost you root.
You must only reboot in the recovery mode or just shutdown your device.
But it's a probleme. Because I often forget about this problem and I reboot and lose my root.
And, I use my phone without realizing that my afWall firewall (root only) is disabled for example.
So I am looking for a solution to detect at startup if my phone is rooted, and if it is not, restart it automatically in the recovery mode.
I think maybe a sh script could do this but I don't know how or where to put it to boot.
Thank you very much

laclac said:
I have a samsung A50 stock rooted (Magisk + TWRP).
But Now, on the Android rooted, you mustn't reboot your device otherwise you lost you root.
You must only reboot in the recovery mode or just shutdown your device.
But it's a probleme. Because I often forget about this problem and I reboot and lose my root.
And, I use my phone without realizing that my afWall firewall (root only) is disabled for example.
So I am looking for a solution to detect at startup if my phone is rooted, and if it is not, restart it automatically in the recovery mode.
I think maybe a sh script could do this but I don't know how or where to put it to boot.
Thank you very much
Click to expand...
Click to collapse
Testing for a rooted Android is difficult to do, it is almost impossible if Android is rooted via Magisk.

I don't really write a script but it is not possible to have:
Code:
try{
cd "/system/"
}catch (e){
#no root
shutdown();
}

@laclac
2 examples useable in a SH-script:
Code:
if [ "$(whoami)" == "root" ] ; then
# you are root
if [ -f "/system/bin/recovery" ]; then
$(/system/bin/reboot recovery)
fi
else
# you are not root
fi
Code:
if [ "$(id -u)" -eq 0 ]; then
# you are root
if [ -f "/system/bin/recovery" ]; then
$(/system/bin/reboot recovery)
fi
else
# you are ordinary user
fi
BTW:
You also may use this JAVA script as template:
https://github.com/rickyazhari/root...a/com/neki/rootchecker/RootCheckerPlugin.java
Can easily be rewrittten as SH script, IMO.

Related

How to root Fujitsu Stylistic M532

Hello,
I have a new Fujitsu Stylistic M532 Android Tablet. It would be great if someone could help me to root this tablet.
Which Information are neccessary from the tablet?
Maybe there is a standart process to test?
Please let me know what i can do to try to root the tablet?
Best regards
Sent from my M532 using xda app-developers app
Hello again,
Here are some more information about the tablet
Android 4.0.3
Kernel 2.6.39.4
Nvidia Tegra 3 T30S
MicroSDHC Slot
Mini USB Port
Updating via an external memory card (micro SD card)
Download and copy the system update package onto an external memory card (micro SD card).
Slide the memory card (micro SD card) into your Tablet PC.
Switch your Tablet PC off by one long press of the ON/OFF switch and confirm the question on the shut down with OK.
Switch your Tablet PC on again.
When you see the Android logo on the screen, press the ON/OFF switch and the volume button (increase volume) and keep them pressed for 2 seconds and then release them.
⇒ After a few seconds you reach the Recovery menu.
Info: If the Fujitsu logo appears on the screen, then you have not reached the recovery menu. Repeat the above step until you reach the recovery menu.
Select "apply update from external storage".
Info: Navigate as follows through the menu:
Volume button (increase volume) to select an option above the current option
Volume button (decrease volume) to select an option below the current option
ON/OFF switch to confirm the selection
Follow the instructions on the screen to perform the system update.
⇒ After the system update has completed, you will be in the recovery menu again.
Select "Reboot system now" to finish the system update.
Sent from my M532 using xda app-developers app
I am also considering buying this tablet. Therefor a root manual would be highly appreciated.
Thanks.
OK. I think no one has done the root on this tabet.
Maybe somone could give me a hint what i can try to root this tablet?
I`m ready to try some some procedures
maybe a standart procedure is available for android 4?
Or is the rooting of each device different?
What happens if i try a wrong procedure? I think a recovery of the os should always be possible or not?
Maybe someone could answer some questions
Sent from my M532 using xda app-developers app
I have the same tablet. Have you already tried to root it?
Is there any guide available in the meantime?
Hi,
I also have the M532, it is really great.
Any advise how to root it would be appreciated.
Thanks for any hint.
Sent from my STYLISTIC M532
I have no fujitsu tablet, but the same model Pegatron Chagall. (exactly the same)
this set you can upgrade my Fujitsu tablet?
Rom which includes applications?
I don't think so.
Look at the detailed update procedure from Fujitsu and you will see that the update process is checking the model and version information and refuses to install if they do not match.
You're right, the update package does not work on my tablet (Síragon 4N) ... it's a shame.
However, if there is a method to be root, so if you serve ...
Even this recent tablet market, hopefully get into the right hands and can unlock.
Hey, has anyone managed to root the M532?
Is there anyone I could send my M532 to to have it rooted?
ironxp said:
I have no fujitsu tablet, but the same model Pegatron Chagall. (exactly the same)
Click to expand...
Click to collapse
+1
Could someone download the boot.img and recovery.img from this tablet? We need those files in order to modify the following values in the default.prop file
filero.secure=0
ro.debuggable=1
persist.service.adb.enable=1
Repack the images and flash it using fastboot to get a privileged shell.
After doing that you will be able to root this table using "unlockroot" software
mandraxxx said:
Could someone download the boot.img and recovery.img from this tablet? We need those files in order to modify the following values in the default.prop file
Click to expand...
Click to collapse
All you can find is a .pkg file which you need for an upgrade.
How to download boot and recovery
I would be glad to, but how do I find them and get them copied to get to you?
mandraxxx said:
Could someone download the boot.img and recovery.img from this tablet? We need those files in order to modify the following values in the default.prop file
filero.secure=0
ro.debuggable=1
persist.service.adb.enable=1
Repack the images and flash it using fastboot to get a privileged shell.
After doing that you will be able to root this table using "unlockroot" software
Click to expand...
Click to collapse
Here is the pkg file which you can download on this page
-Script by Bin4ry-
I have a Tablet Chagall / Pegatron / Siragon 4N (the same model as the Fujitsu)
I tell them that I tried several rooting script:
Cube Root for ICS 4.0.3 , Cube Root for ICS 4.0.3 v2 , DROID 3 easy root script v7, Root_with_Restore_by_Bin4ry_v8, Google Nexus 7 ToolKit, NRT_v1.5.3., superclick, El UnlockRoot..
and three do not remember ...
And no I worked ...
today ... was half annoyed, and I happened to search again Bin4ry script and found this:
"Root_with_Restore_by_Bin4ry_v10" and try with this script by several methods ... but nothing ...
(http://forum.xda-developers.com/showthread.php?t=1886460)
Then I found this old script bin4ry original,
But it did not work ...
script "Root para ICS 4.1.A.0.562"
What I did was change a few lines ... why were here on xda forum
Here the modified
*******************************************************************
@echo This is an adapted idea from the methods of
@echo Dan Rosenberg (vulnfactory.org)
@echo -Script by Bin4ry-
echo off
cd data
echo Please plug the device in ADB-Mode
adb wait-for-device
echo Rename /data/local/tmp to be able to create symlink
adb shell mv /data/local/tmp /data/local/tmp.old
echo Trying to create /data symlink
adb shell ln -s /data /data/local/tmp
adb reboot
echo Waiting for device to reboot
adb wait-for-device
adb shell rm /data/local.prop > nul
echo Trying to write value in tablet to prop-file
adb shell "echo \"filero.secure=0\" > /data/local.prop"
adb shell "echo \"ro.debuggable=1\" > /data/local.prop"
adb shell "echo \"persist.service.adb.enable=1\" > /data/local.prop"
echo Rebooting
adb reboot
echo Waiting for device to reboot again
adb wait-for-device
echo Try to remount /system
adb remount
echo Pushing su and Superuser.apk
adb push su /system/bin/su
adb shell chmod 06755 /system/bin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 644 /system/app/Superuser.apk
echo Cleanup of the Stuff created while running
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.old /data/local/tmp
adb reboot
cd ..
pause
echo Reboot and done Have fun!
*******************************************************************
Note that the only thing not to run this script to copy the application was Superuser.apk and of course change the privileges ...
Install the "superuser" from the market ... and remove the line copy the superuser, and run the whole script.
It was no root ...
I returned to run the scritp of bin4ry, V10 ... and did you root the tablet seems.
(standard option)
Check and reset the tablet, and was even root ..., delete all tablet for recovery to start once again ... and continued to root ...
But, try to certify and document the process for publishing ... and V10 bin4ry script, we apply "unroot"
Now I could not repeat the process, and I could not do root again ...
... but I notice that in the folder / system, I find the SU ...
If someone wants to try, because only must be sure that you can restart the tablet completely ... so that applications may have the lost ...
I managed to root, unroot after applying ...
I root Bin4ry the script, and then with the same script I unroot (Here)
And now I root with script WkPark (Here)
Try making the tablet fujitsu root with these script, they must work ...
My tablet is a Pegatron \ Chagall \ Síragon 4N, which is exactly equal to the Fujitsu ...
ironxp said:
I managed to root, unroot after applying ...
I root Bin4ry the script, and then with the same script I unroot (Here)
And now I root with script WkPark (Here)
Try making the tablet fujitsu root with these script, they must work ...
My tablet is a Pegatron \ Chagall \ Síragon 4N, which is exactly equal to the Fujitsu ...
Click to expand...
Click to collapse
What a pitty!
Did not work on my M532
I only get following message when i try to run the script rooting.bat
Pushing busybox...
error: device not found
error: device not found
error: device not found
rooting.sh: adb: Invalid argument
[*] Remove old fake files...
error: device not found
error: device not found
rooting.sh: adb: Invalid argument
[*] Restore fake backup...
adb: unable to connect for backup
adb: unable to connect for backup
rooting.sh: adb: Invalid argument
[*] Please look at your device and select RESTORE button!
[*] Waiting ...
error: device not found
error: device not found
rooting.sh: adb: Invalid argument
[*] Running ...error: device not found
error: device not found
rooting.sh: adb: Invalid argument
[*] check /data/local.prop
***** FAIL *****
Please retry again
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
Best regards
quaker75 said:
What a pitty!
Did not work on my M532
I only get following message when i try to run the script rooting.bat
Pushing busybox...
error: device not found
Best regards
Click to expand...
Click to collapse
These errors are not connected in "ADB mode" to your pc
Brother, first try to install the driver of google android sdk, and not those of Fujitsu tablet (if you have one installed, it is best to uninstall and reboot the PC)
Then do a factory reset of the tablet, marking the option to delete all.
*- Active in Developer options, USB debugging, stay active and allow test location. Also active in security, unknown sources.
*- Connect the tablet (verifies that Windows recognizes it as "Android ADB Interface")
*- Run the script WkPark friend, follow the instructions and after two reboots, you will have root access to the tablet.
Performs a shutdown and start at the end and if you can run a new factory restore. Install "Root Check" of the market
*- If you do not succeed, try the same steps but running the script Bin4ry friend, and using the "Special" ... you follow the steps indicated.
Always remember to run a shutdown and startup at the end of each script ...
If you have problems with applications that are lost, do not pay much attention as you can re-run a factory reset or restore the tablet for recovery, for it ready.
I can certify that the script works Bin4ry and also the WkPark
(I have a tablet exactly like yours ... Pegatron / Chagall / Síragon 4N)

[Q] help with reboot_recovery.sh

Hey im trying to write a reboot_recovery.sh script to reboot to recovery for my i9100 and the OTA.
Anyone know the correct path ?
I added an example from a different device.
up..
Reboot recovery help
Hi, thank you very much for posting the information. I tried to use your script on the RK3066 based TV Box - DroidTV X1 . This script is supposed to be called by the OTA Updater to reboot the box to the recovery mode. It didn't work for me.
When I tried to execute it through the terminal connection on the box I get this error:
dd: can't open '/dev/block/nandf': Permission denied
reboot: Operation not permited.
Could you please advice what these commands supposed to do:
Code:
#!/system/bin/sh
echo -n boot-recovery | busybox dd of=/dev/block/nandf count=1 conv=sync; sync; reboot
and why do I'm getting this kind of messages?
Thanks a lot for your help!

[Solved] Forgot lock screen pattern need fix without factory reset

So I'm an idiot. Anyway, I recently installed cyanogenmod with CWM recovery (on a Nexus 7) and decided to try one of the largest grids for the lock screen security. Needless to say it was soon forgotten. I've tried the gmail reset but it says the details are incorrect even though I can sign in with them on my PC. My guess is that it can't connect to gmail for authentication due to the firewall I'm using.
Edit: Solution
Factory reset from CWM, that's it.
RoberGalarga said:
Factory reset from CWM, that's it.
Click to expand...
Click to collapse
Not the solution I was aiming for.
Fortunately I found http://forum.xda-developers.com/showthread.php?t=1800799
However this does not work for cyanogenmod as they use an additional system. I had no knowledge of this beforehand but a comment on the above post led me to believe something was different. I decided to pull /data/system folder so I could investigate further. I found cm_gesture.key which after looking it up, I found out it's cyanogenmods additional key file.
I decided to remove this file using the same method as the above post and it worked perfectly. After a reboot the pattern screen is still there but any input is correct.
Mini Cyanogenmod 10.1.2 pattern unlocking guide:
If ADB won't work from android reboot into CWM recovery (other custom recoveries may work). Open a CMD (ADB will need to be installed and setup).
Enter the each of the following:
Code:
adb shell rm /data/system/gesture.key
Code:
adb shell rm /data/system/cm_gesture.key
Code:
adb reboot
It should reboot into android and now any pattern will be correct. You should now go into settings and reconfigure your lock screen.
This works if you only have/delete /gesture.key
works on 4.4.2
Trying to make this work on CWM 13. It doesnt, any tips? forgot my 6x6 lockscreen which is also invisible...
Revome the unlock pattern! [CM13.0 tested]
Cryorus said:
Trying to make this work on CWM 13. It doesnt, any tips? forgot my 6x6 lockscreen which is also invisible...
Click to expand...
Click to collapse
FINALLY I HAVE A SOLUTION!
Version 1 (Custom Recovery):
------------
Get the updated version of TWRP (twrp.me). Flash it via Odin or whatever you use and boot into it (Vol Up + Home + Power).
1) go to Advanced > File Manager
2) then go to '/data/system'
3) press on 'gatekeeper.password.key' > Delete > Swipe to Confirm
4) repeat 3) with 'gatekeeper.pattern.key'
5) Reboot & be happy!
Version 2 (Android Debugging Bridge - adb):
-------------------------------------------------------
Just follow these steps:
1) make sure your device shows up here:
Code:
adb devices
2) restart adb as root:
Code:
adb root
3) start the device-shell:
Code:
adb shell
4) make sure to have su access:
Code:
su
5) go to the 'system' directory in the 'data' folder:
Code:
cd /data/system
6) remove the pattern:
Code:
rm gatekeeper.password.key
7) remove the password sequence:
Code:
rm gatekeeper.pattern.key
8) exit the shell:
Code:
exit
9) reboot to be happy again:
Code:
adb reboot
That's it! Hope I was able to help you!
~ Kerskes ~
Awesome. Thanks for sharing your research.
Kerskes said:
FINALLY I HAVE A SOLUTION!
Version 1 (Custom Recovery):
------------
Get the updated version of TWRP (twrp.me). Flash it via Odin or whatever you use and boot into it (Vol Up + Home + Power).
1) go to Advanced > File Manager
2) then go to '/data/system'
3) press on 'gatekeeper.password.key' > Delete > Swipe to Confirm
4) repeat 3) with 'gatekeeper.pattern.key'
5) Reboot & be happy!
Version 2 (Android Debugging Bridge - adb):
-------------------------------------------------------
Just follow these steps:
1) make sure your device shows up here:
Code:
adb devices
2) restart adb as root:
Code:
adb root
3) start the device-shell:
Code:
adb shell
4) make sure to have su access:
Code:
su
5) go to the 'system' directory in the 'data' folder:
Code:
cd /data/system
6) remove the pattern:
Code:
rm gatekeeper.password.key
7) remove the password sequence:
Code:
rm gatekeeper.pattern.key
8) exit the shell:
Code:
exit
9) reboot to be happy again:
Code:
adb reboot
That's it! Hope I was able to help you!
~ Kerskes ~
Click to expand...
Click to collapse
Thanks a ton man !
Acrylate said:
Not the solution I was aiming for.
Fortunately I found http://forum.xda-developers.com/showthread.php?t=1800799
However this does not work for cyanogenmod as they use an additional system. I had no knowledge of this beforehand but a comment on the above post led me to believe something was different. I decided to pull /data/system folder so I could investigate further. I found cm_gesture.key which after looking it up, I found out it's cyanogenmods additional key file.
I decided to remove this file using the same method as the above post and it worked perfectly. After a reboot the pattern screen is still there but any input is correct.
Mini Cyanogenmod 10.1.2 pattern unlocking guide:
If ADB won't work from android reboot into CWM recovery (other custom recoveries may work). Open a CMD (ADB will need to be installed and setup).
Enter the each of the following:
Code:
adb shell rm /data/system/gesture.key
Code:
adb shell rm /data/system/cm_gesture.key
Code:
adb reboot
It should reboot into android and now any pattern will be correct. You should now go into settings and reconfigure your lock screen.
Click to expand...
Click to collapse
Thanks man i was wondering and worried that i would have to reset my phone again .
wajeehuzkhan said:
Thanks man i was wondering and worried that i would have to reset my phone again .
Click to expand...
Click to collapse
Too late for me, already reseted my phone
I'm on lineage
After a softbrick I deleted these two files.
not I can pass the lockscreen again! nice!
now I can't set a new lockpattern...
How can I fix this?
sejmand said:
I'm on lineage
After a softbrick I deleted these two files.
not I can pass the lockscreen again! nice!
now I can't set a new lockpattern...
How can I fix this?
Click to expand...
Click to collapse
Did you manage to find any solution? I'm on LG G5 and get an FC when I try to open Lock screen settings.
Hassaan Masroor said:
Did you manage to find any solution? I'm on LG G5 and get an FC when I try to open Lock screen settings.
Click to expand...
Click to collapse
Finally, I did a hardreset with wipe data partition. After that I use a pin and never had the problem again...
(Do not remove files, rename them... Remember to see beforehand "ls -l" - access permissions and owners.)
With Lineage OS 14.1-20170607-nightly I succeded with as root:
Code:
mv /data/system/locksettings.db /data/system/locksettings.db_disabled
+ two subsequent reboots.
Settings are available and functional after it.
P.S.
The following was done before the trick above, but I'm not sure final permissions should be exactly as below (I did certain moves before it, but finished with the following):
Code:
# chown system.system /data/system/gatekeeper.pa*
# chmod 660 /data/system/gatekeeper.pa*
# ls -l /data/system/gatekeeper.pa*
-rw-rw---- 1 system system 0 2017-06-13 20:40 /data/system/gatekeeper.password.key
-rw-rw---- 1 system system 58 2017-06-13 20:40 /data/system/gatekeeper.pattern.key
Removing-renaming of the files will remove the pattern and fully unlock screen... and will break Settings app functionality (not able to set up new lock of any type). If files are back with these permissions - the pattern is back.
The following is definitely so, sure:
Code:
# ls -lh /data/system/locksettings.db
-rw-rw---- 1 system system 20K 2017-06-13 12:26 /data/system/locksettings.db
P.S.S. Ideas have been found here - https://forum.xda-developers.com/showthread.php?t=1800799&page=15
Hi Kerskes,
Thanks for the solution. It does work also on my hlte phone with Linage 14.1.
But I am seeing only one problem which is addressed by others as well.
That is Settings crashes everytime I want to set new security setting for lockscreen.
Do you have any proposals or solutions?
Also I would request Admin to set this as unsolved or open detach to new thread for the above issue.
Kerskes said:
FINALLY I HAVE A SOLUTION!
~ Kerskes ~
Click to expand...
Click to collapse
---------- Post added at 08:50 AM ---------- Previous post was at 08:32 AM ----------
Thanks Anker,
Your solution did wonderfully worked on Linage 14.1 over HLTE Phone.
I restarted after renaming locksettings.db using SolidExplorer (With Root). Then I needed one restart and Settings did responded properly for Lock Screen Pattern setting. I also observed that the gatekeeper.pa* files which I had deleted were also created again but they has only 600 file permissions. Soon I modified the file properties in SolidExplorer with proper 660 file permissions. Once again thanks a lot.
I apologize for my stupid previous post which I posted without seeing your solution.
B Anker said:
(Do not remove files, rename them... Remember to see beforehand "ls -l" - access permissions and owners.)
Click to expand...
Click to collapse

[GUIDE] Disable selinux to allow Xposed framework for Oneplus 2

This is a quick guide for disabling selinux to allow installation of Xposed framework on OsygenOS 2.2.x. Tested on my OPT.
This means changing the boot partition settings to allow permissive selinux and re-writing it.
It could work theoretically on any other Lollipops, perhaps Marshmallow, however... needs to be tested.
The red disclaimer: you perform all these changes at your own risk!
My current configuration:
- OxygenOS 2.2.1 (rooted, BETA-SuperSU-v2.67-20160121175247, Boeffla-Kernel 1.1-beta11)
- xposed-v80-sdk22-arm64
- mkbootimg-tools
Steps
You can use adb shell from a prompt (windows is quite ugly though).
For windows I recommend Puttytray (https://puttytray.goeswhere.com/) and connect using adb.
For future ROM updated, assuming you keep patch.sh, just use the terminal embedded in TWRP to run it right from the phone, generate the new boot image and apply it again.
Reboot in recovery (I use TWRP 3.0.0-2)
Make sure /system partition is mounted
Code:
mount /system
unzip mkbootimg_tools-master.zip
cd mkbootimg_tools-master/ARM
Create the patch.sh script (the wrapper for the mkbooting tools)
Code:
vi patch.sh
paste the contents of the attached script:
Code:
#!/system/bin/sh
############################################
# Script to alter the boot image and set selinux=permissive
# WARNING! use this at our own risk, I am not responsible for bricking your phone by corrupting the boot partition
# Tested on OxygenOS 2.1.1, 2.2.0, 2.2.1 (Lollipop 5.1.1)
#
# v1.0.2015-12-30
# Author: cr1cr1
############################################
# Mount /system partition rw, if not already mounted
mount -o rw /system 2>/dev/null
# Set some variables
ORIBOOT=ori-boot.img
PATCHEDBOOT=../new-boot.img
OUTDIR=boot~tmp
# Get the actual boot block partition
BOOTPART=`busybox readlink -f /dev/block/platform/*/by-name/boot`
if [ ! -r $BOOTPART ]; then
echo "Boot partition not found at: $BOOTPART!"
exit 1
fi
echo "Using boot partition: $BOOTPART"
# Copy the boot partition
set -x
busybox dd if=$BOOTPART of=$ORIBOOT
set +x
RETCODE=$?
if [ $RETCODE -ne 0 ]; then
echo "Failed to copy boot part using DD utility, retcode=$RETCODE"
exit $RETCODE
fi
# Unpack the boot image
set -x
./mkboot $ORIBOOT $OUTDIR
set +x
RETCODE=$?
if [ $RETCODE -ne 0 ]; then
echo "Failed to run mkboot utility, retcode=$RETCODE"
exit $RETCODE
fi
if [ ! -w $OUTDIR/img_info ]; then
echo "$OUTDIR/img_info is not writable, exiting!"
exit 1
fi
# Change the kernel command line parameters
if [ "$(busybox grep selinux $OUTDIR/img_info)" == "" ]; then
set -vx
busybox sed -i "s/cmd_line\='/cmd_line\='androidboot.selinux=permissive /" $OUTDIR/img_info
set +vx
else
set -vx
busybox sed -Ei 's/\.selinux=[^ '\'']+/.selinux=permssive/' $OUTDIR/img_info
set +vx
fi
# Repack the boot image
set -x
./mkboot $OUTDIR $PATCHEDBOOT
set +x
Set the execute permission
Code:
chmod +x patch.sh
Execute the script to patch the boot image
Code:
./patch.sh
You should now have a patched and repacked image:
new-boot.img
Install the new boot image using twrp:
- press install
- press "Install Image"
- select new-boot.img
- Select the partition "boot"
Apparently there is a need to also explicitly disable selinux on startup as well.
For this, yet another script must be used:
Code:
vi /system/etc/init.d/08customscript
Paste the following:
Code:
#!/system/bin/sh
mount -o remount,rw /system
/system/xbin/su 0 setenforce 0
echo "0" > /sys/fs/selinux/enforce
mount -o remount,ro /system
Set the appropriate permissions
Code:
chmod u=rwx,go=r /system/etc/init.d/08customscript
There isn't a plugin for kernel adiutor that does the same?
Enviado desde mi ONE A2003
Zalpa said:
There isn't a plugin for kernel adiutor that does the same?
Enviado desde mi ONE A2003
Click to expand...
Click to collapse
Probably, I have seen last night with Boeffla's kernel editor you have the option to disable Selinux.
However, this will NOT work unless you change the boot image as well.
cr1cr1 said:
Probably, I have seen last night with Boeffla's kernel editor you have the option to disable Selinux.
However, this will NOT work unless you change the boot image as well.
Click to expand...
Click to collapse
Thanks
Enviado desde mi ONE A2003

Grant Helium Backup Permission through ADB

I use Helium backup extensively as I do not want to root my new phone yet. But if the permissions are expired, I have to boot up my PC and grant permisssions again using the carbon app. This is okay if I am home. But when I'm not home, this is not possible.
I have another phone which has root and adb. I use it to grant apps like Custom Navigation Bar through OTG.
This is where my question comes.
Can I grant permission to Helium Backup via the adb I have on my rooted phone?
Thanks in advance.
PS. I have Android Oreo 8.1 on my unrooted Asus Zenfone Max Pro M1
And I have Android Marshmallow 6.0.1 on my Magisk systemless rooted Samsung Galaxy J5 (J500F) with adb from Magisk modules.
Bump
Sent from my ZenFone Max Pro M1 using XDA Labs
The answer everybody is looking for
Late answer for posterity: Yes it is possible!
I succeeded to enable Helium Backup without PC on my unrooted phone. For this you need:
* Wireless ADB debug support in developer tools
* Termux app: On F-Droid
* ADB on termux: https://github.com/MasterDevX/Termux-ADB?files=1
* This script: https://gist.github.com/olesenm/06ee8cdee893c732462a#file-helium-desktop-sh
I had to update adb location in the last script. Also I made this little bash helper to enable adb connection from termux:
Code:
adb_init ()
{
adb kill-server;
echo "Info: Connecting to device: \$ANDROID_SERIAL=$ANDROID_SERIAL ...";
export ANDROID_SERIAL=${1:-'127.0.0.1:5555'};
adb connect $ANDROID_SERIAL;
sleep 1;
adb shell echo "Ok: ADB connection is successful!";
local r=$?;
if [ "$r" -eq 0 ]; then
echo "Ok: Run adb shell command to start shell: adb shell";
echo;
adb devices;
else
echo "Error: Something wrong hapenned while trying to connect to device ADB.";
echo "Error: Please ensure Wireless and then USB debugging is activated.";
if command -v nmap &> /dev/null; then
local host=${ANDROID_SERIAL%:*};
local port=${ANDROID_SERIAL#*:};
[ "$host" != "$port" ] || port=5555;
printf "Info: Destination port status: ";
nmap "$host" -p "$port" | grep --color=auto --color=never "$port";
fi;
echo "Error: Then try to run again this command.";
fi;
set +x
}

Categories

Resources