Commit Graph

2871 Commits

Author SHA1 Message Date
topjohnwu
fb40e96917 Update outputs 2019-05-01 01:22:37 -04:00
topjohnwu
4ca25f74c6 More robust mounting scripts
Close #1376
2019-04-30 17:35:58 -04:00
osm0sis
7fda917b86 Fix addon.d error OUTFD derp 2019-04-30 17:09:25 -04:00
osm0sis
e6bd5f2c40 Display error if actual Magisk addon.d script cannot be run
- this would likely occur on an FDE device with block map OTAs (a la LineageOS) since they do not require/request decrypt
- for reference all other addon.d "v1" cases should work fine:
  1) FDE with openrecovery script works fine since it requests decrypt
  2) FBE with openrecovery script OR block map work fine since /data/adb remains accessible
2019-04-30 10:27:29 -04:00
topjohnwu
8a904ee384 Update native external dependencies 2019-04-30 01:31:07 -04:00
topjohnwu
00a9f18a1e Build with -Wall 2019-04-29 21:26:43 -04:00
topjohnwu
8d68ebb074 Revert ioctl rules 2019-04-29 21:25:57 -04:00
topjohnwu
5f53cfb4a9 Update sepolicy rules 2019-04-29 20:26:51 -04:00
topjohnwu
a2fa8d8be1 Stop fdsan complains 2019-04-29 20:04:39 -04:00
topjohnwu
70a3c78ebb Simplify magiskinit logging 2019-04-29 19:53:22 -04:00
topjohnwu
54d1207f92 Auto remove post_ota.sh 2019-04-24 01:59:47 -04:00
topjohnwu
003e44fb84 Remove requirement to use early-init daemon
We used to construct /sbin tmpfs overlay in early-init stage after
SELinux is properly initialized. However the way it is implemented
(forking daemon from magiskinit with complicated file waiting triggers)
is extremely complicated and error prone.

This commit moves the construction of the sbin overlay to pre-init
stage. The catch is that since SELinux is not present at that point,
proper selabel has to be reconstructed afterwards. Some additional
SEPolicy rules are added to make sure init can access magisk binaries,
and the secontext relabeling task is assigned to the main Magisk daemon.
2019-04-24 00:13:48 -04:00
topjohnwu
515f346dcc Monitor app_process
Some stupid Samsung ROMs will spawn multiple zygote daemons. Since we
switched to ptrace based process monitoring, we have to know all zygote
processes to trace. This is an attempt to fix this issue.

Close #1272
2019-04-22 16:36:23 -04:00
topjohnwu
6050c4e8ba Fix strings.xml 2019-04-21 21:01:49 -04:00
tarasyyyk
158af8819a added stub Ukrainian translation 2019-04-21 19:18:15 -04:00
tarasyyyk
7787bb31fa updated Ukrainian translation: 'Patch File' strings 2019-04-21 19:18:15 -04:00
cristisilaghi
a1fe3e7ccd Update Romanian 2019-04-21 19:18:04 -04:00
dark-basic
4316028b23 Update strings.xml
Restructured based on original string. New missing lines added
2019-04-21 19:17:56 -04:00
topjohnwu
f2b52755d6 Track all input devices with KEY_VOLUMEUP
This should in theory should support more devices for detecting the
volume up press on boot.

Close #1346
2019-04-21 19:09:08 -04:00
topjohnwu
f315c4416b Upgrade libsu 2019-04-19 01:07:39 -04:00
topjohnwu
4e7dafb0e4 Use bitset instead of vector 2019-04-13 02:43:43 -04:00
topjohnwu
a6395d35db Refactor with AS 3.5 2019-04-12 01:58:42 -04:00
Viktor De Pasquale
a028cd5cec Updated locations of nearly all files
This has been done in preparations for rewrite to kotlin and upcoming design changes.
Nothing should be broken but use caution.
2019-04-12 01:44:55 -04:00
Viktor De Pasquale
540000d26e Fixed butter knife not building with kotlin 2019-04-12 01:44:55 -04:00
Viktor De Pasquale
888c656aa8 Added kotlin support 2019-04-12 01:44:55 -04:00
topjohnwu
8d4c407201 Directly communicate with Activity
Since Android Q does not allow launching activities from the background
(Services/BroadcastReceivers) and our native process is root, directly
launch activities and use it for communication between native and app.

The target activity is not exported, so non-root apps cannot send an
intent to fool Magisk Manager. This is as safe as the previous
implementation, which uses protected system broadcasts.

This also workaround broadcast limitations in many ROMs (especially
in Chinese ROMs) which blocks the su request dialog if the app is
frozen/force stopped by the system.

Close #1326
2019-04-10 23:35:31 -04:00
topjohnwu
fdeede23f7 Don't build test APKs 2019-04-10 23:33:22 -04:00
topjohnwu
53c5ca59b6 Cleanup SuLogger 2019-04-10 18:09:41 -04:00
topjohnwu
679db97209 Always run su requests in new tasks 2019-04-10 18:05:19 -04:00
topjohnwu
fbdd72273e Restructure SuRequestActivity 2019-04-10 17:02:32 -04:00
topjohnwu
0165602515 More cleanups 2019-04-10 13:54:33 -04:00
topjohnwu
96127f8bd1 Lock orientation in SuRequestActivity
Fix #1302, close #1318
2019-04-10 05:36:02 -04:00
topjohnwu
0dbdf336d6 Update dependencies 2019-04-10 05:17:03 -04:00
topjohnwu
48879df2da Some cleanups 2019-04-10 05:15:20 -04:00
topjohnwu
b067a5bb13 Use root to launch su request Activity on Q 2019-04-10 05:03:26 -04:00
topjohnwu
4b54cf1288 Compile with Android Q SDK
We upgrade compileSdkVersion to Q, but keep targetSdkVersion as 28.
The reason is because targeting Q will no longer allow us to execute
native binaries in an app's private data, which Magisk Manager relies
a lot for performing stock boot image patches in non rooted environment.
For more information regarding this issue, check this link:
https://redd.it/b2inbu

Some workarounds has been discovered (https://github.com/termux/proot),
however for the time being there is no point to introduce these huge
hacks just for targeting Q, which we don't benefit anything.
2019-04-10 02:17:08 -04:00
topjohnwu
6128c24f96 Drastically improve module download service 2019-04-10 02:00:48 -04:00
topjohnwu
d9c58f307f Remove unused resources 2019-04-09 04:44:09 -04:00
Lukas Novotny
b521fbeeda Update Czech translation 2019-04-09 04:38:35 -04:00
Rom
d00a3b89f2 Update French translation 2019-04-09 04:38:23 -04:00
vvb2060
3d15518191 Update zh-rCN translation 2019-04-09 04:38:09 -04:00
Ingan121
9b6535fdf5 Update Korean translations 2019-04-09 04:37:58 -04:00
topjohnwu
e0424fdba3 Remove patch format options
Output format will be the same as input
2019-04-09 04:37:34 -04:00
Ian Macdonald
7481c53451 Update samsung.md 2019-04-08 21:07:36 -04:00
topjohnwu
7219947237 Update libsu
Close #1314
2019-04-08 21:05:11 -04:00
topjohnwu
b72004e9cc Move methods 2019-04-08 17:35:32 -04:00
topjohnwu
f187213568 Run update check service only in background 2019-04-08 17:35:32 -04:00
topjohnwu
fc0df84edd Keep track of foreground activity 2019-04-08 17:35:32 -04:00
topjohnwu
f24df4f43d Don't allow cloning root nodes
The root nodes are /system and /vendor. Adding new files into these
directories, although works on some devices, mostly bootloops on many
devices out there. So don't allow it, which also makes the whole magic
mounting logic much easier and extensible.
2019-04-08 12:30:57 -04:00
topjohnwu
dab32e1599 Use our own device nodes for mirrors 2019-04-08 01:40:04 -04:00