Tag Archives

13 Articles

Solve Xposed module list become empty on Android 6.0 Marshmallow

0   8045 转为繁体

中文版本

Recently I found module list in Xposed become empty after I upgrade my Nexus5 to 6.0.1 (M4B30Z, Dec 2016). And all the modules are not activating. So I open logcat and see the following:

Rovo89 said on a xda post that this file should be created if any module is activated. But somehow it didn’t do so on my Nexus5. So I create one myself and set correct permission (0644) and uid (you can run the Xposed Installer app and check the uid through ps |grep xposed). Then I reboot and check logcat again:

Looks like it’s still not working.

Then I realise that Android started to set SELinux to enforce from Lollipop (5.0) so this should be the problem. (We can use dmesg|grep audit to check if the problem really related to SELinux. ) I compared a random file under /data/data to the file we just created:

So all we need to do is to change this conf/modules.list to u:object_r:app_data_file:s0:c512,c768 as well

restorecon is a applet shipped with toybox, we can also use chcon to manually set SELinux context.

解决Android 6.0 Marshmallow中Xposed的模块列表为空

4   20240 转为繁体

English Version

升级Nexus5 到6.0.1 (M4B30Z, Dec 2016)之后,Xposed的模块列表变成空的了,所有的模块也都失效了。没有xposed,怎么种庄稼。于是我打开logcat看了一眼。

rovo89在xda的QA帖中说一般情况下这个文件会在启用任意一个模块后创建。然而现在它并没有被创建。于是我去建了一个,然后chmod 644以及chown到应用到uid(可以通过启动应用之后ps|grep xposed查看uid,形如u0_a??),重启了一下,再瞄了一眼logcat。

好像哪里不对

想起来Android从萝莉棒开始SELinux就是enforce了,所以大概是这个问题。(我们可以通过dmesg|grep audit来查看被SELinux过滤的各种奇怪操作。)于是看了一下默认的文件context和我们刚创建的文件的context:

那么我们把这个conf/modules.list也改成u:object_r:app_data_file:s0:c512,c768这个context好了

restorecon是toybox中带的一个applet,我们也可以用chcon来手动更改context。

Nexus5手动ota升级Android [更新5.1]

10   17229 转为繁体

我知道你们一定和我一样在system分区干了奇怪的事情

然后验证通不过了吧

啊哈哈哈哈哈除了fastboot刷system镜像之外,你还可以这样修复。

首先我们先理解一下OTA包的原理

实际上解包以后可以发现其实是一大堆差量补丁。

这就是说,修改/system分区下原有的文件时会死的,往里面写新的文件时不会死的。 Read More

让QPython自带的终端支持UTF-8

0   8762 转为繁体

QPython是一个好东西,是SL4A项目的继承人,唯一蛋疼的是它自带的终端不支持UTF-8编码,东南亚人民都表示很愤怒

而且在play上提了建议到现在还没改╮(╯-╰)╭ ,所以只能自己改了

smali它的dex。其实这个终端是从jackpal.androidterm这里改出来了,发现各种关于utf-8编解码的代码都在,只是QPython把配置activity全部换了,于是Default to UTF-8那个配置就点不到了orz

然后就改了这些地方

Class TerminalEmulator

Class TerminalSession

重新打包签名运行,ls /sdcard,测试成功

这里是修改过的apk,版本是0.9.6.2 度娘云

你也可以选择自己编译,这里是修改好的smali 度娘云