Peace be upon to you
Please help me
My mobile
Sm-j200h
Android lollipop 5.1
I used this Apktool version
[email protected]
It decompile successfully, but recompile failed
I googled this problem, and found that I can't recompile successfully , if selinux in my mobile is "Selinux Enforce".
Please help me to change selinux from enforce to Permissive.
I tried apps such as ( tuggle selinux changer,,) to change it but all failed
aboaldrdaaa2 said:
Peace be upon to you
Please help me
My mobile
Sm-j200h
Android lollipop 5.1
I used this Apktool version
[email protected]
It decompile successfully, but recompile failed
I googled this problem, and found that I can't recompile successfully , if selinux in my mobile is "Selinux Enforce".
Please help me to change selinux from enforce to Permissive.
I tried apps such as ( tuggle selinux changer,,) to change it but all failed
Click to expand...
Click to collapse
have you tried this app to change selinux mode.
https://forum.xda-developers.com/showthread.php?t=2524485
Ashwinrg said:
have you tried this app to change selinux mode.
https://forum.xda-developers.com/showthread.php?t=2524485
Click to expand...
Click to collapse
Thanks for reply
Yes I tried it before, it failed too.
aboaldrdaaa2 said:
Thanks for reply
Yes I tried it before, it failed too.
Click to expand...
Click to collapse
Then try these commands in terminal emulator.
Open terminal emulator type "su" give root permission to emulator
type "getenforce" and enter.
type "setenforce 0" to set to permissive or "setenforce 1" for enforce
Ashwinrg said:
have you tried this app to change selinux mode.
https://forum.xda-developers.com/showthread.php?t=2524485
Click to expand...
Click to collapse
Ashwinrg said:
Then try these commands in terminal emulator.
Open terminal emulator type "su" give root permission to emulator
type "getenforce" and enter.
type "setenforce 0" to set to permissive or "setenforce 1" for enforce
Click to expand...
Click to collapse
Again failed see screenshot, sorry I can't upload screenshot
Related
Hello there! After months asking for the developer of Simple Streak Rom for a fix in the VPN connections (and no answer) I have been trying to fix it. Well, I made it! After several days of frustration, I have finally made it work
What do you need:
1. Working VPNServices.apk (I pulled from the PlayDoh ROM, which it is based on 354 ROM which it is supposedly the same of Simple Streak 1.2 Testing V4)
Links:
http://www.multiupload.com/E9RI0XOKCQ
Mirror:
https://sites.google.com/site/ernestovillarreal/home/VpnServices.apk?attredirects=0&d=1
2. Working tun.ko for our devices (thanks gpmg762 for that!)
Link:
http://www.multiupload.com/D3FXAJUC72
Mirror:
https://sites.google.com/site/ernestovillarreal/home/tun.ko?attredirects=0&d=1
3. Need to give special permissions to the VPNServices.apk. In a terminal emulator, or using adb, type:
Code:
su
mount -o remount,rw /dev/null /system
chmod 0644 /system/app/VpnServices.apk
mount -o remount,ro /dev/null /system
sync
reboot
3. Load for the first time the tun.ko. In the same console, type:
Code:
su
insmod /pathofwheretun.kois/tun.ko
4. Edit the init script to load the tun module every boot. Edit this file: "/etc/init.streak.post_boot.sh", adding this line to the last line:
"insmod /system/lib/modules/tun.ko"
ASSUMING you have the tun.ko in /system/lib/modules folder.
And that's it!
**UPDATE: It works! The problem seems to be my router, in 3G is working fine!!
**UPDATE 2: In my case, it is not working on WiFi. I'll try on other ones in the night.
**UPDATE 3: My bad, problem with the chmod. I have fixed it on the thread
**UPDATE 4: In the Simple Streak 1.3 testing 5, Splida added the tun.ko but he didnt add the VpnServices.apk nor the postboot modification. So, just skip step 2. And it is still not working using WiFi.
WiFi problem probably with dd-wrt router. Will test this night.
#Bump
This is awesome! VPN working on Simple Streak?! Downloading now.
Excited to use my blue tooth mouse with windows remote desktop (2x Client) away from the office and secured tunnel.
::EDIT:: working great on my WiFi!
Ok, so how do we script tun.ko? You could figure out how to run the insmod /data/tunko/tun.ko at every boot -TheManii, I'm looking at you
Or create a shortcut that will run tun.ko on demand and preferably connect the VPN with the same single click.
This is more of DJ_Steve's area of expertise I think, I dont really know much in regards to launching scripts on boot.
I guess you could make a script in /system/etc/init.d or just /system/etc
with
Code:
insmod /system/lib/modules/tun.ko
I dont see where streakdroid has it's scripts to run it, mabye it's automatic if it's in that folder? If it does in fact still need to be scripted i believe init.d runs with root privs?
Really I'm just guessing
May be you can try scriptmanager run on boot option
Sent from my Dell Streak using Tapatalk
Guys, you can put the line "/system/bin/insmod /system/lib/modules/tun.ko" into /etc/init.streak.post_boot.sh, that loads it for me after a reboot.
Or you can use GScript from market to load it manually.
Hope that helps.
gpmg762 said:
Guys, you can put the line "/system/bin/insmod /system/lib/modules/tun.ko" into /etc/init.streak.post_boot.sh, that loads it for me after a reboot.
Or you can use GScript from market to load it manually.
Hope that helps.
Click to expand...
Click to collapse
That's right, I figured it out minutes later I posted this post.. but I was lazy to put it here
In my case, I just put on the last line:
insmod /system/lib/modules/tun.ko
i'm testing your method now....
here is the result. ..
terminal emulator:
su
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed(Exec format error)
need your expertise. . . .TIA
in init.streak.post_boot.sh
the last line says "esac"
will i put it like this{ esac "insmod /system/lib/modules/tun.ko"}
or like this:
esac
"insmod /system/lib/modules/tun.ko"
noob here....thanks again.
request. . .
gpmg762 said:
Guys, you can put the line "/system/bin/insmod /system/lib/modules/tun.ko" into /etc/init.streak.post_boot.sh, that loads it for me after a reboot.
Or you can use GScript from market to load it manually.
Hope that helps.
Click to expand...
Click to collapse
can you compile a working tun.ko for my device sir?tun attached in this thread didn't work for me...here is the info:
dell streak 5
android 2.2.2
baseband - GAUSB1A134700-EU
kernel - SimpleStreakKernel-bySpidlA
OEM - GAUSB1A135411
build number - Simple Streak 1.3 (4th testing)
TIA XDA MEMBERS...
takoyaki17 said:
can you compile a working tun.ko for my device sir?tun attached in this thread didn't work for me...here is the info:
dell streak 5
android 2.2.2
baseband - GAUSB1A134700-EU
kernel - SimpleStreakKernel-bySpidlA
OEM - GAUSB1A135411
build number - Simple Streak 1.3 (4th testing)
TIA XDA MEMBERS...
Click to expand...
Click to collapse
Try to ask him via PM and then, provide the tun.ko, so I can put it on the mirror server to everyone.
takoyaki17 said:
i'm testing your method now....
here is the result. ..
terminal emulator:
su
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed(Exec format error)
need your expertise. . . .TIA
in init.streak.post_boot.sh
the last line says "esac"
will i put it like this{ esac "insmod /system/lib/modules/tun.ko"}
or like this:
esac
"insmod /system/lib/modules/tun.ko"
noob here....thanks again.
Click to expand...
Click to collapse
Thanks right, but without the quotes.
Like this:
esac
insmod /system/lib/modules/tun.ko
Still searching for the right tun.ko to run openvpn in my streak....
Sent from my Dell Streak using XDA Premium App
takoyaki17 said:
Still searching for the right tun.ko to run openvpn in my streak....
Sent from my Dell Streak using XDA Premium App
Click to expand...
Click to collapse
if you trust me, sned me the login details so I can check with my cell phone if I can log in.
hmmm
netomx said:
if you trust me, sned me the login details so I can check with my cell phone if I can log in.
Click to expand...
Click to collapse
log in details of what?my openvpn or my xda account?
takoyaki17 said:
can you compile a working tun.ko for my device sir?tun attached in this thread didn't work for me...here is the info:
dell streak 5
android 2.2.2
baseband - GAUSB1A134700-EU
kernel - SimpleStreakKernel-bySpidlA
OEM - GAUSB1A135411
build number - Simple Streak 1.3 (4th testing)
TIA XDA MEMBERS...
Click to expand...
Click to collapse
try the attached file.
netomx said:
if you trust me, sned me the login details so I can check with my cell phone if I can log in.
Click to expand...
Click to collapse
For your last config file.
takoyaki17 said:
log in details of what?my openvpn or my xda account?
Click to expand...
Click to collapse
Your OpenVPN login details.
thanks but. . .
gpmg762 said:
try the attached file.
Click to expand...
Click to collapse
i think it doesn't work....
i used terminal emulator to test it
and says no such file or directory....
can you take another shot sir....thanks
takoyaki17 said:
i think it doesn't work....
i used terminal emulator to test it
and says no such file or directory....
can you take another shot sir....thanks
Click to expand...
Click to collapse
That seems to be a problem in your terminal emulator.
hmmm
netomx said:
That seems to be a problem in your terminal emulator.
Click to expand...
Click to collapse
i dont think so...at first i thought that's the problem too....
so i tried using openvpn it says FATAL ERROR: cannot allocate tun/tap
you guys are great...so please help me. . .thanks
takoyaki17 said:
i dont think so...at first i thought that's the problem too....
so i tried using openvpn it says FATAL ERROR: cannot allocate tun/tap
you guys are great...so please help me. . .thanks
Click to expand...
Click to collapse
yes it is, that's why openvpn can't open the tun device.
type here what you write on the terminal
netomx said:
yes it is, that's why openvpn can't open the tun device.
type here what you write on the terminal
Click to expand...
Click to collapse
same as your post...
su
mount -o remount,rw /dev/null /system
chmod 0644 /system/app/VpnServices.apk
mount -o remount,ro /dev/null /system
sync
reboot
then after reboot:
su
insmod /system/lib/modules/tun.ko
i tried the one gpmr provided ad the result is:
no such file or directory
then i tried the one that he gave you last:
Failed (file exist)
anyway,what does 0644 do to the vpnservices.apk?
Is there any command on cmd.exe that would allow me to run apk.file after installing it .. like
adb install myapp.apk
This command will only install myapp onto the emulator and I have to manually run this application from the emulator (by performing single click on its icon).
What I want to do is use a command which not only installs the application but also run it or open it in the device after installation.
stiphen said:
Is there any command on cmd.exe that would allow me to run apk.file after installing it .. like
adb install myapp.apk
This command will only install myapp onto the emulator and I have to manually run this application from the emulator (by performing single click on its icon).
What I want to do is use a command which not only installs the application but also run it or open it in the device after installation.
Click to expand...
Click to collapse
http://delphi.org/2013/11/installing-and-running-android-apps-from-command-line/
I think that is what you are looking for
quentin330 said:
http://delphi.org/2013/11/installing-and-running-android-apps-from-command-line/
I think that is what you are looking for
Click to expand...
Click to collapse
after installing Myfile.apk
adb install Myfile.apk
and then try to run it in the device
adb shell am start -n com.other.Myfile.apk/.MainActivity
I get the error
Starting: Intent { cmp=com.other.Myfile.apk/ .MainActivity }
Error type 3
Error: Activity class {com.other.Myfile.apk/com.other.Myfile.apk.MainActivity} does not exist.
whereas Myfile.apk is installed
stiphen said:
after installing Myfile.apk
adb install Myfile.apk
and then try to run it in the device
adb shell am start -n com.other.Myfile.apk/.MainActivity
I get the error
Starting: Intent { cmp=com.other.Myfile.apk/ .MainActivity }
Error type 3
Error: Activity class {com.other.Myfile.apk/com.other.Myfile.apk.MainActivity} does not exist.
whereas Myfile.apk is installed
Click to expand...
Click to collapse
You have to remplace com.other by the name of the package and MainActivity by the name of the activity you want to open
quentin330 said:
You have to remplace com.other by the name of the package and MainActivity by the name of the activity you want to open
Click to expand...
Click to collapse
As in my first post .. I said I install apk file into my device by
adb install myfile.apk
OK it is installed into my device .. Now with command I want to open/run installed apk in my device .. I know i can normally run it by touching its icon .. but i want to do the same through the command ..
stiphen said:
As in my first post .. I said I install apk file into my device by
adb install myfile.apk
OK it is installed into my device .. Now with command I want to open/run installed apk in my device .. I know i can normally run it by touching its icon .. but i want to do the same through the command ..
Click to expand...
Click to collapse
That's what you can do with the commands but you have to know which activity to open and in which package it is
quentin330 said:
That's what you can do with the commands but you have to know which activity to open and in which package it is
Click to expand...
Click to collapse
as i am new .. i only know that i have installed an apk and is installed . now hoe come i know which package is this in and how can i run it
Android 5.0 Lollipop breaks apps that mount file systems to be shared with other apps. This includes CifsManager, Mount Manager, essentially anything that mounts cifs shares, FUSE file sytems, etc. The symptom is that the mounted contents appear fine to app that peforms the mount operation (assuming the app itself provides the ability to browse the contents), but every other app only sees an empty directory at the mount point.
Will a fix be possible for Lollipop as it was for Android 4.2?
Fix as pointed out by user glimmling.
Firstly, ensure you have the ElementalX kernel flashed onto your nexus 5.
glimmling said:
Cifs is definitily working on lollipop with my old Nexus 7. I use a patched kernel to make the mounts visible for all apps: http://forum.xda-developers.com/showpost.php?p=36908034&postcount=1
If your kernel doesn't have the patches, there is a second workaround with the SuperSU mount-master option: http://su.chainfire.eu/#how-mount
Important! Both approaches needs the SE Linux mode to be "permissive" to see the files in the mounts.
This example should work:
Code:
su
setenforce Permissive
su --mount-master -c busybox mount -o username=guest,rw,noperm,iocharset=utf8 -t cifs //192.168.178.23/cifsshare /data/media/0/mounts/cifsshare
Click to expand...
Click to collapse
If you can't be buggered typing out lengthy line 3 every time you mount you can use the patched version of Cifsmanager.v1.5a which uses prefixed mount command (su --mount-master -c) however it requires SuperSU and you still need SE Linux mode to be "permissive" to see the files in the mounts. So you can either do that manually in terminal:
Code:
su
setenforce Permissive
or download SELinux Mode Changer to switch for you (note: it's a bit buggy on switching)
After unmounting the share you should go back to Enforcing mode.
Code:
su
setenforce Enforcing
or just use SELinux Mode Changer to change back.
What is the difference between the SE for Android status: Enforcing, Permissive and Disabled?
Enforcing — SE for Android is enforcing the loaded policy. Your device is actively protected from security threats and malicious apps will be denied access.
Permissive — The SE for Android policy file is loaded, but your device is not enforcing it. If a malicious app tries to access a resource that it is not allowed to, the access will be logged but not prevented. This mode is intended for testing and debugging. It generates log files of denied app and allows Samsung to identify new app threats and update its policy files.
Disabled — The SE for Android infrastructure is not enabled, and there is no policy file loaded. Log files are not generated and your system is vulnerable to security threats.
Click to expand...
Click to collapse
bseos said:
If you can't be buggered typing out lengthy line 3 every time you mount you can use the patched version of Cifsmanager.v1.5a which uses prefixed mount command (su --mount-master -c) however it requires SuperSU and you still need SE Linux mode to be "permissive" to see the files in the mounts.
Click to expand...
Click to collapse
If you want to leave SELinux enabled, you can use that patched version of Cifsmanager above and and label the directory in the Options,
Code:
context=u:object_r:rootfs:s0
The full options string i use
Code:
vers=2.1,domain=MYDOMAIN,rw,file_mode=0777,dir_mode=0777,context=u:object_r:rootfs:s0
This works for my Nexus 6, 5.0 & 5.1.
Note: the version 2.1, isn't always enabled in the kernel so you might have to remove vers=2.1.
Hello,
Im using MIUI 10 android 9 non rooted.
When i want activate agressive doze via adb [ adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS ], i get this error message:
D:\ANDROID\TOOLS\ADB-FASTBOOT>adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
Security exception: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:1822)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1850)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1391)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:89)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:2118)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5604)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21860)
at android.os.Binder.shellCommand(Binder.java:629)
at android.os.Binder.onTransact(Binder.java:527)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2809)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4014)
at android.os.Binder.execTransact(Binder.java:728)
D:\ANDROID\TOOLS\ADB-FASTBOOT>
I read tutorial here https://greenify.uservoice.com/know...o-grant-permissions-required-by-some-features
Any help would be appreciated
exodius48 said:
Hello,
Im using MIUI 10 android 9 non rooted.
When i want activate agressive doze via adb [ adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS ], i get this error message:
D:\ANDROID\TOOLS\ADB-FASTBOOT>adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
Security exception: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:1822)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1850)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1391)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:89)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:2118)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5604)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21860)
at android.os.Binder.shellCommand(Binder.java:629)
at android.os.Binder.onTransact(Binder.java:527)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2809)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4014)
at android.os.Binder.execTransact(Binder.java:728)
D:\ANDROID\TOOLS\ADB-FASTBOOT>
I read tutorial here https://greenify.uservoice.com/know...o-grant-permissions-required-by-some-features
Any help would be appreciated
Click to expand...
Click to collapse
Most likely your ROM is incompatible. If you are keen on Greenify, switch to a custom ROM and check.
tnsmani said:
Most likely your ROM is incompatible. If you are keen on Greenify, switch to a custom ROM and check.
Click to expand...
Click to collapse
Custom rom? So i need to unlock bootloader my device , install twrp etc etc.? OK thanks.
I dont want to do it, so better to uninstall greenify.
exodius48 said:
Custom rom? So i need to unlock bootloader my device , install twrp etc etc.? OK thanks.
I dont want to do it, so better to uninstall greenify.
Click to expand...
Click to collapse
Good plan. Greenify really isn't needed on your device/rom.
When you run ADB on the computer make sure the CMD (the black window) is running As Administrator.
It really is worth it to run these ADB commands on a Non-Rooted device, Greenify works great.
I have an OPPO K5 - China domestic version. When I tried to grant permission to GSAM I also had the same long error message. Then I discovered further down the Developer Options menu, there's a tab called "Disable Permission Monitoring", I switched it on and the adb command worked without the long error message. Not sure if MIUI has a similar tab though.
exodius48 said:
I read tutorial here https://greenify.uservoice.com/know...o-grant-permissions-required-by-some-features
Click to expand...
Click to collapse
Hi.
Link is broken. Any tutorial copy to post here?
Regards.
Hi,
is there any way to set selinux permissive permanently on LiR? Everything I've found and tried only works until the next reboot.
I would like to install some audio modifications, e.g. Dolby, Viper, James, etc., and I heard they require selinux permissive.
ANE-LX1 said:
Hi,
is there any way to set selinux permissive permanently on LiR? Everything I've found and tried only works until the next reboot.
I would like to install some audio modifications, e.g. Dolby, Viper, James, etc., and I heard they require selinux permissive.
Click to expand...
Click to collapse
Try to set 'permissive' using Magisk, it works similar to init.d method
(worked for me on stock EMUI, should work on LiR too):
- First of all flash in TWRP "Phenix kernel" by @TureX and wipe Dalvik/ART cache, reboot.
- open root Explorer (e.g. Solid explorer), go to directory data/adb/post-fs-data.d , create a file , rename it as selinux
- add the line
setenforce 0
in the file 'selinux' and save it.
- change the permissions of a 'selinux' file to rwxrwxrwx (777) .
- reboot.
The phone should reboot into selinux permissive.
You can change selinux status via "Termux", without reboot, if needed.
(su <enter>
setenforce 0 <enter>
or
setenforce 1 <enter>
Status:
su <enter>
getenforce <enter> ).
Maybe this will help you.
P.S.: As for installing Viper or Dolby Atmos, it's just an academic question, imo...
-Alf- said:
Try to set 'permissive' using Magisk, it works similar to init.d method
(worked for me on stock EMUI, should work on LiR too):
- First of all flash in TWRP "Phenix kernel" by @TureX and wipe Dalvik/ART cache, reboot.
- open root Explorer (e.g. Solid explorer), go to directory data/adb/post-fs-data.d , create a file , rename it as selinux
- add the line
setenforce 0
in the file 'selinux' and save it.
- change the permissions of a 'selinux' file to rwxrwxrwx (777) .
- reboot.
The phone should reboot into selinux permissive.
You can change selinux status via "Termux", without reboot, if needed.
(su <enter>
setenforce 0 <enter>
or
setenforce 1 <enter>
Status:
su <enter>
getenforce <enter> ).
Maybe this will help you.
P.S.: As for installing Viper or Dolby Atmos, it's just an academic question, imo...
Click to expand...
Click to collapse
It's a little bit complicated for me...
Thanks for your help anyway!
P.S.: what do you mean by that?
-Alf- said:
As for installing Viper or Dolby Atmos, it's just an academic question
Click to expand...
Click to collapse
ANE-LX1 said:
P.S.: what do you mean by that?
Click to expand...
Click to collapse
I mean, neither of them will work.
-Alf- said:
I mean, neither of them will work.
Click to expand...
Click to collapse
Unfortunately, you are perhaps right and it has been a vain hope. Is there really no chance to have Volte and Dolby on a custom ROM??
ANE-LX1 said:
Unfortunately, you are perhaps right and it has been a vain hope. Is there really no chance to have Volte and Dolby on a custom ROM??
Click to expand...
Click to collapse
Oreo is your friend