Google Groups

Re: Building for the Alcatel One Touch Fire

Krzysztof Adamski Sep 12, 2013 12:59 AM
Posted in group:
W dniu 12.09.2013 02:03, Naoki Hirata pisze:
> Just to note, I believe adb remount should work as well if you update
> your adb.
> It's a lot easier to remember than
> mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system

But in order to use adb remount, adbd has to be running as root, not as
shell. It should be possible to force adb running as root without
touching /boot/ partition, however. Since we have access to /system/
parition, it's a matter of changing one of the binaries there to custom
compiled adbd that wont check setting. Creating such binary is
easy and I can provide one if someone is interested.

If Alcatel did not change this, /init.b2g.rc should run
/system/bin/fakeperm binary as root while booting.

Something like:
adb push adbd-root /data/local/tmp/
$ su
# mount -o remount,rw /dev/block/mtdblock1 /system
# mv /data/local/tmp/adbd-root /system/bin/
# chmod 755 /data/local/tmp/adbd-root
# mv /system/bin/fakeperm /system/bin/
# cat > /system/bin/fakeperm << _END
/system/bin/adbd-root & /system/bin/
# chmod 755 /system/bin/fakeperm

should run adbd-root as root on startup. We have to _disable remote
debugging_ so that normal adbd is not started before our fake one. I
haven't tryied this as I don't have access to the hardware right now,

Wow, that message ended up being quite long and I was mean to be only
degresion :)