View Single Post
Old 07-26-2023, 08:59 PM   #56
elinkser
Addict
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 242
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
XIII. EXTRA

XIII. EXTRA


* Security Note:
The Kobo is not intended for secure browsing uses such as banking and email.
If the outdated kernel, lack of fine-grained privilege separation, and insecure Telnet protocol were not enough, Opera Mini features:
1) A closed-source app, albeit downloaded from "trusted" official sources.
2) The introduction of a middleman in the form of Opera servers, although Opera states they are subject to Norwegian privacy laws.
This may be mitigated by the fact that you are running a dumbphone java app in an emulator, running in a virtual machine, running in a chroot, which won't have access to the filesystem unless you specifically enable it as shown later in this post to enable saved web pages for offline.


***


Save expensive data charges with Opera Mini on your Kobo:

On your Kobo:

# apk add openjdk7-jre
(about 50 MB)

Go to:
(Use your desktop or luakit browser because need javascript)
Installing Opera Mini on Your Computer
https://dev.opera.com/articles/insta...your-computer/
OR
# wget https://storage.googleapis.com/googl...ator-2.0.4.zip

Go to the Opera Mini download page, select “Opera Mini 8” and click on “View download link”. Then choose opera-mini-latest-advanced-en.jar to start the download.
https://www.opera.com/download/mobile-versions

NOW QUIT LUAKIT OR YOU WILL RUN OUT OF MEMORY/CPU!

# unzip microemulator-2.0.4.zip

# cd microemulator-2.0.4/

# java -jar microemulator.jar
Options->Select Device
Resizeable device
Options->Scaled display
x3
(This opens a second bigger window.)
* The key is to resize the first window(right click on top bar) to slightly less than 1/3 width and 1/3 height of available display dimensions (i.e. not including the top taskbar and one row of the svkbd keyboard which we will slide partly off the bottom to only expose the number keys.) Also have a magnifying glass handy, just for initial setup.

Running Opera Mini inside MicroEmulator

Now we will run Opera Mini inside MicroEmulator. Open MicroEmulator and go to File > Open MIDlet File…, then navigate to the location where you’ve saved the downloaded opera-mini-…-advanced-en.jar file and open it.

Then, click Start. Opera Mini will be installed and, after a minute, will do font data calculation for a few minutes.
Subsequently, its EULA is shown. Once you accept it (use the first window to click accept), the Opera Mini start screen is shown and you can start browsing!

If you are unable to move the second screen due to it being partly off screen, use the settings once you have Opera running or the "*#" command on the first window to set landscape mode temporarily so you can move it.
Then, Options->Scaled display
x3
Fonts don't work in landscape so unset it after moving.
* OK I lied. Just tap the screen and presto - fonts.

8 and 2 for forward and back. 4 and 6 for left and right.
Hit the # key for some shortcuts.
One-finger scrolling to avoid constantly minimizing /unminimizing the keyboard.
But mostly I leave the svkbd keyboard with only the top number row showing.

You may have to use the first window for accept buttons during initial setup.



***


You can avoid the extra step of selecting the Opera app from the File menu if we invoke it as:
# java -jar /home/myuser/microemulator-2.0.4/microemulator.jar opera-mini-8.0.35626-advanced-en.jar


But by adding an entry to our launcher bar and window manager menu, we can run it as unprivileged normal user, which is more secure than when we run it from the root terminal:

# cp /usr/share/applications/luakit.desktop /usr/share/applications/opera.desktop

EDIT /usr/share/applications/opera.desktop:
Code:
[Desktop Entry]                                                                                     
Name=OperaMini                                                                                      
Comment=Microemulator run Opera Mini                                                                
Exec=java -jar /home/myuser/microemulator-2.0.4/microemulator.jar opera-mini-8.0.35626-advanced-en.jar
Icon=xfce-wm-stick                                                                        
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
EDIT /home/root/.config/tint2/tint2rc:
Code:
launcher_item_app = netsurf.desktop                      
launcher_item_app = luakit.desktop                       
launcher_item_app = opera.desktop                   
#launcher_item_app = vncviewer.desktop
EDIT the "Internet" section of/home/root/.config/openbox/menu.xml
Code:
  <item label="Opera">                                                 
    <action name="Execute">                                            
      <command>java -jar /home/myuser/microemulator-2.0.4/microemulator.jar opera-mini-8.0.35626-advanced-en.jar</command>
      <startupnotify>                                                              
        <enabled>yes</enabled>                                                     
        <wmclass>Opera</wmclass>                                                   
      </startupnotify>                                                             
    </action>                                                                      
  </item>

Propagate your changes to the /home/myuser/ account:

# cp -r /home/root/.config/ /home/myuser

# chown -R myuser:myuser /home/myuser/.config



***


* UPDATE - SAVE BATTERY LIFE BY ADDING ABILITY TO SAVE WEB PAGES FOR OFFLINE READING *
(Enables an Opera menu bar icon to save web pages for offline reading.)

EDIT /usr/share/applications/opera.desktop:
Code:
[Desktop Entry]                                                                                     
Name=OperaMini                                                                                      
Comment=Microemulator run Opera Mini                                                                
Exec=java -cp /home/myuser/microemulator-2.0.4/microemulator.jar:/home/myuser/microemulator-2.0.4/lib/microemu-jsr-75.jar org.microemu.app.Main --impl "org.microemu.cldc.file.FileSystem" opera-mini-8.0.35626-advanced-en.jar
...
EDIT the "Internet" section of/home/root/.config/openbox/menu.xml
Code:
  <item label="Opera">                                                 
    <action name="Execute">                                            
      <command>java -cp /home/myuser/microemulator-2.0.4/microemulator.jar:/home/myuser/microemulator-2.0.4/lib/microemu-jsr-75.jar org.microemu.app.Main --impl "org.microemu.cldc.file.FileSystem" opera-mini-8.0.35626-advanced-en.jar</command>
...

Propagate your changes to the /home/myuser/ account:

# cp -r /home/root/.config/openbox/menu.xml /home/myuser/.config/openbox/

# chown -R myuser:myuser /home/myuser/.config



***
Attached Files
File Type: jar opera-mini-8.0.35626-advanced-en.jar (310.2 KB, 258 views)
File Type: zip microemulator-2.0.4.zip (1.57 MB, 314 views)

Last edited by elinkser; 08-03-2023 at 09:58 PM. Reason: added save web page for offline, security note
elinkser is offline   Reply With Quote