[Q][HELP] Mediatek user2root and modify enforce (Run ADB Shell localy?) - Android Q&A, Help & Troubleshooting

Hi,
I'm new here afterwards I use this forum a lot of times before but its the first time I'm writting because i don't find too much information about my problem:
I have a mt6735 device with Android 5.1 unrooted, bootloader locked and a factory ROM. I know, I know... maybe you think I'm mad because I have a not rooted Android, but I can explain:
I need the phone unrooted because I use some apps which dont work propertly if the device its rooted. Furthemore I need to pass Basic integrity of SAFETYNET check.
Everything its ok but SELinux its in permissive mode by default (and f**k SAFETYNET check), and I need root access to change it. I'd it with ADB with engineer mode and enabling User2root witch give me access to root shell and the command setenforce 1. But the other day the device restarted itself and SELinux become permissive again... I needed to get access a PC install drivers again and use ADB to change it again but it isn't always an option (For example in the middle of a trip) I tried to change permissions of enforce file, but that only work before restart...
I see many solutions witch require to modify and flash boot.img but I prefer to avoid that.
My questions are the following:
1.- Its posible to change default SELinux mode? Or change permissions of the enforce file so I'll can use setenforce command without root from terminal?
2.- Its posible to run terminal (or a comand on terminal) with root privileges with user2root? It seems to be not possible, but if anyone can confirm it...
3.- Its posible to run ADB Shell locally (Without loosing configuration when device restart) to run comands like root as I do on the PC?
4.- Its posible to achieve this without flashing or using SuperSu? Maybe I ask for the imposible
Many thanks to everyone

Related

Root info

I have used the instantroot method of rooting my fone (hero)
How do i know if it has worked ?
is there a new app or terminal window installed lets me control apps and settings etc
The easiest way to test if the device is rooted is to open another command prompt in the tools dir and type
adb root
If it returns that adb is already running in root, then you're all set.
Try google next time.

[Q] Disable ADB root login (cyanogenmod)

Now my phone is rooted, engineering boot ROM, with Cyanogenmod installed.
I'm wondering from a security standpoint, if someone happens to take my phone, and I happen to forget to disable USB Debugging, how can I make it harder to use ADB to reformat the phone?
By default, an ADB shell gives root access to the phone. How can you set the ADB shell to default to an unprivileged user that will have to 'su' in order to gain root access?
matkam said:
I'm wondering from a security standpoint, [...] How can you set the ADB shell to default to an unprivileged user that will have to 'su' in order to gain root access?
Click to expand...
Click to collapse
I'd really like to know this, too. :b

[Q] ADB inside Android?

I'm sorry If I'm missing something really obvious, or if this question has been asked before, but I didn't find anything in the search, so here goes:
Firstly, as the title suggests, I'm wondering whether it would be possible to run ADB (Android Debug Bridge) inside an existing Android device. I saw this, but what I want is to be able to compile an ADB binary (plus any necessary libraries) for Android, put it on my sdcard, and run ADB commands from within a terminal emulator.
Secondly, I'm wondering whether, after installing ADB on one device (device #1), I could connect that device and another device (device #2) together, and use device #1 to perform ADB commands on device #2 (for example, rooting device #2 without needing a PC).
So..... Would it be possible?
This would fare better in the Android Q&A forum. I'll flag it to the forum mod and ask them to move it
Done, and Thank You Sir.
adb
pokepal101 said:
I'm sorry If I'm missing something really obvious, or if this question has been asked before, but I didn't find anything in the search, so here goes:
Firstly, as the title suggests, I'm wondering whether it would be possible to run ADB (Android Debug Bridge) inside an existing Android device. I saw this, but what I want is to be able to compile an ADB binary (plus any necessary libraries) for Android, put it on my sdcard, and run ADB commands from within a terminal emulator.
Secondly, I'm wondering whether, after installing ADB on one device (device #1), I could connect that device and another device (device #2) together, and use device #1 to perform ADB commands on device #2 (for example, rooting device #2 without needinig a PC).
So..... Would it be possible?
Click to expand...
Click to collapse
I want to start by saying I'm no expert, but to the best of my knowledge, this is how it works.
adb runs native on android, the android property is ro.secure=1 this is found in the default.prop file. ADB is run in user privilege mode with this property setting. Not all of the adb shell commands will work with the device in this mode. With ro.secure=0 property setting, adb will run with root user privileges and all adb shell commands will function. There is an adb comand that when issued will return the value of the setting, but off the top of my head I could not tell you it. The file default.prop is part of the boot.img and will load every time the device is booted, so to edit the file the boot.img would have to be unpacked, edited, repacked, and pushed to the device boot partition.
I don't know why you would want to connect two smartphones using adb and don't know if it is even possible. It is probably best to run the binary with a script on the device where you want it installed. Good Luck with your project.
Sorry, I don't think I quite understand....
fdaconta said:
Not all of the adb shell commands will work with the device in this mode
Click to expand...
Click to collapse
I'm sorry if I'm not making myself clear, but I'm talking about running the ADB client/server on an android phone (normally done on a development computer), not the ADB daemon.
fdaconta said:
It is probably best to run the binary with a script on the device where you want it installed
Click to expand...
Click to collapse
That's also not possible, as the script involves running some complicated ADB-ish things like "adb restore" and running while device #2 is turned off - hence the need for device #1.

[ROOT] Technical how to ?

HEllo,
I'm actually trying to hack THOMSON THBK1-10 tablet (also know at VOYO A1).
This is a dual boot system with Android 4.4.2, and Windows 8.1, based on Bay Trail (Atom Z3720) CPU. Running kernel is 3.4.43
After a long fight, i gained accesses to /system and /data partitions.
I have so copyed su binary, and changed the access mode to ugo+rx. Good !
Sadly, this is not enough to gain root access. everytime i'm issuing su command i got into a $ prompt.
I must mention i only have ADB wireless for this device: the USB is acting as an USB host, it is not possible to plug it into a PC/MAC.
My question is what i must check, do, to gain root accesses ? What should i look, try, dig ?
Thank you !
Self reply: you only need to have SU installed, as i mentionned.

Can't get ADB root access - What else could I try?

Hi there
I fiddle largely with MTK based phones and when I tweak a phone, I normally only need ADB root access. So my general process has been to:
1. OEM Unlock the device
2. unpack the boot.img and change the default.prop values (ro.adb.secure etc) to allow ADB root access.
3. Use ADB to get temporary write access using adb Root, then ADB remount Rw. Then you can pull and push files.
However I have an MT8735b, Android 7.0, Alps based device that will simply not give me ADB root access. so when I run "adb remount rw" or any of the equivalent shell scripts you can use instead, it just won't give me write access.
So I heard that newer phones based on these chipsets and also ones like 6737M are locking the device up in other ways.
My question is, does anyone have any ideas or knows anything I could try to get root access?
Any help is much appreciated.

Categories

Resources