Mobile Pentesting

Next we need to modify three files, otherwise the mac80211 and atheros modules will fail to build. Which are:

  • kernel/xiaomi/lavender/net/mac80211/mlme.c
  • kernel/xiaomi/lavender/net/mac80211/tx.c
  • kernel/xiaomi/lavender/drivers/net/wireless/ath/regd.c

On line 1343 replace IEEE80211_BAND_60GHZ with NL80211_BAND_60GHZ

On line 167 replace IEEE80211_BAND_60GHZ with NL80211_BAND_60GHZ

On line 670 and 672 replace IEEE80211_BAND_2GHZ with NL80211_BAND_2GHZ

Now we can build the ROM for flashing onto the phone. This can take a long time depending on your processor. On my AMD 3700x it took 45 minutes.

Start the build in the root of the Pixel-Experience directory with:

mka bacon -j$(nproc --all)

After the build finishes successfully you should have a ROM zip in your output directory.

ls out/target/product/lavender
Pages: 1 2 3 4 5 6