[HOW TO] Install GNU/Linux on Samsung Galaxy Note 10.1 2014 (Updated 03/17) - Galaxy Note 10.1 (2014 Edition) General

#NOTE: For quick taste go to post#4. That mini-guide -for the time being- only works on Samsung's Kitkat. For Best Performance running Samsung's KitKat is recommended
Also (just so that to be clear), no matter which version of this guide that you are going to follow, you'd need at least 5GB of free Internal Storage.
INTRO
Since the advent of the Microsoft Surface Pro line we had a great "great-computer/mediocre-tablet" combo on one hand, and through the already running iPad line we had a "great-tablet/bad-computer" on the other hand.
One of the primary reasons to buy into the Note tablet line is because I always thought that it conveniently sandwiches itself between the above categories hopefully avoiding the pitfalls of both. Sadly the reality was a bit further than that and our tablet seems to have taken equally the bad and the good of the above lines. I set to ameliorate part of those faults, since I mostly lack coding expertise or indeed deep knowledge of the Linux kernel I created a ... patchy solution.
Sooo the following is a ... rather monumental guide/tutorial to set up Gui - Linux with acceptable performance on top of android in our devices. Since I'm running it "on top" it relies to the chroot method (it's been detailed in quite many posts). For simplicity's (and ... repeatability's) sake I'm using the "LinuxDeploy" app which can be found here (buy a beer to the creator, don't forget that he's practically giving away his software).
Ook, let me say right out of the bat that I could have had released a ready-made Linux image so that everybody could benefit instantly, or alternatively write a script to automate the process that I'm going to detail next.
Instead I decided against it, firstly because (as you will soon find out) this guide is a work in progress, so through exposing each individual step it can/would actually become better (hopefully through the help of more talented/knowledgeable individuals than I). Secondly many of the steps would most certainly break down, down the road (continuously changing software tend to do that to tutorials), yet since all/most steps would be exposed a simple tweak to them would save it...
Important Note: This particular Guide is tested to work on both KitKat and Lollipop (Samsung) Roms for P600. Even a slightly different setup may cause it to misbehave. So that's one more reason why I chose to expose the relevant steps (what/how they do). Hopefully slight tweaks to some of the steps would make Linux perfectly functional on all variants of Note tablet and their many differing roms.
PREPARATIONS
Let me move to the particulars then:
You'd definitely need root and a "Virtual Terminal" enabled kernel (I can't stress this enough), xposed framework/modules is optional (only needed for one work-around). I'm sure a mere Google search can tell you how to achieve the 1st and the 3rd requirement but the CONFIG_VT enabled kernel is a tougher nut to crack. Therefore I'm willing to make a list with VT_Enabled kernels for out tablet, for the time being I'll only be offering kernel based on Samsung Roms (many thanks to @xluco). Non-P600 guys should find an equivalent kernel on their own (or compile one for their own usage).
KitKat: http://forum.xda-developers.com/attachment.php?attachmentid=3686507 , reportedly Disabl0w's version works better
Lollipop: http://forum.xda-developers.com/attachment.php?attachmentid=3686508
Marshmallow: I'm willing to post a VT Enabled kernel here when (and if) our device reach nightly status on CM13.
BEWARE those kernels are for P600 (wifi version of Note 10.1 2014). I take no responsibility if you've bricked your device by flashing it to the wrong device/setup.
Additionally those apps would be needed:
a) Meefik's Busybox v1.24.1 (Download the apk and install it, once installed, do as follows: open the app -> tap "install" in the lower right corner -> OK)
b) LinuxDeploy v1.5.6 (Download the apk and install it, once installed, open the app -> press the "menu" button -> tap "settings" -> tap "update env" -> OK )
c) Linux Deploy's companion app (LinuxCanvas I named it)
d) Privilege Terminal (Terminal Emulator is more feature packed but for the purposes of this guide Privilege Terminal is preferable as you can paste content coming from HTML pages, directly to it)
e) Lastly, certain Configuration Files are needed (download and extract the contents to the root of your internal storage)
THE GUIDE
The guide is really made out of 11 simple steps. You can "blindly" follow them and you'd get a fully working image. Preferably, though, you'd also read the explanations of each step. I've included them because (as mentioned above) this guide is a work in progress. So making you privy to what each step does would hopefully lead to a better guide. Probably one with less steps and even more functionality. The explanation part would also help you debug a step if (for some reason) it didn't work correctly to your device.
So on we go:
1) Copy xorg.conf:
a) Open Privilege Terminal
b) Run:
Code:
su;
cp /data/media/0/Linux/res/xorg.conf /data/data/ru.meefik.linuxdeploy/files/share;
echo"";
Explanation:
The xorg.conf file is basically where input-output devices are mapped. I've modified it to support as many as 8 input devices as well as to support the S-Pen (w right click function!). If you want to add more devices, or for some reason your S-pen does not work and/or you prefer the S-pen button to work as middle click you can modify by navigating to Linux/res/xorg.conf (you can open it with any text editor). To find to which events your devices are mapped you have to run cat /proc/bus/input/devices in Terminal Emulator. From that you could see to which event you can map your S-Pen and/or the rest of your external devices. As it stands I have S-pen as event8 (the default in most roms) and my keyboard and mouse as 10 and 11 respectively (that's how they get mapped in my devices, but they may get mapped differently to yours).
Note: Apart from S-pen everything else doesn't *have to* be mapped precisely (even if your mouse is called "keyboard" it would still work"). Also as a general heads up please connect your devices after device boot as if you have them connected already (say through OTG connection) as the device boots, the handler numbering would be messed up (for example the mouse could be event5 and s-pen event10)
2) Create a Linux image
a) Open Linux Deploy
b) Navigate to properties (Arrow showing "down") and choose the following Configuration:
Use the Default option to all except:
To Distribution Suite: Wheezy
To Installation Path: change the "/storage/emulated" part to "/data/media" (everything else stays as is)
To Select components: Tick X server, untick VNC server
To Graphics subsystem: choose Framebufer
To GUI settings: choose DPI = 230 (or anything higher if it suits you) and untick Force Refresh
To Custom Mounts: Tick it
To Mount Points: Delete the extant mount points (select them -> press "menu" -> delete) and add the following:
/data/media/0
/mnt/media_rw/extSdCard
/mnt/media_rw/UsbDriveA
/mnt/media_rw/UsbDriveB
If you want to add support for more External devices you can add up to 4 more ( /mnt/media_rw/UsbDriveC - /mnt/media_rw/UsbDriveF )
c) Return to Properties' main menu and Tap Install (first selection)
d) Wait (quite a bit) until it reads "<<< install". It should read "processing triggers" on the line just before it, if not, reboot and follow step (c) again (re-install)​Explanation:
I was only able to make Debian and Ubuntu variants work with our device. In principle everything should (and can) work as well, but since I'm mostly accustomed to Debian's eco-system I never bothered to investigate. Similarly (from windows environments) only LXDE and XFCE reliably work (KDE and Gnome technically "work" with Debian too but they're ultra slow). For this instance I chose Debian Wheezy + LXDE due to GUI performance issues mostly, every other disto/window manager causes considerable lag in window placement. I used to use Debbian Jessie + XFCE, love XFCE's features (sessions, Window snap), but the ultra-slow window placement mostly killed the GUI experience that I was after. So I reverted to the less featured but lighter on resources LXDE.
Note: Our tablet's internal SDcard is/would be mounted to /mnt/0 when inside the chroot Linux environment ( similarly External SDcard -> /mnt/extSdCard , 1st external Storage -> /mnt/UsbDriveA , etc ). If you're on another device (not P600) running the command "mount" from Terminal is going to give you where in which paths your storage mounts to, in which case you'd have to change the mount points in LinuxDeploy accordingly.
3) After the linux image is created (Linux deploy says "<<< install") go to Linux's Shell:
a) Go back to Privilege Terminal
b) Run:
Code:
/data/data/ru.meefik.linuxdeploy/files/bin/linuxdeploy shell;
echo"";
Explanation:
It starts the Shell of the freshly installed image
3.5) This step is only relevant to those running Stock Samsung 5.1.1 rom. DO-NOT-RUN it if you're on any other version. Giving root permissions to the default user ("android"):
Run:
Code:
sed -i '/android/c\android:x:0:5000:x:/mnt/0/Linux/Home:/bin/bash' /etc/passwd;
echo"";
Explanation:
Due to complication with SELinux permission (from Android 5 and up most possibly), as a workaround I had to give root permissions to user "Android". See Issue "8" in Post #3 for more information.
4) Change Home folder's path:
Run the following commands:
Code:
usermod android -d /mnt/0/Linux/Home;
rm -rf /mnt/0/Linux/Home;
mkdir /mnt/0/Linux/Home;
cp -a /home/android/. /mnt/0/Linux/Home;
echo"";
Explanation:
Technically this step is optional but I would strongly advice against ignoring it as it allows an 1:1 communication between Android and Linux's user files. By choosing a folder that is visible by android file managers (/Linux/Home) it allows for the user to instantly manipulate the data he/she just created within Linux. For example a document file that is saved on (Linux) Desktop is easily visible by navigating to Linux/Home/Desktop or better yet it's automatically detected by the relevant app (for example a music app would "see" your music Folders, a video app your "Linux videos", etc). Additionally it uses the /sdcard partition which is close to 28GB in size, instead of the 4GB micro-partition that LinuxDeploy created (which is better used by the software that you're going to install there).
5) Apply basic HiDPI fixes:
Run:
Code:
cp /mnt/0/Linux/res/.gtkrc-2.0 /mnt/0/Linux/Home/;
echo"";
Explanation:
It solves basic issues that arise from the HiDPI environment of our devices. Things like CheckBoxes, ScrollBars, even Double Click behavior. The changes are only detectable on GTK2 software. Since all the software I've been using is based on GTK2, it is enough for me. However if you're using a GTK3 based application please by all means recommend of a way to make similar changes to GTK3 applications (I think equivalent -system wide- changes happen when one modifies the /etc/gtk-3.0/settings.ini file). Lastly if the dimensions/changes are not to your taste you can always try different ones by changing their numeric values on Linux/res/.gtkrc-2.0 file (editable by any text editor, beware it's a hidden file) and then rerun this step. What numeric value is controlling what, is rather straightforward due to the naming that it follows. So happy editing!
6) Enable GUI Repaint:
Run:
Code:
chmod +x /mnt/0/Linux/bin/logout;
echo"";
Explanation:
It fully enables the menu button within the LinuxCanvas app (it redraws the environment). I could bundle the script with my "LinuxCanvas" apps, but I wanted to make it modifiable (for example right now it kills the LXsession), but if you were to use a different Window manager you'd probably need to use a different command) and since my app creation powers are very (very!) basic, I simply exposed an internal part of my app. It can be found in "Linux/bin/logout". You can edit it with any text editor (again you'd have to rerun this step after editing is done).
7) Resize Windows Borders:
Run:
Code:
chmod +x /mnt/0/Linux/bin/resizeBorder; chmod +x /mnt/0/Linux/bin/revertBorder; /mnt/0/Linux/bin/resizeBorder;
echo"";
Explanation:
Another Fix needed due to the high DPI of our devices. It basically makes the borders of the windows that much thicker. Since it obviously makes the look of the environment less easy to the eyes I would welcome any work-around. Also you can run
Code:
/mnt/0/Linux/bin/revertBorder
(from within linuxdeploy's shell) to return the Windows borders to their initial size if you're so much bothered about the ... foul look (again I'd advice against it as it'd kill some of the ease of use of window placement/resize). If you want differently sized borders you can always edit the script (found in Linux/bin/resizeBorder) with the text editor of your choice. My current value is 10 pixels you can change it to whatever. Also you don't have to change it for every theme, just the one you're using. Again, I'm open to recommendations (for example what value do you think is better for usability?)
8) Fix Mouse Cursor size:
Run:
Code:
sed -i '/CursorThemeSize/c\iGtk/CursorThemeSize=58' /etc/xdg/lxsession/LXDE/desktop.conf;
echo"";
Explanation:
It makes the Cursor bigger. It doesn't always work. I have to investigate, but I can't be bothered since it rarely (ever) caused me any issues. Still I'd welcome it if someone is willing to investigate and see why it works only some of the times (it probably has to do with boot sequence/times).
9) Install basic Components:
Run the following:
Code:
apt-get update;
sudo -u android sudo apt-get install -y samba gvfs-bin gvfs-backends zip iceweasel xfce4-mixer dmz-cursor-theme gstreamer0.10-alsa;
echo"";
Explanation:
Though the above shell command we add some basic functionality to our Linux installation, like a Samba server (network places for the Windows guys), a browser (Iceweasel is called in Debian) and a virtual keyboard (very important for those using only the S-pen).
10) Exit:
Close Privilege Terminal (press "CLOSE" on the upper right of the app and then "OK")​Explanation:
We're better off to shut down this particular shell instance as it may mess up with the booting of our Linux image later
11) Start Linux:
a) Open "LinuxCanvas"
b) Press Volume Up, wait a bit and voila! (if it doesn't work the first time, press the "menu" button to repaint)​Explanation:
The App is included below this post. This is a veeery basic app (my app-creating prowess is close to zero) which acts as a companion to LinuxDeploy. LinuxDeploy was/is mostly created to fascilitate the XServer/VNC crowd, but the "Framebuffer" crowd has been left a bit in the cold. With as a result the "Framebuffer" functionality of LinuxDeploy to be quite basic (it only creates a black frame and that's it). So I added a bit more than that (it's the super-duper edition ). Orientation is locked, back, Escape buttons blocked (they cause issues). Also:
Volume up -> starts the chroot environment
Volume down -> kills it ("un-chroot")
Menu button -> "redraws" the graphical environment
And that's it. The caveat is of course (as a companion app to LinuxDeploy) that it is heavily dependent to LinuxDeploy, so any change that the developers would choose to make would -predictably- break functionality, so please PM me if/when that will happen. Also I'm a very un-creative person when it comes to App-creation so I would be veeery happy if another user was to take this task from me (someone who -hopefully- would make a much better featured and beautiful companion app), so updating this guide would be the only task that would remain to me.
As you may be able to see, by (as of) now you're good to go and you can fully work on your brand new Desktop environment. However I would like to add some less essential tips/fixes on my second post as well as a list with the remaining issues and workarounds to them (in my third post).

In my first post I described how you can get a relatively well performing Desktop envrironment working on our Samsung Note tablets. This post acts as a companion. Most of the tips here are either completely optional or easy to figure out. Still they may seem useful to many users so I include them here anyhow. As always any recommendations to improve on them or any additional tips would be well considered.
1) DPI Tips and seting up Volume Control :
a) Right click (S-pen button press) on Start menu -> Panel Settings -> Height: 70 and Icon: 70 -> Panel Applets (tab) -> Application Launch Bar (the first one) -> Edit -> Florence (extend Universal Access) -> Add -> Close -> Application Launch Bar (you have to scroll down for this one) -> Edit -> Mixer (extend Sound & Video) -> Add -> Close -> Close
b) LXDE Button -> Preferences -> OpenBox Configuration Manager -> Appearance -> change all to 13-15 (except Active/Inactive on-screen Display: 11-12 ) -> Close
c) File Manager (Black Icon) -> Edit -> Preferences -> Display (Tab) -> Size of Big Icons (96), Size of Small Icons (48), Size of Thumbnails (256), Size of Side Pane Icons (48) -> Close
d) Click the gear looking icon (in the lower-right part of the screen) -> Select Controls... -> Tick Speaker Digital -> Close -> Quit​Explanation:
Those are easy-to-figure but I think essential changes that need to be done so that to make the LXDE enironment more functional on our HiDpi (and often keyboardless) screen. I would be glad to add more HiDPI changes accesible through LXDE's GUI (that you'd think that may be important).
2) If you want Linux's user data to be readable/writable/cacheable by/from your android apps:
Run the following from Privilege Terminal:
Code:
su;
find /data/media/0/Linux/Home -type d -exec chmod 777 {} \;
find /data/media/0/Linux/Home -type f -exec chmod 777 {} \;
echo"";
Note: This step has to be re-run if for whatever reason some of your Linux user-files are -again- not accessible from Android.​Explanation:
While the folder Linux/Home contains all your personal data from Linux it's only accessible from within Linux. That's an obvious security feature, but it may also affect the practicality of running Desktop Linux side by side with Android. By allowing permissions to all "your" files they can be literally read by everyone/everything which also includes your android Apps (for example your edited photos could be "seen" from within your android gallery) which can be extremely useful to many, as well as an easy way to send/save files from Android to Linux, too.
3) In case you want to remove android's mouse cursor (for more experienced users, as inability to follow the steps will -well softbrick your device. BEWARE! )
a) If you're using Windows (if not equivalent steps have to be followed on your mac/linux) unzip the adb folder (included to the bottom of this post) to C:\ and install the samsung drivers (if you haven't already): http://developer.samsung.com/technical-doc/view.do?v=T000000117
b) Reboot your tablet to recovery and connect it to your PC
c) mount /system (from mounts and storage menu or similar). Disable MTP too, if applicable
d) On your PC navigate to C:\adb from command line
e) run:
Code:
adb pull /system/framework/framework-res.apk
f) Navigate to C:\adb, create a copy of framework-res.apk and rename it to framework-res.bak
g) Open the framework-res.apk (the original) with WinRar (or similar) and navigate to res\drawable-sw800dp-xhdpi or res\drawable-xhdpi-v4 and rename pointer_arrow.png to pointer_arrow.bak . Close Winrar
h) Back to the command line run the following
Code:
adb push framework-res.apk /system/framework
adb push framework-res.bak /system/framework
adb shell chmod 0755 /system/framework/framework-res.apk
adb reboot
After having followed the above guide succesfully you can restore the mouse cursor and then kill it again as easily as described below (those commands reboot the device, so beware)
To restore the cursor (after having it killed) in Privilege Terminal run:
Code:
su;
mount -o rw,remount /system; mv /system/framework/framework-res.apk /system/framework/framework-res ; mv /system/framework/framework-res.bak /system/framework/framework-res.apk ; chmod 0755 /system/framework/framework-res.apk; reboot;
echo"";
To kill the cursor (after having it restored) in Privilege Terminal run:
Code:
su;
mount -o rw,remount /system; mv /system/framework/framework-res.apk /system/framework/framework-res.bak ; mv /system/framework/framework-res /system/framework/framework-res.apk; chmod 0755 /system/framework/framework-res.apk; reboot;
echo"";
Explanation:
The above is to kill android's mouse cursor so that when you connect a mouse you won't have two mouse cursors on-screen. It would have been a far less dangerous endeavor if I was to include a flashable zip file doing those changes, but I much prefer to expose the way by which you can kill android's cursor, so that any user would be able to do the same on any other version of android that he or she is willing to run Linux on. Also as a bonus the user is just "one" shell command away from reverting his mouser cursor. Obviously any bricked devices resulted from this method is the user's responsibility and the user's alone (however it's a very recoverable situation)
4) Tips to make browsing easier when you'd want to use the Pen Exclusively:
a) Open the browser (Iceweasel) while in Linux
b) Type on the URL bar -> about:config-> "I'll be careful, I promise"
c) Search for: browser.search.showOneOffButtons . Change its Value from true to false (double click on it)
d) go to: ("hamburger" button ->)preferences -> privacy (tab) -> Iceweasel will: -> Use Custom settings for history -> Untick Remember search and form history
e) Right click on the search bar and untick "show suggestions"
f) Restart Iceweasel​Explanation:
It kills Firefox/Iceweasel's fancy search so typing on the search bar when using pen/virtual keyboard is twice as fast. When I found out about that it completely transformed my usage patters, now I often "quick boot" to Linux if I want to browse to a web-site that android's mobile browser refuse to have rendered. Oh BTW, if you followed the "DPI Tips" (tip No1) the virtual keyboard (florence) can be found to the left of the "start button" (for quick reference).
5) In case you want a multilanguage keyboard:
a) Enter LinuxDeploy's shell by running the following on Privilege Terminal:
Code:
su;
/data/data/ru.meefik.linuxdeploy/files/bin/linuxdeploy shell;
echo"";
b) Run the following command. Where xx your choice of language: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes (only 639-1 codes are applicable)
Code:
echo 'setxkbmap -option grp:ctrl_shift_toggle "us,[B]xx[/B]"' >> /etc/xdg/lxsession/LXDE/autostart
c) when back in Linux/LXDE do the following:
Right click on Start menu -> Add/Remove Panel Items -> Add -> Keyboard Layout Switcher -> Add -> Close​Explanation:
It allows to change keyboard's layouts in both your virtual keyboard (by tapping the flag icon) and physical keyboard (by pressing ctrl+shift). I have not tried any other key combinations other than ctrl+shift so I don't know how well they'll work but you're welcome to try/modify (just replace the ctrl_shift part of the command with any other combination, as you're following the steps).
6) Kernel level changes (Please read the expanation, those changes may well cause instability! BEWARE!):
To achieve those you'd need the Donate version of TricksterMod (much recommended app to own)
Ultra Aggressive OOM Values:
a) You can access them by navigating to General (tab) -> MinFree Control while in Tricker Mod
b) When there please save the default values ( tap on "untitled", then "save" and name it default -> ok )
c) Then proceed to change the values as follows:
Foreground = 384
Visible = 412
Secondary Server = 480
Hidden App = 512
Content Provider= 640
Empty App = 768
d) Again save them as "Aggressive" ( tap on "untitled", then "save" and name it aggressive -> ok )
e) Tap on the tick (that has just showed up) to validate the changes​ Undervolting
a) If your kernel does not support it you won't find it. If it does, you'd find it by choosing the "Specific" tab (MTU Voltages).
b) Similarly as above please save the default values ( tap on "untitled", then "save" and name it default -> ok )
c) Proceed to change the values. I won't include any here as every SoC is different, but typically the greatest clock the greatest undervolt is achievable. As an example I started by lowering my volts by around 100 mvolts in my highest clocks, and progressively less in my lower clocks (for example 1900Mhz was lower by 125 mvolts, 1800Mhz by 100mvolts, etc). You (the user) are the the only one who can find the best volts for your device (low yet stable). If your device starts to get unstable (restarts without notice) you'd have to choose higher volts (you went too low), etc.
d) Try different volt levels (Tap on the tick on each of your attemps)
e) When you found stable enough (hopefully low enough) voltages, save them ( tap on "untitled", then "save" and name it low -> ok )​ As an add-on you can "tell" TrickerMod to boot with the settings you just chose (menu button -> tick on "Kernel Settings"). Else you'd have to manually choose "your profiles" with every reboot.​Explanation:
I struggled very much before deciding to add the above section. I know it may cause instability to many users (the undervolt) and/or significantly lower the capacity of the device to keep apps on system's RAM (due to the high OOM values) but eventually I decided against not including it. The reason is that Linux/Desktop usage can be characteristically RAM and battery hungry. That makes the above tip(s) less of an often uneeded option and more of a necessity, especially to those willing to make heavy use of the Desktop environment. Basically what running a whole OS via chroot means is that you'd need most of the resources of the device. That can only be done by using uncharacteristically high "killing" thresholds.
The OOM values -above- basically mean that the device would kill significantly more background processes than it is expected. In fact I've experimented with many values and the above are the only ones that I've found to (still) be acceptably "low" yet allowing seamless use of the chroot/Linux environment. I could go lower but I start to see hits in performance. Also keep in mind that those values are also dependant on the rom one uses. There are other Roms that "react" better on low ram envrironments than mine. So -obviously- those values are not panacea, but I would be surprised if significantly lower values were not to harm the "Linux experience" no matter the rom.
So -yeah- background processes would be killed left and right. The upside is more RAM for Linux use, less battery leaking from background processes and surprisingly better responsiveness in Android too. In fact that's the other reason why I've kept those values, I've never seen my tablet being as responsive than after adopting those values.Still depending on your usage patterns it may start killing some important background process of yours, in which case I'd advice lowering those values (but not way too much as it would impact Linux performance).
For undervolting (if you can do it) the story is very similar. It may well cause a more unstable system, but it greatly helps with performance and battery life. On Linux there are processes that are characteristically harder to the Processor than most of anything that can be found to a "consumption OS" like Android. This means that the high clocks of our device are used much more frequently, leading to a very much lower battery life, but worse of all overheating which leads to throttling (low performance) and even possibly lowers the SoC's lifespan. Undervolting sets to aleviate those issue. After undervolting my processor I'm getting much better *sustained* performance and while on Linux quite better battery life too, about 30-40 minutes more! I like to say that undervolting is the "overclocking of mobiles", as it achieves the same end-result by aleviating or -even- eliminating throttling, one of the most important causes of low performance on mobiles.
7) Kill multi-window before starting Linux:
Well that's very straight forward, just toggle multiwindow off on quick settings.​
Explanation: Ram (as explained above) is a precious commodity for "serious" Desktop work, so about ~100 MB of RAM is being freed in that way. But most importantly it disallows accidental activation of the multi-window panel which is a quite frustrating experience when it happens while "Desktoping".
This concludes my second post. The following (and final) one is all about the things that still have to be done (where I'd need you -guys- more) and also some work-arounds that I found to those.

With two posts above us, this guide is mostly concluded. Still it may probably be worth the while to read a bit more as in here I include a few workarounds. Which while they're not true solutions in any shape or form, they may make the experience juuust seamless enough...
BUGS/ISSUES
1) No Hardware Acceleration (Biggest)
Explanation:
This is pretty much the elephant in the room. Without a solution to this everything written here is/would be a waste for many guys. Especially those willing to use rendering software, or generally care about media consumption/creation. Unfortunately this is also (by far) the toughest nut to crack. It most probably requires knowledge far greater than my own (even though I must admit that I never seriously considered "solving" this issue). In fact it is here that I could use as much help as possible. If we solve this, suddenly our tablet is viable as a laptop replacement for most uses ... In sort: Solution pending, no workaround in sight, zip, nothing ... it's the Chuck Norris of our problems
2) No ability to redraw (Biggie)
Explanation:
Another big issue. Basically if you lose focus (say press home by mistake) you cannot regain it. Every process continues on the background, of course, your picture is lost forever though, and it's mostly non-recoverable. In the workaround section I have posted the very hacky solution that I'm using (which is no way, shape or form a true solution). This issue's importance is somewhat tempered -though- by the fact that our tablet already operates in a low-Ram environment so putting the chroot/Linux environment to the background for a bit would probably cause a lot of its processes to be eventually killed by Android's ram manager as it would try to regain Ram for the foreground app. Also it's probably easier to solve but -again- it requires knowledge beyond my own. The issue has to do with Android and chroot/Linux "fighting" for the framebuffer's exclusivity. Once Android gains it, it never gives it back (selfish dastard ).
3) Devices cannot be detected "on-the-fly"
Explanation:
A big issue still, but a lesser one than the above two. Again it has to do with the GNU/Linux lacking some kind of daemon constantly "sweeping the place" so that to detect changes. I have not looked deeply in this issue as the workaround has been enough for me. Maybe not that hard of an issue to be solved. Again I'd welcome any recommendation(s).
4) No touch support:
Explanation:
This is a big issue at first glance, I happen to think that it is one of the smallest ones, especially if you think about it: GNU/Linux GUI is/was created for a highly accurate pointing device and the finger(s) is certainly not it. Similarly right click is very hard to be performed by hand (probably via a gesture) with much accuracy. Both of those issues are solved by the pointing device we already own, the s-pen. I find the pen to be faster to a HiDPI Linux environment simply because you make less mistakes with it. Also it supports hovering, so it simulates a mouse pointer on-the-go, much better than a hand. Still touch support would help with typing on the virtual keyboard (it would have been faster due to multi-touch) and scrolling (again multi-touching). It's due to those issues that I include the lack of touch support as an issue. Again I'd welcome it if anyone was to come with (any) ideas regarding (adding) touch support. BTW simply mapping the relevant event on xorg.cong doesn't work, don't know why.
5) Pressing Middle mouse Button returns to Home (thus kills the picture)
Explanation:
It's connected to problem No2. This is more of an annoyance (though) than a true issue as pressing the middle button is not of much use on GNU/Linux's GUI environments. Still I'm using a workaround (posted below) that completely eliminates this issue (sadly it needs xposed).
6) No native way to control brightness (there's probably a solution, never bothered to investigate)
Explanation:
Again mostly an annoyance, as there are alternative ways to control those. A work-around is posted below
7) HiDPI is not well-supported by a lot of Linux's Software.
Explanation:
Depending on your kind of use you may find yourself facing with a software that does not scale well to the ultra-high resolution of our tablets. That would mean veeery small GUI elements and an almost inability to use it. Thankfully most have workarounds (to some it is in-built, to others it requires the installation of some HiDPI theme, to others yet editing config files would do the trick). I regard it less of a problem that it initially seems because by now many/most small laptops are offering a HiDPI screen with as a result forcing most Linux Software maintainers to get by the times and either fix the issue with their particular software, or at least offer a work-around. Obviously I'm not going to post any of those here as the list would be non-exhaustive. If someone wants to create a post (and maintain it) with HiDPI workarounds for many/most of the popular software I'd be glad to link it here (as a work-around)
8) SUDO cannot be be used by regular users on Samsung's Lollipop
Explanation:
Due to changes in SeLinux policy implemented from Android 5 and on permission is denied when a regular use is trying to use the SUDO command
WORKAROUNDS:
To Issue 2) Pressing the menu button. It re-draws the LXSession. The caveat is that you lose all your progress (it's a sort of a "soft-reboot").
To Issue 3) Input devices are detected with a simple redraw (pressing the menu button), but for external storage you have to wait a bit (around 10 seconds after you've connected it) and *then* redraw
To Issue 5) The solution to that is hacky (as it needs xposed) but it works: You'd need Xposed Additions Pro to disable home while on LinuxCanvas App, plus a gesture to get back home (you do that using the gesture navigation plugin)
To Issue 6) You can control brightness through the notification center as you would in any other app.
To Issue 8) Give root permissions to chroot's main user ("android"). Unfortunately that's an obvious security concern and I'm feeling quite uneasy to have to do that. I'd feel much better if this permission issue would be resolved.
FEATURES THAT I HAVEN'T CHECKED:
1) External devices apart from External Storage, Mice and Keyboards.
2) Bluetooth File transfer
3) Cameras
4) GPS
5) IrDA
Explanation:
The above are all tablet functionality that I have not checked.
If I was to venture a guess I would say that they won't work "out of the box", but everyone is free to check. I'm sure there's some workaround to let them work (at least partly), but I had no need of them so I have not investigated further.
INSTEAD OF CONCLUSION:
With the guide concluded I would like to write (instead of a conclusion) the reason that I chose to "run" a desktop environment as above (chroot with the GUI rendered on Android's framebuffer). It's obviously neither the easiest to setup (running the GUI on top of an android-bornt Xserver is far easier to set-up, 3 steps, literally) nor the most efficient (a dual boot setup would be the ideal as far as efficient use of the tablet's resources go).
Well let me "combat" the above arguments one by one. Firstly choosing to use the android's Framebuffer as the renderer: Obviously it's hard to setup at it needs a "Virtual Terminal" enabled kernel (not easy to be found for those who are not into kernel compiling), but, maybe most importantly, it disallows of an easy way to change the resolution (it uses the screen's native resolution) leading to HiDPI issues.
Well, the reason to render on the Framebuffer instead of an Xserver app (like Xserver XSDL) is ... frankly responsiveness. Rendering directly to the framebuffer bypasses all the "lag" caused by the android implementation running beneath. The greatest example is typing responsiveness. Typing on our Note (using a phtsical keyboard), as you may have found out, is a tedious process. There's a very visible latency which causes constant errors when fast typing. This is completely solved by directly rendering on the Framebuffer (hence directly taking input events from kernel events, bypassing Android's stack). For a guy who types a lot, the difference is day and night, it finally turned my Android Tablet into a work horse. Of course the great increase in responsiveness carries over to the rest of the GUI as well.
Let me, then, tackle the second source of scepticism to the solution that I recommended in here. To many a true dual-boot is the holy grail of their idea of how/what an android tablet doubling as a productivity machine is. To me it's not, I've bought an android tablet not because I want a Linux laptop. In fact I already have one. No, I bought it *because of* android and having to "kill" it so that to boot my "productive" environment doesn't really make any sense to me. Sure I can always boot back to Android, but actually most people are not into distinct "productivity" and/or "consuming" modes. In fact most of my usage patterns are all over the place. For example I'm writing something for my paper, but then I want to carefully study another paper, heck I may want to watch a movie in the middle of all this. Sure I can do those two on Linux, but what's the point if I have a far more capable "content consumption" OS lying just beneath? No, my ideal mobile machine is one that produces in the best way possible but one that also lets me consume information in the best way possible.
I bought a tablet *because* I want to consume information much more efficently than what my laptop/PC would had allowed me to. I want to use the "PocketBook" app to read and MxPlayer to watch a movie from my NAS collection, but then I also want to get back to my fully featured IDE. A dual boot absolutely kills the flow (having to constantly reboot). In fact Microsoft's vision in this (Project Continuum) is I think ideal. Still Project Continuum is far from being practical (for the time being) and it may never become, simply because Developers may not support it, so the next best thing is to have my "Productiviy OS" and "Consumption OS" side-by-side in fact that is very much the reason that I've included "step 4" to my guide as well as the "redraw" option. I think it gives flight to the experience (having different "scopes" of experience).
THANKS TO:
Pretty much to everyone from the Android scene that let us enjoy such high quality experience via rooting, kernel modifications, etc. People like @Chainfire, @rovo89 (and many, many others) are indispensable for their services, it goes without saying.
Similarly thanks to everyone from the Open Source community and in particular the Linux Kernel, starting from Linus Torvalds all the way down to the mere user who's recommending a fix. And of course to the guys developing the software running on the Linux kernel (without it, it would have been useless to most).
Also thanks to @xluco for providing a feature-packed (and lately very stable) kernel for me to play with.
Oh and thanks to you guys, hopefully helping to fix (on the longer or shorter run) this mess of a guide. *Any* input would be much appeciated.
OK. CYa. I'm signing off (pheewwww)

Mini-Guide
INTRO
While it kind of saddens me since I've tried (and I think succeeded) to make the guide as simple as possible all the while explaining the steps, the low interest to it lead me to decide to post also post a quick guide (instead of a full guide) that makes no use of shell commands.
There are good news and bad news due to this. The good news is that the guide has contracted further yet its end result really does give a quick taste of well running Linux on our tablet. To sweeten the deal the guide posted in this post gives a quick taste to most devices running a VT (virtual terminal) enabled kernel, no matter the brand and/or Android version.
The bad news is that due to the little interest expressed in here and my extreme lack of time most bugs and annoyances would most probably remain unsolved ... sadly. In no way or shape does that mean that I'm discontinuing support, just that I'll be lukewarm about it and I mostly expect from you / the users to find more workarounds / solutions and hopefully post them here...
Anyway on we go.
PREPARATIONS
Follow the Preparation Section from the First post of this thread. Steps (d) and (e) are not needed, so you can leave those out.
Additionally you'd need to download and place the following two files accordingly:
a) Config Files (you extract the contents to the root directory of your tablet's internal storage, don't change the directory tree)
b) Linux Image (you simply place it to the root directory of the internal storage)
THE "MINI"-GUIDE
For starters make sure that you have followed the "Preparations" Section Exactly. One mistake is enough to make this guide not to work. So without further ado:
1) Open LinuxCanvas and grant it root access (if asked)
2) Create a Linux image
a) Open LinuxDeploy
b) Tap the "Back" Arrow in the upper left corner of the app
c) Delete the extant profile ("Garbage Bin" Icon -> OK)
d) Import the downloaded Profile (3-dot icon -> Import -> OK)
e) Double-tap to the imported profile (its name is "linux")
f) Navigate to properties (Arrow showing "down") and Tap "Install" -> "OK"
g) Be patient. When it's done it will read " >>>install"​3) Start Linux:
a) Go back to "LinuxCanvas"
b) Press Volume Up, wait a bit and voila! (if it doesn't work the first time, press the "menu" button to repaint)​
...and that's it (really). If you want to know what you get by following this guide (instead of the full one), the answer is "basically everything from the first post plus the first step from the second post". Which means that if you want the full deal you *still* have to follow Posts #2 and #3 (workarounds), but of course it's completely up to you.
Again, report any issues, annoyances or even workarounds that you may have found. I'm counting on them to make the guide better.
Cheers!

Great Work Man ....
@Stevethegreat Great Work Man , it's just amazing ... but unfortunately , in Iran , I can't download from the Linux Deploy's Server ... is there anyway I could get the Image to do the Process ( I'm not that lazy ) Or even the ready image to try booting on my SM-P601 ( mybe a better Idea ) ? ... if there's some way , I'll work on the performance a bit ... also , maybe we can get the boot script used in my ARM-UEFI to get it sooner ... Also I have an idea that your ISO size can tell me if it's possible ( Dual Boot , I mean , like what MultiROM does , but much nicer and faster without the Android booted like a single ROM ) ... Great thanks for your effort ...
With Best Wishes
Hitman1376​

I have to wonder if this will work for other Note devices. (for instance I have the note 3)
I'll give it a shot, and the changes I make to obviously match my device, I'll post here.
Thanks for this mate, well done

Sweet. I will try when I have time
Sent from my SM-P600 using Tapatalk

kevp75 said:
I have to wonder if this will work for other Note devices. (for instance I have the note 3)
I'll give it a shot, and the changes I make to obviously match my device, I'll post here.
Thanks for this mate, well done
Click to expand...
Click to collapse
Mate , It needs a Kernel with VT Support , don't forget to have one .... also with " Frame Buff " enabled , it's better .... Good Luck
With Best Wishes
Hitman1376​

kevp75 said:
I have to wonder if this will work for other Note devices. (for instance I have the note 3)
I'll give it a shot, and the changes I make to obviously match my device, I'll post here.
Thanks for this mate, well done
Click to expand...
Click to collapse
It will, most probably without much/any tweaks to the individual steps as Note 3 is very similar hardware wise.
But I have to warn you. Firstly, you'd need a CONFIG_VT enabled kernel. That's fairly easy to get from Note3's kernel guys (it's just an extra option to enable). If they are not willing to provide you with one such kernel, you'd have to wait until I'd find the time to write a guide on how to create one from the sources.
Secondly, you'd have to be much more agressive with your DPI settings as a Note 3 screen is way smaller than our tablet's. Of course you can always opt to work on an external screen, in which case you'd have to be much more restrained with the settings that control the dpi/size of the elements (by contrast).
hitman1376 said:
@Stevethegreat Great Work Man , it's just amazing ... but unfortunately , in Iran , I can't download from the Linux Deploy's Server ... is there anyway I could get the Image to do the Process ( I'm not that lazy ) Or even the ready image to try booting on my SM-P601 ( mybe a better Idea ) ? ... if there's some way , I'll work on the performance a bit ... also , maybe we can get the boot script used in my ARM-UEFI to get it sooner ... Also I have an idea that your ISO size can tell me if it's possible ( Dual Boot , I mean , like what MultiROM does , but much nicer and faster without the Android booted like a single ROM ) ... Great thanks for your effort ...
With Best Wishes
Hitman1376​
Click to expand...
Click to collapse
Hey, LinuxDeploy offers a way to use different servers than the Russian ones. Also you can fiddle with the DNS server options (maybe there's a DNS server in your country/provider that resolves the Russian address).
edit: Oh BTW (to the second part of your past). While I'd welcome anyone at all working on bringing truly native linux (in the form of dual-booting) I'm not too sure of it's usefulness. Still you're free to use parts of my guide towards that goal (if that's what you wish). You can read the final part of my guide ("Instead of Conclusion") to see why I'm not that interested to a true dual-boot.

YYYESSSS!!!!
http://screencloud.net/v/gz6h
I'll let you know how I make out with this! Man, it'd be great to get ubu-touch running on it...

kevp75 said:
YYYESSSS!!!!
http://screencloud.net/v/gz6h
I'll let you know how I make out with this! Man, it'd be great to get ubu-touch running on it...
Click to expand...
Click to collapse
Yeah , that's enough. All it takes now is to see whether my step will work as is. If not I'm sure small tweaks specific to your device will make them work (like changing some of the numeric values in xorg.conf and/or the other files). Keep us posted

Stevethegreat said:
Hey, LinuxDeploy offers a way to use different servers than the Russian ones. Also you can fiddle with the DNS server options (maybe there's a DNS server in your country/provider that resolves the Russian address).
edit: Oh BTW (to the second part of your past). While I'd welcome anyone at all working on bringing truly native linux (in the form of dual-booting) I'm not too sure of it's usefulness. Still you're free to use parts of my guide towards that goal (if that's what you wish). You can read the final part of my guide ("Instead of Conclusion") to see why I'm not that interested to a true dual-boot.
Click to expand...
Click to collapse
Sure ... thank in deed ... I'll take a look but I don't think it's possible cuz the servers were unreachable ( I tried almost all of them )
... God damn those useless guys who do the web infiltration ... why a Linux containing server should get filtrated ? ...

brilliant guide mate theres a new version of my VT enabled kernel here btw http://d-h.st/fr1s

xluco said:
brilliant guide mate theres a new version of my VT enabled kernel here btw http://d-h.st/fr1s
Click to expand...
Click to collapse
Yeah thanks. I made sure to update the OP :good:

Stevethegreat said:
Yeah thanks. I made sure to update the OP :good:
Click to expand...
Click to collapse
Here's the stock 5.1.1 kernel for the P600 with VT enabled, platform.xml fix for external stoarge and chainfire's modified sepolicy for rooting without disabling SELinux.
http://d-h.st/0ImD
Edit: it takes FOREVER to boot, so be patient and ignore the seandroid notice!

xluco said:
Here's the stock 5.1.1 kernel for the P600 with VT enabled, platform.xml fix for external stoarge and chainfire's modified sepolicy for rooting without disabling SELinux.
http://d-h.st/0ImD
Edit: it takes FOREVER to boot, so be patient and ignore the seandroid notice!
Click to expand...
Click to collapse
Thank you very much indeed! I've made some attempts to compile on my own, but it wouldn't boot properly (it would boot into Android and after a while reboot).
I'll now start working on porting my guide. Much appreciated!

So...
Followed to a T
Results: Now have a nice lightweight desktop on my phone
Nice job on the tutorial mate!

Sound problem.
Stevethegreat said:
6) No native way to control sound and/or brightness (there's probably a solution, never bothered to investigate)
Click to expand...
Click to collapse
A possible solution to your sound issue, but it is dependent upon your Linux distribution in use:
Most newer distros of Linux use Pulse Audio for sound. This will not work as you need dbus, udevd, and a few other background processes running which are not functioning properly (or at all) in LinuxDeploy. A work around for this that I have successfully used in the past with LinuxDeploy on a Motorola Flipside was to download ALSA in your Linux distro. In my case it was Debian so I followed these steps:
1. Using the aptitude package manager, I purged all PulseAudio.
2. Using the aptitude package manager, I installed all the alsa tools and libraries.
Be sure to get the Alsa mixer.
3. When I logged in, I could, as root, bring up the alsa mixer in the terminal (eventually I mapped it to a shortcut on the desktop), and once open I could adjust the sound there. Note, you have to turn on an output device in the mixer, such as the SPK_HP or BT_SPK and then set the volume. I usually would start a sound file playing, like music, and then enter into the mixer and adjust to satisfaction.
(NOTE: these are steps, not commands, because your Linux distro or version thereof may differ.)
One problem that I had there before was that the Android system, in an effort to preserve order, would turn off the output device channel I selected after there was no sound coming out of it. E.g. the song ended, then Android would set the SPK_HP back to 0 or mute. SO to avoid that, you need to adjust the permissions of the sound card with chmod and chown to prevent Android from touching it until you are done. You can use LinuxDeploy's start/stop script options to allow you to create scripts to "steal the device" and "give it back" when you start/stop. Or you can simply keep the mixer handy and set the volume/output device every time you play a sound file. I found in practice that I didn't use the sound too much, but your mileage may vary.
-AlaskaLinuxUser

kevp75 said:
So...
Followed to a T
Results: Now have a nice lightweight desktop on my phone
Nice job on the tutorial mate!
Click to expand...
Click to collapse
Glad to hear!
Still there are bugs to be solved, I pray to have them solved (with the help of others hopefully), so keep yourself tuned.
I have to ask though: Is everything working OK? What about the s-pen? Also is the DPI suitable to your phone, or did you have to play with it? (changing the numeric values in some of my files?).
Thanks for trying to out my guide.
Cheers.

is this tested on 5.1.1?

Related

busybox, shell scripts, and device sleep

Is it okay to ask development questions here? I asked one a little while ago, and it got moved over to the General section, which doesn't make sense to me. Anyway, I'm sure the mod will move this one too if it's inappropriate to ask development questions in the development forum (puzzling, if true).
Regardless, on to the question:
I've been developing hardware and software for 25 years, much of it on UNIX and Windows. Know .NET, and other frameworks (X, in terms of UNIX) well. I'm brand-new to Android, though, and haven't taken the plunge yet to get a dev environment set up, and start learning the app frameworks. So, I'm working on some things via creating some rather sophisticated shell scripts.
I've run into two seeming bugs: Looping scripts, using sleep to go dormant, then wake up and do something, don't transition through a device suspend/wakeup cycle.
Intermittently, the OS will come back up with the sleep command stuck, pinning the CPU. This sometimes happens with the hosting shell, ash, as well.
In reality, both these processes are just invocations of busybox. So it's really busybox that's having the problem.
If I can work around this, I will have a very nice, clean, near zero-load ALSA solution for the pathetic default sound chip settings, adding substantial boost (configurable), balance control, and (future) control over output device (earphones, speaker, BT, earpiece)... and much more going forward.
I plan to reimplement all this with native code in a nice GUI app, but for now I'm doing proof of concept with shell scripting, and have hacked up a pretty cool real-time interactive configuration interface using curses-like ANSI terminal controls in ConnectBot (should work with any terminal app on the Epic as long as it supports ANSI standard cursor controls).
So, anyone have any insight/advice/help on this issue with busybox in it's "sleep" and "ash" command personas? One idea I had was to create a cron job to run every 5 minutes or so to check via top and see if either of these processes is running and chewing up the CPU, and if so, kill them off. I notice, though, that crond isn't running, so I'm concerned about what effect it will have if I start it up... Will it wake the phone up every minute to do it's job, thereby killing the battery? (that's how cron works, see the manpage).
Another solution would be to just put the native sleep and shell binaries on my phone, and call them. Sleep will be tiny, so no big deal there. But what about sh/ash/ksh/bash? In theory, should be comparable to busybox (in fact, I'd supect smaller), and as a side-benefit, could get the full scripting functionality of one of these shells (busybox has a few limitations).
Best of all, if there was a "I'm going to suspend" signal I could just trap in the script then I could deal with this in the most logical, direct way. Nirvana would be that signal, and a corresponding trappable "I just woke up" signal.
I'd really appreciate knowlegable dev's comments on these ideas, and any other suggestions/advice for how to deal with this.
Please post questions in General section.
We really need a trollface smiley.

[Mod][MotoActv] Tweaks+Mods Pack!

ive gathered some things and did a few tests on my MotoActv since ive gotten it and did some tweaks here and there and i added the following features to mine and put them into a flashable zip for u all
-init.d support (plus some scripts to make it faster then ever) (tested and working (makes two files in sdcard on boot to show it) (picks and chooses when to work now for some reason, so i put an app i made that loads scripts when onCreate()'d and sometimes on-boot)
-Viper4Android sound system (only works for bluetooth headsets if enabled, but its sounds better with good settings)(see credits)
-OpenVPN (idk if theres a use for us but i added the required files (no GUI)
-UsbEnabler.apk (see credits)
-Adblock host (hopefully it works i havent been able to test yet)
-lag-free entropy (so far seems to work, as im not lagging switching launchers anymore)
-MotoActv DPI (my own personall app i made for Changing dpi from 90,100, and stock(120)
-Sqlite3 + init.d sqlite3 optimizer
-Busybox Run-parts (for init.d, still picks and chooses when to work)
-100 Dpi When-Flashed (can be changed back to stock with the MotoActv DPI app i made)
-minor-to-major tweaks from init.d scripts and other methods
-DalvikCache2Sd (not sure if it truly tested working, but i do have a tiny bit more space+no lag like other 2SD methods
soon to be added:
I take bare minimum credit for these, i mostly used this personal zip for when i update my MotoActv's rom, this can be universal for other androids, but it was initially made to the MotoActv watch running custom roms
Credits to give:
(will edit when i get forum post urls and OP's names)
Viper4Android:
OP = @zhuhang
Thread = http://forum.xda-developers.com/showthread.php?t=2191223
UsbEnabler:
OP = @fagalto
Thread = http://forum.xda-developers.com/showthread.php?t=2396138
init.d scripts, OpenVpn, Entropy:
i extracted from the rom on my phone so idk where they originally came from
Init.d App(unreleased w/o mod_pack)+MotoActv DPI:
OP:me @jkok for developing and publishing
Thread (MotoActv DPI):
http://forum.xda-developers.com/showthread.php?t=2435370
Gallery+Live Wallapapers:
Google, But @ClearD for giving me the zip with the script+apks
the zip:
i put together, made the script, signed+released for general use for others:
future credits will be made when i add more things.
Download:
Reusable Download Link
Awesome!
Here's a zip (with changed mounting, again; this time using the exact same one that I use for the rom) of the Live Wallpapers + Gallery apks. Hopefully, this one will work fine.
ClearD said:
Awesome!
Here's a zip (with changed mounting, again; this time using the exact same one that I use for the rom) of the Live Wallpapers + Gallery apks. Hopefully, this one will work fine.
Click to expand...
Click to collapse
well thanks ClearD i can do the script just fine, some of the mountpoints are universal like what i use
umount("/system");
or
run_program("xbin/mount", "/system"); (might be wrong on the xbin part, just going by memory
run_program("xbin/umount", "/system");
but the resolution on the galery on your motoactv rom is too big for it, it resizes dont get me wrong, but it needs to do a single horizontal row cause if u overscroll to the farest right u see there is second or more rows going down, imma fine the sourcecode for the galery2.apk, and make a single-row version when i find it =)
jkok said:
well thanks ClearD i can do the script just fine, some of the mountpoints are universal like what i use
umount("/system");
or
run_program("xbin/mount", "/system"); (might be wrong on the xbin part, just going by memory
run_program("xbin/umount", "/system");
but the resolution on the galery on your motoactv rom is too big for it, it resizes dont get me wrong, but it needs to do a single horizontal row cause if u overscroll to the farest right u see there is second or more rows going down, imma fine the sourcecode for the galery2.apk, and make a single-row version when i find it =)
Click to expand...
Click to collapse
Ah, sweet! That sounds good. I couldn't get it to mount properly any other way so far, but it could have been something as simple as a typo. If it does actually work, then I might use that in the future. That's the one I tried with the last iteration.
ClearD said:
Ah, sweet! That sounds good. I couldn't get it to mount properly any other way so far, but it could have been something as simple as a typo. If it does actually work, then I might use that in the future.
Click to expand...
Click to collapse
the universal way i do my scripts is
mount("ext3", "MTD", "system", "/system");
unmount("/system");
and it always seemed to work for me, so thats why i call it universal anyways
but the other ways i posted seemed to work for me when i tried em, i just used this way cause it was in a zip for a motoactv rom (i think it was yours or the battery mod)
Opps! i was wrong, its not
run_program("xbin/mount", "system");
its
run_program("sbin/mount", "system");
lol i had to check my other mod zips lol
jkok said:
the universal way i do my scripts is
mount("ext3", "MTD", "system", "/system");
unmount("/system");
and it always seemed to work for me, so thats why i call it universal anyways
but the other ways i posted seemed to work for me when i tried em, i just used this way cause it was in a zip for a motoactv rom (i think it was yours or the battery mod)
Click to expand...
Click to collapse
Lol no doubt, I went through the same thing with the battery mod, looking over and over for one that worked better. I'd prefer the xbin/mount method, but for some reason, it was hit and miss on my end with end users. Not sure why, unless busybox wasn't set up right somehow.
Just updated the mod_pack with more features!
Sorry but the only thing i havent really been able to fix that well way the init.d it seemed to workwhen i first released this mod_pack, but it seems to pick+choose when to work, so i added 2 other methods for init.d (one of which is an app i made, yet to release that loads the scripts when the app is onCreate()'d and sometimes on-boot when SuperUser allows it)
but there are some great new features that WILL work, along with some of my own personall apps, tweaks, and clock faces =)
Again: this mod_pack is meant for MotoActv's running a custom rom, and Not meant for AOSP based MotoActv Roms
Tested and confirmed working (except init.d that picks and chooses) on @ClearD 's ClearRom 1.2.0 T2 (and my own personal (un)Official 1.2.1 T1 i made for him)
For some reason all of the mods are being denied superuser, any ideas? I am setup to automatically allow all requests
Edit: Installed SuperSU and my problem has been resolved
Has there been anything definitive about the entropy thing? The last consensus I saw by anyone not potentially making money from a fix is that at best it's just forcing the processor to stay awake, decreasing battery life.
Saeviomage said:
Has there been anything definitive about the entropy thing? The last consensus I saw by anyone not potentially making money from a fix is that at best it's just forcing the processor to stay awake, decreasing battery life.
Click to expand...
Click to collapse
well by my testing before my motoactv went kaput it didnt affect the battery any noticeable amount, but it did solve some-to-all of the lag from switching launchers on the ClearDroid 1.2.0_T2 rom, i cannot make or update this mod-pack anymore because i dont like submitting a mod-pack that is untested, and since my motoactv went kaput i cannot test it anymore but if u have any questions feel free to ask and ill try to answer the best i can for now =)
not sure what is the right place to ask this... How does DPI change work? Does it mean the "system" screen resolution is changed? Let say, what is the "Full Screen" resolutions in 90/100/stock(120?) dpi's??? Where to read about it if it is not so simple???
yuiop0 said:
not sure what is the right place to ask this... How does DPI change work? Does it mean the "system" screen resolution is changed? Let say, what is the "Full Screen" resolutions in 90/100/stock(120?) dpi's??? Where to read about it if it is not so simple???
Click to expand...
Click to collapse
Dont worry its ok to ask here, since i made this app after all , i might as well answer how this works =)
well to make it shorter and more understandable to alot more people:
Yes, it is the overall resolution of the screen:
DPI (dots-per-inch) is more like the size range to view images/displays/graphics on ANY of your LCD/LED Screened devices including androids, I-craps(iPhones/ipods )(sorry i dont like apple too much, bad excperiences, dont get offended if u like it as its just my personal preferences), blackberries, windows phones, TV's, computer Monitors, etc:
the stock setting for HDPI phones (the more common screened ones now) is 240, say if u lower it, the images get smaller, if u raise it it gets bigger (maybe even too big for the screen to handle correctly);
but since the MOTOACTV has a smaller screen as u can obviously see (if u have one that is, as i dont know others posesions =P), its default for the stock rom is 120 (1/2 of HDPI if u notice the math) and 120 is as big as it should go cause say for example 130 dpi, it makes the images slightly too big for the screen, but slightly smaller values (100 is usually smallest for alot of peoples eyes for the watch, but for some people like me that like them a tad smaller for sharp small details, i put 90), but literally the smaller the amounts go, the smaller the images(and possible errors, i.e ES File Explorer crashes below 120 DPI untill u restore to 120+) , and for the smaller screen we have u cant go too big (121+), or too small (>=90-100), so i put those details of 90,100,and 120 (no 110 as it doesnt make too much of a difference by what i saw)
but there is (a) way(s) to check what DPI u are at currently:
METHOD1.check your build.prop file under /system/build.prop by doin these ADB commands (**new line is a new command**) (commands stop at <EOC>)
adb remount
adb pull /system/build.prop
<EOC>
check somewhere using notepad for this line (NOTE: if u want to edit to push to your device use notepad++, search for it on google if u dont already have it, as regular notepad corrupts it)
ro.sf.lcd_density=(your current DPI is displayed here)
if u decide to change it that way and want to apply it MAKE A BACKUP!!!, then change it in notepad++ and save it, then goto the directory it is in in the terminal/command prompt and do (**new line is a new command**) (commands stop at <EOC>)
adb remount
adb push build.prop /system/build.prop
adb shell chmod 644 /system/app/build.prop
adb reboot
<EOC>
METHOD 2: Any DPI Checking/changer app (there might be some good free ones, i.e. pimpmyrom has a density changer (DPI changer) that works the same as mine i think, it changes the DPI value in the Build.prop and it WILL stick over reboots, just not rom flashes (as it overwrites it and my change)
if u want to see how i did this(if u understand java/android applications) u can check This app on my github, its acually fairly easy and lightweight compared to others
https://github.com/kittleapps/MotoActvDPI
and the exact class that does this (using a library), is this
https://github.com/kittleapps/MotoA...om/KittleApps/app/motoactvdpi/MainScreen.java
as u can see it changes it to 90,100, and 120 quite simply (with root access of course)
and sorry for this long message but it explains not only your question, but possible future questions on how this app works =)
jkok said:
but there is (a) way(s) to check what DPI u are at currently:
METHOD1.check your build.prop file under /system/build.prop by doin these ADB commands (**new line is a new command**) (commands stop at <EOC>)
adb remount
adb pull /system/build.prop
<EOC>
check somewhere using notepad for this line (NOTE: if u want to edit to push to your device use notepad++, search for it on google if u dont already have it, as regular notepad corrupts it)
ro.sf.lcd_density=(your current DPI is displayed here)
if u decide to change it that way and want to apply it MAKE A BACKUP!!!, then change it in notepad++ and save it, then goto the directory it is in in the terminal/command prompt and do (**new line is a new command**) (commands stop at <EOC>)
adb remount
adb push build.prop /system/build.prop
adb shell chmod 644 /system/app/build.prop
adb reboot
<EOC>
METHOD 2: Any DPI Checking/changer app (there might be some good free ones, i.e. pimpmyrom has a density changer (DPI changer) that works the same as mine i think, it changes the DPI value in the Build.prop and it WILL stick over reboots, just not rom flashes (as it overwrites it and my change)
if u want to see how i did this(if u understand java/android applications) u can check This app on my github, its acually fairly easy and lightweight compared to others
https://github.com/kittleapps/MotoActvDPI
and the exact class that does this (using a library), is this
https://github.com/kittleapps/MotoA...om/KittleApps/app/motoactvdpi/MainScreen.java
as u can see it changes it to 90,100, and 120 quite simply (with root access of course)
and sorry for this long message but it explains not only your question, but possible future questions on how this app works =)
Click to expand...
Click to collapse
There is a 3rd method as well.
Method 3 = Install the Xposed framework and app settings apk found here: http://forum.xda-developers.com/showpost.php?p=44034334&postcount=2315
This will allow per app DPI settings rather than one global setting.
In order for this to work correctly, make sure you move both the Xposed Installer and App Settings apks to the phone after installation and reboot as well.
I like running some apps at 120, others at 100, 90, and even 70 w/ modded font sizes and this allows for all those combinations.
Artimis said:
There is a 3rd method as well.
Method 3 = Install the Xposed framework and app settings apk found here: http://forum.xda-developers.com/showpost.php?p=44034334&postcount=2315
This will allow per app DPI settings rather than one global setting.
In order for this to work correctly, make sure you move both the Xposed Installer and App Settings apks to the phone after installation and reboot as well.
I like running some apps at 120, others at 100, 90, and even 70 w/ modded font sizes and this allows for all those combinations.
Click to expand...
Click to collapse
that is true, but i didnt include that cause i was seeing people having issues with xposed-framework on the MOTOACTV on a few threads, and tbh i made this app+inlcuded in modpack before that method was usable for MOTOACTV (or gingerbread in general), thats kinda why i havent updated the modpack in a while (including the fact mine is damaged for some time now), i managed to fix mine up somewhat but it only turns on the backlight and no button combos work but to turn on backlight XD, so no fastboot recovery, boot-to-system, or quickboot :S and since the device is discontinued i cant get a real fix XD, so unless i personally test the things i put in this modpack, i cant make new versions to distribute for device stability reasons (e.g. in case it is corrupted and breaks someone elses device, as it is un-tested, since i dont have a device to test it on)
jkok said:
that is true, but i didnt include that cause i was seeing people having issues with xposed-framework on the MOTOACTV on a few threads, and tbh i made this app+inlcuded in modpack before that method was usable for MOTOACTV (or gingerbread in general), thats kinda why i havent updated the modpack in a while (including the fact mine is damaged for some time now), i managed to fix mine up somewhat but it only turns on the backlight and no button combos work but to turn on backlight XD, so no fastboot recovery, boot-to-system, or quickboot :S and since the device is discontinued i cant get a real fix XD, so unless i personally test the things i put in this modpack, i cant make new versions to distribute for device stability reasons (e.g. in case it is corrupted and breaks someone elses device, as it is un-tested, since i dont have a device to test it on)
Click to expand...
Click to collapse
Sorry to hear that. I personally haven't loaded the mod pack yet. Was looking into cherry picking parts of it when I saw the question on DPI. I thought it was a general question.
In any case, I personally have not had any issues with Xposed on my actv. What issues have you heard about?
jkok - thank you so much for the explanations. It's become more clear for me but I'm not so experienced in android/development so I have some more questions related to dpi on actv.
My practical interest in this is - to investigate the possibility to run igo primo on this device (for route planning/voice navigation) because I'm not happy with Motorola map application (walk/run outdoor mode). I have some ideas how to modify igo's data.zip for specific screen resolutions (at least I managed to make "custom 640x480" data.zip for primo 2.4.0 WM for htc DIAM100) but I need to know what is the "Full Screen" resoluton (for igo and other applications) in different dpi modes on actv (ClearD 1.2.0 rom currently, just in case). Is it the same - 176x220 for all dpi's (I don't think so as the size of icons/fonts/etc are different). So, the real question is - what is the screen resolution I need to set up in data.zip to try to run igo primo on motoactv. To know that I need to understand if dpi change affects the "full screen resolution" in motoactv/android. And, once more, sorry if the question looks stupid (already explained etc) as I'm not developer...
yuiop0 said:
jkok - thank you so much for the explanations. It's become more clear for me but I'm not so experienced in android/development so I have some more questions related to dpi on actv.
My practical interest in this is - to investigate the possibility to run igo primo on this device (for route planning/voice navigation) because I'm not happy with Motorola map application (walk/run outdoor mode). I have some ideas how to modify igo's data.zip for specific screen resolutions (at least I managed to make "custom 640x480" data.zip for primo 2.4.0 WM for htc DIAM100) but I need to know what is the "Full Screen" resoluton (for igo and other applications) in different dpi modes on actv (ClearD 1.2.0 rom currently, just in case). Is it the same - 176x220 for all dpi's (I don't think so as the size of icons/fonts/etc are different). So, the real question is - what is the screen resolution I need to set up in data.zip to try to run igo primo on motoactv. To know that I need to understand if dpi change affects the "full screen resolution" in motoactv/android. And, once more, sorry if the question looks stupid (already explained etc) as I'm not developer...
Click to expand...
Click to collapse
well im not familiar with those apps, as for the resolutions/dpi im not sure of that :S it could possible be found on google, as basic hdpi (240 dpi), usually is around 480*800, and 120 dpi is like the motoactv 220*176, so i guess there isnt a ratio it follows, just sizing of images maybee :S, but i also just became a developer more resently withing the last 2 years so im still learning

[TUTE][TIPS] Android RAM Management

Android RAM Management
What's this thread about?
This is a brief account of some useful aspects of android memory management and what could be done to make it better or to suit our needs. This is arranged in two parts; A) RAM Management Lesson. B) RAM Management Tips. Whoever is familiar with the Android RAM management concepts can skip to the second part (2nd post). [highlight]Please read and understand carefully before applying anything to the phone. I'm not responsible for any unwanted effects thereby. Credits belong to respective authors of any MOD/APP discussed here.[/highlight]
A) RAM Management Lesson
Android uses a different way of handling processes. Instead of killing every process after its activity ended, processes are kept until the system needs more memory. The idea is to give speed improvements if you start that activity again. But how/when does Android kill a process if it needs more memory and and which process to kill first?
This is managed by the LMK (Low Memory Killer) driver of Android. You may already know that every app/process in Android is assigned an oom_adj value, which indicates the likelihood of it being killed when an out of memory (OOM) situation occurs. More higher it's value, the higher likelihood of it getting killed. Valid range is -17 to +15. (if in the -17 range means it won't get killed). According to that, there are six groups (OOM groups), into which apps/processes are categorised:
1. Foreground app
2. Visible app
3. Secondary server
4. Hidden app
5. Content provider
6. Empty app
Basically these could be described as..
FOREGROUND_APP:
// This is the process running the current foreground app. We'd really
// rather not kill it!
VISIBLE_APP:
// This is a process only hosting activities that are visible to the
// user, so we'd prefer they don't disappear.
SECONDARY_SERVER:
// This is a process holding a secondary server -- killing it will not
// have much of an impact as far as the user is concerned.
HIDDEN_APP:
// This is a process only hosting activities that are not visible,
// so it can be killed without any disruption.
CONTENT_PROVIDER:
// This is a process with a content provider that does not have any clients
// attached to it. If it did have any clients, its adjustment would be the
// one for the highest-priority of those processes.
EMPTY_APP:
// This is a process without anything currently running in it. Definitely
// the first to go!
Click to expand...
Click to collapse
These groups are defined by oom_adj value limits, and apps would fall into one of those groups according to the oom_adj value assigned to that particular app. "Foreground apps" usually have an oom_adj value of 0 or less (so they are the least killable; i.e High priority). "Empty apps" have a higher oom_adj (they are killed early; i.e Low priority). Also, oom_adj value changes according to the state of the user app; it's 0 when the app is active in the foreground and assigned a higher value when the app goes to the background.
Why their "killability" differ? Apps belonging to these different groups (that have different oom_adj's), start to get killed at different levels of free RAM. These triggering RAM limits are defined by the LMK minfree values. Above 6 categories correspond with 6 RAM limits which are set in the LMK minfree. Eg: Stock Android 4.3 in our SP comes with the minfree values of 58,68,78,88,98,118. (these are in MB; see below how to check it). Practically what it means is, Empty apps will get killed when ram goes below 118mb, Content providers when it goes below 98mb, Hidden apps when it goes below 88mb and so on.. lastly starts killing Foreground apps when ram goes below 58mb. You may notice that this last value (58mb) is not desirable when using memory intensive apps like heavy games. The app might shutdown while we interact with it. It won't be a surprise if RealRacing3 would shutdown in the middle of a race with these minfree settings!
[Highlight]Notes:[/highlight]
1. In our SP (and newer kernels), oom_[highlight]score[/highlight]_adj is used instead of old oom_adj. (oom_score_adj valid range is -1000 to 1000). But oom_adj is also maintained for compatibility I think.
2. It is said that there are many OOM process categories that are assigned different oom_adj priorities by the ActivityManagerService, but eventually all of those would be considered under above six slots/groups (according to oom_limits), for the purpose of killing by the LMK minfree triggers. Therefore, those six are the importatnt ones for normal users like us.
[highlight]Now, to the practically important part...[/highlight]
# We can check the minfree values (also change them) and see the OOM groupings of apps/processes with this Memory Manager app easily.
a) LMK Minfrees:................... ......................................b) OOM groupings:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
....
If we click on an app in the list and select 'more info', we can see it's oom_adj value. In my case, System UI has -12 (foreground), Home Launcher has 1 (visible group) etc..
# We can check these manually in a terminal too..
a) LMK Minfrees:
Give the following command (without quotes) in a terminal emulator or adb shell: "cat /sys/module/lowmemorykiller/parameters/minfree"
Code:
$ cat /sys/module/lowmemorykiller/parameters/minfree
[b]15000,17532,20065,22598,25131,30263[/b]
** These are in pages; 1 page=4K. Therefore, converting these in to MB results in.. 58,68,78,88,98,118. (e.g: 15000 x 4 /1024 = 58,5938)
b) OOM_adj value of an app:
*This is not much useful. But nice to know where to get these values from.
E.g. take home launcher. Find out it's PID (process ID) like this.. (command with output posted)
Code:
$ ps |grep [b]home[/b]
u0_a26 1653 721 471408 78076 ffffffff 00000000 S com.sonyericsson.home
It's pid is 1653. To see it's oom_adj value..
Code:
$ cat /proc/[b]1653[/b]/oom_adj
1
It's 1 (foreground). You might get 6 (hidden). So, your home is easily killed than my home . See below why..
At the same time we can see the new oom_score_adj..
Code:
$ cat /proc/[b]1653[/b]/oom_score_adj
58
* To convert old oom_adj value to newer oom_score_adj..
oom_score_adj = (oom_adj x 1000)/17 (truncate the decimals). So, (1x1000)/17=58.823
*There's another value (0-1000) of oom_score (cat /proc/1653/oom_score), which is THE actual indicator of how likely a process will get killed. It changes according to the tunable oom_score_adj and other factors..? something like that.. forget it!
[highlight]## The above mechanism could also be described according to what is mentioned in kernel source files[/highlight], as below. Can skip if it's boring ..
It's from 'drivers/misc/lowmemorykiller.c' of kernel sources (4.3; .266)
* The lowmemorykiller driver lets user-space specify a set of memory thresholds
* where processes with a range of oom_score_adj values will get killed. Specify
* the minimum oom_score_adj values in
* /sys/module/lowmemorykiller/parameters/adj and the number of free pages in
* /sys/module/lowmemorykiller/parameters/minfree. Both files take a comma
* separated list of numbers in ascending order.
*
* [highlight]For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
* "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill
* processes with a oom_score_adj value of 8 or higher when the free memory
* drops below 4096 pages and kill processes with a oom_score_adj value of 0 or
* higher when the free memory drops below 1024 pages.[/highlight]
*
* The driver considers memory used for caches to be free, but if a large
* percentage of the cached memory is locked this can be very inaccurate
* and processes may not get killed until the normal oom killer is triggered.
Click to expand...
Click to collapse
If we take our phone values, "cat /sys/module/lowmemorykiller/parameters/adj" command returns: "0,58,117,235,529,1000". These are in (new) oom_score_adj values. If we convert them to (old) oom_adj values, these become "0,1,2,4,9,15". (eg:117x17/1000=1.989=2; The last value becomes 17, but oom_adj range ends with 15, so we take 15). Now, with our minfrees of 58,68,78,88,98,118, what it means practically is to kill processes with a oom_adj value of 0 or higher when the free memory drops below 58mb and kill processes with a oom_adj value of 1 or higher when the free memory drops below 68mb and so on... Therefore, it's clear that the adj values "0,1,2,4,9,15" (or score_adj values "0,58,117,235,529,1000") define the limits of each of 6 OOM slot described above.
Another point to note is what mentioned above in the kernel source file "..driver considers memory used for caches to be free..", which is described below.
[highlight]What is "Free RAM"?[/highlight]
What's reported in many apps as "free ram" is actually not free/empty. Linux/Android always tries to utilise the whole ram in some way, so the ram is not wasted. Ram which is not used by active apps, is used for caching apps and for some buffers. These caches and buffers can release memory for apps when needed. We can see the ram usage in detail with this command.. "cat /proc/meminfo" [giving "watch cat /proc/meminfo" would refresh the output every 2 seconds].
Code:
$ cat /proc/meminfo
MemTotal: 859764 kB
[B]MemFree: 26380 kB
Buffers: 2008 kB
Cached: 136600 kB[/b]
SwapCached: 0 kB
Active: 557312 kB
Inactive: 70520 kB
...blah.. ..blah...
....
Reported "free ram" was ~150mb when this was taken. Out of that, most (135mb) is already cached. ["Free RAM"=MemFree+Cached]. Actual free is very little. So, increasing "free ram" makes the phone much snappier because most of that "free" part of the RAM is used for caching things.
-->> RAM Management Tips
B) Tips for better RAM management.
Following is an account of which i benefitted from, sharing for others who may not be aware of these. Your milage may vary... Desired "RAM Management" differs depending on whether expecting more multitasking or a snappy phone with lot of free RAM. Nowadays, phones with better specs generally won't show any lag even if tuned for multi-tasking , although "free RAM" stays little lower. I prefer towards more multi-tasking
1. Change the minfree values to suit your needs. [highlight](Need Root access)[/highlight].
LMK Minfree values can be changed on the fly. Use lower values if you want more multitasking. Higher values if need more "free ram" for gaming etc.. . I use 8,12,45,65,95,165 for more multitasking and for foreground apps to stay until ram becomes much lower. Asphalt8 never crashed with this! If we use values like 15,25,95,145,195,245 "free ram" would be more but background apps (e.g. Hidden apps) would shutdown earlier. However, make sure NOT to increase the first 2 slots too high, so that the Foreground and Visible apps would stay even if RAM goes lower.
How to set/change them:
a) You can set those values with the above Memory Manager app and press Apply. (and tick 'apply at boot' for those values to be applied at every boot).
** There are many preset values you can experiment with.
b) Or can do the manual way.. Give the following command in a terminal/ADB shell:
Code:
echo "2048,3072,11520,16640,24320,42240" > /sys/module/lowmemorykiller/parameters/minfree
(That's after "su" command to get root prompt). ** Need to 'echo' them in pages; not in MBs. See first post how to convert them.
Note: This won't survive reboot. You can run this command as a script with init.d every boot. (For init.d support, check this). The script would look like this:
Code:
#!/system/bin/sh
echo "2048,3072,11520,16640,24320,42240" > /sys/module/lowmemorykiller/parameters/minfree ;
c) Can use Minfree Manager app. To set the minfrees, press Apply after entering the values. If we press 'Apply at Boot', it saves a script under init.d. No hassle.
** There are many apps that can do these kind of changes. Eg: Auto Memory Manager, Ram Manager(Free/Pro)-with other options. The above described ones are very easy to use.
2. Use 'App Settings' xposed module to make any app "stay" in memory (make it "Resident"). [highlight](Need Root access)[/highlight]
It would definitely help multitasking by keeping the needed apps in the background without getting killed, even if RAM becomes low. It possibly works by reduces the app's oom_adj value. That's why you can see Opera Mini in the 'Foreground app' list in my screenshot above (1st post). It's oom_adj value is 0. You can do this for your home launcher and any app you wan't to stay un-killed in the background.
Caution: Making apps to stay in memory would make them stay without being killed, even when e.g. a heavy game is starving for RAM. Therefore, indiscriminate use of this option is not advised. I think it's better to..
(i) Apply only to the apps which have an 'Exit' button/menu, so we can shut it down when needed.
(ii) If no exit button, Add to the 'Greenify' list to be hibernated when the app is not needed. But it asks for confirmation before hibernating these kind of apps with 'High Priority' oom_adj status.
How-to:
1. Get Xposed installer from here. Install it. Install the Xposed framework through it. Refer to the respective thread for more details.
2. Then download the 'App Settings' module through Xposed installer..
3. Open 'App Settings'.. App list will load.
4. Select the app you wan't to tweak.. It will lead to a page as seen in the screenshot above.
5. Select 'Resident' and save (upper right corner button). Can change any other setting if needed.
3. Use zeppelinrox's jar patcher tools to patch services.jar. [highlight](Need Root access)[/highlight].
It changes Home Launcher priority and many other LMK related tweaks. This is why you see my home launcher is under visible apps (oom_adj 1). No launcher redraws even after asphalt8! See the particular thread for details. In summary, patching services.jar results in (quoted from the thread):
- This will SuperCharge Your Home Launcher and ADJ/OOM Priorities! You pick launcher strength!
- This lets you run up to 70 hidden apps instead of the default 15 (RAM permitting) without breaking the lowmemorykiller!
- This tries to bypass the 30 minute service inactivity limit by increasing it to 24 hours.
Click to expand...
Click to collapse
** From ICS up, Android doesn't read ADJ values from build.prop or local.prop - they are hardcoded into services.jar! That is the reason for needing to patch services.jar to change OOM priorities. More details in the respective threads.
How-to (quoted):
Get Jar patcher tools from the thread. I used 'Ultimatic_Jar_Patcher_Tools_RC7_TEST6_ALL_DEX_ALL_OSes_NO_FLASH.zip'. Extract it in the PC. Make sure ADB drivers installed.
How to run -=Ultimatic Jar Patcher Tools=-
1. Connect your Android to your PC with Android Debugging ENABLED and Mass Storage DISABLED so your device has access to your sdcard.
2. Windows: Run either the zip's *.bat or the attached *.exe
If running the exe, you can put a different ultimate jar power tools script version in the same folder and it will use that one otherwise it uses the embedded version!
If you have cygwin installed, you can even use the zip's *.sh file at the cygwin prompt.
Linux/Mac OSX: run the zip's *.sh file
Just be sure to read everything and answer Yes or No as is your preference.
Example: The script allows you to choose the level of your Launcher's Super Strength! (BulletProof, Die-Hard, or Hard To Kill)
Click to expand...
Click to collapse
** Always keep a cwm backup before attempting this; might not get it correct in the first attempt..
4. With the above jar patching, can use zeppelinrox's supercharger script. [highlight](Need Root access)[/highlight].
It can be used to change the minfrees and it re-groups the OOM categories. It also has tons of other cool tweaks. If we check "cat /sys/module/lowmemorykiller/parameters/adj" after applying the SuperCharger scripts to our phone, it returns.. "0,176,352,588,705,1000". Converting to oom_adj values (see 1st post) it becomes "0,3,6,10,12,15". Comparing with stock values (0,1,2,4,9,15), we can see that the above described six OOM slots are re-arranged, sort-of categorising more processes towards higher priority. Can test those settings by echoing those values (this won't survive reboot):
Code:
echo "0,176,352,588,705,1000" > /sys/module/lowmemorykiller/parameters/adj
** Not advisable to meddle with this if no clear idea about what is being done. Use the SuperCharger script instead. Checkout the respective thread for more info.
[For me, this OOM regrouping made some task killings more difficult and it didn't relese RAM readily when needed for heavy games..(may not be same for others ). So I'm not using it at the moment. I'm setting up minfrees as described previously.]
How-to (briefly):
1) Get the latest SuperCharger script from the thread.
2) Make sure requirements are met. Eg: Rooted, Busybox installed.
3) Run the script through 'Script Manager-Smanager' app (with root access granted).
4) Read the output of the screen and reply to the prompts accordingly.
** Keep a cwm backup before attempting this, just in case..
5. Override the "Hidden app limit" of Android. [highlight](Need Root access)[/highlight].
In addition to the LMK driver mechanism described above, this is another parameter that leads to killing of Hidden and Empty apps. Apps are killed when the number of those apps go beyond the specified limits. (Traditionally it was 15, so no more than 15 hidden apps would stay in the background even if there's plenty of RAM). There's a build.prop setting which can control this in our SP. (Btw, services.jar patching mentioned above makes that limit to 70). With the build.prop setting mentioned, we could make it to even 150 ! (This way, we can maximize multitasking and app killing is fully handed over to LMK minfrees, which we can control).
How-to:
Code:
ro.sys.fw.bg_apps_limit=70
Add this line to end of build.prop file (in /system) and leave another blank line below that, and save the file. Then reboot.
Tip: Build Prop Editor is an easy way to edit the build.prop.
** Always keep cwm backups before doing these kind of things.
How to test:
a) Install CatLog app (need root) [This is for reading Logcat]
b) Run it and enter "longer" (without quotes) in the filter bar. Might get a filtered output like this:
It means that the 24th Empty app had got killed, because of exceeding the hidden app limit. This is after services.jar patching making the Hidden app limit to 70. Before it was #17 if I remember correctly.
c) Check the same output after applying the build.prop setting. Should get a little increase. (When I made Hidden app limit to 100, output was #34th empty app gets killed. So, I wen't upto 150 until that kind of output disappeared ).
## Credits to @zeppelinrox for finding that build.prop setting. You can read what happened here in his thread.
How it works:
By @zeppelinrox
In Android 4.2 the max hidden apps are divided into 2 parts (In AMS smali the value is stored in "mProcessLimit")
Part of it goes towards hidden apps.
Part of it goes towards empty apps.
So what happens is it gets the max apps limit (v2)
It gets multiplied by 2 so "v2" is doubled in value.
Now... that is divided by 3 and that value is assigned to empty apps (v13)
Finally, empty apps (v13) is subtracted from v2 to give you hidden apps (v17)
So by default, there are MORE empty apps than hidden apps!
2/3 are empty
1/3 are hidden
So your original config was probably...
max hidden apps = 25
empty apps = 17 (25x2/3)
hidden apps = 8 (25-17)
So normally (without jar patching), if the limit is 70 it would break down like this...
max hidden apps = 70
empty apps = 46 (70x2/3)
hidden apps = 24 (70-46)
** Services.jar patching reverses this ratio (to give more allowance to Hidden apps than Empty apps. Then it results in:
max hidden apps = 70
empty apps = [highlight]23[/highlight] (70x3/9)
hidden apps = 47 (70-23)
Click to expand...
Click to collapse
That's why my 24th Empty app was getting killed with app limit of 70. You might get a totally different value if this build.prop setting is applied without services.jar patching. Appreciate your feedback
[highlight]** Please Note: I'm no dev. I wrote this according to what i understood by reading around in the net. I'd be more than glad if anyone points out any shortcomings/improvements. Thanks.[/highlight]
Credits/Sources
@zeppelinrox for his supercharger thread with overwhelming info, for finding out the build.prop setting in our SP, for explaining things and many more!
@androcheck for his thread
Took more info from here, here, here, and here.
[Highlight]An interesting observation...[/highlight]
Many of us refer to 'Settings>Apps>Running' to see how much free RAM is available at a particular moment. Generally we believed that it shows the correct value. But, some observations makes that value doubtful. E.g: This value doesn't tally with /proc/meminfo values. Furthermore, 'Free RAM' indicated by other apps at times are totally different.
(1).CoolTool - 121 MB
(2).meminfo (watch cat /proc/meminfo) - Looks compatible with cooltool value.
(3). Android says - 23MB!!??
**(all 3 values were updating realtime..)
Sometimes it goes the other way:
(gave time to settle down of course)
Any thoughts?? Does anyone experience like this or only me?
Just in case..
mrhnet said:
@androcheck for his thread...
Click to expand...
Click to collapse
Hi @mrhnet: I got pinged by your mention of my username. Thank you for this valuable thread! It's so important for xda having people around which actually explain and give knowledge to others! This is how a community should work! Great work! :good:
P.S.: Also thanks for giving me credit. That's not to be taken for granted. When I search the web for the unfortunate typo in my posting "on Android the current forefround application" I find a lot of resources which simply copied my words and often did not give any credit. So I appreciate this very much!
@androcheck
Thanks for the encouragement..
nice tutorial with full descriptions...great..:good:
This is wonderfull! I will add this to the tutorial Index this weekend
mrjraider said:
This is wonderfull! I will add this to the tutorial Index this weekend
Click to expand...
Click to collapse
Thanks. That's nice of you
thx u very much for the detailed explanation, gonna try ur recommended values later
great bro can be a sticky thread
mrhnet said:
Just in case..
Click to expand...
Click to collapse
Nice thread dude.
Now I'm glad that I had patience with your patching issues lol
However I don't think I have the patience to go into every tiny detail which is why I link to @androcheck 's thread in my original Supercharger OP (which is now post #3)
And you may find useful the new tool that I'm finally on the verge of releasing...
androcheck said:
Hi @mrhnet: I got pinged by your mention of my username. Thank you for this valuable thread! It's so important for xda having people around which actually explain and give knowledge to others! This is how a community should work! Great work! :good:
P.S.: Also thanks for giving me credit. That's not to be taken for granted. When I search the web for the unfortunate typo in my posting "on Android the current forefround application" I find a lot of resources which simply copied my words and often did not give any credit. So I appreciate this very much!
Click to expand...
Click to collapse
Yeah don't you hate that... personally I'm to lazy to copy other people's efforts and rather link to them while doing something new.
No sense in retreading a good tire
zeppelinrox said:
Yeah don't you hate that... personally I'm to lazy to copy other people's efforts and rather link to them while doing something new.
No sense in retreading a good tire
Click to expand...
Click to collapse
Thanks.
I didn't take any offense, if not I would have written it, someone else would have. In the end the knowledge has spread.
@zeppelinrox
I'm so glad about your comments on this thread. Thanks
Awaiting for your new works.. as always..
mrhnet said:
@zeppelinrox
I'm so glad about your comments on this thread. Thanks
Awaiting for your new works.. as always..
Click to expand...
Click to collapse
Soon.
It's done but gotta write up an OP
Edit: Done http://goo.gl/9H58pS
This is a great thread, you've explained everything very well. :good:
In my experience, RAM management works best if I set very low LMK values, like this. Anything higher means processes will get closed sooner.
Multitasking is good with this, not very good, though, because this is a Sony ROM, but still way better than higher values.
But be warned, using these values on stock 4.3 made it unstable for me, but it works on stock 4.1 without any problems.
Also, I've read on some sites that Sony will release Kitkat for the SP in June, and Kitkat has ZRAM enabled and also some other memory management-helping changes are made by Google. So I really hope it will be released for our device.
Edit (05.23): Well, it seems after a few days of testing, that these low values don't do anything good. The phone slows down a lot. So, this post might be considered pointless. Anyway, it was a good experiment.
I found one thing: in /proc/meminfo it shows more than 200 MB at Cached, but the launcher still redraws when i press Home in Chrome, and sometimes when going back from minfree manager (while chrome is running). So why doesn't the system utilize the Cached memory instead? I see that you, mrhnet, have 78 MB cached on one of the screenshots... Is this some sort of ram management bug in the stock 4.1 or what?
Lajbymester said:
I found one thing: in /proc/meminfo it shows more than 200 MB at Cached, but the launcher still redraws when i press Home in Chrome, and sometimes when going back from minfree manager (while chrome is running). So why doesn't the system utilize the Cached memory instead? I see that you, mrhnet, have 78 MB cached on one of the screenshots... Is this some sort of ram management bug in the stock 4.1 or what?
Click to expand...
Click to collapse
200mb cached means it's included in "free RAM". But it changes according to RAM demand/usage by apps. (Give "watch cat /proc/meminfo" command [without quotes] in a terminal to see; "watch" command runs what comes after that every 2 seconds). Maybe, by the time you switch from Chrome to terminal, Cached amount might have changed. (I think Chrome is a memory hog btw; haven't used it much).
If you really want to see what was in meminfo while chrome is on, I suggest to "record" meminfo values to a file real-time. Can do like this:
*Open terminal emulator
*go to /sdcard
Code:
cd sdcard
*append output of meminfo to a file every 2 seconds
Code:
watch cat /proc/meminfo >> memlog.txt
*leave terminal emulator in background and do whatever in chrome. Meminfo values should be recording in the background; terminal is not easily shutdown because it has a notification (apps having a notification saying that it's running has a high priority I think).
*then come back to terminal emulator and do a "ctrl+c" to break the recording (see terminal settings to know what's assigned as ctrl button)
*now you have a memlog.txt file in sdcard with meminfo output every 2 seconds (might look overwhelming ). If 2 seconds is too frequent, can adjust "watch" command accordingly (eg: watch -n 10 cat /proc/meminfo). Just give "watch" command to see it's usage.
You can go through that file leisurely to see how Cached etc have changed with time. Can filter with "grep" to avoid other gibberish.
Eg:
Code:
grep -w Cached: memlog.txt
This command outputs only the "Cached:" line in the file. [Remember: everything is case sensitive in Linux]. You can even write that output to another file for ease (can do for other values also):
Code:
grep -w Cached: memlog.txt >> Cached.txt
grep -w MemFree: memlog.txt >> MemFree.txt
grep -w Buffers: memlog.txt >> Buffers.txt
Then can go through these files leisurely to see min/max values. I think you can do lot of things with "grep". A Linux geek might even arrange these data to make a graph! @zeppelinrox is the man for this I think
Thanks for the very detailed reply
Actually I was doing the "cat /proc/meminfo" command on the computer using adb on the computer, so switching apps wouldn't interfere. ("watch cat /proc/meminfo" doesn't work for some reason, it doesn't output anything but the actual date). And while looking at Chrome with 2 heavy desktop websites, it was showing ~220 MB at Cached. It doesn't ever go below 180 MB...
Ok.
Dunno exactly what's wrong there.. Just remembered a part from kernel sources I've mentioned in OP:
The driver considers memory used for caches to be free, but if a large
* percentage of the cached memory is locked this can be very inaccurate...
Click to expand...
Click to collapse
Maybe part of Cached is "locked"?? Can do a reboot and see whether the situation persists (if not done already).

[Q] Reducing Audio Latency Through Mods

I'm using a USB MIDI keyboard (through a mini USB connector) and trying to use my Galaxy S4 to drive the sound. The reason is that it's a small, portable, solid state computing device (stage vibrations already killed a couple hard drives in the last few months) that I already own. The drawback, of course, is latency. The delay between key press and sound generation makes this unworkable.
Here's a list of what I've done, I'd love to hear any advice for making this possible. I'm hoping to update this into a complete tutorial if it is successful:
1) The best app as far as sounds available (for the music I play, this may vary for you) AND allowing external keyboard control is Music Synthesizer (https://play.google.com/store/apps/details?id=com.levien.synthesizer). It would be ideal if there was an app that allowed VST plugins for custom sounds or had its own internal latency controls, but none seem to exist on Android. Please, please notify me if I'm wrong. That would make this whole setup better.
2) Because stock Android is super bloated, I wiped and flashed TriFroceRom onto my device using TWRP. This was harder for me than I'd like to admit, so allow me to point future people to what worked for me:
First you'll need to get TWRP up and running. Here's the walk through that worked for me: http://wccftech.com/install-twrp-recovery-on-samsung-galaxy-s4-i9505/
This is the best tutorial I've found for installing TriForce: http://wccftech.com/flash-triforcerom-54-samsung-galaxy-s4-sphl720/. MAKE SURE you do not just reboot straight away. Follow that last step about going back to home, reboot menu, into system. And it may ask to fix your root permissions too. I skipped that part and had a dead phone for a while.
Also, if you're on this stage and wondering about the best way to back everything up before you do it, G Cloud (https://play.google.com/store/apps/details?id=com.genie9.gcloudbackup&hl=en) is your answer. It is free, works perfect on upload and download, and lets you look at what is on their server at any time (including browsing photos, not just file names). Text messages and contacts sync too. If you pay a little bit of money for the full version, it will even keep your application data. If you're super cool and want to put in my referral number, it's BG2III (gives me more storage, and those are uppercase letter i not number 1s).
3) I then added Ktweaker so that I could overclock and improve the system performance. I watched this video to figure it out: https://www.youtube.com/watch?v=w5hcuLG-xp0. He has a link to download the files for Ktweaker which is this: http://forum.xda-developers.com/showthread.php?t=2294083 but you ALSO need to know that, with the links provided, you PROBABLY need 4.3 touchwiz version. TriForce Rom is a touchwiz rom for sure, and depending on when in the future you see this, check your device's about page (in the settings on your phone) to make sure which version of android you're running.
ALL OF THIS SAID, I have noticed zero improvement. I've read some documentation on Ktweaker and watched some videos on optimizing it and tried several different settings (overclocking, changing the CPU governor, reducing internal and external read ahead (and increasing, for kicks and giggles, though it seemed counter to my intuition), and ultimately have found not a single detectable millisecond of improvement in the latency.
Does anybody have any ideas? I understand that the Nexus devices are supposed to have lower latency, but a new device is not currently in my budget. It seems to me that MIDI controllers have been possible with very low latency since far before the computing power of even this phone was available, so conceivably there should be a way.
deleted

Microwear H5 MT6737M Android 6

Very scarce info everywhere, but quite a few people already use this $80 super-powerful watch including me (which is basically a micro-smartphone).
Many video reviews already.
I personally think that such powerful watch (much more powerful than my cheap 2016 tablet on previous Mediatek chip with less RAM) is a such small smartphone with illusion like it’s watch made by very modified version of Circle launcher with edited Android 6. I don’t see any limitations on this watch to run full stock Android OS here from the M6737M series smartphones, if ported. Even now all full-featured apps from Google store made for smartphones are perfectly runs here, including very big navigation apps and even the full “battery saver” function present from smartphones (first one which I see on Android watch ever). The only limitation which I noticed is very small display (specific apps cannot fit) and badly edited Android OS (like completely deleted status bar from OS, any 3rd-party status bar apps are installing fine but crashing on settings). Most 3rd-party launchers from Google store and open sources are installing here (only with few exceptions) - the most stable one I’ve found is open source “Essential Launcher” ver. 1.3.
My feeling from “lift wrist turn on” function with “swipe pages” makes almost iPhone X experience here, no any buttons needed, very stable power on only by view and swiping windows (including closing them by swiping to the right) makes very good feedback to the user.
Everything spoiled only by edited OS - awful work with fonts, too many illogical Menu lists, deleted functions like not present “Storage” in OS settings(only shortcut to file explorer) - the USB storage media not adding because of edits on OS level, considering normal micro-USB & even if you turn on “usb media” in developer settings.
Very few watch-faces with no way to install any others, it’s obviously fake feature to make you feel and use them as watch.
So, what I think many would be glad to see here - the root is the most important goal for now(developer menu allows bootloader unlock-not sure if it’s true because USB media settings there not works), maybe putting the normal Android is the next goal.
The root is very needed to firewall for very shady apps here, it’s very powerful device so it have full smartphone spyware, like notorious MTK Logger & Thermal Manager, which can work at sleep mode (it is almost suspicious that they broke USB media function so user can’t bypass network connection for installs). Root needed to work with display resolution and etc.
Edit: the processor by Aida app recognized as MT6737M but on Aliexpress you can find watch easily by search term processor "MTK6737M" (only like 7 sellers total).
I have the H5 as well, and you're correct! The main draw back is the stripped down OS, for example the call forwarding features are missing..
Ordered one of these a few weeks ago, should be getting delivery soon. Interesting to see how it performs, my last android watches have been mt6572 & mt6580, both of these I ported full Android versions to, I may give it a go at porting a full Android version to this in the future
Check this also:
https://forum.xda-developers.com/sm...dorid-6-0-finow-q1-pro-smartwatch-4g-t3745271
Well I got mine today, seems good so far. As for alternative launchers tried a few that work OK, if you want to change the clockskins for now I have found that Universal Launcher New Gen works just fine (you add clockskin folder +clockskins)
https://play.google.com/store/apps/details?id=com.ricktop.ClockSkinCoco
I use mine at least 2 weeks maybe. Without root (which I plan to do but don't have time right now) I do not connect them to any Internet, so I'm using them as just watch (it's my first smartwatch). Files I'm sending through bluetooth from my Android phone, quite neat that you can install apps from bluetooth menu right away.
About battery - very good, if you don't connect them to networks at all, with battery Saver on & "wrist move activation" off they can work whole week on 1 charge (this includes some extensive using in 2 days on winter street with GPS apps, camera-video, constant time checking and etc.). They CAN HOLD MORE days, after the full charge, watch calculated the battery to the 15 days of work - which is believable, as I see now if you will check only time manually they can easily save 1 charge to 12-13 days. I use charger with them only once at week, it's quite shocking to read Apple Watch forums where people making that every 2-3 days.
They're quite powerful - making the zip archive internally from 250Mb photos/videos takes something like 2 minutes.
Because the step-counter here work always (even if you take them to the other room) - this device is just made for the SmartNavi (open source navigation app which use mainly step-counter with rare or no GPS connection for battery saving).
Can't wait for a custom recovery to be made for it, so I can root it. Tried all the rooting apps out on the web and none work so far.
Well I have managed to get Root access, using Magisk, and flashing patched boot image, struggling to create a TWRP recovery. Hoping someone out there can come up with a custom recovery.
Managed to port TWRP to it, but it is in miniature! going to have a play around with it to see if I can make it usable. Anyone with suggestions be grateful - well gave up on trying to amend TWRP resolution, and installed flashify - just flashed an AOSP ROM to the H5, happy days!
Well done stevea76
A step by step or point in the right directions kinda 'guide' would be really appreciated, cos the H5 with its stock funos is far from fun... sure its usable but no fun.
Wizard2004 said:
Well done stevea76
A step by step or point in the right directions kinda 'guide' would be really appreciated, cos the H5 with its stock funos is far from fun... sure its usable but no fun.
Click to expand...
Click to collapse
I will put something together at the weekend, by then I should have something usable, don't want people breaking their new toys!
stevea76 said:
I will put something together at the weekend, by then I should have something usable, don't want people breaking their new toys!
Click to expand...
Click to collapse
It would be interesting to find if there's any "recovery mode" on stock ROM image at all, considering that there's only 1 button. On similar watches from Samsung and etc they have quite awkward way to enter recovery - like some swipe to the left in time of logo showing and etc. I tried to repeat any swiping during boot - nothing...
Also, by the usual use of watch (almost a month now) I can say that in my case of use the battery holding 1 full charge for 7 days, so a week, the same amount calculated by OS also. That's the battery regime or mode which is now constant in my case (it can be different in situation of other people).
The battery here can be saved even more for a week - I managed to notice that "sleep stat" function are working here at all times and cannot be turned off like step counter in this Android OS, at the night time it randomly turning on the pulse checker light even if you not wearing them, which using the battery (not a big deal, but using some).
Wizard2004 said:
Well done stevea76
A step by step or point in the right directions kinda 'guide' would be really appreciated, cos the H5 with its stock funos is far from fun... sure its usable but no fun.
Click to expand...
Click to collapse
Here is the link to the AOSP ROM I ported to the H5.
I must express it is a long winded way to flash it as I am not technically minded, just playing at it, and only do this if you have the stock ROM downloaded as a backup to revert back to and don't mind the possibility of wrecking your toy!, the only reason for me doing it this way is that the recovery TWRP I ported is functional, but not set for the screen size for the H5 so unless you have bionic eyes it is nearly impossible to use, hence the reason for my 'workaround' (note: If anyone can make the TWRP scaled for the watch, just flash the ROM in the usual way)
Here is a 'sort of' guide and link to files.
https://www.androidfilehost.com/?w=files&flid=252561
1. Flash
Microwear_Magisk_Patched_Boot_IMG using splash tool, reboot device.
2. Install Magisk Manager from here: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445/page4
Open Magisk manager and go to settings, set default action to 'Grant'
You now have root.
3. Flash
Microwear_H5_Recovery_TWRP using spflashtool.
4. Install
Flashify (for root users) from the Playstore.
5. Download directly to the watch (or to Computer and transfer to the watch) Microwear_H5_AOSP ROM AND the GAPPS of your choice (Open Gapps arm64 nano was my choice)
6. Use Flashify to install zip(s) making sure you click TWRP as recovery option and also tick the wipe cache, data etc (add the Gapps as well if you want Google)
Click Reboot on flashify.
Hopefully the watch boots to recovery and installs the ROM and gapps!
First boot sticks on boot animation, so if not starting after 3 or 4 minutes power off the watch and reboot, after another 5 to 10 minutes you should see 'android is starting'
Nav Bar is by default on permanently, to make this and notification bar 'hide' (fully Immersive) I used this method.
1. install on pc ADB (Guide below)
2. Enable developer options and USB debugging on watch.
3. connect watch (switched on)
4. Open ADB on pc.
5. Type: adb devices (click enter)
(should see you device is connected)
6. Then type: adb shell - (click enter)
7. Then type this line:
settings put global policy_control immersive.full=*
Now the navigation bar will pop up when you pull down or up slightly on the screen and will auto hide after a couple of seconds.
As for sensors I don't think any are working.
I have included 3 launchers on this ROM, so make your choice!
Please, please, please DO NOT ATTEMPT THIS if you don't know how to revert back to stock rom. I bear no responsibility for broken toys!
Guys, who already have a scatter file for this watch, i really want to make a backup of current ROM before checking for any new updates (which is quite good version from January and there's nowhere on Internet any firmware files for this watch, so saving and sharing ROM is important). If i manage to download ROM i will post it on Google drive.
I wanted to force watch go into it's own recovery but my ADB installation don't see this watch connected - there's a primitive subsystem on watch beside Android OS, it can be seen when you turn Android OS "power off" and connect USB for charging - it will show the battery, i'm puzzled how to enter into any settings of that subsystem.
The stock firmware is on the Microwear Website.
http://m.microweartech.com/en/MicrowearFirmware.html
stevea76 said:
The stock firmware is on the Microwear Website.
http://m.microweartech.com/en/MicrowearFirmware.html
Click to expand...
Click to collapse
Yeah, i noticed only now, strangely but i remember that a month ago there was nothing about H5 model on their site when i searched…maybe because they just released it.
Also the firmware have the same scatter file - the first one which i found myself for some cheap smartphone on 6737 chip, as i remember i found it on reddit.
As i seen no updates of firmware for now.
crustier said:
Yeah, i noticed only now, strangely but i remember that a month ago there was nothing about H5 model on their site when i searched…maybe because they just released it.
Also the firmware have the same scatter file - the first one which i found myself for some cheap smartphone on 6737 chip, as i remember i found it on reddit.
As i seen no updates of firmware for now.
Click to expand...
Click to collapse
No updates as yet. I have ported an AOSP version, pretty much stock Android to the H5, it is basic, but I like the 'stock experience' on a square watch. Not got the sensors set up, but not really bothered about how many steps I have done on any given day or my heart rate for that matter.
Also if you want fancy clockskins then Eric's launcher works just fine on it.
stevea76 said:
No updates as yet. I have ported an AOSP version, pretty much stock Android to the H5, it is basic, but I like the 'stock experience' on a square watch. Not got the sensors set up, but not really bothered about how many steps I have done on any given day or my heart rate for that matter.
Also if you want fancy clockskins then Eric's launcher works just fine on it.
Click to expand...
Click to collapse
As i understand correctly - here they simulated or just copied clock skins from Apple watch?
Where to find Eric launcher?
For everyone else i will write again link to the firmware from Microwear site here – https://drive.google.com/drive/folders/1WaktAl-cjCTE1l0jffA7BnevzESdlCwc?usp=sharing
because chinese support is very short in time and can vanish with website very easily (for example to find an older firmwares to my Onyx Boox ereader i used "webarchive" service, thanks gods we have it - only from this saved archived copies of pages i found the sharing links to the older firmwares, still i cannot find the first version of RemixOS release for KitKat-if anyone have the alpha - please message me)
Eric's launcher is here:
https://play.google.com/store/apps/details?id=com.ricktop.ClockSkinCoco
All about the clockskins mainly for round Full Android watches here:
https://plus.google.com/communities/109827242607524552712
For square Full Android Watches here:
https://plus.google.com/communities/118413074291213420811
A useful forum for Full Android watches (round) with guides how to install custom watch faces:
http://roundandroidwatches.proboards.com

Categories

Resources