[GUIDE] Increase Number of OnePlus Launcher Rows - OnePlus 8T Guides, News, & Discussion

Credit: @stelio_kontos - https://forum.xda-developers.com/t/guide-add-more-columns-to-the-oneplus-launcher.3659772/
They were saying in that thread that it was no longer working for them, but it does still work, at least on 8T. Not sure how long it will continue to work though. They were also talking about changing the number of columns, but I'm only concerned with changing the number of rows. There is a column entry in the path listed below, I just haven't tried it myself because five columns is what I want.
Root required.
Go to: /data/data/net.oneplus.launcher/shared_prefs/net.oneplus.launcher.prefs.xml
Adjust this value to your liking: <int name="workspace_rows" value="9" />
Find OnePlus Launcher app in Settings and force close. Wait a second or two, then go home. Viola!
So far it's stuck through reboots and updating the launcher from Playstore.

If you have trouble finding the data/data/net.oneplus.launcher folder due to Android 11 nonsense, you can copy the file or folder to your sdcard via terminal, edit it, then push it back. Below are the commands for that process.
Code:
C:\xxx\00_OnePlus8T>adb shell
OnePlus8T:/ $ su
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # setenforce 0
OnePlus8T:/ # getenforce
Permissive
OnePlus8T:/ # cp -r /data/data/net.oneplus.launcher/shared_prefs /sdcard
OnePlus8T:/ # cp -r /sdcard/shared_prefs/net.oneplus.launcher.prefs.xml /data/data/net.oneplus.launcher/shared_prefs
OnePlus8T:/ # setenforce 1
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # exit
OnePlus8T:/ $

Related

Dealing with busybox LS output in Windows

If you are using ADB Shell on a Windows machine and try to LS with busybox on your phone it will add color coding along with directory and file names.
To get rid of this you need only need to type [1] in the command prompt.
If you would like an LL type function added you can also put in [2].
[1] alias ls='ls --color=never'
[2] alias ll='ls -la --color=never'
Is there any way to get these aliases to stick?
The aliases go away every time I open a new ADB Shell. :\
##########edit1
I found that you can use PuTTYcyg to properly display the colors if you have Cygwin installed on your machine.
I just selected "Cygterm" for "Connection type" and put "adb shell" in "Command (use - for login shell)".
I would still like to have an alias for LL at least if we can figure out a way to get the aliases to stick.
Thanks!
##########edit2
In case people have no idea what I'm talking about.
Busybox LS output with color in Windows CMD:
Code:
# ls
ls
←[1;34mcache←[0m ←[1;36metc←[0m ←[1;34mroot←[0m
←[1;34mconfig←[0m ←[1;32minit←[0m ←[1;34msbin←[0m
←[1;36md←[0m ←[1;32minit.desirec.rc←[0m ←[1;34msdcard←[0m
←[1;34mdata←[0m ←[1;32minit.goldfish.rc←[0m ←[1;34msqlite_stmt_journals←[0m
←[0;0mdefault.prop←[0m ←[1;32minit.rc←[0m ←[1;34msys←[0m
←[1;34mdev←[0m ←[0;0mlogo.rle←[0m ←[1;34msystem←[0m
←[1;34memmc←[0m ←[1;34mproc←[0m
Busybox LS output without color in Windows CMD:
Code:
# ls --color=never
ls --color=never
cache etc root
config init sbin
d init.desirec.rc sdcard
data init.goldfish.rc sqlite_stmt_journals
default.prop init.rc sys
dev logo.rle system
emmc proc
And now color just looks like one of the weirdest words to me after looking at it for so long....
COLOR.
I got an LL going if anyone is interested. Basically using this guys instructions but making it for ll instead of dir.
1) Create a file named ll in /system/xbin
With this in it [NO COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la --color=never [email protected]
}
ll [email protected]
OR
With this in it [COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la [email protected]
}
ll [email protected]
2) Set file ownership/permissions
Get an ADB Shell:
Code:
cd /system/xbin
chown 0 ll
chmod 755 ll
The LL command will work immediately after setting ownership/permissions on the LL file. It's a workaround for now but works great.
Updated first post.
Not at all
The shortest way to do it is:
Code:
# alias ls="ls --color=never"
What I wonder is how to get rid of the annoying ECHO..
Long term fix?
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
http://forum.xda-developers.com/showthread.php?p=14564633
The alias only works for a single cmd session
update
ScottHW said:
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
Click to expand...
Click to collapse
Small update: I noticed that I actually only have the problems with ls -al when the phone is fully booted. When I use adb booted in Recovery (CWM) the file listings are fine.
It's possible that I have never used adb while the phone is fully booted before, and just assumed that the Recovery behavior was universal and when I got the funky behavior, it wasn't messing around with ADB, it was just because I didn't know what "normal" was.
Short term fix is still just to use an alias for ls
But you have to redo it every time you restart adb

Sideloading part 2...

The first method I presented showed you how to enable sideloading but to toggle it you'd need to re-edit the db file. This method enables the checkbox in System > Settings > Applications so there's no need to modify any DBs.
Code:
[[email protected] ~]$ adb shell
$ su
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db.bak
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /sdcard/settings.db
# exit
$ exit
[[email protected] ~]$ adb pull /sdcard/settings.db
sqlite3 settings.db
sqlite> SELECT * FROM settings WHERE name="force_only_market_apps";
107|force_only_market_apps|0
sqlite> UPDATE settings SET value=0 WHERE name="force_only_market_apps";
sqlite> SELECT * FROM secure WHERE name="force_only_market_apps";
107|force_only_market_apps|1
sqlite> .quit
[[email protected] ~]$ adb push settings.db /sdcard/
[[email protected]ite ~]$ adb shell
$ su
# busybox cp /sdcard/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# exit
$ exit
Oh, and I am pretty sure OneClick doesn't enable this. So you Windows fanboys can hush up.

[Q] Wifi Phase 2 authentication setting will not set

I have found a little bug in the WiFi settings of MIUI HD2 GINGER v9.2 where the Phase 2 authentication drop down menu does not accept its setting. In my case I am trying to set it to MSCHAPV2 and after selecting Save it does not take the setting and reverts to None.
How can I fix that bug
Didn't try yet ...but try this:
I'm not using eduRoam but our wifi is TTLS with Phase 2 PAP. Here's what worked for me
Step One
using adb shell:
# cd /data/misc/wifi
# cp wpa_supplicant.conf /sdcard
# exit
Step 2:
mount the sdcard on pc/ usb and edit the file
Here's what I added to my wpa_suppliant.conf file has (replace the *** with the correct information)
network={
ssid="***"
proto=WPA
key_mgmt=WPA-EAP IEEE8021X
group=CCMP TKIP
eap=TTLS
identity="***"
anonymous_identity="anonymous"
password="***"
ca_cert="/sdcard/***.cer"
phase2="auth=PAP"
priority=3
}
If you have a certificate ( ***.CER) you will need to have it on your sdcard - not inside a folder.
Step 3:
adb shell
# cd sdcard
# cp wpa_supplicant.conf /data/misc/wifi
# cd /data/misc/wifi
# su
# ls –l
(check other file(s) owners in my case it was – wifi.wifi but on previous ROMs it was root.root or System.wifi)
chown wifi.wifi wpa_supplicant.conf
# chmod 777 wpa_supplicant.conf (read, write execute for all) – start with 777 and relax it (I was lazy and left it there)
# reboot

[Q] Rooting via Mac - amidoinitrite?

Out of the 4 or so times I've successfully rooted the damn thing, I still am not 100% what I am doing right. Since each time I end up with a headache I've written myself a guide which seems to be almost always wrong along somewhere. I'm curious how wrong my latest discovery is. It seems when I use the 2.2.2 Android sbf I can't follow the usual directions listed on the wiki page. I need to run psneuter from another phone's root hack to give me "busybox, psneuter and su. Then I go back to install the bootmenu. Am I missing anything? Cheers:
II.C. Rooting
[EDIT:: It seems for Froyo 2.2.2 ("CEE sbf") you will probably need to follow the psneuter instructions:
http://wiki.cyanogenmod.org/wiki/LG_G2x:_Full_Update_Guide
Then go back and install bootmenu:
http://wiki.cyanogenmod.org/wiki/Motorola_Defy:_Full_Update_Guide ]
Is there anything else?
II.C.1. Connect Defy via USB and set it to "None." Open up terminal and begin pushing the files over:
Code:
$ adb push $PATH/TO/busybox /data/local/
i.e.
Code:
$ adb push /Users/kg/Android/android-sdk-macosx/platform-tools/busybox /data/local/
Push psneuter:
Code:
$ adb push $PATH/TO/psneuter /data/local/
… and su:
Code:
$ dab push $PATH/TO/su /data/local/
Now to change some permissions
Code:
$ adb shell chmod 777 /data/local/busybox
Code:
$ adb shell chmod 777 /data/local/psneuter
Enter into Defy and run psneuter by typing:
Code:
$ adb shell
Code:
$ /data/local/psneuter
Once the command finishes enter:
Code:
$ adb shell
"$" should now be "#."
Code:
# mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system
Code:
# mkdir /system/xbin
Should the last command say, "mkdir failed for /system/xbin, File exists" let it be. It tried to create a directory but one with that name already exists. Just move along:
Code:
# /data/local/busybox cp /data/local/su /system/xbin/su
Code:
# chown 0:0 /system/xbin/su
Code:
# chmod 6755 /system/xbin/su
Code:
# ln -s /system/xbin/su /system/bin/su
Code:
# exit
One last push:
Code:
$ adb push $PATH/TO/Superuser.apk /system/app/Superuser.apk
Code:
$ adb reboot
Fin.
II.C.2.To Install the Bootmenu by connecting the Defy via USB, allow memory card access.
Drag and drop the bootmenu folder into the SD card
Rename it "bootmenu"
Eject the SD card and on the Defy set the USB mode to "None."
In Terminal start up adb:
Code:
$ adb shell
Now give it SuperUser permissions, enter the following then unlock the screen on the defy and select "allow":
Code:
$ su
The prompt "$" should now be "#."
Code:
# cp -R /sdcard/bootmenu /data/bootmenu
Code:
# cd /data/bootmenu
Code:
# chmod 755 *
Just let this command run the script to the end (when the user prompt, # is given)
Code:
# ./install.sh
Once finished, don't reboot yet:
Code:
# rm -R /data/bootmenu
Now do so:
Code:
# reboot
If you want to see if it worked, upon the first boot animation/logo watch for the LED to flash blue after a good few seconds. Press Volume-Down upon seeing the light. You should be in the bootmenu!

How to change environment variable without patch kernel ???

I want to install busybox to other path, so i need to change $PATH
but $PATH define in init.environ.rc, but this file is in ramdisk and will be rewrote on every boot
Is there any way to change it without patch kernel? because i hate screen display that "kernel is not xxxxx, set warranty bit kernel"
I tried install-recovery.sh and install-recovery-2.sh. but it not work, it may not run at every boot so install-recovery-2.sh will not be loaded
if run install-recovery-2.sh manually, create dir, install busybox and soft link is worked but still can not change $PATH...
in init.rc file, what dos "seclabel u:r:flash_recovery:s0" mean?
Code:
service flash_recovery /system/etc/install-recovery.sh
class main
seclabel u:r:flash_recovery:s0
oneshot
install-recovery.sh
Code:
#!/system/bin/sh
# If you're implementing this in a custom kernel/firmware,
# I suggest you use a different script name, and add a service
# to launch it from init.rc
# Launches SuperSU in daemon mode only on Android 4.3+.
# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.
# If you want to force loading the daemon, use "--daemon" instead
/system/xbin/daemonsu --auto-daemon &
# Some apps like to run stuff from this script as well, that will
# obviously break root - in your code, just search this file
# for "install-recovery-2.sh", and if present, write there instead.
/system/etc/install-recovery-2.sh
install-recovery-2.sh
Code:
#!/system/bin/sh
#Script for init Busybox on every boot by BZH
busybox_path=/system/etc
busybox_bin=busybox-armv7l-1221
busybox_install_path=/root/bin
$busybox_path/$busybox_bin mount -o rw,remount /
$busybox_path/$busybox_bin mkdir -p /root/bin
$busybox_path/$busybox_bin cp $busybox_path/$busybox_bin $busybox_install_path/
$busybox_path/$busybox_bin chmod -R 755 /root
$busybox_install_path/$busybox_bin --install -s $busybox_install_path/
$busybox_install_path/$busybox_bin ln -s $busybox_install_path/$busybox_bin /system/bin/busybox
$busybox_install_path/$busybox_bin ln -s $busybox_install_path/$busybox_bin /system/xbin/busybox
sync
$busybox_path/$busybox_bin mount -o ro,remount /
export PATH="/root/bin:$PATH"
up...

Categories

Resources