8953n的user 想要root的話 不太方便,
當需要push檔案到system下時,需要執行如下步驟:
1. 先使用fdss signature unlock機台,通過此方式解鎖機台,便能夠獲得root許可權
(a).在fastboot下使用 fastboot_89xx getvar cpusn ,獲得cpuid
(b).將該cpuid發給pm,說明需要unlock機台。pm會回傳乙個signature檔案
(c).將該signature檔案用 fastboot_89xx flash asus_unlock signature ,即可unlock機台。
2. 此時開機便可以使用 adb root
3. adb root之後,下命令 adb disable-verity,然後重啟機台
4. 重啟之後便可以使用 adb remount命令,可以adb push檔案到system目錄下
這裡的matthew@matthew:/media/matt2/8953-n/out/host/linux-x86/bin$ ./adb disable-verity //一定要用n的out下面的adb才行
verity already disabled on /system
還有要記得關selinux
1|asus_z01f_1:/ # setenforce 0
在這期間還遇到了問題就是還是push不進去,於是看看目錄的掛載情況
1|asus_z01f_1:/ # cat proc/mounts
/dev/block/bootdevice/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
原來是個ro也就是read only 所以需要重新掛載
asus_z01f_1:/ # umount firmware/
asus_z01f_1:/firmware # mount -t vfat -o rw /dev/block/bootdevice/by-name/modem /firmware 掛成rw就可以了
system裡的fw主要在兩個目錄下
需要push的目錄是
關某些service的指令碼如下
#!/bin/bash
adb root
adb shell stop thermal-engine
adb shell "echo 0 > /sys/module/msm_thermal/core_control/enabled"
#adb shell rmmod core_ctl
adb shell stop perfd
sleep 1
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu3/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu4/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu5/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu6/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu7/online"
sleep 1
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor"
# gpu performance mode
adb shell stop thermal-engine
adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split"
adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor"
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_bus_on"
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_rail_on"
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on"
adb shell "echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer"
root許可權的獲取
ubuntu預設是禁用了root使用者的登陸,在登入視窗只能看到普通使用者和訪客登入。這主要是為了安全考慮。因此,這裡還是推薦只有當要修改系統設定,或安裝軟體時才使用root使用者的許可權。獲得root許可權主要有以下方式 1 終端下臨時使用 root 許可權 直接輸入 sudo 你要執行的命令,根...
乙個簡單的以User許可權啟動外部應用程式
bool bret false wchar pusername null wchar ppassword null startupinfo si process information pi check user name size t nlen wcslen lpszusername 1 puse...
獲取屬性節點的N種方式
本身是window物件上的乙個子物件。我們寫的html 載入到瀏覽器中,就會形成document物件。利用document物件,就可以獲取dom樹上的元素節點。document.head 了解 獲取head元素 document.title 了解 獲取不是title元素,是title標籤中的文字節點...